<?php 	include_once('../../config.php');   	
		include_once(ABS_PATH.'/admin/login_check.php');    
    
	    if(isset($_POST['submitF']))
			{     
			    
			    if($_POST['marchant']==1) 
			    {
			        $DPexplode = explode("DP",$_POST['Ccid']);   
			        $nwnId = trim("MT".$DPexplode[1]);
			        
                    $stmt=$conn->prepare("select  id from  UI__AdharVeri where custId=:custId");  
                    $stmt->bindValue(':custId', $_POST['Ccid'] , PDO::PARAM_STR);
                    $stmt->execute(); 
                    if($stmt->rowCount() > 0)
                    {    
                        $stmt=$conn->prepare("update  UI__AdharVeri set  custId='$nwnId' where custId=:custId");  
                        $stmt->bindValue(':custId', $_POST['Ccid'] , PDO::PARAM_STR);
                        $stmt->execute(); 
                    }
                    
                    
                    $stmt=$conn->prepare("select  id from  UI__PanVeri where custId=:custId");  
                    $stmt->bindValue(':custId', $_POST['Ccid'] , PDO::PARAM_STR);
                    $stmt->execute(); 
                    if($stmt->rowCount() > 0)
                    {    
                        $stmt=$conn->prepare("update  UI__PanVeri set  custId='$nwnId' where custId=:custId");  
                        $stmt->bindValue(':custId', $_POST['Ccid'] , PDO::PARAM_STR);
                        $stmt->execute(); 
                    }
			        
			        
			    }else
			        $nwnId = $_POST['Ccid']; 
			        
			        
    			 
    			 /*  				
        				$stmt=$conn->prepare("update  UI__Rgst set directxfer=:directxfer,mtycommision=:mtycommision,cuurentId=:cuurentId, marchant=:marchant,IMPSLimit=:IMPSLimit,NEFTLimit=:NEFTLimit,UpiLimit=:UpiLimit,idtoid=:idtoid,news=:news,impsStats=:impsStats,nm=:nm,eml=:eml,phm=:phm,Bname=:Bname,Bifsc=:Bifsc,Bnumber=:Bnumber,accHolderNm=:accHolderNm,is_active=:is_active,UPI=:UPI   where id=:cust_id  ");    
                        $stmt->bindValue(':directxfer', $_POST['directxfer'] , PDO::PARAM_STR);  
                        $stmt->bindValue(':mtycommision', $_POST['mtycommision'] , PDO::PARAM_STR);    
                        $stmt->bindValue(':cuurentId', $nwnId , PDO::PARAM_STR); 
                        $stmt->bindValue(':marchant',$_POST['marchant'], PDO::PARAM_STR); 
                        $stmt->bindValue(':IMPSLimit',$_POST['IMPSLimit'], PDO::PARAM_STR); 
                        $stmt->bindValue(':NEFTLimit',$_POST['NEFTLimit'], PDO::PARAM_STR); 
                        $stmt->bindValue(':UpiLimit',$_POST['UpiLimit'], PDO::PARAM_STR); 
                        $stmt->bindValue(':idtoid',$_POST['idtoid'], PDO::PARAM_STR); 
                        $stmt->bindValue(':news',$_POST['newsSelect'], PDO::PARAM_STR); 
                        $stmt->bindValue(':impsStats',$_POST['impsStats'], PDO::PARAM_STR); 
                        $stmt->bindValue(':nm',$_POST['nm'], PDO::PARAM_STR);  
                        $stmt->bindValue(':eml',$_POST['eml'], PDO::PARAM_STR); 
                         
                        $stmt->bindValue(':Bname',$_POST['Bname'], PDO::PARAM_STR); 
                        $stmt->bindValue(':Bifsc',$_POST['Bifsc'], PDO::PARAM_STR); 
                        $stmt->bindValue(':Bnumber',$_POST['Bnumber'], PDO::PARAM_STR); 
                        $stmt->bindValue(':accHolderNm',$_POST['accHolderNm'], PDO::PARAM_STR);  
                        $stmt->bindValue(':cust_id',$_REQUEST['id'], PDO::PARAM_STR);  
                        $stmt->bindValue(':is_active',$_POST['is_active'], PDO::PARAM_STR);    
                        $stmt->bindValue(':UPI',$_POST['UPI'], PDO::PARAM_STR);      
                        $stmt->execute();    
    			 
    			 */
			    
			    
			    if(isset($_POST['upiActive'])) 
			        $Utly = "1";
			     else   
			         $Utly = "0"; 
			         
			     
			    if(isset($_POST['BnkActive'])) 
			        $Utly .= ",1";
			     else   
			         $Utly .= ",0"; 
			         
			             
			     
			    if(isset($_POST['IdtoIdActive'])) 
			        $Utly .= ",1";
			     else   
			         $Utly .= ",0"; 
			         
			     
			       
			    if(isset($_POST['UtilitiesActive'])) 
			        $Utly .= ",1";
			     else   
			         $Utly .= ",0"; 
			         
			         
		       if(isset($_POST['instatantImps'])) 
			        $instatantImps =  1;
			     else   
			         $instatantImps =  0;
			         
			         
			           
			         
		       if(isset($_POST['DPthough'])) 
			        $DPthough =  1;
			     else   
			         $DPthough =  0;    
			       
			    if(isset($_POST['allDysroi'])) 
			        $allDysroi = "1";
			     else   
			         $allDysroi = "0";  
			                         
		        if(isset($_POST['powerPlayer'])) 
			        $powerPlayer = "1";
			     else   
			         $allDysroi = "0";   
			         
			         
			 if(isset($_POST['AutoWithdrawls'])) 
			        $AutoWithdrawls = "1";
			     else   
			         $AutoWithdrawls = "0";    
			         
			 
			         
			 if(isset($_POST['othertopup'])) 
			        $othertopup = "1";
			     else   
			         $othertopup = "0";    
			                 
			    
			         
			 if(isset($_POST['grabPlans'])) 
			        $grabPlans = "1";
			     else   
			         $grabPlans = "0";    
			                       
			                 
			     
			         
			     if(isset($_POST['P2PUser']))  
			     {        
                        $digits = 6;
                        $P2PUser = "P2P".rand(pow(10, $digits-1), pow(10, $digits)-1);   
			     }
			         
			          
    			$stmt=$conn->prepare("update  UI__Rgst set p2p=:p2p,grabPlans=:grabPlans,othertopup=:othertopup,autoWithdrawls=:AutoWithdrawls,powerPlayer=:powerPlayer,IMPSLimit=:IMPSLimit,DPthough=:DPthough,instatantImps=:instatantImps,allDysroi=:allDysroi,utilities=:utilities,dailyMonthly=:dailyMonthly,upiAllow=:upiAllow,is_active=:is_active,directxfer=:directxfer,mtycommision=:mtycommision,cuurentId=:cuurentId, marchant=:marchant,NEFTLimit=:NEFTLimit,UpiLimit=:UpiLimit,idtoid=:idtoid,news=:news,impsStats=:impsStats,nm=:nm,eml=:eml,pay2second=:pay2second,grabDays=:grabDays where id=:id  ");    
                $stmt->bindValue(':p2p', $P2PUser , PDO::PARAM_INT);
                $stmt->bindValue(':grabPlans', $grabPlans , PDO::PARAM_INT);
                $stmt->bindValue(':othertopup', $othertopup , PDO::PARAM_INT);
                $stmt->bindValue(':AutoWithdrawls', $AutoWithdrawls , PDO::PARAM_INT);
                $stmt->bindValue(':powerPlayer', $powerPlayer , PDO::PARAM_INT);
                $stmt->bindValue(':IMPSLimit', $_POST['UpiLimit'], PDO::PARAM_INT); 
                $stmt->bindValue(':DPthough', $DPthough, PDO::PARAM_INT); 
                $stmt->bindValue(':instatantImps', $instatantImps, PDO::PARAM_INT); 
                $stmt->bindValue(':allDysroi', $allDysroi , PDO::PARAM_INT); 
                $stmt->bindValue(':utilities',$Utly , PDO::PARAM_INT); 
                $stmt->bindValue(':dailyMonthly', $_POST['dailyMonthly'] , PDO::PARAM_INT); 
                $stmt->bindValue(':upiAllow', $_POST['upiAllow'] , PDO::PARAM_INT); 
                $stmt->bindValue(':is_active', $_POST['is_active'] , PDO::PARAM_INT); 
                $stmt->bindValue(':directxfer', $_POST['directxfer'] , PDO::PARAM_STR); 
                $stmt->bindValue(':mtycommision', $_POST['mtycommision'] , PDO::PARAM_STR);    
                $stmt->bindValue(':cuurentId', $nwnId , PDO::PARAM_STR); 
                $stmt->bindValue(':marchant',$_POST['marchant'], PDO::PARAM_STR); 
             
                $stmt->bindValue(':NEFTLimit',$_POST['NEFTLimit'], PDO::PARAM_STR); 
                $stmt->bindValue(':UpiLimit',$_POST['UpiLimit'], PDO::PARAM_STR); 
                $stmt->bindValue(':idtoid',$_POST['idtoid'], PDO::PARAM_STR); 
                $stmt->bindValue(':news',$_POST['newsSelect'], PDO::PARAM_STR); 
                $stmt->bindValue(':impsStats',$_POST['impsStats'], PDO::PARAM_STR); 
                $stmt->bindValue(':nm',$_POST['nm'], PDO::PARAM_STR);  
                $stmt->bindValue(':eml',$_POST['eml'], PDO::PARAM_STR);   
                $stmt->bindValue(':id',$_REQUEST['id'], PDO::PARAM_STR);  
                $stmt->bindValue(':pay2second', $_POST['pay2second'], PDO::PARAM_STR);  
                $stmt->bindValue(':grabDays', $_POST['grabDays'], PDO::PARAM_STR);  
                
                
                $stmt->execute();  
				header("Location: edit-details.php?id=".$_REQUEST['id']);  
				die;
			}   
			
    
            $stmt=$conn->prepare("select  * from  UI__Rgst where id=:id    ");  
            $stmt->bindValue(':id', $_REQUEST['id'] , PDO::PARAM_STR);
            $stmt->execute(); 
            $AllUsers = $stmt->fetch(PDO::FETCH_OBJ);   
            $sr = 1;    
            
            $instatantImps= 0;
            if($AllUsers->instatantImps==1)
                $instatantImps = 1;
                
            $grabPlans= 0;
            if($AllUsers->grabPlans==1)
                $grabPlans = 1;    
            
             $DPthough= 0;
            if($AllUsers->DPthough==1)
                $DPthough = 1;
                
            $powerPlayer = 0;
              if($AllUsers->powerPlayer==1)
                  $powerPlayer = 1;
            
            $AutoWithdrawls = 0;
              if($AllUsers->autoWithdrawls==1)
                  $AutoWithdrawls = 1;
                  
            
            if($AllUsers->utilities=="")
            {
                $UpiA = 0;
                $Bkn = 0;
                $IdToId = 0;
                $Utili = 0;
            }else
            {
                $expln =  explode(",",$AllUsers->utilities);  
                $UpiA = $expln[0];
                $Bkn = $expln[1];
                $IdToId = $expln[2];
                $Utili = $expln[3];
            }   
            
            
          
            if($AllUsers->p2p=='')
                $P2PUser = 0;
            else
                $P2PUser = 1;
                
        
