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.61.142
Current Path : /var/www/html/mcu/phdadm/src/ |
| Current File : /var/www/html/mcu/phdadm/src/applicationFormReportSBM.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/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(3);
$form = "";
if($this->aobj_context->form == 'B')
{
$form = 'non -';
}
//var_dump($this->aobj_context->form);die();
$this->Cell(0,4,'FORM : '.$this->aobj_context->form." - Ph.D Application for ".$form." Entrance Candidates",0,1,'C');
$this->Ln(8);
$this->Cell(0,4,'Register Number : '.$this->aobj_context->fregno,0,0,'L');
$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->FAPPNO, 'C39', '140', '22','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"];
$app_no = trim($aobj_context->mobj_data["app_no"]);
$aobj_context->FAPPNO = trim($aobj_context->mobj_data["app_no"]);
$get_date="select DATE_FORMAT(now(), '%d/%m/%Y') as now_date";
$obj=$this->aobj_context->mobj_db->GetRow($get_date);
$get_coll_name="select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
FUNIVADD1 as 'state', pdf_logo_path,
ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
$lobj_get_coll_name=$this->aobj_context->mobj_db->GetRow($get_coll_name);
$aobj_context->FUNIVNAME=$lobj_get_coll_name['FUNIVNAME'];
$aobj_context->s_state=$lobj_get_coll_name['state'];
$aobj_context->pdf_logo_path=$lobj_get_coll_name['pdf_logo_path'];
$aobj_context->FEXAMAPPREQ=$lobj_get_coll_name['FEXAMAPPREQ'];
$aobj_context->FUNIVCODE=$lobj_get_coll_name['FUNIVCODE'];
$get_college_name="select fform,FREGNO as fregno from phdstudadm where fappno = '{$app_no}'";
$lobj_get_college_name = $this->aobj_context->mobj_db->GetRow($get_college_name);
$aobj_context->form = $lobj_get_college_name['fform'];
$aobj_context->fregno = $lobj_get_college_name['fregno'];
// var_dump('lobj_get_college_name'.$lobj_get_college_name['fregno']);
// var_dump('aobj_context->fregno'.$aobj_context->fregno);
$this->aobj_context->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', 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'];
}
//, $subjects,$upload
function writeApplication($per_details)
{
$pdf=$this->pdf;
$pdf->SetMargins(10,30,20,false);
$pdf->startPageGroup();
$pdf->AddPage("P");
$pdf->ln(3);
$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.'/'.$per_details['fphotopath']);
$i= 1;
$table1 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">Application No.</td>
<td width="270" colspan="2" style = "font-size:15px;">'.$per_details['FAPPNO'].'</td>
<td width="100" rowspan="5"><img width="80" height="90" src="'.$per_details['FPHOTOPATH'].'" ></td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Name of the Applicant</td>
<td width="270" colspan="2">'.$per_details['FNAME'].'</td></tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable" >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">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</td>
<td width="135">'.$per_details['dob'].'</td>
<td width="70" class="lable">Gender</td>
<td width="65">'.$per_details['gender'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">FAADHARNO</td>
<td width="135">'.$per_details['FAADHARNO'].'</td>
<td width="135" class="lable">Category</td>
<td width="100" >'.$per_details['FCATEGORY'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Caste</td>
<td width="135">'.$per_details['FCASTE'].'</td>
<td width="135" class="lable">Nationality</td>
<td width="100" >'.$per_details['FNATIONAL'].'</td>
</tr>';
$table1 .='<tr nobr="true">
<td width="150" class="lable">Hyderabad Karnataka(HK)</td>
<td width="135">'.$per_details['FHK'].'</td>
<td width="135" class="lable">Physically Handicap</td>
<td width="100" >'.$per_details['FHANDICAP'].'</td>
</tr>';
$table1 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table1, true, true, false, false, 'L');
$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);
$table2 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="2" 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, true, true, false, false, 'L');
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> Post Graduate Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$table2 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">Post Graduate Degree</td>
<td width="370">'.$per_details['FQDEGREE'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Post Graduate Subject</td>
<td width="370">'.$per_details['FQSUB'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Post Graduate Year Of passing</td>
<td width="370">'.$per_details['FQYEAR'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Post Graduate Aggregate % / Grade Secured</td>
<td width="370">'.$per_details['FQPERCENTAGE'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Post Graduate Specialization</td>
<td width="370">'.$per_details['FQSUB'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Post Graduate University</td>
<td width="370">'.$per_details['FQUNIV'].'</td>
</tr>';
$table2 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table2, true, true, false, false, 'L');
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);"> Course Opted Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$table2 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">Broad Area of Research / subject /intending to pursue research</td>
<td width="370">'.$per_details['fdescpn'].'</td>
</tr>';
/*$table2 .= '<tr nobr="true">
<td width="150" class="lable">Name of the Deparatment / College/Institution where you intend to carryout research</td>
<td width="370">'.$per_details['fcollname'].'</td>
</tr>'; */
$table2 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table2, true, true, false, false, 'L');
$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">Payment Details</h3>';
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
$table2 = '<style>
td {
border: 0.5px solid black;
}
.lable {
font-weight: bold;
}
</style>
<table cellpadding="2" cellspacing="0">
<tr nobr="true">
<td width="150" class="lable">Amount</td>
<td width="135">'.$per_details['FTOTFEE'].'</td>
<td width="135" class="lable">Payment Type</td>
<td width="100">'.$per_details['FPAYTYPE'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Transcation Date</td>
<td width="370">'.$per_details['FPAYDATE'].'</td>
</tr>';
$table2 .= '<tr nobr="true">
<td width="150" class="lable">Transcation Id</td>
<td width="370">'.$per_details['FPAYID'].'</td>
</tr>';
$table2 .= '</table>';
$pdf->SetX(11);
$pdf->writeHTML($table2, true, true, false, false, 'L');
$pdf->AddPage("P");
$pdf->SetFont('Times','BU',12);
$pdf->cell(0,7,"DECLARATION",0,1,'C');
$pdf->SetFont('Times','',10);
$pdf->cell(0,7,"I do here by declare, in case of my selection for Ph.D Programme:",0,1,'L');
$pdf->cell(0,5,"1. I shall submit the progress reports regularly as per the rules of the University.",0,1,'L');
$pdf->cell(0,5,"2. I shall pay the registration fee / term fee / fee for extended terms within the stipulated date.",0,1,'L');
$pdf->cell(0,5,"3. I also understand that if I fail to submit the progress reports / payments of fees within the ",0,1,'L');
$pdf->cell(0,5," stipulated period my registration for Ph.D degree stands cancelled automatically",0,1,'L');
$pdf->cell(0,5,"4. I shall seek extension of terms wherever needed before the expiry of the period.",0,1,'L');
$pdf->cell(0,5,"5. I shall abide by all the relevant rules pertaining to the Doctoral Degree Programme of the University.",0,1,'L');
$pdf->cell(0,5,"6. I will not claim for Hostel facility, if admitted to the Research Centre / Institution (including Government Colleges)",0,1,'L');
$pdf->cell(0,5,"7. Only the Women candidates are eligible to apply for Women Colleges and applications of men, if any will be rejected.",0,1,'L');
$pdf->Ln(11);
$pdf->cell(130,5,"Signature with seal of the HOD / College",0,0,'L');
$pdf->cell(35,5,"Signature of the Candidate",0,1,'R');
$pdf->cell(130,5," (For the in-service candidates)",0,1,'L');
$pdf->cell(0,7,"Date : ",0,1,'L');
$pdf->cell(0,7,"Place : ",0,1,'L');
$pdf->SetFont('Times','BU',11);
$pdf->cell(0,5,"FOR USE IN THE DEPARTMENT",0,1,'C');
$pdf->SetFont('Times','',10);
$pdf->cell(90,7,"Name of the Candidate ",0,1,'L');
$pdf->cell(90,7,"Whether selected through Entrance Test? Yes / No ",0,1,'L');
$pdf->cell(180,7,"Name and Signature of the Guide",1,1,'L');
$pdf->cell(180,6,"Signature of the Chairperson of the ",LRT,1,'L');
$pdf->cell(180,6,"Department(with seal)",LRB,1,'L');
$pdf->SetFont('Times','BU',11);
$pdf->cell(180,7,"FOR USE IN THE DEPARTMENT",LRT,1,'L');
$pdf->SetFont('Times','',10);
$pdf->cell(180,6,"Is the application approved by the Doctoral Committee: Yes / No",LR,1,'L');
$pdf->cell(180,6,"Resolution No :",LR,1,'L');
$pdf->cell(180,6,"Date :",LRB,1,'L');
}
function SendOutput()
{
$this->pdf->Output("Application_letter{$this->current_date}.pdf","D");
}
}
function PrintApplicationFormSBM($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$app_no = trim($aobj_context->mobj_data["app_no"]);
$per_details_query = "select s.*, date_format(s.fdob,'%d/%m/%Y') as dob, if(fgender = 'M','Male', 'Female') as gender, d.fdescpn, c.fcollname,
concat(FPERMADD1,' ',FPERMADD2,' ', FPERMADD3, ' ',FPERMDIST, ' ',FPERMSTATE,' - ',FPERMPIN) as fperadd,
concat(FCURRADD1,' ',FCURRADD2,' ', FCURRADD3, ' ',FCURRDIST, ' ',FCURRSTATE,' - ',FCURRPIN) as fcuradd
from phdstudadm s
inner join degree d on s.fdegree = d.fdegree and ifnull(d.fdeggrp,'') = 'phd' and d.fexamno = 'a'
inner join phdcolldeg c on s.fdegree = c.fdegree
WHERE s.fappno = '{$app_no}'";
$per_details = $aobj_context->mobj_db->GetRow($per_details_query);
//var_dump($per_details_query);die();
// $class_obj = new AddmissionApplication();
// $class_obj->DefaultConstructor($aobj_context);
$class_obj = new AddmissionApplication();
$aobj_context->FAPPNO = $value['FAPPNO'];
$aobj_context->fcollcode = $value['FCOLLCODE'];
$aobj_context->fdegree = $value['FDEGREE'];
$class_obj->DefaultConstructor($aobj_context);
$class_obj->writeApplication($per_details);
$class_obj->SendOutput();
}
?>
|