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.145.76.12
<?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);
$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->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($db,$per_details, $fee_det,$res_optopns,$degree, $res_prevmarks,$res_lanmarks,$res_totmarks)
{
//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');
//====================Personal Details====================================
$pdf->SetFont('Times','',10);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> 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;
$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="2" 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="2">'.$per_details['FNAME'].'</td></tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable" >2. Father`s /Guardian`s Name</td>
<td width="270" colspan="2">'.$per_details['FFATNAME'].'</td></tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">3. Mother`s Name</td>
<td width="270" colspan="2">'.$per_details['FMOTNAME'].'</td></tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Date of Birth(YYYY-MM-DD)</td>
<td width="135">'.$per_details['FDOB'].'</td>
<td width="70" class="lable">Gender</td>
<td width="65">'.$per_details['FGENDER'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Nationality</td>
<td width="135">'.$per_details['FNATIONAL'].'</td>
<td width="135" class="lable">Religion</td>
<td width="100">'.$per_details['freligion'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Aadhaar No.</td>
<td width="135">'.$per_details['FAADHARNO'].'</td>
<td width="135" class="lable">Annual Family Income</td>
<td width="100">'.$per_details['FINCOME'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Category</td>
<td width="135">'.$per_details['FCATEGORY'].'</td>
<td width="135" class="lable">Sub Category</td>
<td width="100">'.$per_details['fsubcaste'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Online Scholarship (Post metric) Registration No</td>
<td width="135">'.$per_details['FPMREGNO'].'</td>
<td width="135" class="lable">Blood Group</td>
<td width="100">'.str_replace('N','-',str_replace('P','+', $per_details['fbloodgrp'])).'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Income RD No.</td>
<td width="135">'.$per_details['fincomerdno'].'</td>
<td width="135" class="lable">Caste RD No.</td>
<td width="100">'.$per_details['fcasterdno'].'</td>
</tr>';
$table1 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table1, false, true, false, false, 'L');
$pdf->ln(2);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> 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">Permanent Address</td>
<td width="370">'.$per_details['fperadd'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Communication Address</td>
<td width="370">'.$per_details['fcuradd'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Email Address</td>
<td width="370">'.$per_details['FEMAIL'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Mobile No.</td>
<td width="370">'.$per_details['FMOBILENO'].'</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);"> 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);"> 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 Claimed (Certificate issued by the competent authority is must)</b></th>
<th width="100" align="center" ><b>Yes / No</b></th>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you a student of Kalyana Karnataka (Hyaderabad-Karnataka) under 371J ?</b></td>
<td width="100" >'.$per_details['FHK'].$fhkrdno.'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you differently Abled / Blind / PH ?</b></td>
<td width="100" >'.$per_details['FHANDICAP'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you Claim Sports quota ?</b></td>
<td width="100" >'.$per_details['FSPORTS'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Do you Claim NSS/NCC/Rangers & Rovers ?</b></td>
<td width="100" >'.$per_details['FNCC'].'</td>
</tr>
<tr nobr="true">
<td width="420" ><b>Are you other University(other than VSK University within and outside Karntaka) ?</b></td>
<td width="100" >'.$per_details['fkanm'].'</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>Would you like to be considered under Project displaced person ?</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 Devadasi / HIV infected quota ?</b></td>
<td width="100" >'.$per_details['fcof'].'</td>
</tr>';
$table4 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table4, true, true, false, false, 'L');
}
//====================Degree Details====================================
$pdf->SetFont('Times','',10);
$pdf->ln(4);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> 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);
$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 .= '<tr nobr="true">
<td width="100"><b>University Studied</b></td>
<td width="420">'.$univ.'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Degree</b></td>
<td width="420">'.$per_details['FQDEGREE'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Reg. No.</b></td>
<td width="420">'.$per_details['FQREGNO'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Class- I/ II / III</b></td>
<td width="420">'.$per_details['FQCLASS'].'</td>
</tr>';
$table5 .= '<tr nobr="true">
<td width="100"><b>Passing month / year</b></td>
<td width="420">'.$per_details['FQMONTH'].' / '.$per_details['FQYEAR'].'</td>
</tr>';
$percentage = number_format(($per_details['FQSECMARKS'] / $per_details['FQMAXMARKS'])*100,2);
$table5 .= '<tr nobr="true">
<td width="100"><b>Sec. Marks</b></td>
<td width="80">'.$per_details['FQSECMARKS'].'</td>
<td width="80"><b>Max. Marks</b></td>
<td width="80">'.$per_details['FQMAXMARKS'].'</td>
<td width="80"><b>Percentage</b></td>
<td width="100">'.$percentage.'</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(2);
if(count($res_totmarks) > 0)
{
$table6 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<th width="520" colspan="7" align="center"><b>Semester Total marks</b></th>
</tr>
<thead>
<tr nobr="true">
<th width="20" rowspan="2" align="center"><b>Sl. No.</b></th>
<th width="215" 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>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>
</tr>
</thead>';//Percentage
$i = 1;
foreach($res_totmarks as $value)
{
$table6 .= '<tr nobr="true">
<td width="20" align="center">'.$i.'</td>
<td width="215" 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['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');
}
$pdf->ln(2);
if(count($res_lanmarks) > 0)
{
$table6 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<th width="520" colspan="7" align="center"><b>Language Details</b></th>
</tr>
<thead>
<tr nobr="true">
<th width="20" rowspan="2" align="center"><b>Sl. No.</b></th>
<th width="215" 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>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>
</tr>
</thead>';//Percentage
$i = 1;
foreach($res_lanmarks as $value)
{
$table6 .= '<tr nobr="true">
<td width="20" align="center">'.$i.'</td>
<td width="215" 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['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');
}
if(count($res_prevmarks) > 0)
{
$table6 = '<style>
td, th {
border: 0.5px solid black;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<th width="520" colspan="7" align="center"><b>Details of the marks obtained in all the optional subjects in qualifying Degree Examination</b></th>
</tr>
<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>';//Percentage
$i = 1;
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');
}
$pdf->SetFont('Times','',10);
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">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);
}
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> 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. RCUB 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,": ".$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 applicationFormPGReport($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"]);
$db = trim($aobj_context->mobj_data["db"]);
$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,d.fprefix 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}' AND IFNULL(b.fcombcode,'') <> 'TOT'";
$res_prevmarks = $aobj_context->mobj_db->GetAll($query);
$query = "select * from entprevmarks 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 a inner join entprevcomb b
on a.fcombcode = b.fcombcode
and a.fsubcode= b.fsubcode where fappno ='{$appno}'
and a.fcombcode = 'TOT'";
$res_totmarks = $aobj_context->mobj_db->GetAll($query);
// var_dump($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks);
$class_obj->writeApplication($db,$per_details, $fee_det,$res_optopns,$per_details['FDEGREE1'], $res_prevmarks,$res_lanmarks,$res_totmarks);
$class_obj->SendOutput();
}
|