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 : 18.222.161.119


Current Path : /proc/thread-self/root/var/www/html/univadmin/
Upload File :
Current File : //proc/thread-self/root/var/www/html/univadmin/sjbit_smspush_01_stop.php

<?php

	//include 'database.php';
	$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
	$username   = "admin";
	$password  = "T0g3th3r@all";

	$conn = new  mysqli($servername,$username,$password);
	if(!$conn) 
	{
        die("Connection failed: " . mysqli_connect_error());
	}

	$commondb = "logisys3_comexam";
	ini_set('max_execution_time', 300);
	$sql = "select FDBUSER,fdbname, funivcode,ffolder from {$commondb}.dbname where 
	ifnull(fdeleted,'') <> 'T' and ifnull(FEGOV,'') = 'T'
	and funivcode in('055','033','050','052','051','021','054')"; 
	$result = mysqli_query($conn,$sql);

	$result1 = 0;
	if($result)
	{		
		while($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
		{
			$db = $row['fdbname'];
			$univcode = $row['funivcode'];
			$ffolder = $row['FDBUSER'];

			$sql1 = "insert ignore into {$commondb}.sendsms(funivcode, fregno,fmobileno, fusertype,fenttype, fsubcode, fmessage, fstatus, fdeleted, fyear, fexamtype, fupdate,fexamdate)
			select distinct '{$univcode}', x.fregno,m.fmobileno,'S','RA', concat(y.fqpcode,x.fyear, x.fexamtype) ,  
			concat('Dear Student, you have been allotted to room no. : ',
			left(if(ifnull(z.froomname,'') = '',
			ifnull(x.FHALLNO,''),concat(ifnull(z.froomname,''),' - ',x.fslno)),30), ' for the QP Code ',
			concat(y.fsubshort,' - ',left(y.fsubname,20)),' on ',
			date_format(y.fdoe,'%d/%m/%Y'),' ',w.FDESCPN,'',' - PMSOLU') as fmessage,
			'F', 'F', x.fyear, x.fexamtype,now(),d.fexamdate
			from {$db}.canddet x inner join {$db}.subject y
			on  x.fdegree = y.fdegree and x.fexamno = y.fexamno and x.fsubcode = y.fsubcode 
			inner join {$db}.degree d on x.fdegree = d.fdegree and x.fexamno = d.fexamno
			inner join {$db}.candsum cs on cs.fcollcode = x.fcollcode
			
			and cs.fdegree = x.fdegree and cs.fregno = x.fregno
			and ifnull(cs.frecptdate,'')<>''
			inner join logisys3_comexam.masuser m on m.fregno = cs.fregno 
			and m.funivcode = '{$univcode}'	
			and ifnull(m.fsmsstop,'') <> 'T'
			left join {$db}.masroom z on cs.fcntrcode = z.fcollcode 
			and x.FHALLNO = z.froomno
			left join {$db}.reason w on y.FSESSION = w.FREASONCD
			where ifnull(x.fpresent,'') = 'p' and ifnull(x.fpassmth,'') = ''
			and ifnull(y.fqpcode,'') <> ''
			and date_format(now(),'%Y-%m-%d') = date_format(y.fdoe,'%Y-%m-%d')
			and ifnull(y.FSESSION,'') like 'M%' and ifnull(x.fhallno,'') <> ''";
			$result1 = mysqli_query($conn, $sql1);
			

		}
	}
		
?>