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.14.49.59
<?php
function studRegData($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fregno = $aobj_context->mobj_data["fregno"];
$fmobile = $aobj_context->mobj_data["fmob"];
$univcode = '051';
$date = date("Y-m-d H:i:s");
$query = "select * from masuser where FREGNO = '{$fregno}' and FMOBILENO = '{$fmobile}'";
$res = $aobj_context->mobj_db->GetRow($query);
$count = count($res);
if($count == 0){
$query = "INSERT INTO masuser (FUNIVCODE, FREGNO, FMOBILENO, FMOBILEOTP,
FMOBOTPTIME, FOTPCOUNTER, FMOBILEVALID, FEMAIL, FEMAILOTP, FEMAILOTPTIME,
FEMAILHASH, FEMAILVALID, FDOB, FADHARNO, FPARENTMOB, FPASSWD, FUSERTYPE,
FACTIVE, FRESETOTP, FRESETEMAILOTP, FRESETEMAILOTPTIME, FRESETEMAILOTPCNT,
FRESETOTPTIME, FRESETOTPCOUNT, FAPPMOBID, FUPDTIME, FOLDMOBILENO, FMOBUPDTIME,
fgrp, FAPPVER, FAPPLASTLOGIN, FOS, FTEMP, FDOBTMP, ftype, fstatus, fsmsstop)
VALUES
('{$univcode}', '{$fregno}', '{$fmobile}', NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, '{$fmobile}', '900*', 'T', NULL, NULL, NULL, NULL, NULL,
0, NULL, '{$date}', NULL, NULL, NULL, NULL, NULL, NULL, 'T', NULL,
NULL, NULL, NULL);";
$result = $aobj_context->mobj_db->Execute($query);
}else{
$arr['msg'] = 'Mobile No./Register No. Already Register';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
if($result)
{
$arr['msg'] = 'Succssfully Register';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else
{
$arr['msg'] = 'Something went wrong';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
?>
|