Вход Регистрация
Файл: stats.php
Строк: 237
<?
include("header.php");

$new_orders=$_GET['new_orders'];
$page=$_GET['page'];
$gb5=$lang['gb5'];
$gb16=$lang['gb16'];
$sqldel=mysql_query("select*from ".$db_pref."sysvals");
$rowdel=mysql_fetch_array($sqldel);
$del=$rowdel['del'];
if(isset(
$new_orders)):
$urlpage='Подробно/Новые заказы ';
?><div align="center">
<div align="center">
<div class="s5_mod_h3_l">
<div class="s5_mod_h3_r">
<div class="s5_mod_h3_m">
<h3 class="s5_mod_h3"><span class="s5_h3_first">
<?=$lang['stats11'];?>
</span></h3>
</div>
</div>
</div>
</div>
<table class="form" width="400" border="0" align="center" cellpadding="3" cellspacing="5">
<tr>
<td colspan="4" align="center"><a href="stats.php?new_orders=0"><?=$lang['stats11'];?></a>&nbsp;|&nbsp;<a href="stats.php?page=0"><?=$lang['stats12'];?></a><br>
<br><div class="accent"><div class="accent-left"></div><div class="accent-right"></div></div></td>
</tr>
<?
$sqlneworder
=mysql_query("select*from ".$db_pref."neworders");
$rowneworder=mysql_num_rows($sqlneworder);
if(
$rowneworder>0):
?>
<tr class="form_title">
<td align="cenrer"><?=$lang['stats13'];?></td>
<td align="center"><?=$lang['stats14'];?></td>
<td align="center"><?=$lang['stats15'];?></td>
<td align="center"><?=$lang['stats16'];?></td>
</tr>
<?
endif;
$sqlneworder=mysql_query("select*from ".$db_pref."neworders");
$rowneworder=mysql_fetch_array($sqlneworder);
if(
$rowneworder==0):
?>
<tr>
<td colspan="4" align="center"><font color="red"><?=$lang['stats17'];?></font></td>
</tr>
<?
endif;
$sqlrecords=mysql_query("select*from ".$db_pref."sysvals");
$rowrecords=mysql_fetch_array($sqlrecords);
$limit=$rowrecords['user_records'];
$result=mysql_query("SELECT count(*) FROM ".$db_pref."neworders");
$row=mysql_fetch_row($result);
$numrows=$row['0'];
if (empty(
$_GET['new_orders'])) $new_orders=0;
$sql "SELECT * FROM ".$db_pref."neworders ORDER BY id LIMIT ".intval($new_orders).",$limit";
$result mysql_query($sql) or die(mysql_error());
while(
$row=mysql_fetch_array($result)) {
$name=$row['name'];
$sname=$row['sname'];
$rang=$row['rang'];
$datenew=$row['date'];
?>
<tr onMouseOver="this.style.background='#000000';" onMouseOut="this.style.background='';">
<td align="center"><?=$name;?></td>
<td align="center"><?=$sname;?></td>
<td align="center"><?=$rang;?></td>
<td align="center"><?=$datenew;?></td>
</tr>
<?
}
?>
</table>
<?
$sqluser
=mysql_query("select*from ".$db_pref."neworders");
$rowuser=mysql_fetch_array($sqluser);
$sqlrecords=mysql_query("select*from ".$db_pref."sysvals");
$rowrecords=mysql_fetch_array($sqlrecords);
$limitrecords=$rowrecords['user_records'];
if (
$rowuser>$limitrecords):
echo 
"<br><table width=400 border=0 align=center cellpadding=0 cellspacing=0><tr><td class=tabletext><span style=float:left>$gb5&nbsp;";
$pages=ceil($numrows/$limit);
for (
$i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
if (
$new_orders ==$newoffset) {
print 
''.($i).' ';
}
else {
echo 
'<a href="stats.php?new_orders='.($newoffset).'">'.($i).'</a> ';
}}
echo 
"</span><span style=float:right><a href=javascript:window.scroll(0,0);><img src=images/up.png width=33 height=15 border=0 title=$gb16 alt=$gb16></a></span></td></tr></table>";
endif;
elseif(isset(
$page)):
$urlpage='Подробно/На учёте';
?><div align="center">
<div align="center">
<div class="s5_mod_h3_l">
<div class="s5_mod_h3_r">
<div class="s5_mod_h3_m">
<h3 class="s5_mod_h3">
<?if($del=="yes"){?>
<table width="100%">
<tr>
<td align="center"width="33%"></td>
<td align="center"width="33%">
<span class="s5_h3_first"><?=$lang['stats12'];
$servertime date('d.m.Y H:i'time());
?>
</span></td>
<td align="right"width="33%"><?=$lang['stats25'];?><?=$servertime;?></td>
</tr>
</table>
<?}else{
echo
"<span class='s5_h3_first'>".$lang['stats12']."</span>";
}
?>
</h3>
</div>
</div>
</div>
</div>
<table class="form" width="500" border="0" align="center" cellpadding="3" cellspacing="5">
<tr>
<td colspan="5" align="center"><a href="stats.php?new_orders=0"><?=$lang['stats11'];?></a>&nbsp;|&nbsp;<a href="stats.php?page=0"><?=$lang['stats12'];?></a><br><br><div class="accent"><div class="accent-left"></div><div class="accent-right"></div></div></td>
</tr>
<?
$sql
=mysql_query("select*from ".$db_pref."users where rang='0'");
$rownull=mysql_num_rows($sql);

