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.219.182.130


Current Path : /var/www/html/studentportal_wait/src_old/
Upload File :
Current File : /var/www/html/studentportal_wait/src_old/yourAppsRVRT.php

<?php

if($_REQUEST['a'] == 'getYourAppsRVRT'){

  // ini_set('max_execution_time', 300); 
  // set_time_limit(300);
  include 'database.php';
  include("commandb.php");

  // $examno = $_GET["examno"];		 
  $regno = $_GET["regno"];
  $folderName = '';
  $tableHeader = array();
  $tableHeader = [
    "Sl.No.",
    "Application No",
    "Amount",
    "Applied Date",
    "Status",
    "Print",
  ];

  $query   = "select fdegree, fregno, fname,fenroll,fcollcode from student 
  where (fregno = '{$regno}' or fenroll = '{$regno}')";
  $results = $conn->query($query);
  $row1 = mysqli_fetch_assoc($results);
   
  $reg_no = $row1['fregno'];
  $fdegree = $row1['fdegree'];
  $fcollcode = $row1['fcollcode'];

  $get_data="select distinct  res_stud.APPNO,res_stud.FTOTAL,DATE_FORMAT(res_stud.FAPPDATE,'%d/%m/%Y') as FAPPDATE,
  ifnull(res_stud.FCHALLANNO,'') as FCHALLANNO, ifnull(res_stud.FPAYMENTYPE,'') as FPAYMENTYPE,
  ifnull(res_stud.FPAYMENTSTATUS,'') as FPAYMENTSTATUS,
  ifnull(res_stud.FPAYMENTCONFIRM,'') as FPAYMENTCONFIRM,ifnull(res_stud.FAPPLASTDATE,'') as  FAPPLASTDATE,
  if(DATE_ADD(GREATEST(FRVLASTDATE,FRTLASTDATE,FXEROXLASTDATE,FCVLASTDATE),INTERVAL 2 DAY)>=current_date,'1','0') AS last_date,
  if(fackdate is null,'1',if(funivrecdate is null,'2','3')) as app_status from res_stud,res_fee
  where res_stud.FREGNO='{$_SESSION['REGNO']}' and res_fee.FREGNO = res_stud.FREGNO 
  and res_fee.FDEGREE = res_stud.FDEGREE and res_fee.FEXAMNO = res_stud.FEXAMNO";
  $result=$conn->query($get_data);

  $row = mysqli_fetch_assoc($result);
   
  $k=0;
  $sl_no=1;
  $tableData = array();	

  while($row= mysqli_fetch_assoc($result))
  {
    $row_obj =  new \stdClass();;
    $row_obj1=array();
    $av= $row;

    $row_obj1['APPNO']=$av['APPNO'];
    $row_obj1['FTOTAL']=$av['FTOTAL'];
    $row_obj1['FAPPDATE']=$av['FAPPDATE'];
    $row_obj1['FPAYMENTYPE']=$av['FPAYMENTYPE'];
    $row_obj1['FPAYMENTSTATUS']=$av['FPAYMENTSTATUS'];
    $row_obj1['FCHALLANNO']=$av['FCHALLANNO'];
    $row_obj1['app_status']=$av['app_status'];
    $row_obj1['FPAYMENTCONFIRM']=$av['FPAYMENTCONFIRM'];
    $row_obj1['lastdate'] = $av['last_date'];
    $row_obj1['FAPPLASTDATE'] = $av['FAPPLASTDATE'];
    
    if($k%2==0)
    $class='tbl_row1';
    else
    $class='tbl_row_alter1';
  
    $APPNO = $av['APPNO'];
    
    $row_obj->sl_no = $sl_no;
    
    $row_obj->APPNO = $APPNO;   

    $row_obj->FTOTAL = $av['FTOTAL'];

    $row_obj->FAPPDATE = $av['FAPPDATE'];
    $row_obj->PAYSTATUS = $av['FPAYMENTSTATUS']; 
  
    $qry="select count(*) as cnt from collexam where fdegree = '{$fdegree}' 
    and fcollcode = '{$fcollcode}' 
    and '{$av['FAPPLASTDATE']}' < DATE_FORMAT(NOW(),'%Y-%m-%d')";
    
    $exam_last_details = $conn->query($qry);
    // $exam_last_details = $aobj_context->pobj_db->GetRow($qry); 
    $last_details = mysqli_fetch_assoc($exam_last_details);
    
    $cnt = $last_details['cnt'];

    if($av['FPAYMENTCONFIRM'] == 'success')
    {
      $row_obj->status = "Received at University for processing";
    }
    else
    {
      
       if($av['FPAYMENTYPE'] == "CASH")
        $row_obj->status = "Payment not made at College";
       else if($av['FPAYMENTYPE'] == "DEBIT/CREDIT/NET BANKING")
       {	
          if($row_obj1['lastdate'] =='1')          
            $row_obj->status = "Online Payment Pending";          
          else         
            $row_obj->status = "Last date is over for Online Payment";          
       }
       else     
        $row_obj->status ="Payment Pending";
    } 

    $div_data="";
    if($av['FPAYMENTYPE'] == "DEBIT/CREDIT/NET BANKING" || $av['FPAYMENTYPE'] == "Other Banks")
    {
      if($av['FPAYMENTCONFIRM'] == "success")
      {   
          $row_obj->print ="Print App";
          $row_obj->link = "http://results.logisys.org/" .$folderName ."/app.php?a=PrintRevaluationApplicationForm&app_no=" .$APPNO;
      }
      else
      {
        /*if($lastdate =='1')
        {	
          $div_data="<div class='raval_submit' style='margin-right:19px;width:129px;  ;' >
          <span  onclick=\"MakeOnlinePayment('{$APPNO}');\" style='float:left;margin-left:8px;cursor: pointer; line-height: 19px;font-size:14px;font-weight:bold;'>Make Payment</span>
          </div>";
        }*/
          
         $query ="select masbank.*,control.funivcode from masbank, control where ifnull(fsuspend,'') <> 'T'";				
         $resmasbank = $conn->query($query);
        //$resmasbank = json_encode($resmasbank,JSON_HEX_TAG);
        $funivcode = $resmasbank[0]['funivcode'];

        if($cnt > 0)
          $row_obj->print ="Last Date is Over";
        else
        {
          $row_obj->print="Make Payment";
          $row_obj->link ="Make Payment";
        }
          
      }
    }
    
    else if($av['FPAYMENTYPE']=="POSTOFFICE")
    {
      $row_obj->print="Print App";
      $row_obj->link = "http://results.logisys.org/" .$folderName ."/app.php?a=PrintRevaluationApplicationForm&app_no=" .$APPNO;
       
    }
    else if($av['FPAYMENTYPE']=="CASH")
    {
      $row_obj->print="Print App";
      $row_obj->link = "http://results.logisys.org/" .$folderName ."/app.php?a=PrintRevaluationApplicationForm&app_no=" .$APPNO;
    }
    else
    {   
      $row_obj->print="Print Challan";
      $row_obj->link ="http://results.logisys.org/" .$folderName ."/app.php?a=PrintRevaluationApplicationForm&app_no=" .$APPNO;
      
      if(!empty($av['FCHALLANNO']))
      {
        $row_obj->print="Print App";
        $row_obj->link ="http://results.logisys.org/" .$folderName ."/app.php?a=PrintRevaluationApplicationForm&app_no=" .$APPNO;
      }

    }
    
    $sl_no++;
    $k++;

    array_push($tableData,$row_obj);
    
  }

  $send_data = new \stdClass();
  $send_data->tableHeader = $tableHeader;
  $send_data->tableData = $tableData;
  $send_data->error_code = 0;
  $send_data->status="success"; 
  echo json_encode($send_data);

}

?>