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.134.165
Current Path : /var/www/html/pgadm/pgetadm/ |
| Current File : /var/www/html/pgadm/pgetadm/vkuapplicationFormPGReportOld.php |
<?php
ob_start();
$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";
// var_dump($img_path);
if(file_exists($img_path))
$this->Image($img_path,10,6,20,20);
$img_path1 = $this->aobj_context->main_src . "img/".$this->aobj_context->FUNIVCODE."_logo_2.jpeg";
//var_dump($img_path);
if (file_exists($img_path1)) {
$this->Image($img_path1, 178, 3, 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 Programme Admission Application Form -'.$cur_year,'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->fprefix.$this->aobj_context->appno, 'C39', '130', '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'];
$degree = trim($aobj_context->mobj_data["degree"]);
$this->ip=$_SERVER["REMOTE_ADDR"];
$get_date="select DATE_FORMAT(now(), '%d/%m/%Y') as now_date,fprefix from entdeg where fdegree = '{$degree}'";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
$fprefix = $obj['fprefix'];
$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->fprefix = $fprefix;
$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($db,$per_details, $fee_det,$res_optopns,$degree, $res_prevmarks,$res_lanmarks,$res_totmarks,$fdob)
{
//var_dump($degdet[$per_details['FDEGREE1']]);
// var_dump($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks);
$pdf=$this->pdf;
$pdf->SetMargins(10,35,25,false);
$pdf->startPageGroup();
$pdf->AddPage("P");
$pdf->SetFont('Times','UB',10);
$this->degree = $degdet[$degree];
//$pdf->cell(0,7,"Courses Preference : ".$degree." - ".$degdet[$degree],0,1,'C');
$head = '<style>
td {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0" border="0" width="100%">';
//====================Subject Details====================================
$table2 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0" border="0" width="100%">';
$i = 1;
$fprefix = "";
$fprefix = $res_optopns[0]['fprefix'];
foreach ($res_optopns as $value) {
$degr_desn = $value['fdescpn'];
$table2 .= '<tr nobr="true">
<td align="center">' . 'Application for ' . $value['fdescpn'] . ' [' . $value['fdegree'] . ']' . '</td>
</tr>';
$i++;
}
$table2 .= '</table>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->SetX(11);
$pdf->writeHTMLcell(185, 0, $x, $y, $table2, false, true, false, false, 'C');
//var_dump($fprefix);
$pdf->ln(2);
//====================Personal Details====================================
$pdf->SetFont('Times','',10);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">I. Personal Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$path = realpath(__DIR__ .'/..');
//var_dump($path.'/pget_photos'.'/'.$per_details['fphotopath']);
//var_dump($path.'/'.$per_details['fphotopath']);
$photo_url = "https://admission-certificates.s3.ap-south-1.amazonaws.com";
$i= 1;
// var_dump($photo_url);
// var_dump($per_details['FPHOTOPATH']);
$table1 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">Application No.</td>
<td width="270" colspan="3" style = "font-size:15px;">'.$fprefix.$per_details['FAPPNO'].'</td>
<td width="100" rowspan="5"><img width="100" height="100" src="'.$photo_url.'/'.$per_details['FPHOTOPATH'].'" /></td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">1. Name of the Applicant</td>
<td width="270" colspan="3">'.$per_details['FNAME'].'</td></tr>';
$table1 .='<tr nobr="true">
<td width="80" class="lable">2. Gender </td>
<td width="70">'.$per_details['fgender'].'</td>
<td width="150" class="lable">3. Date of Birth (DD/MM/YYYY)</td>
<td width="120">'.$per_details['fdob'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="80" class="lable">4. Nationality </td>
<td width="70">'.$per_details['FNATIONAL'].'</td>
<td width="150" class="lable">5. Religion</td>
<td width="120">'.$per_details['freligion'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="80" class="lable">6. Mother Tongue</td>
<td width="70">'.$per_details['fmotherton'].'</td>
<td width="150" class="lable">7. Aadhar Number</td>
<td width="120">'.$per_details['FAADHARNO'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="80" class="lable">8. Blood Group</td>
<td width="70" colspan="3">'.str_replace('N','-',str_replace('P','+', $per_details['fbloodgrp'])).'</td>
<td width="70" class="lable">9. Category</td>
<td width="80">'.$per_details['FCATEGORY'].'</td>
<td width="120" class="lable">10. Sub Category</td>
<td width="100">'.$per_details['fsubcaste'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">11. Father Name</td>
<td width="150">'.$per_details['FFATNAME'].'</td>
<td width="120" class="lable">Father Occupation</td>
<td width="100">'.$per_details['FFATOCC'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">12. Mother Name</td>
<td width="150">'.$per_details['FMOTNAME'].'</td>
<td width="120" class="lable">Mother Occupation</td>
<td width="100">'.$per_details['FMOTOCC'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">13. Annual Family Income</td>
<td width="150">'.$per_details['FINCOME'].'</td>
<td width="120" class="lable">14. Online Scholarship (Post metric) Reg. No</td>
<td width="100">'.$per_details['FPMREGNO'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">15. Income RD No.</td>
<td width="150">'.$per_details['fincomerdno'].'</td>
<td width="120" class="lable">16. Caste RD No.</td>
<td width="100">'.$per_details['fcasterdno'].'</td>
</tr>';
$table1 .= '</table>';
// echo $table1;
$pdf->SetX(11);
// $pdf->SetY(42);
$pdf->writeHTML($table1, false, true, false, false, 'L');
$pdf->ln(2);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">II. Communication Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$per_details['fperadd'] = $per_details['FPERMADD1'].' '.$per_details['FPERMADD2'].' '.$per_details['FPERMADD3'].' '.$per_details['FPERMDIST'].' '.$per_details['FPERMSTATE'].' - '.$per_details['FPERMPIN'];
$per_details['fcuradd'] = $per_details['FCURRADD1'].' '.$per_details['FCURRADD2'].' '.$per_details['FCURRADD3'].' '.$per_details['FCURRDIST'].' '.$per_details['FCURRSTATE'].' - '.$per_details['FCURRPIN'];
$table2 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">17. Permanent Address</td>
<td width="370">'.$per_details['fperadd'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">18. Communication Address</td>
<td width="370">'.$per_details['fcuradd'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">19. Mobile No.</td>
<td width="370">'.$per_details['FMOBILENO'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">20. Email Address</td>
<td width="370">'.$per_details['FEMAIL'].'</td>
</tr>';
$table2 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table2, false, true, false, false, 'L');
$pdf->ln(2);
if($db == 'rcub')
{
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">III. Reservation Details </h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$pdf->SetX(11);
// $query = "SELECT fboardname FROM masboard WHERE fboardcode = '{$per_details['FUNIVNAME']}'";
// $obj_univ = $this->aobj_context->mobj_db->GetRow($query);
// $per_details['FUNIVNAME'] = $obj_univ['fboardname'];
$cnd = $per_details['FBCUETYPE'];
if($per_details['FBCUE'] == 'No')
$cnd = "";
if($per_details['FHK'] == 'Yes'){
$fhkrdno = ' ('.$per_details['fhkrdno'].')';
}else{
$fhkrdno = "";
}
// var_dump($fhkrdno);
$table4 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<th width="420" align="center"><b>Reservation Details</b></th>
<th width="100" align="center" ><b>Yes / No</b></th>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Kalyana Karnataka quota (371j)?</b></td>
<td width="100" >'.$per_details['FHK'].$fhkrdno. '</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Physically handicapped / Differently abled quota?</b></td>
<td width="100" >'.$per_details['FHANDICAP'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Sports quota?</b></td>
<td width="100" >'.$per_details['FSPORTS'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under NCC quota?</b></td>
<td width="100" >'.$per_details['FNCC'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under NSS quota?</b></td>
<td width="100" >'.$per_details['FNSS'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Childrens of Defence / Politically Sufferers quota (C.D.P.S.)?</b></td>
<td width="100" >'.$per_details['fdefence'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you a student from Other University within Karnataka?</b></td>
<td width="100" >'.$per_details['funikar'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you a student from Other University outside Karnataka?</b></td>
<td width="100" >'.$per_details['foutstud'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Would you like to be considered under Self Supporting Scheme?</b></td>
<td width="100" >'.$per_details['fselfsupsch'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Project Displaced quota?</b></td>
<td width="100" >'.$per_details['fpdp'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you a Gadinadu / Horanadu Kannadiga?</b></td>
<td width="100" >'.$per_details['fgah'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you Claim under Children of Devdasi quota?</b></td>
<td width="100" >'.$per_details['fcof'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under HIV inflected quota?</b></td>
<td width="100" >'.$per_details['fcoh'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under EX-Service Man quota?</b></td>
<td width="100" >'.$per_details['fexservice'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Kannada Medium quota?</b></td>
<td width="100" >'.$per_details['fkanm'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Children of Farmers Committed Suicide quota?</b></td>
<td width="100" >'.$per_details['fchilsuid'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you claim under Jammu Kashmir Students quota?</b></td>
<td width="100" >'.$per_details['fjks'].'</td>
</tr>';
$table4 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table4, true, true, false, false, 'L');
}else
{
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">III. Reservation Details </h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$pdf->SetX(11);
// $query = "SELECT fboardname FROM masboard WHERE fboardcode = '{$per_details['FUNIVNAME']}'";
// $obj_univ = $this->aobj_context->mobj_db->GetRow($query);
// $per_details['FUNIVNAME'] = $obj_univ['fboardname'];
$cnd = $per_details['FBCUETYPE'];
if($per_details['FBCUE'] == 'No')
$cnd = "";
if($per_details['FHK'] == 'Yes'){
$fhkrdno = '('.$per_details['fhkrdno'].')';
}else{
$fhkrdno = "";
}
// var_dump($fhkrdno);
$table4 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<th width="420" align="center"><b>Reservation Details</b></th>
<th width="100" align="center" ><b>Yes / No</b></th>
</tr>
<tr nobr="true">
<td width="420" ><b>21. Do you claim under Kalyana Karnataka quota (371j)?</b></td>
<td width="100" align="center" >'.$per_details['FHK'].' '.$fhkrdno. '</td>
</tr>
<tr nobr="true">
<td width="420" ><b>22. Do you claim under Physically handicapped / Differently abled quota?</b></td>
<td width="100" align="center" >'.$per_details['FHANDICAP'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>23. Do you claim under Sports quota?</b></td>
<td width="100" align="center" >'.$per_details['FSPORTS'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>24. Do you Claim NSS/NCC/Rangers & Rovers ?</b></td>
<td width="100" align="center">'.$per_details['FNCC'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>25. Are you a child of Defence Personnel ?</b></td>
<td width="100" align="center" >'.$per_details['FDEFENCE'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>26. Are you a student of other University (other than VSK University within and outside Karntaka) ?</b></td>
<td width="100" align="center" >'.$per_details['fkanm'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>27. Would you like to be considered under Project displaced person ?</b></td>
<td width="100" align="center" >'.$per_details['fpdp'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>28. Are you a Gadinadu/Horanadu Kannadiga ?</b></td>
<td width="100" align="center" >'.$per_details['fgah'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>29. Do you Claim under Children of Devadasi/HIV infected quota ?</b></td>
<td width="100" align="center" >'.$per_details['fcof'].'</td>
</tr>';
$table4 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table4, true, true, false, false, 'L');
}
//====================Self Supporting Scheme Details====================================
$pdf->AddPage("P");
$pdf->ln(4);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">IV. Self Supporting Scheme</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$table4 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<td width="420" ><b>30. Would you like to be considered under Self Supporting Scheme ?</b></td>
<td width="100" align="center" >'.$per_details['fselfsupsch']. '</td>
</tr>';
$table4 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table4, true, true, false, false, 'L');
//====================Degree Details====================================
$pdf->SetFont('Times','',10);
$pdf->ln(0);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">V. Previous Academic Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$pdf->ln(2);
$pdf->SetX(11);
// var_dump($per_details['funivstud']);
$table5 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">';//Percentage
$univ = $per_details['FQUNIV'];
if($per_details['FQUNIV'] == '' || $per_details['FQUNIV'] == NULL)
$univ = "NA";
$table5 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<td width="240" ><b>31. Are you a student of Vijayanagara Sri Krishnadevaraya University ?</b></td>
<td width="280" align="left" >'.$per_details['funivstudd']. '</td>
</tr>';
// $table5 .= '</table>';
// $pdf->SetX(11);
// $pdf->writeHTML($table4, true, true, false, false, 'L');
$table5 .= '<tr nobr="true">
<td width="240"><b>32. Degree Exam Registration Number</b></td>
<td width="280">'.$per_details['FQREGNO'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>33. Qualifying Degree</b></td>
<td width="280">'.$per_details['fdescpndeg'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>34. Qualifying Degree Combination</b></td>
<td width="280">'.$per_details['fdescpncomb'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>35. Name of the Degree College in which you studied</b></td>
<td width="280">'.$per_details['FQCOLLEGE'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>36. Name of the Degree awarding University</b></td>
<td width="280">'.$univ.'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>37. Class / Division</b></td>
<td width="280">'.$per_details['FQCLASS'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="240"><b>38. Passing month / year</b></td>
<td width="280">'.$per_details['FQMONTH'].' / '.$per_details['FQYEAR'].'</td>
</tr>';
$table5 .='</table>';
//$pdf->SetX(12);
$pdf->SetX(11);
$pdf->writeHTML($table5, false, false, true, false, 'L');
// $table5 = '<style>
// td, th {
// border: 0.5px solid black;
// }
// </style>
// <table cellpadding="3" cellspacing="0">';
// $table5 .= '<tr nobr="true"> <td width="520"><b> Language Details </b> </td> </tr>
// <tr nobr="true">
// <td width="200"><b>Kannada</b></td>
// <td width="80">Sec. Marks</td>
// <td width="80">'.$per_details['FLANG1MS'].'</td>
// <td width="80">Max. Marks</td>
// <td width="80"><b>'.$per_details['FLANG1MM'].'</b></td>
// </tr>';
// if($per_details['FLANG2'] != '' || $per_details['FLANG2'] != NULL)
// {
// $table5 .= '<tr nobr="true">
// <td width="200"><b>English</b></td>
// <td width="80">Sec. Marks</td>
// <td width="80">'.$per_details['FLANG2MS'].'</td>
// <td width="80">Max. Marks</td>
// <td width="80"><b>'.$per_details['FLANG2MM'].'</b></td>
// </tr>';
// }
// $table5 .='</table>';
// $pdf->SetX(11);
// $pdf->writeHTML($table5, false, false, true, false, 'L');
// var_dump($res_prevmarks);
$pdf->ln(5);
if(count($res_totmarks) > 0 || count($res_lanmarks) >0 || count($res_prevmarks) >0 )
{
$table6 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0">
<thead>
<tr nobr="true">
<th width="20" rowspan="2" align="center"><b>Sl. No</b></th>
<th width="115" align="center" rowspan="2"><b>Subject</b></th>
<th width="50" colspan="2" align="center"><b>Sem I / Year</b></th>
<th width="50" colspan="2" align="center"><b>Sem II / Year</b></th>
<th width="50" colspan="2" align="center"><b>Sem III / Year</b></th>
<th width="50" colspan="2" align="center"><b>Sem IV / Year</b></th>
<th width="50" colspan="2" align="center"><b>Sem V / Year</b></th>
<th width="50" colspan="2" align="center"><b>Sem VI / Year</b></th>
<th width="50" colspan="2" align="center"><b>Total Marks</b></th>
<th width="35" align="center" rowspan="2"><b>%</b></th>
</tr>
<tr nobr="true">
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
<th width="25" align="center"><b>Max</b></th>
<th width="25" align="center"><b>Obt</b></th>
</tr>
</thead>
<tr nobr="true">
<th width="520" colspan="7" align="left"><b>39. Semester Total marks</b></th>
</tr>';//Percentage
$i = 1;
// var_dump($res_totmarks);
foreach($res_totmarks as $value)
{
$table6 .= '<tr nobr="true">
<td width="20" align="center">'.$i.'</td>
<td width="115" align="left">'.$value['fsubname'].'</td>
<td width="25" align="center">'.$value['famm'].'</td>
<td width="25" align="center">'.$value['famo'].'</td>
<td width="25" align="center">'.$value['fbmm'].'</td>
<td width="25" align="center">'.$value['fbmo'].'</td>
<td width="25" align="center">'.$value['fcmm'].'</td>
<td width="25" align="center">'.$value['fcmo'].'</td>
<td width="25" align="center">'.$value['fdmm'].'</td>
<td width="25" align="center">'.$value['fdmo'].'</td>
<td width="25" align="center">'.$value['femm'].'</td>
<td width="25" align="center">'.$value['femo'].'</td>
<td width="25" align="center">'.$value['ffmm'].'</td>
<td width="25" align="center">'.$value['ffmo'].'</td>
<td width="25" align="center">'.$value['fmaxmarks'].'</td>
<td width="25" align="center">'.$value['fsecmarks'].'</td>
<td width="35" align="center">'.$value['fpercent'].'</td>
</tr>
<tr nobr="true">
<th width="520" colspan="7" align="left"><b>40. Language Details</b></th>
</tr>';
$i++;
}
foreach($res_lanmarks as $value)
{
$table6 .= '<tr nobr="true">
<td width="20" align="center">'.$i.'</td>
<td width="115" align="left">'.$value['fsubname'].'</td>
<td width="25" align="center">'.$value['famm'].'</td>
<td width="25" align="center">'.$value['famo'].'</td>
<td width="25" align="center">'.$value['fbmm'].'</td>
<td width="25" align="center">'.$value['fbmo'].'</td>
<td width="25" align="center">'.$value['fcmm'].'</td>
<td width="25" align="center">'.$value['fcmo'].'</td>
<td width="25" align="center">'.$value['fdmm'].'</td>
<td width="25" align="center">'.$value['fdmo'].'</td>
<td width="25" align="center">'.$value['femm'].'</td>
<td width="25" align="center">'.$value['femo'].'</td>
<td width="25" align="center">'.$value['ffmm'].'</td>
<td width="25" align="center">'.$value['ffmo'].'</td>
<td width="25" align="center">'.$value['fmaxmarks'].'</td>
<td width="25" align="center">'.$value['fsecmarks'].'</td>
<td width="35" align="center">'.$value['fpercent'].'</td>
</tr>';
$i++;
}
$table6 .='<tr nobr="true">
<th width="520" colspan="7" align="left"><b>41. Details of the marks obtained in all the optional subjects in qualifying Degree Examination</b></th>
</tr>';
foreach($res_prevmarks as $value)
{
$table6 .= '<tr nobr="true">
<td width="20" align="center">'.$i.'</td>
<td width="115" align="left">'.$value['fsubname'].'</td>
<td width="25" align="center">'.$value['famm'].'</td>
<td width="25" align="center">'.$value['famo'].'</td>
<td width="25" align="center">'.$value['fbmm'].'</td>
<td width="25" align="center">'.$value['fbmo'].'</td>
<td width="25" align="center">'.$value['fcmm'].'</td>
<td width="25" align="center">'.$value['fcmo'].'</td>
<td width="25" align="center">'.$value['fdmm'].'</td>
<td width="25" align="center">'.$value['fdmo'].'</td>
<td width="25" align="center">'.$value['femm'].'</td>
<td width="25" align="center">'.$value['femo'].'</td>
<td width="25" align="center">'.$value['ffmm'].'</td>
<td width="25" align="center">'.$value['ffmo'].'</td>
<td width="25" align="center">'.$value['fmaxmarks'].'</td>
<td width="25" align="center">'.$value['fsecmarks'].'</td>
<td width="35" align="center">'.$value['fpercent'].'</td>
</tr>';
$i++;
}
$table6 .='</table>';
$pdf->SetX(11);
$pdf->writeHTML($table6, true, false, true, false, 'L');
}
//====================Preferred location====================================
$pdf->ln(-4);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">VI. Preferred Document Verification centre </h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$table4 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">
<tr nobr="true">
<td width="100" ><b>42. Preferred centre</b></td>
<td width="420" align="center" >'.$per_details['fcollname']. '</td>
</tr>';
$table4 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table4, true, true, false, false, 'L');
// $pdf->SetFont('Times','',10);
// $html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> VII. Programme for which you wish to take admission</h3>';
// $x = $pdf->GetX();
// $y = $pdf->GetY();
// $pdf->SetMargins(10,35);
// $pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
// $i = 1;
// $head = '<style>
// td {
// border: 0.5px solid black;
// }
// </style>
// <table cellpadding="3" cellspacing="0">';
// //====================Subject Details====================================
// $table2 = '<style>
// td, th {
// border: 0.5px solid black;
// }
// </style>
// <table cellpadding="2" cellspacing="0">
// <tr nobr="true">
// <th width="50" align="center"><b>Sl. No.</b></th>
// <th width="70" align="center"><b>Programme Code</b></th>
// <th width="400" align="center"><b>Programme Name</b></th>
// </tr>';
// $i = 1;
// $fprefix = "";
// $fprefix = $res_optopns[0]['fprefix'];
// foreach($res_optopns as $value)
// {
// $table2 .= '<tr nobr="true">
// <td width="50" align="center">'.$i.'</td>
// <td width="70" align="center">'.$value['fdegree'].'</td>
// <td width="400" align="left">'.str_replace('(CBCS)','',$value['fdescpn']).'</td>
// </tr>';
// $i++;
// }
// $table2 .='</table>';
// $pdf->SetX(11);
// $pdf->writeHTML($table2, false, true, false, false, 'L');
//var_dump($fprefix);
$pdf->ln(2);
if(strtoupper($per_details['FPGDEGREE']) == 'YES')
{
$pdf->cell(0,7,"Postgraduate Degree Details",0,1,'L');
$table5 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">';//Percentage
$table5 .= '<tr nobr="true">
<td width="100"><b>University Studied</b></td>
<td width="420">'.$per_details['FPGUNIVTYPE'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Reg. No.</b></td>
<td width="420">'.$per_details['FPGREGNO'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Class- I/ II / III</b></td>
<td width="420">'.$per_details['FPGQCLASS'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Passing month / year</b></td>
<td width="420">'.$per_details['FPGMONTH'].' / '.$per_details['FPGYEAR'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="130"><b>Sec. Marks</b></td>
<td width="130">'.$per_details['FPGSECMARKS'].'</td>
<td width="130"><b>Max. Marks</b></td>
<td width="130">'.$per_details['FPGMAXMARKS'].'</td>
</tr>';
$table5 .='</table>';
//$pdf->SetX(12);
$pdf->SetX(11);
$pdf->writeHTML($table5, true, false, true, false, 'L');
$pdf->ln(2);
}
$pdf->AddPage("P");
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">VIII. Fee Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
// $pdf->SetMargins(10,30);
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$pdf->ln(1);
$i = 1;
$head = '<style>
td {
border: 0.5px solid black;
}
</style>
<table cellpadding="3" cellspacing="0">';
//====================Subject Details====================================
$table2 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true"><th width="40" align="center"><b>Sl. No.</b></th>
<th width="360" align="center"><b>Fee Head</b></th>
<th width="120" align="center"><b>Amount</b></th>
</tr>';
$i=1;
$total = 0;
foreach ($fee_det as $key => $value)
{
$table2 .= '<tr nobr="true">
<td width="40" align="center">'.$i.'</td>
<td width="360" align="left">'.substr($value['FHEADCODE'],3).'</td>
<td width="120">'.$value['FAMOUNT'].'</td></tr>';
$total = $total+$value['FAMOUNT'];
$i++;
}
$table2 .= '<tr nobr="true">
<td width="400" collspan = "2" align="right"><b>Total</b></td>
<td width="120"><b>'.$total.'</b></td></tr>';
$table2 .='</table>';
$pdf->SetX(11);
$pdf->writeHTML($table2, true, true, false, false, 'L');
$pdf->ln(10);
if($pdf->GetY() > 210)
{
$pdf->AddPage();
}
$pdf->SetFont('Times','BU',10);
$pdf->Cell(180,7,'Declaration by the Candidate',0,1,'C');
$str = "I hereby declare that the above information furnished by me is true. I have not suppressed any information. VSKUB can initiate action against me, if I have furnished any false information";
$pdf->SetFont('Times','',11);
$pdf->MultiCell(180,4,$str,0,'J');
$pdf->ln(20);
$pdf->SetFont('Times','B',10);
$pdf->Cell(160,4,'Date',0,0,'L');
$pdf->Cell(30,4,'Signature of the Student ',0,1,'R');
$pdf->ln(20);
if($pdf->GetY() > 210)
{
$pdf->AddPage();
}
$pdf->SetLineStyle(array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter', 'dash' => 4, 'color' => "black"));
$pdf->Cell(0,7,'',"T",1,'C');
$pdf->SetFont('Times','BU',13);
$pdf->Cell(0,7,' Student Acknowledgement ',0,1,'C');
$pdf->SetFont('Times','',11);
$pdf->Cell(45,7,'Application No.',0,0,'L');
$pdf->Cell(80,7,": ".$fprefix.$per_details['FAPPNO'],0,1,'L');
$pdf->Cell(45,7,'Student Name',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FNAME'],0,1,'L');
$pdf->Cell(45,7,'Amount Paid',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FTOTFEE'],0,1,'L');
$pdf->Cell(45,7,'Payment Type ',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FPAYTYPE'],0,1,'L');
$pdf->Cell(45,7,'Payment Status ',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FPAYSTATUS'],0,1,'L');
$pdf->Cell(45,7,'Payment Date',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FPAYDATE'],0,1,'L');
$pdf->Cell(45,7,'Tranction ID',0,0,'L');
$pdf->Cell(80,7,": ".$per_details['FPAYID'],0,1,'L');
// $pdf->Cell(45,7,'Payment Transcation ID ',0,0,'L');
// $pdf->Cell(80,7,": ".$per_details['FPAYID'],0,1,'L');
// $html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">Course for which you are appearing</h3>';
// $x = $pdf->GetX();
// $y = $pdf->GetY();
// $pdf->SetMargins(10,30);
// $pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
// $pdf->ln(1);
// $i = 1;
// $head = '<style>
// td {
// border: 0.5px solid black;
// }
// </style>
// <table cellpadding="3" cellspacing="0">';
// //====================Subject Details====================================
// $table2 = '<style>
// td, th {
// border: 0.5px solid black;
// }
// </style>
// <table cellpadding="2" cellspacing="0">
// <tr nobr="true">
// <th width="50" align="center"><b>Courses Code</b></th>
// <th width="200" align="center"><b>Courses Name</b>
// <th width="200" align="center"><b>College Name</b>
// <th width="50" align="center"><b>Priority</b>
// </th>
// </tr>';
// foreach($res_optopns as $value)
// {
// $table2 .= '<tr nobr="true">
// <td width="50" align="left">'.$value['fdegree'].'</td>
// <td width="200" align="left">'.$value['fdescpn'].'</td>
// <td width="200" align="left">'.$value['fcollname'].'</td>
// <td width="50" align="left">'.$value['fpriority'].'</td>
// </tr>';
// }
// $table2 .='</table>';
// $pdf->SetX(11);
// $pdf->writeHTML($table2, true, true, false, false, 'L');
$pdf->ln(20);
$pdf->SetFont('Times','B',10);
$pdf->Cell(160,4,'Date',0,0,'L');
$pdf->Cell(30,4,'Signature of the Document Receiver ',0,1,'R');
}
function SendOutput()
{
// ob_end_clean();
// ob_end_flush();
// ob_end_clean();
$this->pdf->Output("Application_letter.pdf","D");
}
}
function vkuapplicationFormPGReportOld($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);
// var_dump($result);
$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);
// var_dump( $aobj_context->mobj_db);
$appno = trim($aobj_context->mobj_data["appno"]);
$degree = trim($aobj_context->mobj_data["degree"]);
$db = trim($aobj_context->mobj_data["db"]);
$per_details_query = "SELECT DISTINCT IF(IFNULL(fgender,'') = 'F', 'Female', IF(IFNULL(fgender,'') = 'M', 'Male', IF(IFNULL(fgender,'') = 'T', 'Transgender',''))) AS fgender,
IFNULL(b.fcollname,'') AS fcollname,IFNULL(c.fdescpn,'') AS fdescpndeg,IFNULL(d.fdescpn,'') AS fdescpncomb,
IF(IFNULL(funivstud,'') = 'N', 'No', IF(IFNULL(funivstud,'') = 'Y', 'Yes', '')) AS funivstudd,
DATE_FORMAT(IFNULL(a.fdob,''), '%d/%m/%Y') AS fdob, a.* FROM entstudadm_2021 a, entcoll b ,entprevdeg c,entprevcomb d
WHERE a.fdocvrfloc = b.fcollcode AND a.fqdegree = c.fdegree AND d.fcombcode=a.fqcombcode AND IFNULL(FPAYSTATUS,'') = 'success' AND fappno = '{$appno}' ";
// var_dump($per_details_query);
$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,d.fprefix from entoptdeg_2021 o
inner join entdeg d on d.fdegree = o.fdegree
where fappno = '{$appno}'
and o.fdegree = '{$degree}'
order by o.fdegree";
$res_optopns = $aobj_context->mobj_db->GetAll($query);
$query = "select * from entprevmarks_2021 a inner join entprevcomb b
on a.fdegree = b.fdegree
and a.fsubcode= b.fsubcode where fappno ='{$appno}'
AND IFNULL(b.fcombcode,'') <> 'TOT'
group by a.fdegree, a.fsubcode";
$res_prevmarks = $aobj_context->mobj_db->GetAll($query);
$query = "select * from entprevmarks_2021 a inner join entprevcomb b
on a.fcombcode = b.fcombcode
and a.fsubcode= b.fsubcode where fappno ='{$appno}'
and a.fcombcode = 'lan'";
$res_lanmarks = $aobj_context->mobj_db->GetAll($query);
$query = "select * from entprevmarks_2021 a inner join entprevcomb b
on a.fdegree = b.fdegree and a.fcombcode = b.fcombcode
and a.fsubcode= b.fsubcode where fappno ='{$appno}'
and a.fcombcode = 'TOT'
GROUP BY a.fcombcode";
$res_totmarks = $aobj_context->mobj_db->GetAll($query);
// $query = "select date_format(ifnull(fdob,''), '%d/%m/%Y') as fdob from entstudadm_2021 where fappno ='{$appno}'";
// $res = $aobj_context->mobj_db->GetAll($query);
$fdob = "";
// var_dump($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks);
// var_dump($res);
// var_dump($fdob);
// var_dump($per_details['funivstud']);
$class_obj->writeApplication($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks,$res_totmarks,$fdob);
$class_obj->SendOutput();
}
|