<?
$idstr = "?cl=$cl&cp=$cp";

$mcnt = 0;
$acnt = 0;
$fm = @file("mail/$cl");
for ($m = 0; $m < count($fm); $m++) {
 $ar = explode("^", $fm[$m]);
 If ($ar[0] == "0") {
  $mcnt++;
 }
 $acnt++;
}
If ($mcnt > 0) {
 $pimg = "pic_mail_incom.gif";
}
Else {
 $pimg = "pic_mail_old.gif";
}

If (floor((double) trim($ft[9])*100)/100 <> (double) trim($ft[9])) {
 $ft[9] = floor((double) trim($ft[9])*100)/100;

 $fsv = fopen("users/$cl", "w");
 for ($g = 0; $g < count($ft); $g++) {
  fwrite($fsv, trim($ft[$g]) . "\n");
 }
 fclose($fsv);
}

$fmb = @file("moneyback/$cl");
$ismoneyback = "false";
for ($rmb = 0; $rmb < count($fmb); $rmb++) {
 $aet = explode("^", trim($fmb[$rmb]));
 If ($aet[1] == "1" and trim($ft[10]) <> "1") {
  $ft[11] = "3";

  $ff = fopen("users/" . $cl, "w");
  for ($m = 0; $m < count($ft); $m++) {
   fwrite($ff, trim($ft[$m]) . "\n");
  }
  fclose($ff);

  $ismoneyback = "true";
  break;
 }
}
?>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Language" content="ru">
<title>wmshop.ru - Авторизированный пользователь <? echo trim($ft[4]) . " ($cl)" ?></title>
<link rel="stylesheet" href="/antsoft.css" type="text/css">
</head>

<body topmargin="0" leftmargin="0" link="#0000FF" vlink="#0000FF" alink="#FF0000">
<script language="JavaScript" src="/the_menu.js"></script>

<table border="0" width="100%" height="71" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" height="1" bgcolor="#FFFFFF">
      <table border="0" width="100%" cellpadding="0" cellspacing="0" height="89">
        <tr>
          <td width="60%" height="89"><img border="0" src="/my_account.jpg" width="450" height="89"></td>
          <td width="40%" valign="top" height="89"><font color="#000000">
           <p align="left"><b>Статус: </b><? If (trim($ft[11]) == "1") { echo "Обычный пользователь"; } ElseIf (trim($ft[11]) == "0") { echo "Блокированный пользователь"; } ElseIf (trim($ft[11]) == "2") { echo "VIP пользователь"; }  ElseIf (trim($ft[11]) == "3") { echo "Счет временно блокирован"; }?>, комиссия <? echo trim($ft[12])*100 ?>%</p>
           <p align="left"><b>Аттестат: </b><? If (trim($ft[10]) == "0") { echo "Не проверен или ниже персонального"; } ElseIf (trim($ft[10]) == "1") { echo "Персональный или выше"; } ?></p>
           <p align="left"><b>На счету: </b><? echo trim($ft[9]) ?>wm</p>
           <p align="left"><b>Почта: </b>Всего <? echo $acnt ?>, непрочитанных <? echo $mcnt ?> <a href="/my.phtml<? echo $idstr ?>&com=mail"><img border="0" src="/<? echo $pimg ?>" width="13" height="12"></a></p>
          </font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="10" bgcolor="#FFFFFF" style="border-bottom: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0">
      <table border="0" width="100%" cellpadding="0" height="26">
        <tr>
	<td align=left>&nbsp;&nbsp;<a href="/my.phtml<? echo $idstr ?>" class="cap1" onMouseOver="hmenu('document.dropm1')"><b>Н</b>астройки</a>&nbsp;&nbsp;<font color="#FFFFFF">|</font></td>
	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href="javascript:void(0);" class="cap1" onMouseOver="openm(event,(nn6) ? 'dropm1' : dropm1,'document.dropm1',86);"><b>Т</b>овары</a>&nbsp;&nbsp;<font color="#FFFFFF">|</font></layer></ilayer></td>
	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href="javascript:void(0);" class="cap1" onMouseOver="openm(event,(nn6) ? 'dropm3' : dropm3,'document.dropm3',86);"><b>О</b>тзывы</a>&nbsp;&nbsp;<font color="#FFFFFF">|</font></td>
	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href="javascript:void(0);" class="cap1" onMouseOver="openm(event,(nn6) ? 'dropm4' : dropm4,'document.dropm4',86);"><b>Б</b>ухгалтерия</a>&nbsp;&nbsp;<font color="#FFFFFF">|</font></layer></ilayer></td>
	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href="javascript:void(0);" class="cap1" onMouseOver="openm(event,(nn6) ? 'dropm5' : dropm5,'document.dropm5',86);"><b>К</b>онструктор</a>&nbsp;&nbsp;<font color="#FFFFFF">|</font></layer></ilayer></td>

