<?
// используется в  ext aspmo_client
function panel_org_edit($rec,$options=array())
{
  ?><div id="panel_org_edit"><form  enctype="multipart/form-data">
    <table class="info">
     <tr><td>Организация:</td><td><input data-required type="text" name="org[obj_name]" class="big" value="<?echo htmlspecialchars($rec['obj_name'])?>"></td></tr>
     <tr><td>Полное наименование:</td><td><input type="text" name="org[full_name]" class="big" value="<?echo htmlspecialchars($rec['full_name'])?>"></td></tr>
     <tr><td>email:</td><td><input type="text" name="org[email]" class="email" value="<?echo htmlspecialchars($rec['email'])?>"></td></tr>
     <tr><td>Телефон:</td><td><input type="text" data-required  name="org[phone]" class="small" value="<?echo htmlspecialchars($rec['phone'])?>"></td></tr>
     <tr><td>Доп.телефон:</td><td><input type="text" name="org[phone2]" class="small" value="<?echo htmlspecialchars($rec['phone2'])?>"></td></tr>
     <tr><td>ИНН:</td><td><input type="text" name="org[inn]" class="small" value="<?echo htmlspecialchars($rec['inn'])?>"></td></tr>
     <tr><td>КПП:</td><td><input type="text" name="org[kpp]" class="small" value="<?echo htmlspecialchars($rec['kpp'])?>"></td></tr>
     <tr><td>БИК:</td><td><input type="text" name="org[bik]" class="small" value="<?echo htmlspecialchars($rec['bik'])?>"></td></tr>
     <tr><td>Банк:</td><td><input type="text" name="org[bank]"  value="<?echo htmlspecialchars($rec['bank'])?>"></td></tr>
     <tr><td>Корреспонденский счет:</td><td><input type="text" name="org[ks]" value="<?echo htmlspecialchars($rec['ks'])?>"></td></tr>
     <tr><td>Расчетный счет:</td><td><input type="text" name="org[rs]"  value="<?echo htmlspecialchars($rec['rs'])?>"></td></tr>
     <tr><td>Юр.адрес:</td><td><textarea data-required name="org[adres1]"><?echo addslashes($rec['adres1'])?></textarea></td></tr>
     <tr><td>Почт.адрес:</td><td><textarea name="org[adres2]"><?echo addslashes($rec['adres2'])?></textarea></td></tr>
     <tr><td>Печать (GIF, 300х300px):</td>
         <td><?if ($rec['stamp']['pkey']){?><img src="<?echo img_clone($rec['stamp'])?>" width="150"><?}?>&nbsp;&nbsp;&nbsp;
         <input name="upload_file[]" type="file" size="50"></td></tr>
     <tr></tr>


     <tr><td></td><td><br><br><input type="submit" class="v1" cmd="save_org" value="Сохранить" org_id="<?echo $rec['pkey']?>" validate="form"></td></tr>
     </table></form>
    <!--
     <form>

     <table class="info">
     <tr><td colspan="2"><h1>Подразделения</h1></td><td>
     <tr><td></td><td>
        <?  $list_otdels=PERSONAL()->get_org_otdels($rec['pkey']) ;   $cnt_edit=0 ;
            if (_sizeof($list_otdels)) foreach($list_otdels as $rec_otd)
            if (!$rec_otd['read_only']) {?><div class="item_otd"><input type="text" name="otdel[<?echo $rec_otd['pkey']?>]"  value="<?echo htmlspecialchars($rec_otd['obj_name'])?>"> <button class="v2" cmd="aspmo_personal/delete_otdel" otdel_id="<?echo $rec_otd['pkey']?>">Удалить</button></div><? $cnt_edit++ ;}
            else                        {?><div class="item_otd"><? echo htmlspecialchars($rec_otd['obj_name'])?> <span class="red">[изменение запрещено]</span></div><?  ;}
        ?>
     </td></tr>
     <?if ($cnt_edit){?><tr><td></td><td><input type="submit" class="v2" cmd="aspmo_personal/save_otdel" value="Сохранить"></td></tr><?}?>
     <tr><td>Новое подразделение:</td><td><input type="text" name="new_otdel"  value=""> <button class="v2" cmd="aspmo_personal/add_otdel" org_id="<?echo $rec['pkey']?>">Добавить новый отдел</button></td></tr>

   </table>-->
   </form></div><?
}






?>
