<? If ($user == "") { $user = "admin";} ?>
<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>

<?
$fu = file("users/$user");

If ($send == "ok") {
 $orgname = stripslashes($orgname);
 $city = stripslashes($city);
 $url = stripslashes($url);
 $fio = stripslashes($fio);
 $phone = stripslashes($phone);
 $email = stripslashes($email);
 $wmid = stripslashes($wmid);
 $wmz = stripslashes($wmz);

 $fr = fopen("users/$user", "w");
 fwrite($fr, "$pwd\n");			//пароль пользователя
 fwrite($fr, "$orgname\n");		//название организации
 fwrite($fr, "$city\n");		//место проживания
 fwrite($fr, "$url\n");			//url
 fwrite($fr, "$fio\n");			//Ф.И.О.
 fwrite($fr, "$phone\n");		//телефон
 fwrite($fr, "$email\n");		//e-mail адрес
 fwrite($fr, "$wmid\n");		//wm идентификатор
 fwrite($fr, "$wmz\n");			//z-кошель
 fwrite($fr, trim($fu[9]) . "\n");	//денег на счету
 fwrite($fr, "$attestat\n");		//тип аттестата: 0-не проверен/аттестата нет/аттестат ниже персонального; 1-персональный аттестат!!!
 fwrite($fr, "$status\n");		//статус: 1-обычный статус; 0-без права продажи и изменения данных (блокировка); 2-VIP
 fwrite($fr, "$commis\n");		//процент комиссии (только для VIP пользователей)
 fclose($fr);

 $fu = file("users/$user");
}
?>

<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="<? 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>

<SCRIPT language="javascript">
function frmpost(){
	if(confirm("Вы уверены, что хотите изменить информацию?")){
		document.all.frm.submit();
	}
}
</SCRIPT>

<form method="POST" name="frm">
<input type="hidden" name="send" value="ok">
<input type="hidden" name="user" value="<? echo $user?>">
<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="100%" bgcolor="#FBC900"><p><b>Информация о пользователе <? echo $user ?></b></p></td>
        </tr>
        <tr>
           <td width="100%" valign="top">

          <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" height="209">
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                На счету:</p></td>
              <td width="67%" height="19"><p>&nbsp;<? echo trim($fu[9]) ?></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Название организации:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="orgname" value="<? echo trim($fu[1]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Место нахождения:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="city" value="<? echo trim($fu[2]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                URL:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="url" value="<? echo trim($fu[3]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9" value="http://"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Ф. И. О. ответственного лица:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="fio" value="<? echo trim($fu[4]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Контактный телефон:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="phone" value="<? echo trim($fu[5]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="18" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                E-mail адрес:</p></td>
              <td width="67%" height="18"><p>&nbsp;<input type="text" name="email" value="<? echo trim($fu[6]) ?>" size="70" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                WM - идентификатор:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="wmid" value="<? echo trim($fu[7]) ?>" size="24" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9" maxlength="12"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                WM кошелек Z-типа:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="text" name="wmz" value="<? echo trim($fu[8]) ?>" size="24" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9" maxlength="13"></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Аттестат:</p></td>
              <td width="67%" height="19"><p>&nbsp;<select size="1" name="attestat" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9">
    <option value="0" <? If (trim($fu[10]) == "0") { echo "selected"; }?>>не проверен/аттестата
    нет/аттестат ниже персонального</option>
    <option value="1" <? If (trim($fu[10]) == "1") { echo "selected"; }?>>персональный аттестат</option>
  </select> <a href="https://certsrv.webmoney.ru/certview.asp?wmid=<? echo trim($fu[7]) ?>" target="_blank">view certsrv</a></p></td>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Статус:</p></td>
              <td width="67%" height="19"><p>&nbsp;<select size="1" name="status" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9">
    <option value="0" <? If (trim($fu[11]) == "0") { echo "selected"; }?>>без права продажи и изменения данных (блокировка)</option>
    <option value="1" <? If (trim($fu[11]) == "1") { echo "selected"; }?>>обычный статус</option>
    <option value="2" <? If (trim($fu[11]) == "2") { echo "selected"; }?>>VIP</option>
    <option value="3" <? If (trim($fu[11]) == "3") { echo "selected"; }?>>счет блокирован</option>
  </select> комиссия (VIP): <input type="text" name="commis" value="<? echo trim($fu[12]) ?>" size="6" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            </tr>
            <tr>
              <td width="33%" bgcolor="#C4CAFF" height="19" bordercolorlight="#000000" bordercolordark="#FFFFFF"><p>
                Пароль:</p></td>
              <td width="67%" height="19"><p>&nbsp;<input type="password" name="pwd" value="<? echo trim($fu[0]) ?>" size="24" style="background-color: #FFFFFF; font-family: Verdana, Arial; font-size: 8pt; border: 1 solid #7F9DB9"></p></td>
            </tr>
            <tr>
              <td width="33%" height="19" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF"></td>
              <td width="67%" height="19"><p><input type="button" onClick="frmpost();" name="B1" value="Изменить" style="font-family: Verdana, Arial; font-size: 8pt"></p></td>
            </tr>
          </table>
           </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

</form>