<?
If ($cl == "admin") {
 echo "	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href='javascript:void(0);' class='cap1' onMouseOver=\"openm(event,(nn6) ? 'dropm6' : dropm6,'document.dropm6',86);\"><b>А</b>дминистрация</a>&nbsp;&nbsp;<font color='#FFFFFF'>|</font></layer></ilayer></td>";
}
?>
	<td align=left><ilayer><layer visibility = show>&nbsp;&nbsp;<a href="/my.phtml<? echo $idstr ?>&com=mail" class="cap1" onMouseOver="hmenu('document.dropm1')"><b>П</b>очта</a><font color="#FFFFFF"></font></layer></ilayer></td>
	<td align=left width="100%"></td>
<!------>
<div id=dropm1 style="position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px">
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=new_goods"><img border="0" src="/arrow.gif" width="12" height="5">Добавить</a><br>
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=goods"><img border="0" src="/arrow.gif" width="12" height="5">Список</a><br>
</div>

<div id=dropm2 style="position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px">
<a class="cap1" href="javascript:alert('Этот раздел еще не готов.');"><img border="0" src="/arrow.gif" width="12" height="5">Изменить</a><br>
<a class="cap1" href="javascript:alert('Этот раздел еще не готов.');"><img border="0" src="/arrow.gif" width="12" height="5">Добавить</a><br>
</div>

<div id=dropm3 style="position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px">
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=responses"><img border="0" src="/arrow.gif" width="12" height="5">Положительные</a><br>
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=responses&r=bad"><img border="0" src="/arrow.gif" width="12" height="5">Отрицательные</a><br>
</div>

<div id=dropm4 style="position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px">
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=stat"><img border="0" src="/arrow.gif" width="12" height="5">Мой счет</a><br>
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=history"><img border="0" src="/arrow.gif" width="12" height="5">История переводов</a><br>
</div>

<div id=dropm5 style="position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px">
<a class="cap1" href="/my.phtml<? echo $idstr ?>&com=construktor"><img border="0" src="/arrow.gif" width="12" height="5">Собственного магазина</a><br>
</div>

<?
If ($cl == "admin") {
 echo "
<div id=dropm6 style='position:absolute;left:0;top:0;background-color:#FFFFFF;width:180;visibility:hidden;border:1px solid #C0C0C0;padding:3px'>
<a class='cap1' href='/my.phtml$idstr&com=admin&com2=userslst'><img border='0' src='/arrow.gif' width='12' height='5'>Просмотр пользователей</a><br>
<a class='cap1' href='/my.phtml$idstr&com=admin&com2=history'><img border='0' src='/arrow.gif' width='12' height='5'>История пользователя...</a><br>
<a class='cap1' href='/my.phtml$idstr&com=admin&com2=chinfo'><img border='0' src='/arrow.gif' width='12' height='5'>Информация о ...</a><br>
<a class='cap1' href='/my.phtml$idstr&com=admin&com2=mail'><img border='0' src='/arrow.gif' width='12' height='5'>Почта пользователя...</a><br>
<a class='cap1' href='/my.phtml$idstr&com=admin&com2=addnews'><img border='0' src='/arrow.gif' width='12' height='5'>Добавить новость</a><br>
</div>
";
}
?>
<!------>



          <td width="9%">
            <p align="right"><a href="/index.phtml?my=exit" class="cap1"><b>В</b>ыход</a></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="100%" height="93" valign="top">
<?
If ($com == "") {
 $com = "index";
}

include("tx/my_$com.php");

?>
<p>&nbsp;</p>
    </td>
  </tr>
  <tr>
    <td width="100%" height="1">
       <p>С вопросами и предложениями пишите на e-mail <a href='mailto:support@' class='cap4'>support@</a></p>
    </td>
  </tr>
</table>


</body>
</html>