1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Get rid of unneeded file

This commit is contained in:
e107steved 2008-01-13 17:04:48 +00:00
parent 9bab8c6db9
commit cf9456a36c
2 changed files with 9 additions and 43 deletions

View File

@ -1,39 +0,0 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| ©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]);
}
?>

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/userposts.php,v $
| $Revision: 1.5 $
| $Date: 2007-10-28 15:01:49 $
| $Revision: 1.6 $
| $Date: 2008-01-13 17:04:47 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -87,8 +87,13 @@ if ($action == "comments")
}
else
{
require_once(e_HANDLER."encrypt_handler.php");
$dip = decode_ip($id);
$dip = $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;
$data = $cobj->getCommentData($amount='10', $from, "comment_ip = '".$id."'");
}