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.227.52.111
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
$this->pdf_writer_class =$main_src."/tarka_pdf_latest/fpdf.php";
require_once($this->pdf_writer_class);
class evaluation_report
{
public $aobj_context;
public $college_name;
public $town;
public $address;
public $Degree_name;
function __construct($aobj_context)
{
require_once($aobj_context->main_src.'src/format.php');
$this->aobj_context=$aobj_context;
$this->collcode=$_SESSION['collcode'];
include($this->pdf_writer_class);
session_start();
$this->report_id = $aobj_context->mobj_data["report_id"];
$this->pdf= new FPDF();
$this->pdf->SetFont('Times','',10);
$this->pdf->SetMargins(15,15);
$this->pdf->AliasNbPages();
$this->pdf->Ln(3);
$this->from_college_code = $aobj_context->mobj_data['from_college_code'];
$this->to_college_code = $aobj_context->mobj_data["to_college_code"];
$this->from_qp_code= $aobj_context->mobj_data["from_qp_code"] ;
$this->to_qp_code= $aobj_context->mobj_data["to_qp_code"] ;
$this->RunHeader();
$this->pdf= new FPDF();
}
function RunHeader()
{
$page_header_college ="select concat(FTOWN,', ',FUNIVADD1) as address,FUNIVNAME as college_name ,
pdf_logo_path as pdf_logo_path from control ";
//echo $page_header_college;die();
$lobj_page_header_college = $this->aobj_context->mobj_db->GetRow($page_header_college);
$this->coll_name = $lobj_page_header_college['college_name'];
$this->address = $lobj_page_header_college['address'];
$this->pdf_logo_path = $this->aobj_context->main_src."/".$this->aobj_context->mobj_data["db"]."/".$lobj_page_header_college['pdf_logo_path'];
}
function GenerateBatchSetupDetails()
{
$get_data="select s.FQPCODE,s.FPACKET,s.FSLNO,v1,v2,abs(v1-v2) as diff from tabsummary s
inner join
(select distinct FQPCODE from tabhead where FCOLLCODE>='{$this->from_college_code}' and FCOLLCODE<='{$this->to_college_code}') q
on s.FQPCODE=q.FQPCODE
where FDEVIATION='T'
and s.FQPCODE>='{$this->from_qp_code}' and s.FQPCODE<='{$this->to_qp_code}'";
$lobj_get_data = $this->aobj_context->mobj_db->GetAll($get_data);
$this->pdf->AddPage();
$this->pdf->SetFont('Times','',10);
//$this->pdf->Cell(190,4,$this->coll_name,0,1,'C');
//$this->pdf->Cell(190,4,$this->address,0,1,'C');
$this->pdf->SetFont('Times','B',14);
$this->pdf->Cell(190,4,$this->coll_name,0,1,'C');
$this->pdf->SetFont('Times','',8);
$this->pdf->Cell(190,4,$this->address,0,1,'C');
$this->pdf->Ln(2);
$this->pdf->SetFont('Times','B',12);
$this->pdf->Cell(190,6,'Marks Deviation Report',0,1,'C');
if(file_exists($this->pdf_logo_path))
{
$this->pdf->Image($this->pdf_logo_path,22,7,22);
}
$this->pdf->Ln(20);
$this->pdf->Cell(30,6,' ',0,0,'C');
$this->pdf->Cell(30,6,' QP Code',1,0,'C');
$this->pdf->Cell(20,6,'Packet ',1,0,'C');
$this->pdf->Cell(15,6,'Sl NO',1,0,'C');
$this->pdf->Cell(25,6,'Q NO',1,0,'C');
$this->pdf->Cell(17,6,'V1',1,0,'C');
$this->pdf->Cell(18,6,'V2',1,0,'C');
$this->pdf->SetFont('Times','',10);
/* $prev_qp_code=$lobj_get_data[0][FQPCODE];
foreach($lobj_get_data as $key =>$val)
{
$FQPCODE=$val[FQPCODE];
$FPACKET=$val[FPACKET];
$FSLNO=$val[FSLNO];
$v1=$val[v1];
$v2=$val[v2];
$diff=$val[diff];
if($prev_qp_code!=$FQPCODE)
$this->pdf->Ln(12);
$this->pdf->Cell(30,5,'',0,0,'C');
$this->pdf->Cell(30,5,$FQPCODE,1,0,'C');
$this->pdf->Cell(20,5,$FPACKET,1,0,'C');
$this->pdf->Cell(15,5,$FSLNO,1,0,'C');
$this->pdf->Cell(17,5,$v1,1,0,'C');
$this->pdf->Cell(18,5,$v2,1,0,'C');
$this->pdf->Cell(50,5,$diff,1,1,'C');
$prev_qp_code=$FQPCODE;
} */
}
function GetNumWord($num)
{
$ones = array(
"0"=>"Zero",
"1"=>"One",
"2"=>"Two",
"3"=>"Three",
"4"=>"Four",
"5"=>"Five",
"6"=> "Six",
"7"=>"Seven",
"8"=>"Eight",
"9"=>"Nine");
$final_val="";
for($i=0;$i<strlen($num);$i++)
{
$split_num=substr($num,$i,1);
$final_val.=$ones[$split_num]." ";
}
return $final_val;
}
function SendOutput()
{
$this->pdf->Output("marks_deviation_report{$this->report_id}.pdf","D");
}
}
function GenerateBatchSetupDetails($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new evaluation_report($aobj_context);
$class_obj->GetNumWord();
$class_obj->GenerateBatchSetupDetails();
$class_obj->SendOutput();
}
?>
|