<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" bgcolor="#F0F0F0"><p><b>&gt;&gt; Администрация &gt;&gt; Список пользователей</b></p></td>
  </tr>
</table>
<p>&nbsp;</p>


<table border="1" width="600" align="center" cellspacing="0" cellpadding="0" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF">
  <tr>
    <td width="100%" align="center">
      <form method="POST">
        <input type="hidden" name="lst" value="1">
        <p>Пользователь: <input type="text" value="<? If ($user == "") { echo "admin";} Else { echo $user; } ?>" name="user" size="60" style="font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"> <input type="submit" value="Просмотр" name="B1" style="font-family: Verdana, Arial; font-size: 8pt"></p>
      </form>
    </td>
  </tr>
</table>
<p>&nbsp;</p>

<table border="0" width="98%" cellpadding="0" align="center" style="border: 1 solid #0000FF" cellspacing="1">
  <tr>
    <td width="100%" valign="top">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
           <td width="8%" bgcolor="#FBC900"><p><b>дата</b></p></td>
           <td width="8%" bgcolor="#FBC900"><p>приход</p></td>
           <td width="8%" bgcolor="#FBC900"><p>расход</p></td>
           <td width="8%" bgcolor="#FBC900"><p>комиссия WMT*</p></td>
           <td width="8%" bgcolor="#FBC900"><p>комиссия WMSHOP</p></td>
           <td width="8%" bgcolor="#FBC900"><p>отсаток</p></td>
           <td width="10%" bgcolor="#FBC900"><p>от куда (wmz)</p></td>
           <td width="11%" bgcolor="#FBC900"><p>куда</p></td>
           <td width="31%" bgcolor="#FBC900"><p>примечания</p></td>
        </tr>
<?
If ($user == "") {
 $user = "admin";
}
$fh = @file("history/$user");

$rd = $fh;
for ($i = 0; $i < count($rd); $i++) {
 $fh[count($rd)-$i-1] = $rd[$i];
}

If ($lst == "") {
 $lst = "1";
}
$lfrom = (integer) $lst * $serv_const_lstcount - $serv_const_lstcount;
$lto = (integer) $lst * $serv_const_lstcount;
If ($lto > count($fh)) {
 $lto = count($fh);
}

for ($i = $lfrom; $i < $lto; $i++) {
 $ar = explode("^", trim($fh[$i]));

 If ($clr == "#F9FBFF") { 
  $clr = "#EAEDFF";
 }
 Else {
  $clr = "#F9FBFF";
 }

 echo "
  <tr>
    <td width='8%' bgcolor='$clr'><p>$ar[0]</p></td>
    <td width='8%' bgcolor='$clr'><p>$ar[1]</p></td>
    <td width='8%' bgcolor='$clr'><p>$ar[2]</p></td>
    <td width='8%' bgcolor='$clr'><p>$ar[3]</p></td>
    <td width='8%' bgcolor='$clr'><p>$ar[4]</p></td>
    <td width='8%' bgcolor='$clr'><p>$ar[5]</p></td>
    <td width='10%' bgcolor='$clr'><p>$ar[6]</p></td>
    <td width='11%' bgcolor='$clr'><p>$ar[7]</p></td>
    <td width='31%' bgcolor='$clr'><p>$ar[8]</p></td>
  </tr>";

}
?>
      </table>
    </td>
  </tr>
</table>

<p>&nbsp;&nbsp;Страница: 
<?
 for ($c = 1; $c <= ceil(count($fh) / $serv_const_lstcount); $c++) {
  If ($lst == $c) {
   echo "<b><a href='/my.phtml$idstr&com=admin&com2=history&user=$user&lst=$c' class='cap3'>$c</a></b>";
  }
  Else {
   echo "<a href='/my.phtml$idstr&com=admin&com2=history&user=$user&lst=$c' class='cap4'>$c</a>";
  }
  If ($c <> ceil(count($fh) / $serv_const_lstcount)) {
   echo " | ";
  }
 }
?>
</p>