<?php 
	include('../config.php'); 
	include(ABS_PATH.'/custom_function/default.php'); 
         
    if(isset($_SESSION['userId']))
    {      
        header("Location: ../mob/dashboard/");
        die;
    } 
  
      
      
      
            if(isset($_POST['SubmitRef']))
            {         
                    $set=0;   
                    $stmt=$conn->prepare("select * from UI__Rgst where phm=:phm ");    
                    $stmt->bindValue(':phm',  $_POST['login_id'] , PDO::PARAM_STR);   
                    $stmt->execute();   
                    
                     
                    if($stmt->rowCount() > 0)
                    {
                        $Result = $stmt->fetchAll(PDO::FETCH_OBJ);      
                        $user = $Result[0]->nm;
                        $ids = '';
                        
                            foreach($Result as $key=>$mpp) 
                            {
                                if($key<3)
                                    $ids .= $mpp->cuurentId.","; 
                            }
                                   
                             
                            $ids = trim($ids,","); 
                            
                            $mob = $_POST['login_id'];
                            $iD = $_SESSION['userId'];
                            $msg = urlencode('Dear '.$user.', your Login ID is '.$ids.', DO NOT disclose it to anyone, DailyPay team.'); 
                            
                            $URL  = 'http://mobicomm.dove-sms.com//submitsms.jsp?user=DailyPAY&key=d92eabc025XX&mobile=+91'.$mob.'&message='.$msg.'&senderid=DAYPAY&accusage=1&entityid=1201169824017740929&tempid=1207170142729687277';
                              
                            $crl = curl_init();
                            curl_setopt($crl, CURLOPT_URL, $URL);
                            curl_setopt($crl, CURLOPT_FRESH_CONNECT, true);
                            curl_setopt($crl, CURLOPT_RETURNTRANSFER, true); 
                            $response = curl_exec($crl);  
                            
                             
                        $_SESSION['LoginSuccess']  ="Id has been sent successfully on your mobile no";
                    }else
                            $_SESSION['LoginSuccess']  ="Please enter correct mobile";
                            
                    header("Location: forgetId.php");
                    die;
                        
            }
          
               
	$filename = basename(__FILE__); 
	include_once("../view/".$filename); 
?>