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.116.8.68
<?php
$main_src = substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - 7);
$pdf_writer_class = $main_src . "tcpdf/tcpdf.php";
require_once $pdf_writer_class;
ini_set('max_execution_time', 600);
ini_set("memory_limit",'2048M');
class MYPDF extends TCPDF{
public function Header(){
// get the current page break margin
$bMargin = $this->getBreakMargin();
// get current auto-page-break mode
$auto_page_break = $this->AutoPageBreak;
// disable auto-page-break
$this->SetAutoPageBreak(false, 0);
$this->SetTitle("Valuator Report");
// set bacground image
$this->SetFillColor(248, 248, 255);
// $img_path = $this->aobj_context->main_src . "img/".$this->aobj_context->FUNIVCODE."dyp_logo.png";
$img_path = $this->aobj_context->main_src . "img/dyp_logo.png";
if (file_exists($img_path)) {
$this->Image($img_path, 10, 5, 40, 15);
}
$this->SetFont('Times', 'B', 13);
$this->SetY(5);
$this->Cell(0, 4, $this->aobj_context->FUNIVNAME, 0, 1, 'C');
//state
$this->SetFont('Times', '', 11);
$this->Cell(0, 4, $this->aobj_context->s_state, 0, 1, 'C');
$this->SetFont('Times', 'B', 11);
$this->Ln(1);
$cur_year = date("Y");
$this->Cell(0, 5, 'UG EXAMINATION REMUNERATION BILL', '0', 1, 'C');
$this->SetFont('Times', 'B', 12);
// restore auto-page-break status
$this->SetAutoPageBreak($auto_page_break, $bMargin);
// set the starting point for the page content
}
public function Footer(){
$this->SetY(-15);
$this->SetFont('helvetica', 'I', 8);
if($this->CurOrientation == 'P'){
$this->Cell(60, 10, 'IP : ' . $_SERVER["REMOTE_ADDR"], 0, 0, 'L');
$this->Cell(60, 10, 'Date : ' . date("d-m-Y h:i:s A"), 0, 0, 'C');
$this->Cell(60, 10, 'Page ' . $this->getPageNumGroupAlias() . '/' . $this->getPageGroupAlias(), 0, 1, 'R');
}
else {
$this->Cell(90, 10, 'IP : ' . $_SERVER["REMOTE_ADDR"], 0, 0, 'L');
$this->Cell(90, 10, 'Date : ' . date("d-m-Y h:i:s A"), 0, 0, 'C');
$this->Cell(90, 10, 'Page ' . $this->getPageNumGroupAlias() . '/' . $this->getPageGroupAlias(), 0, 1, 'R');
}
}
}
class Report{
public function DefaultConstructor($aobj_context){
$this->aobj_context = $aobj_context;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$this->ip = $_SERVER["REMOTE_ADDR"];
$get_date = "select DATE_FORMAT(now(), '%d/%m/%Y') as now_date";
$obj = $this->aobj_context->mobj_db->GetRow($get_date);
$get_coll_name = "select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
FUNIVADD1 as 'state', pdf_logo_path,
ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name = $this->aobj_context->pobj_db->GetRow($get_coll_name);
// var_dump($get_coll_name);
$aobj_context->FUNIVNAME = $lobj_get_coll_name['FUNIVNAME'];
$aobj_context->s_state = $lobj_get_coll_name['state'];
$aobj_context->pdf_logo_path = $lobj_get_coll_name['pdf_logo_path'];
$aobj_context->FUNIVCODE = $lobj_get_coll_name['FUNIVCODE'];
$this->current_date = $obj['now_date'];
$deggrp = $this->aobj_context->mobj_data["deggrp"];
$get_coll_name = "select concat(fdeggrp, ' - ', fdescpn) as fdeggrp
from deggrp where fdeggrp = '{$deggrp}'";
$lobj_get_degree = $this->aobj_context->pobj_db->GetRow($get_coll_name);
$aobj_context->deggrp = $lobj_get_degree['fdeggrp'];
$this->pdf = new MYPDF('P');
$this->pdf->aobj_context = $aobj_context;
}
public function writeReport($data){
$pdf = $this->pdf;
$pdf->SetMargins(7, 30);
$pdf->SetFont('Times', '', 10);
foreach($data as $val){
$pdf->AddPage("P");
$val['faccno']=="null" ? $accno = "" : $accno = $val['faccno'];
$val['FIFSCCODE']=="null" ? $ifsc = "" : $ifsc = $val['FIFSCCODE'];
$val['FBANKNAME']=="null" ? $bankname = "" : $bankname = $val['FBANKNAME'];
$table = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>';
$table.='<table cellpadding="3" cellspacing="0">';
$table.='<tr nobr="true">';
$table.='<td width="20%" class="lable">Examiner’s Name</td>';
$table.='<td width="80%">'.ucwords(strtolower($val['fteachname'])).'</td>';
$table.='</tr>';
$table.='<tr nobr="true">';
$table.='<td width="20%" class="lable">Designation</td>';
$table.='<td width="80%">'.ucwords(strtolower($val['deg'])).'</td>';
$table.='</tr>';
$table.='<tr nobr="true">';
$table.='<td width="20%" class="lable">College Name & Address</td>';
$table.='<td width="80%" style="justify-content:center;">'.ucwords(strtolower($val['fcollname'])).'</td>';
$table.='</tr>';
$table.='<tr nobr="true">';
$table.='<td width="20%" class="lable">Mobile No</td>';
$table.='<td width="20%">'.$val['fmobile'].'</td>';
$table.='<td width="20%" class="lable">E-mail</td>';
$table.='<td width="40%">'.$val['femail'].'</td>';
$table.='</tr>';
$table.='<tr nobr="true">';
$table.='<td width="20%" class="lable">Name of Examination</td>';
$table.='<td width="80%">'.ucwords(strtolower($val['fexamdate'])).'</td>';
$table.='</tr>';
$table.='</table>';
$pdf->SetX(11);
$pdf->writeHTML($table, false, true, false, false, 'L');
$pdf->ln(4);
$pdf->SetMargins(11, 30);
$pdf->SetFont('Times', '', 9.5);
$message = '<div>';
$message .= '<style>
p {
line-height: 0.2;
}
</style>';
$message .= '<p>To,</p>';
$message .= '<p>The Controller of Examination,</p>';
$message .= '<p>D Y Patil University, Navi Mumbai.</p>';
$message .= '<p>Sir,</p>';
$message .= '<p>I Submit my bill for remuneration of the work done by me as under payment of which may be mades to me at your earliest convenience.</p>';
$message.='</div>';
$pdf->SetX(11);
$pdf->writeHTML($message, false, true, false, false, 'L');
$pdf->SetFont('Times', '', 10);
$table1 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
text-align: center;
}
</style>';
$table1.='<table cellpadding="3" cellspacing="0">';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Assignment</td>';
$table1.='<td width="20%" class="lable">No. of Set/ Days/ Students</td>';
$table1.='<td width="40%" class="lable">QP Code</td>';
$table1.='<td width="20%" class="lable">Total Amount</td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Setting of Question Papers</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Question Papers Moderation</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Convener</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Evaluation/ Moderation/ Revaluation</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Practical/ Clinical Examination/ Viva</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">TA/DA (Only for External Examiners)</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='<tr nobr="true">';
$table1.='<td width="20%" class="lable">Total</td>';
$table1.='<td width="20%"></td>';
$table1.='<td width="40%"></td>';
$table1.='<td width="20%"></td>';
$table1.='</tr>';
$table1.='</table>';
$pdf->SetX(11);
$pdf->writeHTML($table1, false, true, false, false, 'L');
$bankdet = '<p>Certified that the claim has been preferred for time in accordance with the schedule of remuneration approved by the University.</p>';
$bankdet .= '<h4 style="text-align:center;">Bank Details</h4>';
$bankdet .= '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>';
$bankdet.='<table cellpadding="3" cellspacing="0">';
$bankdet.='<tr nobr="true">';
$bankdet.='<td width="30%" class="lable">Examiner’s Name as per the Bank</td>';
$bankdet.='<td width="70%">'.ucwords(strtolower($val['fteachname'])).'</td>';
$bankdet.='</tr>';
$bankdet.='<tr nobr="true">';
$bankdet.='<td width="30%" class="lable">Account No</td>';
$bankdet.='<td width="70%">'.$accno.'</td>';
$bankdet.='</tr>';
$bankdet.='<tr nobr="true">';
$bankdet.='<td width="30%" class="lable">IFSC (11 Digit)</td>';
$bankdet.='<td width="70%">'.$ifsc.'</td>';
$bankdet.='</tr>';
$bankdet.='<tr nobr="true">';
$bankdet.='<td width="30%" class="lable">Bank’s Name & Branch</td>';
$bankdet.='<td width="70%">'.$bankname.'</td>';
$bankdet.='</tr>';
$bankdet.='</table>';
$pdf->SetX(11);
$pdf->ln(4);
$pdf->writeHTML($bankdet, false, true, false, false, 'L');
}
}
public function SendOutput(){
$this->pdf->Output("MasboardReportPdf.pdf", "I");
}
}
function generateDyPatilBill($aobj_context){
$univcode = $aobj_context->mobj_data["univcode"];
$teachcode = $aobj_context->mobj_data["teachcode"];
$teachArr = explode(",", $teachcode);
foreach($teachArr as $key => $val){
$teach .= "'".$val."',";
}
$teachArray = substr_replace($teach ,"",-1);
$query = "select distinct m.fteachcode, m.fteachname,
if(m.fcollcode = '9999',ifnull(m.fcollname,''), concat(c.fcollcode, ' - ', c.fcollname))as fcollname,
m.fmobile, m.femail,if(ifnull(m.fdegncode,'') = '10',fdesname,d.FDEGNDESC) as deg,
ifnull(m.faccno, '')as faccno, ifnull(m.FIFSCCODE, '')as FIFSCCODE,
ifnull(m.FBANKNAME, '')as FBANKNAME,x.fexamdate
from masteach m
inner join college c on c.fcollcode = m.fcollcode
left join masdegn d on m.fdegncode = d.fdegncode
inner join (select distinct q.fteachcode,d.fexamdate from qpseterdet q inner join subject s on q.fqpcode = s.fqpcode
inner join degree d on s.fdegree = d.fdegree and s.fexamno = d.fexamno
where q.fteachcode in ({$teachArray})
group by q.fteachcode) x on x.fteachcode = m.fteachcode
where m.fteachcode in ({$teachArray})";
$result = $aobj_context->pobj_db->GetAll($query);
$class_obj = new Report();
$class_obj->univcode=$univcode;
$class_obj->DefaultConstructor($aobj_context);
$class_obj->writeReport($result);
$class_obj->SendOutput();
}
?>
|