ok heres the full story
this is the website with in it self original as php (use username: guest password:guest)
http://m-sn.myftp.org
here it is as html
http://84.9.109.183/indexhtml.html
i created a .htaccess so i woudnt have any problem with the embeddation (is that a word)
Code:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
and here are the parts that involve cookies in php code
Code:
}
function infobox()
{
global $PHP_SELF, $u_cookieid, $u_id, $app_ver, $setctl, $u_id, $app_build, $homepage;
$homepage = str_replace('KBUILD', $app_build, str_replace('KVER', $app_ver, $setctl->get('homepage')));
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" align="left">
<?php if ($setctl->get('showkeyteq'))
{
?><span class="notice"><?php echo '<a href="http://keyteq.no" target="_blank">'.substr(get_lang(77),0,3).'</a>'.substr(get_lang(77),3); ?></span><?php
}
if ($setctl->get('showupgrade'))
{
?><a title="<?php echo get_lang(120); ?>" href="http://m-sn.com/?ver=<?php echo $app_ver; ?>&build=<?php echo $app_build; ?>" target="_blank">
<font color="#CCCCCC"><?php echo get_lang(78); ?></font></a><br/><?php
} else if ($setctl->get('showkeyteq')) echo '<br/>'; ?> Code:
function webauthenticate()
{
global $_POST, $u_cookieid, $phpenv, $setctl, $cfg, $u_id;
if (!$cfg['disablelogin'])
{
if (isset($_POST['user']) && isset($_POST['password']))
{
$user = mysql_escape_string($_POST['user']);
$pass = mysql_escape_string($_POST['password']);
if (!empty($user) && !empty($pass))
{
if (db_verify_user($user, $pass) == 1)
{
if ($cfg['demomode'])
{
$result = db_execquery('SELECT u_sessionkey FROM '.TBL_USERS.' WHERE u_pass = "'.md5($pass).'" AND u_login = "'.$user.'"');
$row = mysql_fetch_array($result);
$num = $row['u_sessionkey'];
} else
{
$u_cookieid = $num = getrand(1);
db_execquery('UPDATE '.TBL_USERS.' SET u_status = 1, u_ip = "'.$phpenv['remote'].'", u_sessionkey = "'.$num.'", laston = u_time, u_time = '.time().' WHERE u_id = '.$u_id);
}
if ($setctl->get('timeout') > 0 && isset($_POST['rememberme'])) $expiration = time() + $setctl->get('timeout'); else $expiration = 0;
setcookie($cfg['cookie'],'');
setcookie($cfg['cookie'], $num, $expiration);
return true;
}
}
}
} else return true;
}
dont know if this one has go anyting to do with it
Code:
function httpstreamheader2($ftype=1, $sid, $keyint=0)
{
global $phpenv, $streamtypes, $setctl, $u_cookieid, $cfg;
$url = '';
if (isset($streamtypes[$ftype]) && $streamtypes[$ftype][2] == 1)
{
$url = $setctl->get('streamurl').$phpenv['streamlocation'].'?streamsid='.$sid.'&c='.$u_cookieid;
if (URLSECURITY) $url .= '&'.urlsecurity($keyint, $sid);
if ($setctl->get('sendfileextension')) $url .= '&file=.'.$streamtypes[$ftype][0];
}
return $url;
}
class asxgen
and here is the full code as i embeded it in html
http://sendmefile.com/00279164
thanks