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.148.115.43
<?php
function getCollegeNames($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$coll_code = $aobj_context->mobj_data["coll_code"];
$qry="select FCOLLCODE,concat(FCOLLNAME,', ',FTOWN) as FCOLLNAME from college where FCOLLCODE='{$coll_code}'";
$lobj_rs = $aobj_context->mobj_db->GetRow($qry);
if($lobj_rs)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_rs,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_rs,-1,"Failure");
return;
}
function GetQpCode($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$coll_code = $aobj_context->mobj_data["coll_code"];
$qp_code = $aobj_context->mobj_data["qp_code"];
$collcode=$_SESSION['collcode'] ;
$qry="SELECT distinct ms.FQPCODE,FSUBNAME,FMAXMARKS
FROM masqp ms
inner join valqp v on v.FQPCODE=ms.FQPCODE
where ms.FQPCODE='{$qp_code}'
and v.FCOLLCODE='{$collcode}'";
// echo $qry; die();
$lobj_qp_code = $aobj_context->mobj_db->GetRow($qry);
if($lobj_qp_code)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_qp_code,0,"success");
}
else
{
$err_data="Invalid Qp Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
}
return ;
}
function GetVivaSubjectDetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degcode = $aobj_context->mobj_data["degcode"];
$subcode = $aobj_context->mobj_data["subcode"];
$exam_no = $aobj_context->mobj_data["exam_no"];
$qry="select pm.FVVCODE,s.FSUBNAME,FSMAXMARKS from practical_master pm
inner join subject s on s.FEXAMNO=pm.FEXAMNO
and
s.FDEGREE=pm.FDEGREE
and
s.FCSUBCODE=pm.FVVCODE
where pm.FDEGREE='{$degcode}' and pm.FEXAMNO='{$exam_no}' and pm.FPRCODE='{$subcode}' and pm.FVVCODE!=''";
// echo $qry;die();
$lobj_rs = $aobj_context->mobj_db->GetRow($qry);
if($lobj_rs)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_rs,0,"success");
return;
}
else
{
$err_data="No Viva Subject";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
return;
}
}
function getSubjectNameForDispatchScript($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$subject_code = $aobj_context->mobj_data["subject_code"];
$degree_code = $aobj_context->mobj_data["degree_code"];
$exam = $aobj_context->mobj_data["exam"];
$get_sub_names="select FCSUBCODE,FSUBNAME from degree d inner join subject s on
s.FDEGREE=d.FDEGREE and d.FEXAMNO=s.FEXAMNO
where d.FDEGREE='{$degree_code}' and s.FEXAMNO='{$exam}'
and FCSUBCODE='{$subject_code}'
group by FCSUBCODE";
$lobj_get_sub_names = $aobj_context->mobj_db->getRow($get_sub_names);
//echo $get_sub_names;
if($lobj_get_sub_names)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_sub_names,0,"success");
return;
}
else
{
$err_data="Invalid Subject Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
return;
}
}
function getdegreeNames($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree_code=trim($aobj_context->mobj_data["degree_code"]);
$mod_type=trim($aobj_context->mobj_data["type"]);
//echo $mod_type; die();
if($mod_type== '')
{
$get_name_by_degree_code=" select c.FDEGREE,d.FDESCPN
from colldeg c inner join degree d on
d.FDEGREE=c.FDEGREE and c.FDEGREE='{$degree_code}'
and c.FCOLLCODE='{$college_code}'
and c.FDELETED = 'F'
group by FDEGREE";
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
}
else
{
$err_data="Invalid Degree Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
}
return;
}
else
{
$field_name = "c.{$mod_type}";
//$cond= "and c.{$mod_type} is NULL";
$get_name_by_degree_code=" select c.FDEGREE,d.FDESCPN, ifNULL({$field_name},'NOTFREEZED') as type
from colldeg c inner join degree d on
d.FDEGREE=c.FDEGREE and c.FDEGREE='{$degree_code}'
and c.FDELETED = 'F'
and FCOLLCODE='{$college_code}' group by FDEGREE
";
//echo $get_name_by_degree_code;
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if(($lobj_get_name['type'] == 'NOTFREEZED')&& $lobj_get_name)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
}
else if(($lobj_get_name['type'] != 'NOTFREEZED')&& $lobj_get_name)
{
$err_data="Already Freezed By Admin";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
}
else
{
$err_data="Invalid Degree Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($err_data,-1,"Failure");
}
return;
}
}
function getSubjectCode($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$subject_code=trim($aobj_context->mobj_data["subject_code"]);
$get_subject_by_subject_code="select fsubcode,Fsubshort,fsubname
from subject where fsubcode='{$subject_code}'
and fexamno='A'
group by fsubcode ";
// echo $get_subject_by_subject_code;
$lobj_sub_name = $aobj_context->mobj_db->GetRow($get_subject_by_subject_code);
if($lobj_sub_name!= 0)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_sub_name,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_sub_name,-1,"Failure");
return;
}
function getExamNo($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$exam_no=trim($aobj_context->mobj_data["ExamNo"]);
$degree=trim($aobj_context->mobj_data["degree"]);
$get_name_by_degree_code="select distinct fexamno,fexamname from degree
where fexamno='{$exam_no}' and FDEGREE='{$degree}'";
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
return;
}
function getSubMarkDetails($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Subcode=trim($aobj_context->mobj_data["subcode"]);
$Degcode=trim($aobj_context->mobj_data["degcode"]);
$examno=trim($aobj_context->mobj_data["exam_no"]);
$category=trim($aobj_context->mobj_data["category"]);
$module=trim($aobj_context->mobj_data["module"]);
$cat_cond='';
if(!empty($module))
{
$select_category_cond = "select Value from markentrycodition
where FMODULE='{$module}' and Code='{$category}' and FDELETED='F'";
$lobj_select_category_cond = $aobj_context->mobj_db->GetRow($select_category_cond);
if(!empty($lobj_select_category_cond) && ($lobj_select_category_cond['Value']!='0' || $lobj_select_category_cond['Value']!=0 ))
$cat_cond=" and ".$lobj_select_category_cond['Value'];
}
$get_name_by_degree_code=" select FCSUBCODE, FSUBNAME,FSSUBNAME,FSHORTNAME,FSMAXMARKS from
subject s inner join colldeg c on
s.FDEGREE = c.FDEGREE
and c.fdegree = '{$Degcode}' and s.fexamno='{$examno}'
where s.FCSUBCODE='{$Subcode}' and
c.FCOLLCODE='{$college_code}' {$cat_cond} ";
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
;
//echo $get_name_by_degree_code; die();
if($lobj_get_name)
{
$chk_fcsubcode = "select count(*) as count from colldeg
where FMESTATUS{$examno} like '%{$Subcode}%'
and fdegree='{$Degcode}' and fcollcode='{$college_code}'";
$lobj_chk_fcsubcode = $aobj_context->mobj_db->GetRow($chk_fcsubcode);
// echo $chk_fcsubcode; die();
if($lobj_chk_fcsubcode['count']==0 || $module=="PR")
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
}
else
{
$rs_data = "Subject Freezed By Admin";
echo $aobj_context->mobj_output->ToJSONEnvelope($rs_data,-1,"Failure");
}
}
else
{
$rs_data = "Invalid Subject Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($rs_data,-1,"Failure");
}
return;
}
function getSubMarkDetailsForPopUp($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Subcode=trim($aobj_context->mobj_data["subcode"]);
$get_name_by_dcode_for_popup=" select FCSUBCODE,FSUBNAME,FSSUBNAME,FSHORTNAME,FSMAXMARKS from
subject s
where s.FCSUBCODE='{$Subcode}' ";
$lobj_get_name_by_dcode_for_popup = $aobj_context->mobj_db->GetRow($get_name_by_dcode_for_popup);
if(!empty($lobj_get_name_by_dcode_for_popup))
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name_by_dcode_for_popup,0,"success");
}
else
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name_by_dcode_for_popup,-1,"failure");
}
return;
}
function getSubjectCodePopupForAnswerScript($aobj_context)
{
session_start();
$college_code = $_SESSION['collcode'];
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree_code = trim($aobj_context->mobj_data["degree_code"]);
$Subcode = trim($aobj_context->mobj_data["subcode"]);
$get_name_by_scode_for_popup=" select S.FCSUBCODE,S.FSUBNAME from SUBJECT S
WHERE S.FDEGREE='{$degree_code}' and S.FCSUBCODE = '{$Subcode}' ";
//echo $get_name_by_scode_for_popup; die();
$lobj_get_name_by_scode_for_popup = $aobj_context->mobj_db->GetRow($get_name_by_scode_for_popup);
if($lobj_get_name_by_scode_for_popup)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name_by_scode_for_popup,0,"success");
return;
}
else
{
$arr_data="Invalid Subject Code";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr_data,-1,"Failure");
return;
}
}
function getFullSubjectDetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Shortcode=trim($aobj_context->mobj_data["shortcode"]);
$Degcode=trim($aobj_context->mobj_data["degcode"]);
$examno=trim($aobj_context->mobj_data["examno"]);
$get_name_by_degree_code="select fcsubcode,fsubname,fssubname,fshortname,fsmaxmarks from subject
where fdegree ='{$Degcode}' and fexamno='{$examno}' and fshortname='{$Shortcode}'";
//echo $get_name_by_degree_code; die();
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name!= 0)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
return;
}
function getstudentRegisterNoName($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Regno=trim($aobj_context->mobj_data["Regno"]);
$CollegeCode = $_SESSION['collcode'];
$get_name_by_degree_code="select fregno,fname from student where fcollcode= '{$CollegeCode}'and fregno='{$Regno}'";
//echo $get_name_by_degree_code; die();
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name!= 0)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
return;
}
function CheckEnteredRegisterNo($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Regno=trim($aobj_context->mobj_data["Regno"]);
$CollegeCode = $_SESSION['collcode'];
$id =trim($aobj_context->mobj_data["id"]);
$id_split=explode("_",$id);
$id=$id_split[3];
$get_name_by_degree_code="select '{$id}' as id,fregno,fname from student
where fcollcode= '{$CollegeCode}'and fregno='{$Regno}'";
//echo $get_name_by_degree_code;
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
{
$lobj_get_name=$id;
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
}
return;
}
function getNextRegisterNoName($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Regno=trim($aobj_context->mobj_data["Regno"]);
//echo $Regno; die();
$CollegeCode = $_SESSION['collcode'];
$get_name_by_degree_code="select fregno,fname from student where fcollcode= '{$CollegeCode}'and fregno>'{$Regno}' order by 1 limit 1";
//echo $get_name_by_degree_code; die();
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name!= 0)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
return;
}
function getCategoryNames($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$id=trim($aobj_context->mobj_data["id"]);
$get_category_names="select '{$id}' as id,FCATEGORY as internal_code,FCATEGORY as value from category ";
//echo $get_category_names; die();
$lobj_get_category_names = $aobj_context->mobj_db->GetAll($get_category_names);
if($lobj_get_category_names!= 0)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_category_names,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_category_names,-1,"Failure");
return;
}
function isRegNoValid($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$Regno=trim($aobj_context->mobj_data["Regno"]);
$CollegeCode = $_SESSION['collcode'];
$degree =trim($aobj_context->mobj_data["degree"]);
$get_no="select fregno,fname from student
where fcollcode= '{$CollegeCode}'and fregno='{$Regno}' and FDEGREE='{$degree}'";
//echo $get_no;
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_no);
if($lobj_get_name)
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
else
{
$lobj_get_name=$id;
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,-1,"Failure");
}
return;
}
function GetSubSubjectCategory($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$type = trim($aobj_context->mobj_data["type"]);
if($type!='')
$where_cond=" where FMODULE='{$type}'";
else $where_cond=' ';
$get_Subsubject="SELECT Code,Name from markentrycodition {$where_cond} order by Code";
//echo $get_Subsubject;
$lobj_get_subject = $aobj_context->mobj_db->GetAll($get_Subsubject);
if($lobj_get_subject)
print_r ($aobj_context->mobj_output->ToJSONEnvelope($lobj_get_subject,0,"success"));
else
print_r ($aobj_context->mobj_output->ToJSONEnvelope($lobj_get_subject,-1,"Failure"));
return;
}
function CheckEnteredstudentSubjectCode($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$college_code = $_SESSION['collcode'];
$Degcode=trim($aobj_context->mobj_data["degcode"]);
$examno=trim($aobj_context->mobj_data["exam_no"]);
$category=trim($aobj_context->mobj_data["category"]);
$Subcode=trim($aobj_context->mobj_data["subcode"]);
$module=trim($aobj_context->mobj_data["module"]);
$id=trim($aobj_context->mobj_data["id"]);
$id_split=explode("_",$id);
$id=$id_split[3];
$cat_cond='';
$select_category_cond = "select Value from markentrycodition
where FMODULE='{$module}' and Code='{$category}' and FDELETED='F'";
$lobj_select_category_cond = $aobj_context->mobj_db->GetRow($select_category_cond);
if($lobj_select_category_cond['Value']!='0' || $lobj_select_category_cond['Value']!=0)
$cat_cond=" and ".$lobj_select_category_cond['Value'];
$get_name_by_degree_code=" select '{$id}' as id, FCSUBCODE,FSUBNAME,FSSUBNAME,FSHORTNAME,FSMAXMARKS from
subject s inner join colldeg c on
s.FDEGREE = c.FDEGREE
and s.fdegree = '{$Degcode}' and s.fexamno='{$examno}'
where s.FCSUBCODE='{$Subcode}' and
c.FCOLLCODE='{$college_code}' {$cat_cond} ";
$lobj_get_name = $aobj_context->mobj_db->GetRow($get_name_by_degree_code);
if($lobj_get_name)
{
$chk_fcsubcode = "select count(*) as count from colldeg
where FMESTATUS{$examno} like '%{$Subcode}%' ";
$lobj_chk_fcsubcode = $aobj_context->mobj_db->GetRow($chk_fcsubcode);
if($lobj_chk_fcsubcode['count']==0)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($lobj_get_name,0,"success");
}
else
{
$rs_data = "Subject Freezed By Admin";
echo $aobj_context->mobj_output->ToJSONEnvelope($rs_data,-1,"Failure");
}
}
else
{
$rs_data =$id;
echo $aobj_context->mobj_output->ToJSONEnvelope($rs_data,-1,"Failure");
}
return;
}
?>
|