0xV3NOMx
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.191.205.110


Current Path : /var/www/oasis/src/
Upload File :
Current File : /var/www/oasis/src/time_table_degreewise.php

<?php


function DisplayTimetableDegreewise($aobj_context)
{
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $ttd_degree = $aobj_context->mobj_data["degree"];
    $ttd_examno = $aobj_context->mobj_data["examno"];
    $alldeg = $aobj_context->mobj_data["alldeg"];
    $cnd = '';
    // var_dump($alldeg[0]);
    // die();
    if($ttd_examno == ''){
      $ttd_examno = '%';
    }

    $query = "SELECT s.fqpcode,s.fdegree, s.fexamno, fexamname, s.fsubname,DATE_FORMAT(s.fdoe,'%d/%m/%Y') AS fdoe, r.FDESCPN 
    FROM subject s LEFT JOIN reason r 
    ON fsession = freasoncd INNER JOIN degree d ON s.fdegree = d.fdegree AND s.fexamno = d.fexamno
    WHERE s.fdegree LIKE '{$ttd_degree}' AND s.fexamno LIKE '{$ttd_examno}' AND IFNULL(s.fqpcode,'')<> ''";
    // var_dump($query);
    $lobj_get_data = $aobj_context->mobj_db->GetAll($query);

    // var_dump($lobj_get_data);

    $str_reval.="<table style='padding:3px 4px 3px 3px;' class='tr_ventor_row' id='reval_table_data' width='100%' border='0' cellspacing='0' cellpadding='5'>";
    $str_reval.="<tr class='ui-state-default ui-jqgrid-hdiv'>";
    $str_reval.="<td align='center' style=' font-size:11px; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='50px'>Sl No</td>";
    $str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='80px'>Qp code</td>";
    $str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='140px'>Semester</td>";
    $str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='300px'>Subject</td>";
    $str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='150px'>Exam Date</td>";
    $str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;border-top:1px solid #C5DBEC;' width='250px'>Exam Time</td>";    
    /*$str_reval.="<td align='center' style=' font-size:11px; border-right:1px solid #C5DBEC; border-bottom:1px solid #C5DBEC;'>  &nbsp;  &nbsp;  &nbsp;  &nbsp;</td>"; */
    $str_reval.="</tr>";

    $k=0;
    $sl_no=1;
    if($lobj_get_data)
    {
        foreach($lobj_get_data as $ak=>$av)
        {
            
        //   if($k%2==0)
				// 	$class='tbl_row1';
				// else
				// 	$class='tbl_row_alter1';tbl_row_new

            $str_reval.="<tr>";		
            $str_reval.="<td class='tbl_row_new' style='text-align:center; border-left:1px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;' >{$sl_no}</td>";
            $str_reval.="<td class='tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;  ;text-align:center;  ' >{$av['fqpcode']}&nbsp;</td>";
            $str_reval.="<td class='tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;  ;text-align:center; ' >{$av['fexamname']}</td>";
            $str_reval.="<td class='tbl_row_new' style='border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; font-size:11px;text-align:left; ' > {$av['fsubname']}</td>";
            $str_reval.="<td class='tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px;  ;text-align:center;  ' > {$av['fdoe']}</td>";
            $str_reval.="<td class='tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; padding:2px; ;  ;text-align:center; ' >{$av['FDESCPN']}</td>";

            $str_reval.="</tr>";
            
            $sl_no++;
            $k++;
        }
    }else
    {
        $str_reval.="<td class='{$class} tbl_row_new' style='text-align:left; border-left:0px solid #C5DBEC; border-right:1px solid #C5DBEC; border-left:1px solid #C5DBEC;padding:2px;text-align:center; cursor:pointer; ' colspan = '10'><b>No deatils found for the given deatils.</b></td>";
            $str_reval.="</tr>";
    }				
    
    $str_reval.="</table>";
    $arr['html']=$str_reval;
    echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success"); 	
        
}




function loadexamno_ttd($aobj_context){

    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
    $ttd_degree = $aobj_context->mobj_data["degree"];
  
  
  

  $query ="SELECT fexamno , fexamname FROM degree WHERE fdegree = '{$ttd_degree}'";  
  $result=$aobj_context->mobj_db->GetAll($query);

  if($result && count($result)>1){
    echo $aobj_context->mobj_output->TOJSONEnvelope($result,0,"success");
  }
  else{
    $arr['msg']="Please try later";
    echo $aobj_context->mobj_output->TOJSONEnvelope($arr,-1,"failed");
  }



}
    
?>