mirror of
https://github.com/e107inc/e107.git
synced 2025-07-06 15:53:55 +02:00
Get rid of unneeded file
This commit is contained in:
@ -1,39 +0,0 @@
|
|||||||
<?php
|
|
||||||
/*
|
|
||||||
+ ----------------------------------------------------------------------------+
|
|
||||||
| e107 website system
|
|
||||||
|
|
|
||||||
| <20>Steve Dunstan 2001-2002
|
|
||||||
| http://e107.org
|
|
||||||
| jalist@e107.org
|
|
||||||
|
|
|
||||||
| Released under the terms and conditions of the
|
|
||||||
| GNU General Public License (http://gnu.org).
|
|
||||||
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/encrypt_handler.php,v $
|
|
||||||
| $Revision: 1.2 $
|
|
||||||
| $Date: 2007-09-29 17:48:27 $
|
|
||||||
| $Author: e107steved $
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
|
||||||
|
|
||||||
function encode_ip($ip)
|
|
||||||
{
|
|
||||||
if (strpos($ip,':') !== FALSE) return $ip; // IPV6 addresses - return unaltered
|
|
||||||
$ipa = explode('.', $ip);
|
|
||||||
return sprintf('%02x%02x%02x%02x', $ipa[0], $ipa[1], $ipa[2], $ipa[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function decode_ip($encodedIP)
|
|
||||||
{
|
|
||||||
if (strpos($encodedIP,':') !== FALSE) return $encodedIP; // IPV6 addresses - return unaltered
|
|
||||||
$hexip = explode('.', chunk_split($encodedIP, 2, '.'));
|
|
||||||
return hexdec($hexip[0]). '.' . hexdec($hexip[1]) . '.' . hexdec($hexip[2]) . '.' . hexdec($hexip[3]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/userposts.php,v $
|
| $Source: /cvs_backup/e107_0.8/userposts.php,v $
|
||||||
| $Revision: 1.5 $
|
| $Revision: 1.6 $
|
||||||
| $Date: 2007-10-28 15:01:49 $
|
| $Date: 2008-01-13 17:04:47 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@ -87,8 +87,13 @@ if ($action == "comments")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
require_once(e_HANDLER."encrypt_handler.php");
|
$dip = $id;
|
||||||
$dip = decode_ip($id);
|
if (strlen($dip) == 8)
|
||||||
|
{ // Legacy decode (IPV4 address as it used to be stored - hex string)
|
||||||
|
$hexip = explode('.', chunk_split($dip, 2, '.'));
|
||||||
|
$dip = hexdec($hexip[0]). '.' . hexdec($hexip[1]) . '.' . hexdec($hexip[2]) . '.' . hexdec($hexip[3]);
|
||||||
|
|
||||||
|
}
|
||||||
$ccaption = UP_LAN_1.$dip;
|
$ccaption = UP_LAN_1.$dip;
|
||||||
$data = $cobj->getCommentData($amount='10', $from, "comment_ip = '".$id."'");
|
$data = $cobj->getCommentData($amount='10', $from, "comment_ip = '".$id."'");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user