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.24.238
<?php
$main_src=substr($_SERVER['SCRIPT_FILENAME'],0,strlen($_SERVER['SCRIPT_FILENAME'])-7);
//$pdf_writer_class =$main_src."/tarka_pdf/fpdf.php";
$pdf_writer_class =$main_src."/tcpdf/tcpdf.php";
require_once($pdf_writer_class);
//require_once("report_hall_ticket.php");
class applicationFormReport
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
//$this->pdf= new FPDF();
$this->pdf= new TCPDF();
$this->pdf=$this;
$this->appno=trim($this->aobj_context->mobj_data["app_no"]);
$this->regno=trim($this->aobj_context->mobj_data["regno"]);
$this->ip=$_SERVER["REMOTE_ADDR"];
$get_date="select date_format(now(),'%d/%m/%Y') as now_date,funivcode from control";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
$funivcode = $obj['funivcode'];
require_once("getnumword.php");
$this->current_date=$obj['now_date'];
//$this->pdf = new FPDF('L');
$this->pdf= new TCPDF('L');
$this->pdf->SetMargins(2,2);
//$this->pdf->addPage('L');
}
function formcolldata()
{
$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->mobj_db->GetRow($get_coll_name);
$this->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
$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'];
$this->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
$this->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
}
function GetBankDetails()
{
$get_data="SELECT bank_name, acc_no, branch_name, branch_code,
ifsc_code, cheque_favour, place,bank_charge, date_format(now(),'%d/%m/%Y') as ndate
FROM acc_mas";
$lobj_get_data= $this->aobj_context->mobj_db->GetRow($get_data);
$this->bank_name=$lobj_get_data['bank_name'];
$this->acc_no=$lobj_get_data['acc_no'];
$this->branch_name=$lobj_get_data['branch_name'];
$this->branch_code=$lobj_get_data['branch_code'];
$this->ifsc_code=$lobj_get_data['ifsc_code'];
$this->cheque_favour=$lobj_get_data['cheque_favour'];
$this->place=$lobj_get_data['place'];
$this->bank_charge=$lobj_get_data['bank_charge'];
$this->ndate=$lobj_get_data['ndate'];
}
function GetData()
{
$get_app_no="select s.fregno as FREGNO,s.fpamount as FTOTALFEE,
s.fcatcode as FCATEGORY,c.fcollname,d.fdescpn,sd.fname,s.fappno
from entseatallot s
inner join entcoll c on s.fcollcode = c.fcollcode
inner join entdeg d on d.fdegree = s.fdegree
inner join entstudadm sd on s.fappno = sd.fappno
where s.fappno='{$this->appno}'
and s.fregno = '{$this->regno}'";
$obj_get_app_no=$this->aobj_context->mobj_db->GetRow($get_app_no);
$this->reg_no=$obj_get_app_no['FREGNO'];
$this->app_no = $obj_get_app_no['fappno'];
$this->FTOTALFEE=$obj_get_app_no['FTOTALFEE'];
$this->FCATEGORY=$obj_get_app_no['FCATEGORY'];
$this->degree=$obj_get_app_no['fdescpn'];
$this->college_code=$obj_get_app_no['fcollname'];
$this->student_name=$obj_get_app_no['fname'];
$this->GetBankDetails();
}
function WriteRect()
{
$this->pdf->addPage('L');
$width=72;
$this->pdf->Rect(2,5,$width,200);
$this->pdf->Rect(2+$width+2,5,$width,200);
$this->pdf->Rect(2+$width+$width+4,5,$width,200);
$this->pdf->Rect(2+$width+$width+$width+6,5,$width,200);
//var_dump($this->pdf_logo_path);
if(!empty($this->pdf_logo_path))
{
$img_logo_path = file_get_contents("img/rur_logo.jpg");
$this->pdf->Image('@'.$img_logo_path,4,7,68,10);
$this->pdf->Image('@'.$img_logo_path,$width+6,7,68,10);
$this->pdf->Image('@'.$img_logo_path,$width+$width+7,7,68,10);
$this->pdf->Image('@'.$img_logo_path,$width+$width+$width+9,7,68,10);
// $img_logo_path = file_get_contents($this->url.'img/umy.jpg');
// $this->pdf->Image('@'.$img_logo_path,82,6,15,15);
// $this->pdf->Image('@'.$img_logo_path,180,6,15,15);
// $this->pdf->Image('@'.$img_logo_path,278,6,15,15);
}
$this->pdf->setY(5);
}
function formData($label)
{
$line_height=5;
$width=72;
$x_pos=2;
if($this->pos==2)
$x_pos=2+$width+2;
if($this->pos==3)
$x_pos=2+$width+2+$width+2;
if($this->pos==4)
$x_pos=2+$width+2+$width+2+$width+2;
$jump_width=$width;
if($this->pos==2)
$jump_width=$width;
else if($this->pos==3)
$jump_width=$width;
else if($this->pos==4)
$jump_width=$width;
$this->pdf->SetX($x_pos);
$this->old_y=$this->pdf->GetY();
$this->pdf->SetFont('Times','B',7);
//$this->pdf->Cell($jump_width,$line_height,'UNIVERSITY OF MYSORE','0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->SetFont('Times','B',8);
// $this->pdf->Cell($jump_width,4,$this->FUNIVNAME,'0',1,'C');
// $this->pdf->SetFont('Times','B',6);
// $this->pdf->SetX($x_pos);
// $this->pdf->Cell($jump_width,4,$this->s_state,'0',1,'C');
$this->pdf->SetFont('Times','B',8);
$this->pdf->ln(12);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"Challan - ".$label,'0',1,'C');
/* $this->pdf->SetFont('Times','BU',9);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,$label,'0',1,'C'); */
$this->pdf->SetFont('Times','B',8);
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"A/C No. : {$this->acc_no}"." / IFSC CODE: {$this->ifsc_code}",'0',1,'C');
$this->pdf->ln(2);
/* $this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"{$this->bank_name}",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"IFSC CODE: {$this->ifsc_code}",'0',1,'C');
//$this->pdf->Cell($jump_width,$line_height,"BRANCH CODE: {$this->branch_code} | IFSC CODE: {$this->ifsc_code}",'0',1,'C');
$this->pdf->SetX($x_pos);
$this->pdf->Cell($jump_width,$line_height,"BANK USE ONLY",'0',1,'C'); */
$td1_width=$jump_width*(0.30)-1;
$td2_width=$jump_width-$td1_width-2;
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Bank",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->bank_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Branch Name",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->branch_name}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Branch Code",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"{$this->branch_code}",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Journal No",'1',0,'L');
$this->pdf->Cell($td2_width,$line_height,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Date",'1',0,'L');
//$this->ndate = '';
$this->pdf->Cell($td2_width,$line_height,"{$this->ndate}",'1',1,'L');
$line_height = 4;
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Reference No: {$this->app_no}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Applicant Name: {$this->student_name}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Reg. No.: {$this->reg_no}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,"University / College: {$this->college_code}",'0','L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Degree: {$this->degree}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Category: {$this->FCATEGORY}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Fee: {$this->FTOTALFEE}/-",'0',1,'L');
$this->pdf->SetFont('Times','B',8);
$this->pdf->SetX($x_pos+1);
$in_words=getNumber($this->FTOTALFEE);
$this->pdf->Cell($jump_width,$line_height,"Rupees {$in_words}",'0',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->SetFont('Times','',8);
$this->pdf->MultiCell($jump_width,$line_height,"PAID TO THE CREDIT OF {$this->cheque_favour} ",0,"L");
$line_height = 4;
$this->pdf->SetX($x_pos+1);
$this->pdf->SetFont('Times','B',8);
$tdd1_width=$jump_width*(0.25)-1;
$tdd2_width=($jump_width)*.25 ;
$tdd3_width=($jump_width)*.25 ;
$tdd4_width=($jump_width)*.25-1;
$this->pdf->Cell($tdd1_width,$line_height,"Particulars",'1',0,'C');
$this->pdf->Cell($tdd2_width,$line_height,"Course Fee",'1',0,'C');
$this->pdf->Cell($tdd3_width,$line_height,"Bank Charges",'1',0,'C');
$this->pdf->Cell($tdd4_width,$line_height,"Total",'1',1,'C');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($tdd1_width,$line_height,"Amount",'1',0,'C');
$this->pdf->Cell($tdd2_width,$line_height,"Rs {$this->FTOTALFEE}/-",'1',0,'C');
$this->pdf->Cell($tdd3_width,$line_height,"Rs {$this->bank_charge}/-",'1',0,'C');
$total=($this->FTOTALFEE+$this->bank_charge);
$this->pdf->Cell($tdd4_width,$line_height,"Rs {$total}/-",'1',1,'C');
$this->pdf->SetX($x_pos+1);
$in_words=getNumber($total);
$this->pdf->ln(8);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Date",'0',0,'L');
$this->pdf->Cell($td2_width,$line_height,"Signature of Remitter ",'0',1,'R');
$this->pdf->ln(3);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"Received Rupees",'0',1,'L');
$this->pdf->SetFont('Times','',8);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"Denomination",'1',0,'L');
$this->pdf->Cell(10,4,"No.s",'1',0,'L');
$this->pdf->Cell(20,4,"Rs.",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"2000x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"500x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"200x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"100x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"50x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"20x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"10x",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell(30,4,"Total",'1',0,'L');
$this->pdf->Cell(10,4,"",'1',0,'L');
$this->pdf->Cell(20,4,"",'1',1,'L');
$this->pdf->SetX($x_pos+1);
$this->pdf->MultiCell($jump_width,$line_height,'1. Collecting Branch has to enter Reference No: & Name of the candidate for this transaction in core banking system',0,"L");
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($jump_width,$line_height,"2. Not Transferable",'0',1,'L');
$this->pdf->SetX($x_pos+5);
$this->pdf->SetFont('Times','B',8);
$this->pdf->ln(15);
$this->pdf->SetX($x_pos+1);
$this->pdf->Cell($td1_width,$line_height,"Date",'0',0,'L');
$this->pdf->Cell($td2_width,$line_height,"Seal and Signature of receiver",'0',1,'R');
$this->pdf->SetY($this->old_y);
$img_path=$this->aobj_context->main_src.$this->photo_path;
}
function SendOutput()
{
$this->pdf->Output("application_letter_{$this->app_no}.pdf","I");
}
}
function PrintApplicationFormBankChallan($aobj_context)
{
//$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$class_obj=new applicationFormReport();
$class_obj->DefaultConstructor($aobj_context);
$class_obj->formcolldata();
$class_obj->GetData();
$class_obj->WriteRect();
$class_obj->pos=1;
$class_obj->formData("BANK COPY");
$class_obj->pos=2;
$class_obj->formData("FINANCE COPY");
$class_obj->pos=3;
$class_obj->formData("UNIVERSITY COPY");
$class_obj->pos=4;
$class_obj->formData("STUDENT COPY");
$class_obj->SendOutput();
}
?>
|