Файл: old_order.php
Строк: 105
<?
include("header.php");
require("inc/connect.inc.php");
if (isset($_COOKIE['id']) and isset($_COOKIE['hash']))
{
$query = mysql_query("SELECT *,INET_NTOA(login_ip) as login_ip FROM ".$db_pref."users WHERE id = '".intval($_COOKIE['id'])."' LIMIT 1");
$userdata = mysql_fetch_assoc($query);
if(($userdata['hash'] !== $_COOKIE['hash']) or ($userdata['id'] !== $_COOKIE['id'])
or (($userdata['login_ip'] !== $_SERVER['REMOTE_ADDR']) and ($userdata['login_ip'] !== "0.0.0.0")))
{
echo "<div align='center'><font color='red'><br><b>".$lang['error16']."</b></font><br><br></div>";
}
else
{
include("inc/usermenu.inc.php");
$to=intval($_GET["to"]);
$url='Подтв.. заказы {to} уровня';
$url=str_replace("{to}",$to,$url);
$urlpage=$url;
?>
<br><div align="center">
<table class="form" width="95%" border="0" align=center cellpadding="3" cellspacing="3">
<?
if(!isset($to)):
$to="1";
elseif(($to==0) || ($to>10)):
$to="1";
endif;
$lang['old_order']=str_replace("{to}",$to,$lang['old_order']);
$lang['old_order1']=str_replace("{to}",$to,$lang['old_order1']);
$sql=mysql_query("select*from ".$db_pref."oldorders where sname='$user' and rang='$to'");
$num=mysql_num_rows($sql);
if(($num==0)|| ($to>$mat)):
?>
<tr>
<td align="center"class="form_title" ><i><h3><?=$lang['error6'];?></h3></i></td>
</tr>
<tr>
<TD align="center"><font color="red"><?=$lang['old_order'];?></font></TD>
</tr>
<?
echo "<script language='Javascript'>function reload() {location = "account.php"}; setTimeout('reload()', 3000);</script>";
else:
?>
<tr>
<TD colspan="<?if($sistem==webmoney){
echo'5';
}
else{
echo'4';
}?>" align="center" ><i><h2><?=$lang['old_order1'];?></h2><br></i></TD>
</tr>
<tr class="form_title">
<td align="center"><?=$lang['old_order2'];?></td>
<?if($sistem==webmoney){?>
<td align="center"><?=$lang['old_order3'];?></td>
<?}?>
<td align="center"><?=$lang['old_order4'];?></td>
<td align="center"><?=$lang['old_order5'];?></td>
<td align="center"><?=$lang['old_order6'];?></td>
</tr>
<?
while($row=mysql_fetch_array($sql)) {
$id=$row['id'];
$name=$row['name'];
$protect=$row['protect'];
$rang=$row['rang'];
$new_date=$row['new_date'];
$old_date=$row['old_date'];
?>
<tr onMouseOver="this.style.background='#000000';" onMouseOut="this.style.background='';">
<td align="center"><?=$name;?></td>
<?if($sistem==webmoney){?>
<td align="center"><?=$protect;?></td>
<?}?>
<td align="center"><?=$rang;?></td>
<td align="center"><?=$new_date;?></td>
<td align="center"><?=$old_date;?></td>
</tr>
<?
}
endif;
?>
</TABLE></div>
<?
}
}
else
{
echo "<div align='center'><font color='red'><br><b>".$lang['error']."</b></font><br><br></div>";
}
include("footer.php");
?>