?>  
<?php  include ABS_PATH.'/admin/header.php';	?>  


 <script>
	$(function() {
		$( "#datepicker" ).datepicker(); 
	}); 
  
	$(document).ready(function()
	{   

	
	$("#product_frm").validate({
		
		errorElement:'div',
		rules:{ 
			city:{
				required:true				 
			} 
			
			
			
		},
		messages:{				
			 
			 city:{
				required:"Enter city name"				 
			} 
		}
	});


	});
 


</script>
		 
		 <div class="col-md-10">

	  			<div class="row">
	  				<div class="col-md-12">
	  					<div class="content-box-large">
							<div class="panel-heading">
								<div class="panel-title"> <h3> Edit User Details</h3></div>    
								
								<div class="panel-options"> 

								   <input type="button"  class="btn btn-warning" name="btnback" id="btnback" value=" Back " onClick="javascript:location.href='registered_users.php';" />
								  
								</div>
							  
								 
							</div>
							
							
			  				<div class="panel-body">    
			  					<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" id="product_frm"> 
							   	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Name</label>
								    <div class="col-sm-6">
								      <input name="nm" class="form-control"   placeholder="Username"   required  value="<?php echo $AllUsers->nm; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
								    <div class="col-sm-6">
								      <input name="eml" class="form-control"   placeholder="Username"   required  value="<?php echo $AllUsers->eml; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								 
							 
								  
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Sponsor Id</label>
								    <div class="col-sm-6">
								      <input  class="form-control"      value="<?php echo  $AllUsers->refId; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Bank Name </label>
								    <div class="col-sm-6">
								      <input  class="form-control"   name="Bname"   value="<?php echo  $AllUsers->Bname; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Bank IFSC </label>
								    <div class="col-sm-6">
								      <input  class="form-control"    name="Bifsc"  value="<?php echo  $AllUsers->Bifsc; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Bank Account No</label>
								    <div class="col-sm-6">
								      <input  class="form-control"  name="Bnumber"  value="<?php echo  $AllUsers->Bnumber; ?>"  >
								    </div>
								 </div>
								 <hr>
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Acc  Holder Name </label>
								    <div class="col-sm-6">
								      <input  class="form-control"    name="accHolderNm"  value="<?php echo  $AllUsers->accHolderNm; ?>"  >
								    </div>
								 </div>
								 <hr>  
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Branch</label>
								    <div class="col-sm-6">
								      <input  class="form-control"     name="Bbranch"  value="<?php echo  $AllUsers->Bbranch; ?>"  >
								    </div>
								 </div>
								 <hr>   
								 
								 
							 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Profile Pic</label>
								    <div class="col-sm-6">
								       <img src="<?php echo ROOTPATH;?>/uploads/<?php echo $AllUsers->profilePic;?>" width="200" />
								    </div>
								 </div>
								 <hr>
								 
								  
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Status</label>
								    <div class="col-sm-6">
								       <select name="is_active" class="form-control">
								           <option <?php if($AllUsers->is_active==1) echo"selected"; ?> value="1">Active</option>
								           <option <?php if($AllUsers->is_active==0) echo"selected"; ?> value="0">Inactive</option>
								       </select>
								    </div>
								 </div>
								 <hr>
								 
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">IMPS</label>
								    <div class="col-sm-6">
								       <select name="impsStats" class="form-control">
								           <option <?php if($AllUsers->impsStats==0) echo"selected"; ?> value="0">Active</option>
								           <option <?php if($AllUsers->impsStats==1) echo"selected"; ?> value="1">Inactive</option>
								       </select>
								    </div>
								 </div>
								 <hr>
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Id to Id</label>
								    <div class="col-sm-6">
								       <select name="idtoid" class="form-control">
								           <option <?php if($AllUsers->idtoid==0) echo"selected"; ?> value="0">Active</option>
								           <option <?php if($AllUsers->idtoid==1) echo"selected"; ?> value="1">Inactive</option>
								       </select>
								    </div>
								 </div>
								 <hr>
								 
								  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">News</label>
								    <div class="col-sm-6">
								       <select name="newsSelect" class="form-control">
								           <option <?php if($AllUsers->news==0) echo"selected"; ?> value="0">Normal</option>
								           <option <?php if($AllUsers->news==1) echo"selected"; ?> value="1">Special</option>
								       </select>
								    </div>
								 </div>
								 <hr>
								 
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">UPI</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control" name="UPI"  value="<?php echo  $AllUsers->UPI; ?>"  >
							    </div>
							 </div>
							 <hr>
							 
							 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Upi Transaction</label>
								    <div class="col-sm-6">
								       <select name="upiAllow" class="form-control">
								           <option <?php if($AllUsers->upiAllow==0) echo"selected"; ?> value="0">Auto</option>
								           <option <?php if($AllUsers->upiAllow==1) echo"selected"; ?> value="1">Manual</option>
								       </select>
								    </div>
								 </div>
								 <hr>
							  
								 
							 <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">Total Credit</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control"  readonly value="<?php echo  totalCredit($AllUsers->cuurentId); ?>"  >
							    </div>
							 </div>
							 <hr>
							 
							 <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">Total Debit</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control"  readonly value="<?php echo  totalDebit($AllUsers->cuurentId); ?>"  >
							    </div>
							 </div>
							 <hr>
							 
						 	 <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">Total Wallet</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control"  readonly value="<?php echo  GetBalance($AllUsers->cuurentId); ?>"  >
							    </div>
							 </div>
							 <hr>
							   
						 	 
						 	 <div class="form-group"> 
						 	      <?php   
                                    $stmt=$conn->prepare("select  Tamt from  UI__Bns where Rid=:id ");  
                                    $stmt->bindValue(':id',  $AllUsers->cuurentId  , PDO::PARAM_STR);
                                    $stmt->execute(); 
                                    $tRpay = $stmt->fetchAll(PDO::FETCH_OBJ);
                                    
                                    foreach($tRpay as $mp)
                                        $tLpay +=$mp->Tamt; 
						 	       ?> 
						 	     
							    <label for="inputEmail3" class="col-sm-2 control-label">Total Level Pay</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control"  readonly value="<?php echo $tLpay; ?>"  >
							    </div>
							 </div>
							 <hr>
							 
						 	 
						 	 <div class="form-group">
						 	    <?php   
                                    $stmt=$conn->prepare("select  amount from  UI__DailyROIGene where custId=:id ");  
                                    $stmt->bindValue(':id',  $AllUsers->cuurentId  , PDO::PARAM_STR);
                                    $stmt->execute(); 
                                    $tLpayR = $stmt->fetchAll(PDO::FETCH_OBJ);
                                    
                                    foreach($tLpayR as $mp)
                                        $tDpay +=$mp->amount;

						 	     ?>
						 	     
							    <label for="inputEmail3" class="col-sm-2 control-label">Total Daily Pay</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control"  readonly value="<?php echo $tDpay; ?>"  >
							    </div>
							 </div>
							 <hr>
							 
							 
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">UPI / IMPS Limit</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control" name="UpiLimit"  value="<?php echo  $AllUsers->UpiLimit; ?>"  >
							    </div>
							 </div>
							 <hr>
							 
							 
							 <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">NEFT Limit</label>
							    <div class="col-sm-6"> 
							       <input  class="form-control" name="NEFTLimit"  value="<?php echo  $AllUsers->NEFTLimit; ?>"  >
							    </div>
							 </div>
							 <hr>
							 
						
							 
							 
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-2 control-label">Marchant Commission </label>
							    <div class="col-sm-6"> 
							       <input  class="form-control" name="mtycommision"  value="<?php if($AllUsers->mtycommision=='') echo 0; else echo $AllUsers->mtycommision;  ?>"  >
							    </div>
							 </div>
							 <hr>
							 
							 
						 	  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Marchant Update</label>
								    <div class="col-sm-6">
								       <select name="marchant" class="form-control">
								           <option <?php if($AllUsers->marchant==1) echo"selected"; ?> value="1">Active</option>
								           <option <?php if($AllUsers->marchant==0) echo"selected"; ?> value="0">Deactive</option>
								       </select>
								    </div>
								 </div>
								 <hr>
							 
							 
						 	  <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Direct Transfered</label>
								    <div class="col-sm-6">
								       
								       <select name="directxfer" class="form-control">
								           <option <?php if($AllUsers->directxfer==1) echo"selected"; ?> value="1">To Pakindia</option>
								           <option <?php if($AllUsers->directxfer==0) echo"selected"; ?> value="0">To DailyPay</option>
								       </select>   
								       
								    </div>
								 </div>
								 <hr> 
								 
								 
								 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Daily/Monthy</label>
								    <div class="col-sm-6">
								       
								       Daily <input type="radio" name="dailyMonthly" value="0" <?php if($AllUsers->dailyMonthly==0) echo "checked";?> />
								       Monthly <input type="radio" name="dailyMonthly"  value="1" <?php if($AllUsers->dailyMonthly==1) echo "checked";?> />
								       
								    </div>
								 </div>
								 <hr> 
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">Pay2All-2 </label>
								    <div class="col-sm-6">
								       
								       Deactive <input type="radio" name="pay2second" value="0" <?php if($AllUsers->pay2second==0) echo "checked";?> />
								       Active <input type="radio" name="pay2second"  value="1" <?php if($AllUsers->pay2second==1) echo "checked";?> />
								       
								    </div>
								 </div>
								 <hr> 
								 
								 
							     <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Other TopUp Off</label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="othertopup" <?php if($AllUsers->othertopup==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								  
							  	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> All Days ROI </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="allDysroi" <?php if($AllUsers->allDysroi==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">UPI ACTIVE </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"    class="form-control" name="upiActive" <?php if($UpiA==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr> 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Bank Transfer  </label>
								    <div class="col-sm-6">  
								       <input type="checkbox" class="form-control" name="BnkActive" <?php if($Bkn==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr> 
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> ID to Id Transfer  </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"     class="form-control" name="IdtoIdActive" <?php if($IdToId==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr> 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Utilities </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="UtilitiesActive" <?php if($Utili==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Auto Ids </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="instatantImps" <?php if($instatantImps==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
								 
							
    							 
    							 
    							  
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Daily Payout  </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="DPthough" <?php if($DPthough==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Power Player    </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="powerPlayer" <?php if($powerPlayer==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
								 
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label"> Auto Withdrwlas    </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="AutoWithdrawls" <?php if($AutoWithdrawls==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
    					 	 
    					 	 
    					 	     
							 	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">  1000/300 Users   </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="grabPlans" <?php if($grabPlans==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 
								 
								 <?php 
								    if($P2PUser==0){
								 ?>
							  	 <div class="form-group">
								    <label for="inputEmail3" class="col-sm-2 control-label">  P2P Users   </label>
								    <div class="col-sm-6">  
								       <input type="checkbox"   class="form-control" name="P2PUser" <?php if($P2PUser==1) echo "checked";?>  />  
								    </div>
								 </div>
								 <hr>  
								 <?php } ?>
    					 	 
    							 	 
    					 		 <div class="form-group">
    							    <label for="inputEmail3" class="col-sm-2 control-label">Grab Days</label>
    							    <div class="col-sm-6"> 
    							       <input  class="form-control" name="grabDays"  value="<?php echo  $AllUsers->grabDays; ?>"  >
    							    </div>
    							 </div>
    							 <hr>
    							 
    								 	 
								 
								  <div class="form-group">
										<label for="inputEmail3" class="col-sm-2 control-label">Update</label>
										<div class="col-sm-6">
										  <input type="submit"    class="btn btn-primary"  name="submitF" value="Update">
										  <input type="hidden" value="<?php echo $AllUsers->cuurentId?>"  name="Ccid"/> 
										</div>
								  </div>   
								</form>
								
								
							
			  				</div>
			  			</div>
	  				</div>
	  				 
	  			</div>

	  			 


	  		<!--  Page content -->
		  </div>
		</div>
    </div>

<?php  include ABS_PATH.'/admin/footer.php';

    /*$stmt=$conn->prepare("select  utilities,id from  UI__Rgst   "); 
                            $stmt->execute(); 
                            $AllUsers = $stmt->fetchAll(PDO::FETCH_OBJ);   
                          
                          
                            foreach($AllUsers as $amp)
                            {
                                $tc = null;
                                $tc = explode(",",$amp->utilities); 
                                $tc[2]  = 0;  
                                $str = implode(",",$tc);
                                $stmt=$conn->prepare("update  UI__Rgst set  utilities=:utilities where id=:id "); 
                                $stmt->bindValue(':utilities', $str , PDO::PARAM_STR);
                                $stmt->bindValue(':id', $amp->id , PDO::PARAM_STR);
                                $stmt->execute();   
                            }   */
                           
                            
?>    