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.140.188.195
<?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 = "97.74.228.93";
$username = "logisys3_logu";
$password = "Logisys@2106";
$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 logisys3_comexam.pushnotif(funivcode, fcollcode, fregno, fdegree, fenttype,
fsubcode, ftitle, fbody, fstatus, fyear, fexamtype, fpushdate)
select distinct '041', x.fcollcode,x.fregno,x.fdegree, 'RV', x.fexamno, 'Revaluation Result Announced',
concat('Dear ', st.fname,' (',x.fregno ,')',', your revaluation result for ',d.fexamname, ' ',
' exam has been announced. Result : ',
y.fclass,'. Visit student portal studentportal.universitysolutions.in for details.') as fmessage,
'F', x.fyear, x.fexamtype, now()
from {$db}.res_fee x
inner join {$db}.resmarks y
on x.fdegree = y.fdegree
and x.fexamno = y.fexamno
and x.fregno = y.fregno
inner join {$db}.degree d
on x.fdegree = d.fdegree and x.fexamno = d.fexamno
inner join {$db}.student st
on x.fregno = st.fregno
where ifnull(x.FCORRTYPE,'') <> '';
and ifnull(x.frespush,'') <> 'T'";
$result1 = mysqli_query($conn, $sql1);
if($result1)
{
$sql1 = "update {$commondb}.pushnotif x, {$commondb}.masuser y set x.fmobileno = y.fmobileno,
x.fmobappid = y.FAPPMOBID
where x.funivcode = y.funivcode
and x.fregno = y.fregno
and ifnull(y.FAPPMOBID,'') <> ''";
//var_dump($sql1);
$result1 = mysqli_query($conn, $sql1);
echo "success";
}
else
{
echo "failure";
}
}
?>
|