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.188.245.104
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/savePassword.php |
<?php
function savePassword($aobj_context){
$College_Code = $aobj_context->mobj_data['collcode'];
$userid = $aobj_context->mobj_data['user'];
$funivcode = $aobj_context->mobj_data['univcode'];
$opws = $aobj_context->mobj_data["oldpwd"];
$pws = $aobj_context->mobj_data["newpwd"];
$query = "select * from s_sysdb where sysusr = '{$userid}' and sysusrkey = '{$opws}' AND college_code='{$College_Code}'";
$result = $aobj_context->mobj_db->GetRow($query);
$college_code = $result['college_code'];
if($result)
{
}else
{
$rdata = "Old Password Not Matching";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
$query = "update s_sysdb set sysusrkey = '{$pws}'
where college_code = '{$college_code}'
and sysusr = '{$userid}'";
$res = $aobj_context->mobj_db->Execute($query);
if($res)
{
$rdata = "Updated Successfully.";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,0,"success"));
return $rdata;
}
else
{
$rdata = "No Updation Please Try After Sometime";
print_r($aobj_context->mobj_output->ToJSONEnvelope($rdata,-1,"Failure"));
return $rdata;
}
}
?>
|