<?php
	include_once('../../config.php');    
	 
	  
	                        
                      
                 
                     
                        if(($_REQUEST['etththv']=='NEUIEUBNDDOUIOEIONKLV6897634fnfvBVKV34')) 
                        {
                     
                                    $stmt=$conn->prepare("select *   from    UI__Mtwi where  where dys=0 and clear=0  ");   
                                    $stmt->execute();   ;  
                                    $UI__Mtwi = $stmt->fetchAll(PDO::FETCH_OBJ); 
                                    
                                    
                                    foreach($UI__Mtwi as $dmpp)
                                    {     
                                         
                                            if($dmpp->releaseData==date("d-M-Y"))
                                            {
                                                $stmt=$conn->prepare("insert into  UI__Mtwi (custId,Tdate,Amt,status,clear) values(:custId,:Tdate,:Amt,0,1)   ");   
                                                $stmt->bindValue(':custId', $dmpp->custId , PDO::PARAM_STR); 
                                                $stmt->bindValue(':Tdate', date("d-M-Y"), PDO::PARAM_STR); 
                                                $stmt->bindValue(':Amt', $dmpp->Amt , PDO::PARAM_STR);  
                                                $stmt->execute(); 
                                                AddFundNew($dmpp->custId,($dmpp->Amt),"MWI Amount");  
                                                
                                                $stmt=$conn->prepare("update  UI__Mtwi set dys=1 where id=:id   ");   
                                                $stmt->bindValue(':id', $dmpp->id , PDO::PARAM_STR);  
                                                $stmt->execute(); 
                                            }
                                           
                                    }  
                        }