0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.16.50.1


Current Path : /var/www/html/univadmin/bkhm/
Upload File :
Current File : /var/www/html/univadmin/bkhm/bkmhconfirm.php

<?php
include("/var/www/config.php");    
include ('/var/www/html/sms/sendsmsapiv1.php');
include("/var/www/html/univadmin/src/sendGridMail.php");
    
include("/var/www/config.php");
$servername = SERVERNAME;
$username = USERNAME;
$password = PASSWORD;
$database = "logisys3_demo";

// $servername = "184.168.117.223";
// //$servername = "bkmariappacharities.org";
// $username   = "bkmh_alumni";
// $password  = "Arunkumar@22";
// $database = "bkhm_alumni";

$conn = new  mysqli($servername,$username,$password,$database);
if(!$conn) 
{
    die("Connection failed: " . mysqli_connect_error());
}
error_reporting(E_ALL);
ini_set('display_errors', 'on');

    $FCNTCODE = $_POST["FCNTCODE"];
    $FMOBILE = $_POST["FMOBILE"];
    $FEMAIL = $_POST["FEMAIL"];
    $FBATCH = $_POST["FBATCH"];
    $mob_otps = $_POST["mob_otps"];
    $date = date('Y-m-d H:i:s');

    $query1 = "select FMOBOTP from memhead where FMOBILE ='{$FMOBILE}'";
    $result = mysqli_query($conn,$query1);
    $row1 = mysqli_fetch_assoc($result);

    $FMOBOTP = $row1['FMOBOTP'];
   
        if($mob_otps == $FMOBOTP){
            $query = "update memhead set FSTATUS = 'T', FTYPE = 'M'
                    where FMOBILE ='{$FMOBILE}'";

            $result = mysqli_query($conn,$query); 
            // $univcode = "098";
            // if($FCNTCODE == " 91"){
            //     date_default_timezone_set('Asia/Kolkata');
            //     $time =  date("h:i A");
            //     $otp = rand(100000, 90000);
            //     $smsotp = "From BKMH: Dear User, OTP for Registration is $otp. sent at {$time} - Uniclare";
            //     $sms = new SMS('098', 'OTP');
            //     $sms->sendIndvidualSms($FMOBILE, $smsotp, '900', 'PGET');
                
            //     $smsresp = 'Sent';
            //     $row["sms"] = $smsresp;
            // }
        }else{
            $row['status'] = 'invalid';
            $row['msg'] = 'Invalid Mobile OTP';
            echo json_encode($row);
            return;
        }
                    // $message = "<html>";
                    // $message .= "<body>";
                    // $message .= "<style>";
                    // $message .= ".mail_tbl td{text-align:left; padding:2px; font-size:12px; 
                    //                     font-family: Verdana, Arial, Helvetica, sans-serif;}";
                    // $message .= "</style>";
                    // // $message .= "<center><img src='{}' height='100px' width='200px'/></center>";
                    // $message .= "<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align:center; >                
                    //             B.K. Mariappa's Charities</p>";
                    // $message .= "<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align:right'>Date :" . " $date " . "</p>";
                    // $message .= "<p>Dear Sir/Madam,<br></p>";
        
                    // $message .= "<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif'>
                    //                 Your Login I'd for BKMH User I'd :{$FMOBILE} and Password:{$FMOBILE}</p>";
                    // $message .="<br/>";
        
        
                    // $message .= "<p style='font-size:12px; font-family: Verdana, Arial, Helvetica, sans-serif'>
                    //                 Thanking You,</p>";
        
                    // $message .= "</body>";
                    // $message .= "</html>";
                    
                    // $subject = strtoupper("Subject :Email For Login BKMH");
                    // $from = "";
        
                    // $resp = sendGridMail($FEMAIL, $subject, $message, $univcode);
        
        
    if($result){
        session_start();
        $_SESSION["MOBILE"]=$FMOBILE;
        $row['status'] = 'success';
        $row['msg'] = 'Registration Succfully. Welcome to BKMH Alumni Connect please update your profile completely, which will will help us too communicate.';
        echo json_encode($row);
    }else{
        $row['status'] = 'invalid';
        $row['msg'] = 'Something went wrong';
        echo json_encode($row);
    }
mysqli_close($conn);
?>