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 : 52.15.113.71
<?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);
include("/var/www/config.php");
//include 'database.php';
//connect to database
$servername = SERVERNAME;
$username = USERNAME;
$password = PASSWORD;
$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
$unicode = $_GET['univcode'];
if($unicode == '')
{
echo "Univ Code Empty";
die();
}
if($unicode == '027')
{
$db = 'logisys3_rcu';
$ffolder = 'RCUB';
$univcode = '027';
}
//Result Push data to common databse
if( $db != '' && $univcode != '')
{
$sql1 = "INSERT IGNORE INTO logisys3_comexam.sendsms(funivcode, fregno, fmobileno, fenttype, fsubcode, fmessage, fstatus, fdeleted, fyear, fexamtype,fupdate)
SELECT DISTINCT '{$univcode}', m.fregno, m.fmobileno, 'STPC', 'STPC',
CONCAT('From ','{$ffolder}',': Photo copy (Scanned copy) of answer book is available for downloading in Student Portal / App. Click I NEED HELP for any Queries / Help - Uniclare') AS fmessage,
'F', 'F', '2021', '2', NOW()
FROM logisys3_comexam.masuser m where m.funivcode = '{$univcode}'
and fregno in (select distinct fregno from {$db}.res_stud
where ifnull(fpaymentstatus,'') = 'success'
and FCORRTYPE = 'PC'
and (fdegree like 'bca%' or fdegree like 'm%')
and ifnull(fxrpush,'') <> 'T')";
$result1 = mysqli_query($conn, $sql1);
if($result1)
{
$sql1 = "update {$db}.res_stud set fxrpush = 'T'
where ifnull(fpaymentstatus,'') = 'success'
and ifnull(fxrpush,'') <> 'T'
and (fdegree like 'bca%' or fdegree like 'm%')
and FCORRTYPE = 'PC'";
$result3 = mysqli_query($conn, $sql1);
echo "success";
}
else
{
echo "failure";
}
}
?>
|