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.145.85.123
<?php
function GetProgwiseCandidates($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$progCode = $aobj_context->mobj_data['progrCode'];
$sql_candList = "select s.app_no, sd.frollno, s.ffname, date_format(s.fdob,'%d/%m/%Y') as dob, m.FDESCPN,
s.photo_path, sd.fselected, sd.fmarks from student s left join stud_det sd on s.app_no = sd.app_no
left join mascategory m on m.FCATEGORY = s.fcatcode
where ( sd.fpresent = 'P' or s.fucnet ='Cleared' or s.fucjrf = 'Awarded')
and IFNULL(sd.frollno ,'') <> '' and sd.fsubcode = '{$progCode}' and
sd.fsubcode <> '02' and ifnull(fadmitted,'') <> 'T' order by sd.fmarks desc";
$lobj_candList = $aobj_context->mobj_db->GetAll($sql_candList);
if(!empty($lobj_candList))
{
$e_data.="<table align = 'center' width='900px' cellspacing='0' cellpadding='1' border='0' >";
$e_data.="<th align='left' colspan='8' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'>Degree List</th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td align='center' style='width:40px; font-size:12px; border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>App No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; padding:5px 5px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Roll No.</td>";
$e_data.="<td align='center' style='width:200px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Name</td>";
$e_data.="<td align='center' style='width:150px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>DOB / Cat / Marks</td>";
$e_data.="<td align='center' style='width:120px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Photo</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Selected</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Save</td>";
$e_data.="</tr>";
$k=0;
$id=0;
$m=0;
//var_dump($lobj_get_moudle_names); die();
$counter_degree = 1;
foreach($lobj_candList as $key=>$value)
{
if($k%2==0)
{
$class='tbl_row';
$inp_class='tbl_row_input';
}
else
{
$input_class='tbl_row1';
$inp_class='tbl_row1_input';
}
$checked=($value['fselected']!='T')?" ":"checked";
$e_data.="<tr class='ui-widget-content jqgrow'>";
$e_data.="<td class='tbl_row_new' style='width:50px;border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_cnt_{$id}' >{$counter_degree}</td>";
$e_data.="<td class='tbl_row_new' style='width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_mname_{$id}' >{$value[app_no]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center ' id='it_dname_{$id}' >{$value[frollno]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:200px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' >{$value[ffname]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:100px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;' id='it_dname_{$id}' >{$value[dob]}<br>{$value[FDESCPN]}<br>{$value[fmarks]}</td>";
$e_data.="<td class='tbl_row_new' style='width:200px; border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><img src='{$value[photo_path]}' width='100px' height='100px'></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='checkbox' id='check_{$value[app_no]}' {$checked} ></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='submit' id='' onclick='saveSelectedCandidates({$value[app_no]},{$value[frollno]})' value='Save'></td>";
$e_data.="</tr>";
$k++;
$id++;
$m++;
$counter_degree++;
}
$e_data.="</table>";
$arr['total_count']= $m;
$arr['html']=$e_data;
$arr['error']=0;
}
else
{
$arr['html'] = '<p> No record found </p>';
}
if($arr['error']==0)
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
else
{
$error_msg = "Invalid Degree Code..!";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
return;
}
function saveSelectedCandidates($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = $aobj_context->mobj_data['appno'];
$rollno = $aobj_context->mobj_data['rollno'];
$chk_select = $aobj_context->mobj_data['chk_select'];
$sql_updatecand = "update stud_det set fselected = '{$chk_select}' where app_no = '{$appno}' and frollno = '{$rollno}'";
$lobj_updatecand = $aobj_context->mobj_db->Execute($sql_updatecand);
if($lobj_updatecand)
{
$succ_msg = "Updated Succesfully";
echo $aobj_context->mobj_output->ToJSONEnvelope($succ_msg,0,"success");
}
else
{
$error_msg = "Update Failed";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
}
function GetProgwiseCandAdm($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$progCode = $aobj_context->mobj_data['progrCode'];
$sql_candList = "select s.app_no, sd.frollno, s.ffname, date_format(s.fdob,'%d/%m/%Y') as dob, m.FDESCPN,
s.photo_path, sd.fadmitted, sd.fmarks from student s left join stud_det sd on s.app_no = sd.app_no
left join mascategory m on m.FCATEGORY = s.fcatcode
where ( sd.fpresent = 'P' or s.fucnet ='Cleared' or s.fucjrf = 'Awarded')
and IFNULL(sd.frollno ,'') <> '' and sd.fsubcode = '{$progCode}' and sd.fselected ='T'
and sd.finterview = 'T' and sd.fsubcode <> '02' order by sd.fmarks desc";
$lobj_candList = $aobj_context->mobj_db->GetAll($sql_candList);
if(!empty($lobj_candList))
{
$e_data.="<table align = 'center' width='900px' cellspacing='0' cellpadding='1' border='0' >";
$e_data.="<th align='left' colspan='8' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'>Degree List</th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td align='center' style='width:40px; font-size:12px; border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>App No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; padding:5px 5px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Roll No.</td>";
$e_data.="<td align='center' style='width:200px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Name</td>";
$e_data.="<td align='center' style='width:150px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>DOB / Cat / Marks</td>";
$e_data.="<td align='center' style='width:100px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Photo</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Selected</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Save</td>";
$e_data.="</tr>";
$k=0;
$id=0;
$m=0;
//var_dump($lobj_get_moudle_names); die();
$counter_degree = 1;
foreach($lobj_candList as $key=>$value)
{
if($k%2==0)
{
$class='tbl_row';
$inp_class='tbl_row_input';
}
else
{
$input_class='tbl_row1';
$inp_class='tbl_row1_input';
}
$checked = ($value['fadmitted']!='T')?" ":"checked";
$printIdcard = ($value['fadmitted']!='T')?" ":"<a href='#' onclick ='printCandidateIdentityCard({$value[app_no]},{$value[frollno]})' >Print AdmitCard</a>";
$e_data.="<tr class='ui-widget-content jqgrow'>";
$e_data.="<td class='tbl_row_new' style='width:50px;border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_cnt_{$id}' >{$counter_degree}</td>";
$e_data.="<td class='tbl_row_new' style='width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_mname_{$id}' >{$value[app_no]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center ' id='it_dname_{$id}' >{$value[frollno]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:200px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' >{$value[ffname]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:100px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;' id='it_dname_{$id}' >{$value[dob]}<br>{$value[FDESCPN]}<br>{$value[fmarks]}</td>";
$e_data.="<td class='tbl_row_new' style='width:100px; border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><img src='{$value[photo_path]}' width='100px' height='100px'></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='checkbox' id='check_{$value[app_no]}' {$checked} ></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='submit' id='' onclick='saveAdmittedCandidates({$value[app_no]},{$value[frollno]})' value='Save'><br>{$printIdcard}</td>";
$e_data.="</tr>";
$k++;
$id++;
$m++;
$counter_degree++;
}
$e_data.="</table>";
$arr['total_count']= $m;
$arr['html']=$e_data;
$arr['error']=0;
}
else
{
$arr['html'] = '<p> No record found </p>';
}
if($arr['error']==0)
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
else
{
$error_msg = "Invalid Degree Code..!";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
return;
}
function saveAdmittedCandidates($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = $aobj_context->mobj_data['appno'];
$rollno = $aobj_context->mobj_data['rollno'];
$chk_select = $aobj_context->mobj_data['chk_admitted'];
$current_date = "select now() as date ";
$lobj_current_date = $aobj_context->mobj_db->GetRow($current_date);
$curDate = $lobj_current_date[date];
$sql_updatecand = "update stud_det set fadmitted = '{$chk_select}', fadmdate ='{$curDate}' where app_no = '{$appno}' and frollno = '{$rollno}'";
$lobj_updatecand = $aobj_context->mobj_db->Execute($sql_updatecand);
if($lobj_updatecand)
{
$succ_msg = "Updated Succesfully";
echo $aobj_context->mobj_output->ToJSONEnvelope($succ_msg,0,"success");
}
else
{
$error_msg = "Update Failed";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
}
function GetProgwiseCandViva($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$progCode = $aobj_context->mobj_data['progrCode'];
$sql_candList = "select s.app_no, sd.frollno, s.ffname, date_format(s.fdob,'%d/%m/%Y') as dob, m.FDESCPN,
s.photo_path, sd.fadmitted, sd.fmarks, sd.finterview from student s left join stud_det sd on s.app_no = sd.app_no
left join mascategory m on m.FCATEGORY = s.fcatcode
where IFNULL(sd.frollno ,'') <> '' and sd.fsubcode = '{$progCode}' and sd.fselected ='T'
and sd.fsubcode <> '02' and ifnull(fadmitted,'') <> 'T' order by sd.fmarks desc";
$lobj_candList = $aobj_context->mobj_db->GetAll($sql_candList);
if(!empty($lobj_candList))
{
$e_data.="<table align = 'center' width='900px' cellspacing='0' cellpadding='1' border='0' >";
$e_data.="<th align='left' colspan='8' class='ui-jqgrid-titlebar ui-widget-header ui-corner-tl ui-corner-tr ui-helper' style='font-size:12px; padding-left:6px; height:24px;'>Degree List</th>";
$e_data.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
$e_data.="<td align='center' style='width:40px; font-size:12px; border-left:1px solid #C5DBEC;border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Sl. No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>App No.</td>";
$e_data.="<td align='center' style='width:80px; font-size:12px; padding:5px 5px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Roll No.</td>";
$e_data.="<td align='center' style='width:200px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Name</td>";
$e_data.="<td align='center' style='width:150px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>DOB / Cat / Marks</td>";
$e_data.="<td align='center' style='width:120px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Photo</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Selected</td>";
$e_data.="<td align='center' style='width:50px; font-size:12px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>Save</td>";
$e_data.="</tr>";
$k=0;
$id=0;
$m=0;
//var_dump($lobj_get_moudle_names); die();
$counter_degree = 1;
foreach($lobj_candList as $key=>$value)
{
if($k%2==0)
{
$class='tbl_row';
$inp_class='tbl_row_input';
}
else
{
$input_class='tbl_row1';
$inp_class='tbl_row1_input';
}
$checked = ($value['finterview']!='T')?" ":"checked";
$e_data.="<tr class='ui-widget-content jqgrow'>";
$e_data.="<td class='tbl_row_new' style='width:50px;border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_cnt_{$id}' >{$counter_degree}</td>";
$e_data.="<td class='tbl_row_new' style='width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center; ' id='it_mname_{$id}' >{$value[app_no]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:80px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center ' id='it_dname_{$id}' >{$value[frollno]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:200px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' >{$value[ffname]}</td>";
$e_data.="<td class='tbl_row_new' style=' width:100px;border-right:1px solid #C5DBEC; padding:2px; font-size:12px;text-align:center;' id='it_dname_{$id}' >{$value[dob]}<br>{$value[FDESCPN]}<br>{$value[fmarks]}</td>";
$e_data.="<td class='tbl_row_new' style='width:200px; border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><img src='{$value[photo_path]}' width='100px' height='100px'></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='checkbox' id='check_{$value[app_no]}' {$checked} ></td>";
$e_data.="<td align='center' class='tbl_row_new' style=' border-right:1px solid #C5DBEC; padding:2px; font-size:12px; ' id='it_dname_{$id}' ><input type='submit' id='' onclick='saveVivaCandidates({$value[app_no]},{$value[frollno]})' value='Save'></td>";
$e_data.="</tr>";
$k++;
$id++;
$m++;
$counter_degree++;
}
$e_data.="</table>";
$arr['total_count']= $m;
$arr['html']=$e_data;
$arr['error']=0;
}
else
{
$arr['html'] = '<p> No record found </p>';
}
if($arr['error']==0)
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
else
{
$error_msg = "Invalid Degree Code..!";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
return;
}
function saveVivaCandidates($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$appno = $aobj_context->mobj_data['appno'];
$rollno = $aobj_context->mobj_data['rollno'];
$chk_select = $aobj_context->mobj_data['chk_admitted'];
$current_date = "select now() as date ";
$lobj_current_date = $aobj_context->mobj_db->GetRow($current_date);
$curDate = $lobj_current_date[date];
$sql_updatecand = "update stud_det set finterview = '{$chk_select}', fintdate ='{$curDate}' where app_no = '{$appno}' and frollno = '{$rollno}'";
$lobj_updatecand = $aobj_context->mobj_db->Execute($sql_updatecand);
if($lobj_updatecand)
{
$succ_msg = "Updated Succesfully";
echo $aobj_context->mobj_output->ToJSONEnvelope($succ_msg,0,"success");
}
else
{
$error_msg = "Update Failed";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
}
}
?>
|