cvs: phpweb /manual add-note.php
| From: | Nuno Lopes | Date: | Mon, 16 Jan 2006 17:38:30 +0000 |
| Subject: | cvs: phpweb /manual add-note.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30378@lists.php.net to get a copy of this message | ||
nlopess Mon Jan 16 17:38:30 2006 UTC
Modified files:
/phpweb/manual add-note.php
Log:
send remote ip sender along with the note submission
http://cvs.php.net/viewcvs.cgi/phpweb/manual/add-note.php?r1=1.63&r2=1.64&diff_format=u
Index: phpweb/manual/add-note.php
diff -u phpweb/manual/add-note.php:1.63 phpweb/manual/add-note.php:1.64
--- phpweb/manual/add-note.php:1.63 Mon Nov 28 17:36:55 2005
+++ phpweb/manual/add-note.php Mon Jan 16 17:38:30 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: add-note.php,v 1.63 2005/11/28 17:36:55 goba Exp $
+// $Id: add-note.php,v 1.64 2006/01/16 17:38:30 nlopess Exp $
$_SERVER['BASE_PAGE'] = 'manual/add-note.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost.inc';
@@ -80,14 +80,20 @@
// No error was found, and the submit action is required
if (!$error && strtolower($_POST['action']) != "preview") {
+ $redirip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ?
+ $_SERVER['HTTP_X_FORWARDED_FOR'] :
+ (isset($_SERVER['HTTP_VIA']) ? $_SERVER['HTTP_VIA'] :
'');
+
// Post the variables to the central user note script
// ($MQ is defined in prepend.inc)
$result = posttohost(
"http://master.php.net/entry/user-note.php",
array(
- "user" => ($MQ ? stripslashes($user) : $user),
- "note" => ($MQ ? stripslashes($note) : $note),
- "sect" => ($MQ ? stripslashes($_POST['sect']) :
$_POST['sect'])
+ 'user' => ($MQ ? stripslashes($user) : $user),
+ 'note' => ($MQ ? stripslashes($note) : $note),
+ 'sect' => ($MQ ? stripslashes($_POST['sect']) :
$_POST['sect']),
+ 'ip' => $_SERVER['REMOTE_ADDR'],
+ 'redirip' => htmlspecialchars($redirip)
)
);