how can i hide my site sessi0ns if this is my core??
PHP Code:
<?php
/*
(dont removed this copyrights)
*/
include("iconfig.php");
//include("gmprc.php");
//session_start();
ini_set("display_errors", "0");
if(!get_magic_quotes_gpc())
{
$_GET = array_map('trim', $_GET);
$_POST = array_map('trim', $_POST);
$_COOKIE = array_map('trim', $_COOKIE);
$_GET = array_map('addslashes', $_GET);
$_POST = array_map('addslashes', $_POST);
$_COOKIE = array_map('addslashes', $_COOKIE);
$_GET = array_map('addslashes', $_GET);
$_POST = array_map('addslashes', $_POST);
$_COOKIE = array_map('addslashes', $_COOKIE);
}
function cleanInput($text) {
$search = array(
'@<script[^>]*?>.*?</script>@si', // Strip out javascript
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments
);
$output = preg_replace($search, '', $text);
return $output;
}
function sanitize($text) {
if (is_array($text)) {
foreach($text as $var=>$val) {
$output[$var] = sanitize($val);
}
}
else {
if (get_magic_quotes_gpc()) {
$text = stripslashes($text);
}
$text = cleanInput($text);
$output = mysql_real_escape_string($text);
}
return $output;
}
function connectdb()
{
global $dbname, $dbuser, $dbhost, $dbpass;
$conms = @mysql_connect($dbhost,$dbuser,$dbpass); //connect mysql
if(!$conms) return false;
$condb = @mysql_select_db($dbname);
if(!$condb) return false;
return true;
}
function safe($text)
{
$safe = stripslashes($text);
if(function_exists("mysql_real_escape_string"))
{
$safe = mysql_real_escape_string($safe);
}else if(function_exists("mysql_escape_string"))
{
$safe = mysql_escape_string($safe);
}
return $safe;
}
//protect against sql injections and remove $ sign
if( !get_magic_quotes_gpc() )
{
if( is_array($_GET) )
{
while( list($k, $v) = each($_GET) )
{
if( is_array($_GET[$k]) )
{
while( list($k2, $v2) = each($_GET[$k]) )
{
$_GET[$k][$k2] = addslashes($v2);
}
@reset($_GET[$k]);
}
else
{
$_GET[$k] = addslashes($v);
}
}
@reset($_GET);
}
if( is_array($_POST) )
{
while( list($k, $v) = each($_POST) )
{
if( is_array($_POST[$k]) )
{
while( list($k2, $v2) = each($_POST[$k]) )
{
$_POST[$k][$k2] = addslashes($v2);
}
@reset($_POST[$k]);
}
else
{
$_POST[$k] = addslashes($v);
}
}
@reset($_POST);
}
}
/////register form
function findcard($tcode)
{
$st =strpos($tcode,"[card=");
if ($st === false)
{
return $tcode;
}else
{
$ed =strpos($tcode,"[/card]");
if($ed=== false)
{
return $tcode;
}
}
$texth = substr($tcode,0,$st);
$textf = substr($tcode,$ed+7);
$msg = substr($tcode,$st+10,$ed-$st-10);
$cid = substr($tcode,$st+6,3);
$words = explode(' ',$msg);
$msg = implode('+',$words);
return "$texth<br/><img src=\"pmcard.php?cid=$cid&msg=$msg\" alt=\"$cid\"/><br/>$textf";
}
function saveuinfo($sid)
{
$headers = apache_request_headers();
$alli = "";
foreach ($headers as $header => $value)
{
$alli .= "$header: $value <br />\n";
}
$alli .= "IP: ".$_SERVER['REMOTE_ADDR']."<br/>";
$alli .= "REFERRER: ".$_SERVER['HTTP_REFERER']."<br/>";
$alli .= "REMOTE HOST: ".getenv('REMOTE_HOST')."<br/>";
$alli .= "PROX: ".$_SERVER['HTTP_X_FORWARDED_FOR']."<br/>";
$alli .= "HOST: ".getenv('HTTP_X_FORWARDED_HOST')."<br/>";
$alli .= "SERV: ".getenv('HTTP_X_FORWARDED_SERVER')."<br/>";
if(trim($sid)!="")
{
$uid = getuid_sid($sid);
$fname = "tmp/".getnick_uid($uid).".rwi";
$out = fopen($fname,"w");
fwrite($out,$alli);
fclose($out);
}
//return 0;
}
function registerform($ef)
{
$ref = safe(cleanInput($_GET["r"]));
$ref2 = safe(cleanInput($_POST["r2"]));
$ue = $errl = $pe = $ce = "";
switch($ef)
{
case 1:
$errl = "! Please Type Your Screename";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 2:
$errl = "! Please Type Your Password";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 3:
$errl = "! Please Type Your Password Again";
$ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 4:
$errl = "! Screename Is Invalid";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 5:
$errl = "! Password Is Invalid";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 6:
$errl = "! Passwords Doesn't Match";
$ce = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 7:
$errl = "! Screename Must Be 4 Characters Or More";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 8:
$errl = "! Password Must Be 4 Characters Or More";
$pe = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 9:
$errl = "! Screename Already Registered, Choose A Different One";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 10:
$errl = "! Unknown Mysql Error, Please Try To Register Later";
break;
case 11:
$errl = "! Screename Must Start With Letter From A-Z";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 12:
$errl = "Screename Is Reserved For Admin/Owner Of This Site";
$ue = "<img src=\"../images/point.gif\" alt=\"!\"/>";
break;
case 13:
$errl = "! Please Choose An Appropriate Nickname";
$ue = "";
break;
case 14:
$errl = "! You Must Enter An Email Address";
$ue = "";
break;
case 15:
$errl = "! Email Address Already In Use";
$ue = "";
break;
case 16:
$errl = "! Email Address Is Invalid";
$ue = "";
break;
}
$rform = "<br/>";
$rform .= "<form action=\"register.php\" method=\"post\">";
$rform .= "<b>Username:</b><br/><input name=\"uid\" format=\"*x\" maxlength=\"15\"/><br/>";
$rform .= "$pe <b>Password:</b><br/><input type=\"password\" name=\"pwd\" format=\"*x\" maxlength=\"30\"/><br/>";
$rform .= "$ce <b>Re-type Password:</b><br/><input type=\"password\" name=\"cpw\" format=\"*x\" maxlength=\"30\"/><br/>";
$rform .= "<b>Date Of Birth:</b><br/>";
$rform .= "<select name=\"day\" value=\"01\">";
$rform .= "<option value=\"01\">1</option>";
$rform .= "<option value=\"02\">2</option>";
$rform .= "<option value=\"03\">3</option>";
$rform .= "<option value=\"04\">4</option>";
$rform .= "<option value=\"05\">5</option>";
$rform .= "<option value=\"06\">6</option>";
$rform .= "<option value=\"07\">7</option>";
$rform .= "<option value=\"08\">8</option>";
$rform .= "<option value=\"09\">9</option>";
$rform .= "<option value=\"10\">10</option>";
$rform .= "<option value=\"11\">11</option>";
$rform .= "<option value=\"12\">12</option>";
$rform .= "<option value=\"13\">13</option>";
$rform .= "<option value=\"14\">14</option>";
$rform .= "<option value=\"15\">15</option>";
$rform .= "<option value=\"16\">16</option>";
$rform .= "<option value=\"17\">17</option>";
$rform .= "<option value=\"18\">18</option>";
$rform .= "<option value=\"19\">19</option>";
$rform .= "<option value=\"20\">20</option>";
$rform .= "<option value=\"21\">21</option>";
$rform .= "<option value=\"22\">22</option>";
$rform .= "<option value=\"23\">23</option>";
$rform .= "<option value=\"24\">24</option>";
$rform .= "<option value=\"25\">25</option>";
$rform .= "<option value=\"26\">26</option>";
$rform .= "<option value=\"27\">27</option>";;
$rform .=
Comment