if(
$rownull>0):
?>
<tr class="form_title">
<td align="center"><?=$lang['stats18'];?></td>
<td align="center"><?=$lang['stats19'];?></td>
<td align="center"><?=$lang['stats20'];?></td>
<td align="center"><?=$lang['stats21'];?></td>
<?if($del=="yes"){?><td align="center"><?=$lang['stats26'];?></td><?}?>
</tr>
<?
endif;
$sqlnull=mysql_query("select*from ".$db_pref."users where rang='0'");
$rownull=mysql_fetch_array($sqlnull);
if(
$rownull==0):
?>
<tr>
<td colspan="5" align="center"><font color="red"><?=$lang['stats22'];?></font></td>
</tr>
<?
endif;
$sqlrecords=mysql_query("select*from ".$db_pref."sysvals");
$rowrecords=mysql_fetch_array($sqlrecords);
$limit=$rowrecords['user_records'];
$result=mysql_query("SELECT count(*) FROM ".$db_pref."users where rang='0'");
$row=mysql_fetch_row($result);
$numrows=$row['0'];
if (empty(
$_GET['page'])) $page=0;
$sql "SELECT * FROM ".$db_pref."users where rang='0' ORDER BY id LIMIT ".intval($page).",$limit";
$result mysql_query($sql) or die(mysql_error());
while(
$row=mysql_fetch_array($result)){
$nulluser=$row['user'];
$nullparent=$row['parent'];
$nullrang=$row['rang'];
$timestamp=$row['date_reg'];
$nuldate_reg date('d.m.Y H:i'$timestamp);
$nuldate_del date('d.m.Y H:i'$timestamp $rowdel['day'] * 3600   );
$sql444=mysql_query("select*from ".$db_pref."neworders where name='$nulluser'");
$row444=mysql_fetch_array($sql444);
$imranger=$row444['name'];
?>
<tr onMouseOver="this.style.background='#000000';" onMouseOut="this.style.background='';">
<td align="center"><?=$nulluser;?></td>
<td align="ceter"><?=$nullparent;?></td>
<td align="center"><?=$nullrang;?></td>
<td align="center"><?=$nuldate_reg;?></td>
<?if($del=="yes"){?><td align="center"><?
if($imranger!=$nulluser): 
echo
"$nuldate_del";
else:
echo
"".$lang['stats27']."";
endif;
?></td><?}?>
</tr>
<?
}
?>
</table>
<?
$sqluser
=mysql_query("select*from ".$db_pref."users where rang='0'");
$rowuser=mysql_fetch_array($sqluser);
$sqlrecords=mysql_query("select*from ".$db_pref."sysvals");
$rowrecords=mysql_fetch_array($sqlrecords);
$limitrecords=$rowrecords['user_records'];
if (
$rowuser>$limitrecords):
echo 
"<br><table width=400 border=0 align=center cellpadding=0 cellspacing=0><tr><td class=tabletext><span style=float:left>$gb5&nbsp;";
$pages=ceil($numrows/$limit);
for (
$i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
if (
$page ==$newoffset) {
print 
''.($i).' ';
}
else {
echo 
'<a href="stats.php?page='.($newoffset).'">'.($i).'</a> ';
}}
echo 
"</span><span style=float:right><a href=javascript:window.scroll(0,0);><img src=images/up.png width=33 height=15 border=0 title=$gb16 alt=$gb16></a></span></td></tr></table>";
endif;endif;
?>
</div>
<?
include("footer.php");
?>
Онлайн: 2
Реклама