Файл: RootPanel 1.7.0 FreeCode/RootPanel 1.7.0 FreeCode/_rootadmin/_history.inc.php
Строк: 46
<?
checkAdminAccess('clientHistoryRead',1);
$user = GetUserById($uid);
if (!$user) { $user = GetUserByLogin($uid); }
if ($user) {
print menu_admin_client($user->id);
$r=@mysql_query("select * from users_logs where uid='$user->id' order by id desc") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
$rows = mysql_num_rows($r);
list($start, $perPage, $txt) = MakePages($page, $rows, "uid=$user->id");
$r=@mysql_query("select * from users_logs where uid='$user->id' order by id desc LIMIT $start,$perPage") or die("File: ".__FILE__."<BR>Line: ".__LINE__."<BR>MySQL Error: ".mysql_error());
if (mysql_num_rows($r) > 0) {
?>
<table cellpadding=3 width=95%>
<tr><td colspan=3 align=right><?=$txt?></td></tr>
<tr><td colspan=3 align=center bgcolor=<?=$font_head?>><B>История клиента [<?=$user->login?>]</b></td></tr>
<tr bgcolor=<?=$font_head?>><td align=center>дата</td><td align=center>операция</td><td align=center>комментарий</td></tr>
<?
$cnt=0;
while ($rr = mysql_fetch_object($r)) {
getfont();
print "
<tr bgcolor=$font_row>
<td align=center>$rr->dt</td>
<td align=center>$rr->operation</td>
<Td>$rr->comment</td>
</tr>
";
$cnt++;
}
?>
<tr bgcolor=<?=$font_head?>><Td colspan=3>Всего записей: <?=$rows?>, записей на странице: <?=$cnt?></td></tr>
<tr><td colspan=3 align=right><?=$txt?></td></tr>
</table>
<?
} else {
print "Нет записей для клиента $user->login";
}
}
else {
print "Клиент не найден.";
}
?>