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.118.1.100
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/admissionapplist.php |
<?php
function GenerateAdmissionAppList($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode =$aobj_context->mobj_data["college"];;
$degcode = $aobj_context->mobj_data["degree"];
$combcode = $aobj_context->mobj_data["combination"];
$apprstatus = $aobj_context->mobj_data["appstatus"];
if($collcode == 'All' && $degcode == 'All' && $combcode == 'All' && $apprstatus == 'All')
{
$serchAll = '';
}
else
{
$serchAll = 'Where';
}
$searchColl = '';
if($collcode != 'All')
{
$searchColl = "FCOLLCODE='{$collcode}'";
}
$searchdegcode = '';
if($degcode != 'All')
{
$searchdegcode = "and FDEGREE='{$degcode}'";
}
$searchComb = '';
if($combcode != 'All')
{
$searchComb = "and FCOMBCODE='{$combcode}'";
}
$searchAppr = '';
if($apprstatus != 'All')
{
$searchAppr = "and FAPPRSTATUS='{$apprstatus}'";
}
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$pdf_writer_class=$aobj_context->main_src."/maya-pdf/fpdf.php";
$tarkaheader=$aobj_context->main_src."/Report_details/tarkaheader.php";
// global varibales
$p_count =1;
// end global varibales
include($pdf_writer_class);
$pdf= new FPDF();
//$pdf->$title='20000 Leagues Under the Seas';
$pdf->SetFont('Times','',10);
$pdf->SetMargins(5,12);
$pdf->AliasNbPages();
$sub_degcode_cond="";
// query for the page header
$page_header_university = "select FUNIVNAME,FTOWN, date_format(now(),'%d/%m/%Y') as date from control";
$lobj_page_header_university = $aobj_context->mobj_db->GetRow($page_header_university);
$page_header_collcode ="select concat('',FCOLLCODE,' ',FCOLLNAME,', ',FTOWN) as college_name
from college where FCOLLCODE='{$collcode}'";
$lobj_page_header_collcode = $aobj_context->mobj_db->GetRow($page_header_collcode);
$page_header_degcode = "select concat('',FDEGREE,' - ', FDESCPN,', ',FEXAMNAME) as Degree_name, FADYEAR
from degree where FDEGREE = '{$degcode}' ";
$lobj_page_header_degcode = $aobj_context->mobj_db->GetRow($page_header_degcode);
$pdf->aobj_context =$aobj_context ;
$pdf->WhichReport = 'Admission Approve List';
$pdf->FUNIVNAME = $lobj_page_header_university[FUNIVNAME];
$pdf->FTOWN = $lobj_page_header_university[FTOWN];
$pdf->date_1 = $lobj_page_header_university['date'];
$pdf->college_name = $lobj_page_header_collcode['college_name'];
$pdf->Degree_name = $lobj_page_header_degcode['Degree_name'];
$pdf->AdmissionYear = $lobj_page_header_degcode['FADYEAR'];
//$pdf->AddPage();
$pdf->SetFont('Times','',10);
$get_student_data= "select * from studadm
{$serchAll} {$searchColl} {$searchdegcode} {$searchComb} {$searchAppr}";
$lobj_student_data = $aobj_context->mobj_db->GetAll($get_student_data);
$pdf->AddPage('L');
$w = array(10,20,15,15,50,10,45,10,30,40);
writeHeaders($pdf, $w);
//writeFooter($pdf);
$adm_ln_counter=0;
$slno = 1;
foreach($lobj_student_data as $key => $value)
{
$get_x1=$pdf->GetX();
$get_y1=$pdf->GetY();
$pdf->SetXY($get_x1+$w[0]+$w[1]+$w[2]+$w[3],$get_y1);
$pdf->MultiCell($w[4],6, $value['FNAME'] ,'LBT','L');
$get_y2=$pdf->GetY();
$height=$get_y2-$get_y1;
$pdf->SetXY($get_x1,$get_y1);
$pdf->Cell($w[0],$height, $slno,'LBT',0,'C');
$get_x1=$pdf->GetX();
$pdf->SetXY($get_x1,$get_y1);
$pdf->Cell($w[1],$height, $value['FAPPNO'],'LBT',0,'C');
$pdf->SetXY($get_x1+$w[1],$get_y1);
$pdf->Cell($w[2],$height,$value['FAPPDATE'],'LBT',0,'C');
$pdf->Cell($w[3],$height,$value['FREGNO'],'LBT',0,'C');
$get_x1=$pdf->GetX();
$pdf->SetXY($get_x1+$w[4],$get_y1);
$pdf->Cell($w[5],$height,$value['FCASTE'],'LBT',0,'C');
$pdf->Cell($w[6],$height,$value['fservname'],'LBT',0,'L');
$pdf->Cell($w[7],$height,$value['FTOTFEE'],'LBT',0,'R');
$pdf->Cell($w[8],$height,$value['FAPPRSTATUS'],'LBT',0,'C');
$pdf->Cell($w[9],$height,$value['FAPPRDATE'],'LBRT',1,'C');
$get_y1=$pdf->GetY();
++$slno;
/*if($get_y1>=250)
{
$pdf->Ln(10);
$pdf->AddPage('L');
writeHeaders($pdf,$w);
//writeFooter($pdf);
}*/
$adm_ln_counter++;
}
$pdf->ln(2);
$pdf->Output("report_admission_list.pdf","D");
}
function writeHeaders($pdf,$w)
{
$pdf->SetFont('Times','B',9);
$pdf->Cell($w[0],6,"Sl. No.",'LT',0,'C');
$pdf->Cell($w[1],6,"App. No.",'LT',0,'C');
$pdf->Cell($w[2],6,"App. Date.",'LT',0,'C');
$pdf->Cell($w[3],6,"Reg. No.",'LT',0,'C');
$pdf->Cell($w[4],6,"Student Name",'LT',0,'C');
$pdf->Cell($w[5],6,"Cat.",'LT',0,'C');
$pdf->Cell($w[6],6,"Service type",'LT',0,'C');
$pdf->Cell($w[7],6,"Amt.",'LRT',0,'C');
$pdf->Cell($w[8],6,"Status",'LRT',0,'C');
$pdf->Cell($w[9],6,"Ver. Date",'LRT',1,'C');
$pdf->SetFont('Times','',8);
}
function writeFooter($pdf)
{
$get_x1=$pdf->GetX();
$get_y1=$pdf->GetY();
$pdf->SetY(-15);
//$pdf->Cell(0,4,"Note : Attended / Conducted",'0',1,'L');
$new_y=$pdf->GetY();
$pdf->Line(10,$new_y, 220,$new_y);
$pdf->Line(10,$new_y+.5, 220,$new_y+.5);
//$pdf->Ln();
//$pdf->Cell(0,6,"Principal's Signature",'0',0,'R');
$pdf->SetXY($get_x1,$get_y1);
}
?>
|