<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%" bgcolor="#F0F0F0"><p><b>&gt;&gt; Просмотр информации о продавце <? echo $name ?></b></p></td>
  </tr>
</table>
<p>&nbsp;</p>

<?
If ($name == "") {
 echo "<script> alert('Параметры заданы неверно!'); history.back();</script>";
 exit;
}

$fusr = @file("users/$name");

$d = dir("responses/");
while($tme = $d->read()) {
 If ($tme <> "." and $tme <> ".." and $tme <> ".htaccess") {
  $arresp[] = $tme;
 }
}
$d->close();

$prod = 0;
$rating = 0;
$rsp0 = 0;
$rsp1 = 0;
$d = dir("goods/");
while($tme = $d->read()) {
 If ($tme <> "." and $tme <> ".." and $tme <> ".htaccess") {
  $fr = @file("goods/$tme");
  If (trim($fr[0]) == $name) {
   $prod = $prod + (integer) trim($fr[15]);

   for ($s = 0; $s < count($arresp); $s++) {
    If ($tme == $arresp[$s]) {
     $fr2 = @file("responses/$tme");

     $m = 0;
     while ($fr2[$m] <> "") {
      $ar2 = explode("^", trim($fr2[$m]));
      If ($ar2[0] == "0") {
       $rating = $rating + 1;
       $rsp1 = $rsp1 + 1;
      }
      ElseIf ($ar2[0] == "1") {
       $rating = $rating - 1;
       $rsp0 = $rsp0 + 1;
      }
      $m++;
     }

    }
   }
  }
 }
}
$d->close();
?>

<table border="0" width="98%" cellspacing="0" cellpadding="4" bgcolor="#C0C0C0" align="center">
  <tr>
    <td width="2%" valign="middle" bgcolor="#F0F0F0" height="1" style="border-left: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0; border-bottom: 1 solid #C0C0C0"><p align="center"><img border="0" src="/pic_info.gif" width="16" height="16"></p></td>
    <td width="98%" bgcolor="#F0F0F0" height="1" style="border-right: 1 solid #C0C0C0; border-top: 1 solid #C0C0C0; border-bottom: 1 solid #C0C0C0"><p>При нажатии на кнопку 'Товары продавца' Вы увидите полный список товаров, продаваемых этим продавцом.</p></td>
  </tr>
</table>
<p>&nbsp;</p>


<table border="1" width="98%" cellspacing="0" cellpadding="0" bordercolorlight="#0000FF" bordercolordark="#FFFFFF" align="center">
  <tr>
    <td width="100%" bgcolor="#FBC900"><p><b>Просмотр информации о продавце <? echo trim($fusr[1]) . " ($name)" ?></b></p></td>
  </tr>
  <tr>
    <td width="100%">
          <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Псевдоним продавца:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo $name ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Организация:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[1]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Место нахождения:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[2]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>URL:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[3]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Контактный телефон:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[5]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>E-mail адрес:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[6]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>WM - идентификатор:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo trim($fusr[7]) ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Аттестат:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? If (trim($fusr[10]) == "0") { echo "Не проверен или ниже персонального"; } ElseIf (trim($fusr[10]) == "1") { echo "Персональный или выше <a href='https://certsrv.webmoney.ru/certview.asp?wmid=" . trim($fusr[7]) . "' target='_blank' class='cap4'><b>просмотр сертификата</b></a>"; } ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Общее количество продаж:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo $prod ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Рейтинг:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo $rating ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Положительных отзывов:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo $rsp1 ?></p></td>
            </tr>
            <tr>
              <td width="30%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>Отрицательных отзывов:</p></td>
              <td width="70%" height="19" bgcolor="#F4F4F4"><p><? echo $rsp0 ?></p></td>
            </tr>

            <tr>
              <td width="30%" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" valign="top"></td>
              <td width="70%">
                 <p><input type="button" onClick="document.location.href='/buy_sort.phtml?com=seller&name=<? echo $name ?>';" name="gotovars" value="Товары продавца" style="font-family: Verdana, Arial; font-size: 8pt"> <input type="button" onClick="history.back();" name="goback" value="Возврат" style="font-family: Verdana, Arial; font-size: 8pt"></p>
              </td>
            </tr>
          </table>

    </td>
  </tr>
</table>