Update of /cvsroot/phpslash/phpslash-ft/class
In directory sc8-pr-cvs1:/tmp/cvs-serv3895/phpslash-ft/class
Modified Files:
Comment.class
Log Message:
display partial IP of comment author
Index: Comment.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Comment.class,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** Comment.class 11 Dec 2002 19:39:54 -0000 1.38
--- Comment.class 20 Dec 2002 16:29:58 -0000 1.39
***************
*** 271,274 ****
--- 271,284 ----
}
+ $ip_ary = explode(".", $ary['ip']);
+ if( !$this->perm->have_perm("commentAdmin") ) {
+ if( is_numeric($ip_ary[sizeof($ip_ary)-1]) ) {
+ $ip_ary[sizeof($ip_ary)-1] = "--";
+ } else {
+ $ip_ary[0] = "--";
+ }
+ }
+ $ary['ip'] = implode(".", $ip_ary);
+
$this->ctempl->set_var(array(
'COMMENT_ID' => $ary['comment_id'],
***************
*** 282,285 ****
--- 292,296 ----
'MODE' => $this->mode,
'ORDER' => $this->order,
+ 'IP' => $ary['ip'],
'TIME' => psl_dateTimeLong($ary['date_created'])
));
***************
*** 319,323 ****
<input type=submit name=action value=\"".pslgetText("Bulk Delete")."\">
<input type=submit name=action value=\"".pslgetText("Show Pending")."\">
! <input type=hidden name=story_id value=".$cmtary['story_id']."></form>";
} else {
$admin = "";
--- 330,334 ----
<input type=submit name=action value=\"".pslgetText("Bulk Delete")."\">
<input type=submit name=action value=\"".pslgetText("Show Pending")."\">
! <input type=hidden name=story_id value=".$cmtary['story_id'].">";
} else {
$admin = "";
***************
*** 675,678 ****
--- 686,690 ----
$fdate = date("Y-m-d H:i:s",time());
$timestamp = time();
+ $ip = gethostbyaddr($ary['ip']);
$q = "INSERT INTO psl_comment
(comment_id,
***************
*** 693,697 ****
'$ary[name]',
'$ary[email]',
! '$ary[ip]',
'$ary[subject]',
'$ary[comment_text]')";
--- 705,709 ----
'$ary[name]',
'$ary[email]',
! '$ip',
'$ary[subject]',
'$ary[comment_text]')";
|