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.133.155.48
Current Path : /var/www/html/pget/pgetadm/ |
| Current File : /var/www/html/pget/pgetadm/admissionorderPGReport.php |
<?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);
ini_set('memory_limit','900M');
ini_set('max_execution_time',0);
class MYPDF extends TCPDF {
public $aobj_context;
public function setData($aobj_context){
$this->aobj_context = $aobj_context;
}
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);
// set bacground image
$this->SetMargins(10,34,20,true);
$this->SetFillColor(248, 248 ,255);
$img_path = $this->aobj_context->main_src."/img/".$this->aobj_context->FUNIVCODE."_logo.jpg";
if(file_exists($img_path))
$this->Image($img_path,10,6,20,20);
$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',12);
$this->Ln(1);
$cur_year = date("Y");
$this->Cell(180,5,'PG Admission Order ('.$cur_year.') - Round 1' ,'0',1,'C');
$this->Cell(180,5,"CANDIDATE'S COPY" ,'0',1,'C');
// $this->Cell(0,4,$this->degree,0,1,'C');
// // var_dump($this->degree);
// // var_dump($this->degree);
// $style = array(
// 'position' => 'right',
// 'align' => 'C',
// 'stretch' => false,
// 'fitwidth' => true,
// 'cellfitalign' => '',
// 'border' => false,
// 'hpadding' => 'auto',
// 'vpadding' => 'auto',
// 'fgcolor' => array(0,0,0),
// 'bgcolor' => false, //array(255,255,255),
// 'text' => true,
// 'font' => 'helvetica',
// 'fontsize' => 8,
// 'stretchtext' => 4
// );
// var_dump($this->aobj_context->FAPPNO);
// $this->write1DBarcode($this->aobj_context->appno, 'C39', '140', '20','130', 16, 0.3, $style, 'R');
// 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);
// $this->Cell(50, 10,'IP : '.$_SERVER["REMOTE_ADDR"], 0, 0, 'L');
// $this->Cell(100, 10,'Date : ' .$this->aobj_context->current_date, 0, 0, 'C');
// $this->Cell(50, 10,'Page ' .$this->getPageNumGroupAlias().'/'.$this->getPageGroupAlias(), 0, 1, 'R');
// }
}
class AddmissionApplication
{
function DefaultConstructor($aobj_context)
{
$this->aobj_context=$aobj_context;
//$this->pdf= new FPDF();
$this->collcode=$_SESSION['collcode'];
$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', concat(FUNIVCODE,'_',pdf_logo_path) as pdf_logo_path,
ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
//var_dump($this->degree);
$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->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
$aobj_context->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
$app_no = trim($aobj_context->mobj_data["appno"]);
$aobj_context->appno = $app_no;
$aobj_context->current_date = $obj['now_date'];
$this->current_date = $obj['now_date'];
$this->pdf= new MYPDF('P');
$this->pdf->setData($aobj_context);
}
function formcolldata()
{
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
FUNIVADD1 as 'state', concat(FUNIVCODE,'_',pdf_logo_path) as 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->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 writeApplication($per_details, $fee_det,$res_optopns,$degree, $res_prevmarks,$ent_seatallot)
{
// var_dump($degdet[$per_details['FDEGREE1']],$per_details);
$pdf=$this->pdf;
$pdf->SetMargins(10,35,20,false);
$pdf->startPageGroup();
$pdf->AddPage("P");
$photo_url = "https://admission-certificates.s3.ap-south-1.amazonaws.com";
$pdf->SetFont('Times','',9);
$this->degree = $degdet[$degree];
//$pdf->cell(0,7,"Courses Preference : ".$degree." - ".$degdet[$degree],0,1,'C');
$pdf->SetLineStyle(array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => "black"));
// $pdf->Cell(0,7,'',"T",1,'C');
// var_dump($per_details);
$pdf->Ln(-6);
$ent_seatallot = $ent_seatallot[0];
// var_dump($ent_seatallot);
// var_dump($per_details);
$image = file_get_contents($photo_url.'/'.$per_details['FPHOTOPATH']);
$pdf->Image('@'.$image,160,20,20,0,0);
$pdf->Cell(25,5,'Date of issue :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fappno'],'B',1,'L');
$pdf->SetFont('Times','',9);
$pdf->Cell(25,5,'Admn.Order No :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fallotno'],'B',1,'L');
$pdf->SetFont('Times','',9);
$pdf->Cell(25,5,'College Code :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fcollcode'],'B',1,'L');
$pdf->Ln(5);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Application No. :',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(23,6,$ent_seatallot['fappno'],'B',0,'L');
$pdf->SetX(60);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Rank:',0,0,'L');
$pdf->SetX(70);
$pdf->SetFont('Times','B',10);
$pdf->Cell(15,6,$ent_seatallot['frank'],'B',0,'L');
$pdf->SetX(90);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Claimed Category:',0,0,'L');
$pdf->SetX(120);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$per_details['FCATEGORY'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(15,6,'Sri/Kum:',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(60,6,$ent_seatallot['fname'],'B',0,'L');
$pdf->SetX(85);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'is admitted to',0,0,'L');
$pdf->SetX(110);
$pdf->SetFont('Times','B',10);
$pdf->Cell(40,6,'PGET','B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'in',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(130,6,$ent_seatallot['fcollname'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(7,6,'to',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(80,6,$ent_seatallot['fdescpn'],'B',0,'L');
$pdf->SetX(100);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Under',0,0,'L');
$pdf->SetX(115);
$pdf->SetFont('Times','B',10);
$pdf->Cell(75,6,$ent_seatallot['fcatcode'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'on',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$ent_seatallot['fallotdate'],'B',0,'L');
$pdf->SetX(50);
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'at',0,0,'L');
$pdf->SetX(60);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$ent_seatallot['FTOTFEE'],'B',0,'L');
$pdf->SetX(90);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Fees Paid Rs.',0,0,'L');
$pdf->SetX(115);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,"1,00,000",'B',1,'C');
$pdf->SetFont('Times','',10);
$pdf->Ln(5);
$pdf->Cell(120,5,'The candidate is directed to report to the Principal of the above institution latest by',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(50,5,$ent_seatallot['FTOTFEE'],'B',0,'L');
$pdf->SetFont('Times','',10);
$str="The Principal of the college shall immediately allow the candidate to join the course of study. In the event of refusal, the candidate may approach the jurisdiction Deputy Commissioner for enforcement of the Admission order issued by VSKUB, in accordence with Rule 15(1) of the admission Rules, 2006. This Admission order is subject to Rule 13 & 15(3) of the Karnataka Selection of Candidates for Admission to Government seats in Professional Education Institutions Rules, 2006 and the Admission Rules of the respective Universities. ";
$pdf->Ln(7);
$pdf->MultiCell(190,4,$str,0,'L');
$pdf->Ln(15);
$pdf->SetFont('Times','B',9);
$pdf->Cell(160,4,'Signature of the Candidate',0,0,'L');
$pdf->SetX(155);
$pdf->Cell(40,4,'Excecutive Director ',0,1,'L');
$pdf->Cell(10,6,'Date :',0,0,'L');
$pdf->Cell(25,6,"10/09/2020",0,0,'L');
$pdf->SetX(157);
$pdf->Cell(30,4,'VSKUB, Ballari ',0,1,'L');
$pdf->Ln(3);
$pdf->Cell(180,7,'','B',1,'L');
// $pdf->Ln(100);
$pdf->SetMargins(10,34,20,true);
$pdf->SetFillColor(248, 248 ,255);
$img_path = $pdf->aobj_context->main_src."/img/".$pdf->aobj_context->FUNIVCODE."_logo.jpg";
if(file_exists($img_path))
$pdf->Image($img_path,10,150,20,20);
$pdf->SetFont('Times','B',13);
$pdf->SetY(150);
$pdf->Cell(0,4,$pdf->aobj_context->FUNIVNAME,0,1,'C');
//state
$pdf->SetFont('Times','',11);
$pdf->Cell(0,4,$pdf->aobj_context->s_state,0,1,'C');
$pdf->SetFont('Times','B',12);
$pdf->Ln(1);
$cur_year = date("Y");
$pdf->Cell(180,5,'PG Admission Order ('.$cur_year.') - Round 1' ,'0',1,'C');
$pdf->Cell(180,5,'COLLEGE COPY' ,'0',1,'C');
$pdf->SetFont('Times','',10);
$pdf->SetLineStyle(array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => "black"));
// $pdf->Cell(0,7,'',"T",1,'C');
// var_dump($per_details);
$pdf->Ln(2);
$image = file_get_contents($photo_url.'/'.$per_details['FPHOTOPATH']);
$pdf->Image('@'.$image,160,165,20,0,0);
$pdf->Cell(25,5,'Date of issue :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fappno'],'B',1,'L');
$pdf->SetFont('Times','',9);
$pdf->Cell(25,5,'Admn.Order No :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fallotno'],'B',1,'L');
$pdf->SetFont('Times','',9);
$pdf->Cell(25,5,'College Code :',0,0,'L');
$pdf->SetFont('Times','B',9);
$pdf->Cell(25,5,$ent_seatallot['fcollcode'],'B',1,'L');
$pdf->Ln(5);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Application No. :',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(23,6,$ent_seatallot['fappno'],'B',0,'L');
$pdf->SetX(60);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Rank:',0,0,'L');
$pdf->SetX(70);
$pdf->SetFont('Times','B',10);
$pdf->Cell(15,6,$ent_seatallot['frank'],'B',0,'L');
$pdf->SetX(90);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Claimed Category:',0,0,'L');
$pdf->SetX(120);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$per_details['FCATEGORY'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(15,6,'Sri/Kum:',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(60,6,$ent_seatallot['fname'],'B',0,'L');
$pdf->SetX(85);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'is admitted to',0,0,'L');
$pdf->SetX(110);
$pdf->SetFont('Times','B',10);
$pdf->Cell(40,6,'PGET','B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'in',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(130,6,$ent_seatallot['fcollname'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(7,6,'to',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(80,6,$ent_seatallot['fdescpn'],'B',0,'L');
$pdf->SetX(100);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Under',0,0,'L');
$pdf->SetX(115);
$pdf->SetFont('Times','B',10);
$pdf->Cell(75,6,$ent_seatallot['fcatcode'],'B',1,'L');
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'on',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$ent_seatallot['fallotdate'],'B',0,'L');
$pdf->SetX(50);
$pdf->SetFont('Times','',10);
$pdf->Cell(10,6,'at',0,0,'L');
$pdf->SetX(60);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,$ent_seatallot['FTOTFEE'],'B',0,'L');
$pdf->SetX(90);
$pdf->SetFont('Times','',10);
$pdf->Cell(25,6,'Fees Paid Rs.',0,0,'L');
$pdf->SetX(115);
$pdf->SetFont('Times','B',10);
$pdf->Cell(25,6,"1,00,000",'B',1,'C');
$pdf->SetFont('Times','',10);
$pdf->Ln(5);
$pdf->Cell(120,5,'The candidate is directed to report to the Principal of the above institution latest by',0,0,'L');
$pdf->SetFont('Times','B',10);
$pdf->Cell(50,5,$per_details['FTOTFEE'],'B',0,'L');
$pdf->SetFont('Times','',10);
$str="The Principal of the college shall immediately allow the candidate to join the course of study. In the event of refusal, the candidate may approach the jurisdiction Deputy Commissioner for enforcement of the Admission order issued by VSKUB, in accordence with Rule 15(1) of the admission Rules, 2006. This Admission order is subject to Rule 13 & 15(3) of the Karnataka Selection of Candidates for Admission to Government seats in Professional Education Institutions Rules, 2006 and the Admission Rules of the respective Universities. ";
$pdf->Ln(7);
$pdf->MultiCell(190,4,$str,0,'L');
$pdf->Ln(15);
$pdf->SetFont('Times','B',9);
$pdf->Cell(160,4,'Signature of the Candidate',0,0,'L');
$pdf->SetX(155);
$pdf->Cell(40,4,'Excecutive Director ',0,1,'L');
$pdf->Cell(10,6,'Date :',0,0,'L');
$pdf->Cell(25,6,"10/09/2020",0,0,'L');
$pdf->SetX(157);
$pdf->Cell(30,4,'VSKUB, Ballari ',0,1,'L');
}
function SendOutput()
{
$this->pdf->Output("Admission_order{$this->current_date}.pdf","D");
}
}
function admissionorderPGReport($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "select distinct fdegree,fdescpn from degree where fdegree like 'm%'";
$result = $aobj_context->mobj_db->GetAll($query);
$degdet = [];
foreach($result as $value)
{
$degdet[$value['fdegree']] = $value['fdescpn'];
}
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
FUNIVADD1 as 'state', concat(FUNIVCODE,'_',pdf_logo_path) as pdf_logo_path,
ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name=$aobj_context->mobj_db->GetRow($get_coll_name);
$appno = trim($aobj_context->mobj_data["appno"]);
$per_details_query = "select * from entstudadm where fappno = '{$appno}' and ifnull(FPAYSTATUS,'') = 'success'";
$per_details = $aobj_context->mobj_db->GetRow($per_details_query);
$cnt = 0;
$class_obj = new AddmissionApplication();
$class_obj->DefaultConstructor($aobj_context);
$query = "select * from entfeedetl where fappno = '{$appno}'";
$fee_det = $aobj_context->mobj_db->GetAll($query);
$query = "select o.fdegree,d.fdescpn from entoptdeg o
inner join entdeg d on d.fdegree = o.fdegree
where fappno = '{$appno}'
order by o.fdegree";
$res_optopns = $aobj_context->mobj_db->GetAll($query);
$query = "select * from entprevmarks a inner join entprevcomb b
on a.fdegree = b.fdegree and a.fcombcode = b.fcombcode
and a.fsubcode= b.fsubcode where fappno ='{$appno}'";
$res_prevmarks = $aobj_context->mobj_db->GetAll($query);
$query = "select e.fappno,s.fname,e.fcollcode,c.fcollname,e.fdegree,d.fdescpn,e.frank,e.freserve,e.fallotno,date_format(e.fallotdate, '%d-%m-%Y')as fallotdate,e.fcatcode,e.freserve
from entseatallot e
inner join entstudadm s on e.fappno = s.fappno
inner join entdeg d on e.fdegree = d.fdegree
inner join entcoll c on e.fcollcode = c.fcollcode
where e.fappno = '{$appno}'";
$ent_seatallot = $aobj_context->mobj_db->GetAll($query);
$class_obj->writeApplication($per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$ent_seatallot);
$class_obj->SendOutput();
}
?>
|