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.131.37.82
<?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);
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->degree = $aobj_context->mobj_data["degree"];
// $this->degexam = $aobj_context->mobj_data["degexam"];
// $this->yearmode = $aobj_context->mobj_data["yearmode"];
// $this->deggrp=$aobj_context->mobj_data["deggrp"];
// $yearmode = explode("*",$this->yearmode);
// $this->year = $yearmode[0];
// $this->examtye = $yearmode[1];
// $get_date= "select NOW() as now_date,
// CONCAT('[',fcollcode,'] ', fcollname,', ',FTOWN) as college_name,
// dg.fexamdate as fresexamdate, d.fdescpn, d.fexamname from college c, degree d, degexam dg
// where fcollcode = '{$this->collcode}' and d.fdegree = '{$this->degree}'
// and d.fdegree = dg.fdegree and d.fexamno = dg.fexamno
// and d.fexamno = '{$this->degexam}'
// and dg.fyear = '{$this->year}'
// and dg.fexamtype = '{$this->examtye}'";
// $obj=$aobj_context->mobj_db->GetRow($get_date);
// $this->current_date = $obj['now_date'];
// $this->college_name = $obj['college_name'];
// $this->fresexamdate = $obj['fresexamdate'];
// $this->fdescpn = $obj['fdescpn'];
// $this->fexamname = $obj['fexamname'];
// $this->first = true;
}
function Header(){
$img_path=$this->aobj_context->main_src."/".$this->aobj_context->mobj_data["db"]."/".$this->pdf_logo_path;
if(!empty($this->pdf_logo_path) && file_exists($img_path))
{
$this->pdf->Image($img_path,10,10,35);
}
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->cell(0,7,"CIE PENDING - ".$this->fresexamdate ." LIST","0",1,"C");
$this->pdf->cell(0,7,$this->fexamname." - ".$this->fdescpn,"0",1,"C");
}
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->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
}
function formdata(){
$query = "SELECT m.fdegree, m.fexamno, m.fsubcode, CONCAT(s.fsubname,' ',fssubname)AS fsubjectname,
COUNT(m.fregno) AS total_student,
SUM(CASE WHEN IFNULL(m.fmarks, -1) <> -1 THEN 1 ELSE 0 END) AS fmark_entered,
SUM(CASE WHEN IFNULL(m.fmarks, -1) = -1 THEN 1 ELSE 0 END) AS marks_pending
FROM marks m INNER JOIN subject s ON m.fdegree = s.fdegree
AND m.fexamno = s.fexamno AND m.fsubcode = s.fcsubcode
GROUP BY m.fdegree, m.fexamno, m.fsubcode";
// var_dump($query);
// die();
$result=$this->aobj_context->mobj_db->GetAll($query);
// var_dump($result);
// die();
$this->pdf->AddPage();
$this->pdf->Ln(5);
// $this->pdf->SetFont('Times','B',10);
$this->pdf->SetFont('Times','B',9);
$this->pdf->Cell(10,6,"Sl.NO","LRT",0,'C');
$this->pdf->Cell(15,6,"DEGREE","LRT",0,"C");
$this->pdf->Cell(19,6,"SEMESTER","LRT",0,"C");
$this->pdf->Cell(92,6,"SUBJECT","LRT",0,"L");
$this->pdf->Cell(20,6,"STUDENT","LRT",0,"C");
$this->pdf->Cell(18,6,"ENTERED","LRT",0,"C");
$this->pdf->Cell(18,6,"PENDING","LRT",1,"C");
$this->pdf->Cell(10,6,"","LRB",0,"C");
$this->pdf->Cell(15,6,"","LRB",0,"C");
$this->pdf->Cell(19,6,"","LRB",0,"C");
$this->pdf->Cell(92,6,"","LRB",0,"L");
$this->pdf->Cell(20,6,"","LRB",0,"C");
$this->pdf->Cell(18,6,"","LRB",0,"C");
$this->pdf->Cell(18,6,"","LRB",1,"C");
$this->pdf->SetFont('Times','',9);
$i = 1;
foreach($result as $results){
if($i % 30 == 0){
$this->pdf->AddPage();
$this->pdf->SetFont('Times','B',9);
$this->pdf->Cell(10,6,"Sl.NO","LRT",0,'C');
$this->pdf->Cell(15,6,"DEGREE","LRT",0,"C");
$this->pdf->Cell(19,6,"SEMESTER","LRT",0,"C");
$this->pdf->Cell(92,6,"SUBJECT","LRT",0,"L");
$this->pdf->Cell(20,6,"STUDENT","LRT",0,"C");
$this->pdf->Cell(18,6,"ENTERED","LRT",0,"C");
$this->pdf->Cell(18,6,"PENDING","LRT",1,"C");
$this->pdf->Cell(10,6,"","LRB",0,"C");
$this->pdf->Cell(15,6,"","LRB",0,"C");
$this->pdf->Cell(19,6,"","LRB",0,"C");
$this->pdf->Cell(92,6,"","LRB",0,"L");
$this->pdf->Cell(20,6,"","LRB",0,"C");
$this->pdf->Cell(18,6,"","LRB",0,"C");
$this->pdf->Cell(18,6,"","LRB",1,"C");
$this->pdf->SetFont('Times','',9);
}
$this->pdf->Cell(10,6,$i,"1",0,"C");
$this->pdf->Cell(15,6,$results['fdegree'],"1",0,"C");
$this->pdf->Cell(19,6,$results['fexamno'],"1",0,"C");
$this->pdf->Cell(92,6,$results['fsubjectname'],"1",0,"L");
$this->pdf->Cell(20,6,$results['total_student'],"1",0,"C");
$this->pdf->Cell(18,6,$results['fmark_entered'],"1",0,"C");
$this->pdf->Cell(18,6,$results['marks_pending'],"1",1,"C");
$i++;
// $this->pdf->Ln();
}
}
function SendOutput(){
$this->pdf->Output("semesterWiseResultReport.pdf","I");
}
}
function generatecielist($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->SendOutput();
}
?>
|