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.58.141
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$pdf_writer_class =$main_src."/tarka_pdf_latest/fpdf.php";
require_once($pdf_writer_class);
ini_set('max_execution_time', 0);
require_once 'headerNfooter.php';
class GenerateFeeSummaryReport extends FPDF
{
function DefaultConstructor($aobj_context){
include_once($aobj_context->main_src."/src/format.php");
$this->aobj_context=$aobj_context;
$this->pdf= new FPDF();
$this->pdf=$this;
session_start();
$this->collcode = $_SESSION['collcode'];
$this->ip=$_SERVER["REMOTE_ADDR"];
$this->db=trim($this->aobj_context->mobj_data["db"]);
$this-> deggrp = $aobj_context->mobj_data["deggrp"];
$this->degexam = $aobj_context->mobj_data["degexam"];
$this->yearmode = $aobj_context->mobj_data["yearmode"];
$this->degreeArr=trim($aobj_context->mobj_data["degree"]);
$values = explode(',', $this->degreeArr);
foreach($values as $key => $value){
$deg .= "'".$value."',";
}
$this->degArr = substr_replace($deg ,"",-1);
$yearmode = explode("*",$this->yearmode);
$this->year = $yearmode[0];
$this->examtye = $yearmode[1];
$this->first = true;
}
function Header(){
if($this->funivcode == '055'){
}
$qry= "SELECT DISTINCT CONCAT(d.fyear,'*',d.fexamtype) AS internal_code,
d.fexamdate AS value, deg.fexamno, deg.fexamname
FROM degexam d
INNER JOIN res_fee r ON d.fdegree = r.fdegree
AND d.fexamno = r.fexamno
AND d.fyear = r.fyear AND d.fexamtype = r.fexamtype
INNER JOIN degree deg ON deg.fdegree = d.fdegree
INNER JOIN deggrp dg ON dg.fdeggrp = deg.fdeggrp
WHERE r.fcollcode = '{$this->collcode}' AND dg.fdeggrp = '{$this->deggrp}'
AND r.fyear='{$this->year}' AND r.fexamtype='{$this->examtye}'
AND deg.fexamno='{$this->degexam}' GROUP BY deg.fexamno";
// var_dump($qry);
// die();
$result=$this->aobj_context->mobj_db->GetRow($qry);
// var_dump($result);
// die();
$this->fexamname = $result['fexamname'];
$this->examdate = $result['value'];
$pageOrientation = $this->CurOrientation;
$headerName="SEMESTER WISE RESULT ANALYSIS";
$pageOrientation = $this->CurOrientation;
$reporttype="semra";
generateHeader($this->db,
$this->pdf,
$pageOrientation,
$this->funivcode,
$headerName,
$this->college_name,
$this->fresexamdate,
$this->fdescpn,
$this->fexamname,
$this->pdf_logo_path,
$this->aobj_context,
$reporttype,
$this->degree,
$this->degexam,
$this->yearmode,
$this->section,
$this-> deggrp,
$this->examdate,
$this->degreeArr
);
// $img_path=$this->aobj_context->main_src."/".$this->aobj_context->mobj_data["db"]."/".$this->pdf_logo_path;
// if($this->funivcode == '055'){
// generateHeader($this->db, $this->pdf, $pageOrientation,$this->funivcode,$headerName);
// }
// elseif(!empty($this->pdf_logo_path) && file_exists($img_path))
// {
// $this->pdf->Image($img_path,10,10,35);
// }
// if($this->funivcode!=="055"){
// if($this->funivcode=="052"){
// $this->pdf->SetFont('Times','B',9);
// $this->pdf->cell(0,7,""."JSS MAHAVIDYAPEETHA","0",1,"C");
// }
// $this->pdf->SetFont('Times','B',14);
// $this->pdf->cell(0,7,"".$this->FUNIVNAME,"0",1,"C");
// $this->pdf->SetFont('Times','',8);
// $this->pdf->cell(0,4, $this->s_state,"0",0,"C");
// $this->pdf->SetFont('Times','',10);
// $this->pdf->Cell(-20,4,"Page {$this->pdf->PageNo()}/{nb}",0,1,'C');
// $this->pdf->SetFont('Times','B',10);
// // $this->pdf->cell(0,7,"College: ".$this->college_name,"0",1,"C");
// }
// $this->pdf->SetFont('Times','B',10);
// if($this->funivcode=="055"){
// $this->SetY(30);
// }
// $this->pdf->cell(0,7,"SEMESTER WISE RESULT ANALYSIS","0",1,"C");
// // $this->pdf->cell(0,7,$this->fexamname." - ".$this->fdescpn,"0",1,"C");
// $this->pdf->cell(0,7," ".$this->fexamname. " " .$this-> deggrp." ". " RESULT ANALYSIS ".$this->fresexamdate ." " .$this->examdate."", "0",1,"C");
// $this->pdf->SetFont('Times','B',10);
// $this->pdf->cell(0,7,"Degree:- ( ".$this->degreeArr." )", "0",1,"C");
// $this->pdf->Ln();
}
function Footer(){
$this->SetY(-15);
$this->pdf->SetFont('Times','B',8);
$new_y=$this->pdf->GetY();
$this->pdf->Ln(2);
$this->Cell(140,6,'Printed: IP Address : '.$this->ip." Date ".$this->current_date,'0',0,'L');
}
function formcolldata(){
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',funivcode,
FUNIVADD1 as 'state', pdf_logo_path From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
$this->funivcode=$lobj_get_coll_name['funivcode'];
$this->s_state=$lobj_get_coll_name['state'];
$this->f_year=$lobj_get_coll_name['f_year'];
// $this->fexamname=
// $this->fexamname = $lobj_get_coll_name['fexamname'];
$this->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
}
function formdata(){
if($this->degArr == "'All'"){
$degcond = "";
}else{
$degcond = "and d.fdegree in ($this->degArr)";
}
$query="SELECT r.fdegree, s.fsection, count(*)as count,
sum(case when ifnull(fclass, '') like '%fail%' then 1 else 0 end)
as ffailed, sum(case when ifnull(fclass, '') not like '%fail%'
then 1 else 0 end) as passed FROM student s INNER JOIN
(select distinct fdegree, fexamno, fregno, fclass, fyear,
fexamtype from resmarks
where fyear='{$this->year}' AND fexamtype='{$this->examtye}') r ON s.fregno = r.fregno
AND s.fdegree = r.fdegree INNER JOIN degree d
ON d.fdegree = r.fdegree and d.fexamno = r.fexamno
WHERE d.fdeggrp='{$this->deggrp}' {$degcond} AND r.fexamno='{$this->degexam}' AND r.fyear='{$this->year}'
AND r.fexamtype='{$this->examtye}' and s.fcollcode='{$this->collcode}'
GROUP BY s.fdegree, s.fsection, s.fcollcode order by s.fdegree, fsection";
// var_dump($query);die();
$result=$this->aobj_context->mobj_db->GetAll($query);
$this->pdf->AddPage();
$this->pdf->SetFont('Times','B',10);
$this->pdf->Cell(20,6,"Sl. No.","LRT",0,'C');
$this->pdf->Cell(25,6,"Branch","LRT",0,"C");
$this->pdf->Cell(25,6,"Section","LRT",0,"C");
$this->pdf->Cell(25,6,"No. of Students","LRT",0,"C");
$this->pdf->Cell(30,6,"Candidate","LRT",0,"C");
$this->pdf->Cell(30,6,"Candidate","LRT",0,"C");
$this->pdf->Cell(25,6,"Pass","LRT",1,"C");
$this->pdf->Cell(20,6,"","LRB",0,"C");
$this->pdf->Cell(25,6,"","LRB",0,"C");
$this->pdf->Cell(25,6,"","LBR",0,"C");
$this->pdf->Cell(25,6,"Appeared","LRB",0,"C");
$this->pdf->Cell(30,6,"Passed","LRB",0,"C");
$this->pdf->Cell(30,6,"Failed","LRB",0,"C");
$this->pdf->Cell(25,6,"Percentage","LRB",1,"C");
$this->pdf->SetFont('Times','',10);
$i = 1;
foreach($result as $results){
$this->pdf->Cell(20,6,$i,"1",0,"C");
$this->pdf->Cell(25,6,$results['fdegree'],"1",0,"C");
$this->pdf->Cell(25,6,$results['fsection'],"1",0,"C");
$this->pdf->Cell(25,6,$results['count'],"1",0,"C");
$this->pdf->Cell(30,6,$results['passed'],"1",0,"C");
$this->pdf->Cell(30,6,$results['ffailed'],"1",0,"C");
$this->pdf->Cell(25,6,number_format(($results['passed']/$results['count'])*100, 2, '.', ''),"1",1,"C");
$i++;
}
}
function SendOutput(){
$this->pdf->Output("SemesterWiseResultReport.pdf","I");
}
}
function semesterwiseresultanalysis($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new GenerateFeeSummaryReport();
$class_obj->AliasNbPages();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->Header();
$class_obj->formcolldata();
$class_obj->formdata();
$class_obj->SetTitle('Semester Wise Result Report');
$class_obj->SendOutput();
}
?>
|