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.145.152.168
<?php
/*
* Api For sending result sms through web export after uploading the result
*
url == http://studentportal.logisys.org/result_sms_push.php
post data == funivcode=003&fdbname=logisys3_kus
*
*/
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);
//connect to database
$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$username = "admin";
$password = "Logisys2104";
$conn = new mysqli($servername,$username,$password);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$commondb = "logisys3_comexam";
// Will be sent by mohan sir through web export
$db = 'logisys3_bcu';
$univcode = '041';
//Result Push data to common databse
if( $db != '' && $univcode != '')
{
$sql1 = "insert ignore into {$commondb}.pushnotif(funivcode,fmobileno,fmobappid, fcollcode, fregno, fdegree, fenttype, fsubcode, ftitle, fbody, fstatus, fyear, fexamtype, fpushdate)
select distinct '{$univcode}',m.fmobileno,m.FAPPMOBID,cs.fcollcode, m.fregno, cs.fdegree, 'ECH', 'ECH',
'Eligible to Pay Exam Fee' as ftitle,
CONCAT('Dear Student, Your Reg. No. is : ', s.fregno,' and student id : ', s.fstudid,'. Your present status as confirmed by your college is as follows.
Eligibility : Confirmed.
Concession to pay exam fee : ', IF(cs.FCONSTYPE = '0123456789','NO','YES'),'
Visit student portal studentportal.universitysolutions.in for filling the exam application form immediately') AS fmessage,
'F', cs.fyear, cs.fexamtype,NOW()
FROM {$db}.student s INNER JOIN {$db}.candsum cs
ON s.fregno = cs.fregno AND cs.felig <> '0123456789'
INNER JOIN {$commondb}.masuser m ON cs.fregno = m.fregno AND m.funivcode = '{$univcode}'
and ifnull(fappmobid,'') <> ''
and IFNULL(FELIGPUSH,'') <> 'T'";
$result1 = mysqli_query($conn, $sql1);
if($result1)
{
$sql1 = "update {$db}.candsum x set x.FELIGPUSH = 'T'
where ifnull(x.FELIGPUSH,'') <> 'T'
and felig <> '0123456789'";
$result3 = mysqli_query($conn, $sql1);
echo "success";
}
else
{
echo "failure";
}
}
?>
|