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.138.120.112
<?php
include 'database.php';
ini_set('max_execution_time', 300);
$sql = "select fdbname from logisys3_comexam.dbname where ifnull(fdeleted,'') <> 'T'";
$result = mysqli_query($conn,$sql);
if($result)
{
while($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
$db = $row['fdbname'];
$sql = "INSERT IGNORE INTO logisys3_comexam.sendsms
select {$db}.control.funivcode,{$db}.marks.FREGNO,logisys3_comexam.masuser.FMOBILENO,'IA',
'Dear Student, Your IA Marks has been announced please check at http://studentportal.logisys.org' ,'F','F'
from {$db}.marks inner join logisys3_comexam.masuser on
logisys3_comexam.masuser.FREGNO = {$db}.marks.FREGNO
inner join {$db}.control on
{$db}.control.funivcode = logisys3_comexam.masuser.FUNIVCODE
inner join {$db}.collexam on {$db}.marks.FDEGREE = {$db}.collexam.FDEGREE and {$db}.marks.FCOLLCODE = {$db}.collexam.FCOLLCODE
where DATE_FORMAT(NOW(),'%Y-%m-%d') between DATE_SUB(collexam.fiato, INTERVAL 3 DAY)
AND DATE_ADD(collexam.fiato,INTERVAL 60 DAY)";
// var_dump($sql);
$result1 = mysqli_query($conn,$sql);
$sql1 = "INSERT IGNORE INTO logisys3_comexam.sendsms
select {$db}.control.funivcode,{$db}.candsum.FREGNO,logisys3_comexam.masuser.FMOBILENO,'HT',
'Dear Student, Your Hall Ticket is Available at http://studentportal.logisys.org for Download' ,'F','F'
from {$db}.candsum inner join logisys3_comexam.masuser on
logisys3_comexam.masuser.FREGNO = {$db}.candsum.FREGNO
inner join {$db}.control on
{$db}.control.funivcode = logisys3_comexam.masuser.FUNIVCODE
inner join {$db}.collexam on {$db}.candsum.FDEGREE = {$db}.collexam.FDEGREE and {$db}.candsum.FCOLLCODE = {$db}.collexam.FCOLLCODE
where DATE_FORMAT(NOW(),'%Y-%m-%d') between collexam.fhtfrom
AND collexam.fhtto and ifnull({$db}.candsum.frecptdate,'') <> ''";
// var_dump($sql1);
$result2 = mysqli_query($conn,$sql1);
$sql2 = "INSERT IGNORE INTO logisys3_comexam.sendsms
select {$db}.control.funivcode,{$db}.attend.FREGNO,logisys3_comexam.masuser.FMOBILENO,'AT',
'Dear Student, Your Attendance has been announced please check at http://studentportal.logisys.org' ,'F','F'
from {$db}.attend inner join logisys3_comexam.masuser on
logisys3_comexam.masuser.FREGNO = {$db}.attend.FREGNO
inner join {$db}.control on
{$db}.control.funivcode = logisys3_comexam.masuser.FUNIVCODE
inner join {$db}.collexam on {$db}.attend.FDEGREE = {$db}.collexam.FDEGREE and {$db}.attend.FCOLLCODE = {$db}.collexam.FCOLLCODE
where DATE_FORMAT(NOW(),'%Y-%m-%d') between DATE_SUB(collexam.fiato, INTERVAL 3 DAY)
AND DATE_ADD(collexam.fiato,INTERVAL 60 DAY)";
// var_dump($sql2);
$result3 = mysqli_query($conn,$sql2);
}
}
if($result1)
{
$arr = "Updated Successfully";
echo json_encode($arr);
}else
{
$arr = "Updation Failed";
echo json_encode($arr);
}
?>
|