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.223.241.235
<?php
function saveNBLRegn($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$reg_no = $aobj_context->mobj_data["reg_no"];
include_once($aobj_context->main_src."/json.php");
$json = new Services_JSON();
//recieve decode json string of personal info
$lstr_param = stripslashes($aobj_context->mobj_data["regn_info"]);
$per_arr_data = json_decode($lstr_param, true);
$strSubjects = implode("','", $sub_arr_data);
//convert to Associative array
$rgPerArray = array();
for($i=0; $i<count($per_arr_data); $i++)
{
$rgPerArray[$per_arr_data[$i]['id']] = $per_arr_data[$i]['value'];
}
//For phd admissions assuming examno and college code
$fmobileno = '';
$query = "select fmobileno from nlsregn
where fmobileno = '{$rgPerArray['fmobileno']}'";
$studresult = $aobj_context->mobj_db->GetRow($query);
if(count($studresult) >0)
$fmobileno = $studresult['fmobileno'];
// var_dump($fmobileno);
if($fmobileno == '')
{
$insert_qry="insert into nlsregn
(fname, femail, fmobileno, fattno, fattdate1, fattdate2,
fattdate3, fremainder, fcreatedate, fremoteip)
values
(ucase('{$rgPerArray['fname']}'), '{$rgPerArray['femail']}','{$rgPerArray['fmobileno']}', '{$rgPerArray['fattno']}',
'{$rgPerArray['fattdate1']}', '{$rgPerArray['fattdate2']}',
'{$rgPerArray['fattdate3']}','{$rgPerArray['fremainder']}', now(),
'{$_SERVER['REMOTE_ADDR']}' )";
// var_dump($insert_qry);
$results = $aobj_context->mobj_db->Execute($insert_qry);
if($results)
{
$query = "select fid from nlsregn
where fmobileno = '{$rgPerArray['fmobileno']}'";
$results2 = $aobj_context->mobj_db->GetRow($query);
if(count($results2) > 0)
{
$regnno = $results2['fid'];
$data='Thank you for accepting the invite. We will keep you informed with updates and reminders on the Distinguished Annual Nobel Lecture Series. Looking forward to having you with us at the Distinguished Annual Nobel Lecture Series. <br/><br/>
Regards,<br/>
Vice Chancellor,<br/>
Bengaluru Central University<br/>';
$arr['message']= $data;
$arr['app_no'] = $regnno;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr['message'] = 'Error while Registering.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
else
{
$arr['message'] = 'Error while Registering.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
else
{
$query = "update nlsregn set
fname = '{$rgPerArray['fname']}',
femail = '{$rgPerArray['femail']}',
fattno = '{$rgPerArray['fattno']}',
fattdate1 = '{$rgPerArray['fattdate1']}',
fattdate2 = '{$rgPerArray['fattdate2']}',
fattdate3 = '{$rgPerArray['fattdate3']}',
fremainder = '{$rgPerArray['fremainder']}',
flogdate = now(),
fremoteip = '{$_SERVER['REMOTE_ADDR']}'
where fmobileno = '{$fmobileno}'";
// var_dump($query);
$results = $aobj_context->mobj_db->Execute($query);
if($results)
{
$query = "select fid from nlsregn
where fmobileno = '{$rgPerArray['fmobileno']}'";
$results2 = $aobj_context->mobj_db->GetRow($query);
if(count($results2) > 0)
{
$regnno = $results2['fid'];
$data='Thank you for accepting the invite. We will keep you informed with updates and reminders on the Distinguished Annual Nobel Lecture Series. Looking forward to having you with us at the Distinguished Annual Nobel Lecture Series. <br/><br/>
Regards,<br/>
Vice Chancellor,<br/>
Bengaluru Central University<br/>';
$arr['message']= $data;
$arr['app_no'] = $regnno;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr['message'] = 'Error while Registering.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
else
{
$arr['message'] = 'Error while Registering.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
}
|