<?php 
	include_once('../../config.php');    
	
	if(isset($_POST['Verify']))		
	{ 
	    
            $stmt=$conn->prepare("select  * from   UI__Rgst  where phm=:phm ");  
            $stmt->bindValue(':phm', $_POST['phoneNo'] , PDO::PARAM_STR);
            $stmt->execute(); 
            
             if($stmt->rowCount() > 0)
             {
                  $AllUsers = $stmt->fetch(PDO::FETCH_OBJ); 
                  $ar['name'] = $AllUsers->nm;
                  $ar['cust_id'] = $AllUsers->custId;
                  $ar['found'] =  1;
             }else
                $ar['found'] =  0;
                
            echo json_encode($ar); 
            die;        
	}    
	
	
	if(isset($_POST['CrtPn']))		
	{ 
		 
 
	}      
	  
	
	
	if(isset($_POST['PayTrading']))		
	{   	     
	    $stmt=$conn->prepare("update UI__DailyROIGene set PaidDate=:PaidDate , paidStatus=1 where id=:id");  
        $stmt->bindValue(':PaidDate', date("d-M-Y H:i"), PDO::PARAM_STR); 
        $stmt->bindValue(':id', $_POST['val'], PDO::PARAM_STR); 
        $stmt->execute();      
        die;         
	}
	
	 
	if(isset($_POST['PayNow']))		
	{   	     
	     
	    $stmt=$conn->prepare("update UI__Bns set PaidDate=:PaidDate , paidStatus=1 where id=:id");  
        $stmt->bindValue(':PaidDate', date("d-M-Y H:i"), PDO::PARAM_STR); 
        $stmt->bindValue(':id', $_POST['val'], PDO::PARAM_STR); 
        $stmt->execute();      
        die;         
	}
	
	if(isset($_POST['del_Pin']))		
	{   	     
	    $stmt=$conn->prepare("delete from UI__PnMX where PhNo=:id");  
        $stmt->bindValue(':id', $_POST['val'], PDO::PARAM_STR); 
        $stmt->execute();      
        die;         
	}
	
	if(isset($_POST['DelFund']))		
	{   	     
	    $stmt=$conn->prepare("delete from  UI__Fundtransfer where id=:id");  
        $stmt->bindValue(':id', $_POST['val'], PDO::PARAM_STR); 
        $stmt->execute();      
        die;         
	}   
	
	
	if(isset($_POST['deletBar']))		
	{   	     
	    unlink(ABS_PATH."/uploads/banners/".$_POST['name']); 
	    $stmt=$conn->prepare("delete from   UI__Banners where id=:id");  
        $stmt->bindValue(':id', $_POST['val'], PDO::PARAM_STR); 
        $stmt->execute();      
        die;         
	} 
	
	if(isset($_POST['special100']))		
	{   	      
            $stmt=$conn->prepare("update   UI__Rgst set rewardPoints=:rewardPoints where id=:id ");   
            $stmt->bindValue(':rewardPoints', 100000 , PDO::PARAM_STR);
            $stmt->bindValue(':id', $_POST['val'] , PDO::PARAM_STR);
            $stmt->execute();   
            die;
	}
	
	if(isset($_POST['deleteTopup']))		
	{         
        $stmt=$conn->prepare("select  * from  UI__DChstr where id=:Rid ");  
        $stmt->bindValue(':Rid', $_POST['val'] , PDO::PARAM_STR);
        $stmt->execute(); 
        $AllUsers = $stmt->fetch(PDO::FETCH_OBJ); 

          
        $stmt=$conn->prepare("insert into   UI__DeleTop (Rid,Amt,Tdate) values(:Rid,:Amt,:Tdate) ");  
        $stmt->bindValue(':Rid', $AllUsers->Rid, PDO::PARAM_STR);
        $stmt->bindValue(':Amt', $AllUsers->amt, PDO::PARAM_STR);
        $stmt->bindValue(':Tdate', date("d-M-Y H:i"), PDO::PARAM_STR);
        $stmt->execute(); 
        
        
        $stmt=$conn->prepare("delete from UI__DChstr where id=:Rid ");  
        $stmt->bindValue(':Rid', $_POST['val'] , PDO::PARAM_STR);
        $stmt->execute();  
        die; 
	}
	
	
	
?>