<?php
include_once(dirname(__FILE__)."/../../../../include/connect/connect.php"); 
include_once(dirname(__FILE__)."/../../../../include/jdf.php");
include_once(dirname(__FILE__)."/../../../../include/base/base.php"); 
    
    if(empty(session("useradmin"))){
        echo "<script>
            window.top.popupiframeoff();
            window.top.labelok('no','شما دسترسی ندارید');
        </script>";
        exit();
    }
   
if(!empty(post("arg"))) 
$Arr=explode(",",$arg);
else {$Arr="";$arg="";}

$Listsize=sizeof($Arr);

if(!empty($Arr) && $Listsize==1){
    $fetchdb= mysql_fetch_array(mysql_query("SELECT * FROM orderproduct WHERE id='$arg' ORDER BY id ASC"));
}else $fetchdb="";

?>

 <form action="useredit/add_user" method="post" target="<?php echo 'target'; ?>" enctype="multipart/form-data">
<div class="rowwditorder rowwditorder1 row" style="border: 0;">
<div class="col-md-12">

<?php

             echo "<div class='Titerh'><span>::. اطلاعات کاربری</span></div>";
             $SelectStatus="<input type='text' placeholder='09121234567' name='username' ";
             if(!empty($fetchdb['username'])) $SelectStatus.=" value='".getinput($fetchdb['username'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("username"),$SelectStatus);
            
             $SelectStatus="<input type='text' name='password' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("password"),$SelectStatus);
            
             $SelectStatus="<input type='text' name='minbag' ";
             if(!empty($fetchdb['minbag'])) $SelectStatus.=" value='".getinput($fetchdb['minbag'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("minbag"),$SelectStatus);
            
             $SelectStatus="<select name='groupuser' >";
             $SelectStatus.=get_groupuser("");
             $SelectStatus.="</select>";
            echorowadminorder(lang("groupuser"),$SelectStatus);
            

             $SelectStatus="<select name='status' >";
             
             $SelectStatus.="<option value='0' ";
             if(empty($fetchdb['status'])) $SelectStatus.=" selected ";
             $SelectStatus.=" >".lang("no")."</option>";
             $SelectStatus.="<option value='1' ";
             if(!empty($fetchdb['status'])) $SelectStatus.=" selected ";
             $SelectStatus.=" >".lang("yes")."</option>";
             
             $SelectStatus.="</select>";
            echorowadminorder(lang("status_user"),$SelectStatus);

             $SelectStatus="<select name='flag' >";
             
             $SelectStatus.="<option value='0' ";
             if(empty($fetchdb['flag'])) $SelectStatus.=" selected ";
             $SelectStatus.=" >".lang("no")."</option>";
             $SelectStatus.="<option value='1' ";
             if(!empty($fetchdb['flag'])) $SelectStatus.=" selected ";
             $SelectStatus.=" >".lang("yes")."</option>";
             
             $SelectStatus.="</select>";
            echorowadminorder(lang("flag_mobile"),$SelectStatus);
            
            

            
             echo "<div class='Titerh'><span>::. اطلاعات شخصی</span></div>";
             
             $SelectStatus="<input type='text' name='fname' ";
             if(!empty($fetchdb['fname'])) $SelectStatus.=" value='".getinput($fetchdb['fname'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("fname"),$SelectStatus);
            
            
             $SelectStatus="<input type='text' name='lname' ";
             if(!empty($fetchdb['lname'])) $SelectStatus.=" value='".getinput($fetchdb['lname'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("lname"),$SelectStatus);
            
             $SelectStatus="<input type='text' name='mob' ";
             if(!empty($fetchdb['mob'])) $SelectStatus.=" value='".getinput($fetchdb['mob'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("mob"),$SelectStatus);
            
             $SelectStatus="<input type='text' name='email' ";
             if(!empty($fetchdb['email'])) $SelectStatus.=" value='".getinput($fetchdb['email'])."' ";
             $SelectStatus.=" />";
            echorowadminorder(lang("email"),$SelectStatus);
    
?>
    


        

     <input type="hidden" name="level" value="-1" />
    <input type="hidden" name="arg" value="<?php echo $arg; ?>" />
   <div class="RowTb fullRowTb nomb">
       <button type='submit' onClick="startnewloader();" class='save'>اضافه کردن</button>
       </div>
      	
<iframe  class="none nifram" 
name="<?php echo 'target'; ?>"></iframe>


</div>

</div>




 </form>

   