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.196.141
<?php
function GenerateCollegeCentrStud($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$college_code = $_SESSION['collcode'];
$FUNIVCODE = $_SESSION['FUNIVCODE'];
$degree = $aobj_context->mobj_data["degree"];
$examno = $aobj_context->mobj_data["examno"];
$userid = $_SESSION['user_id'];
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$pdf_writer_class=$aobj_context->main_src."/maya-pdf/fpdf.php";
$root_pdf_file_download=$aobj_context->main_src."/Report_details/output/report_general_list.pdf";
$getnumword=$aobj_context->main_src."/src/getnumword.php";
include($getnumword);
// global varibales
$p_count =1;
include($pdf_writer_class);
$pdf= new FPDF();
$pdf->SetFont('Times','',10);
$pdf->SetMargins(10,10);
$pdf->AliasNbPages();
// query for the page header
$page_header_university = "select FUNIVNAME,FTOWN,FUNIVADD1, date_format(now(),'%d/%m/%Y') as date from control";
$lobj_page_header_university = $aobj_context->mobj_db->GetRow($page_header_university);
$page_header_college ="select concat('[ ',FCOLLCODE,' ] ',FCOLLNAME,', ',FTOWN) as college_name
from college where FCOLLCODE='{$college_code}'";
$lobj_page_header_college = $aobj_context->mobj_db->GetRow($page_header_college);
$page_header_degree = "select concat('[ ',FDEGREE,' ] - ', FDESCPN) as Degree_name,
concat(' ', FEXAMNAME ,' Examination ',FEXAMDATE,'') as Exam ,FADYEAR
from degree where FDEGREE = '{$degree}' and FEXAMNO='{$examno}'";
$lobj_page_header_degree = $aobj_context->mobj_db->GetRow($page_header_degree);
$pdf->aobj_context =$aobj_context ;
//$pdf->WhichReport = 'Exam Centrewise Candidates list';
$pdf->FUNIVNAME = $lobj_page_header_university['FUNIVNAME'];
$pdf->FTOWN = $lobj_page_header_university['FTOWN'];
$pdf->FUNIVADD1 = $lobj_page_header_university['FUNIVADD1'];
$pdf->date_1 = $lobj_page_header_university['date'];
$pdf->college_name = $lobj_page_header_college['college_name'];
$pdf->Degree_name = $lobj_page_header_degree['Degree_name'];
$pdf->Exam = $lobj_page_header_degree['Exam'];
$get_subject_data = " select cs.fregno,s.fname,
SUBSTRING(fname,1,31) as name1,
SUBSTRING(fname,32,40) as name2,
SUBSTRING(concat(c.fcollcode,' - ',c.fcollname,', ',c.ftown),1,65) as collname1,
SUBSTRING(concat(c.fcollcode,' - ',c.fcollname,', ',c.ftown),66,120) as collname2
from candsum cs
inner join student s on cs.fcollcode = s.fcollcode and
cs.fregno = s.fregno and cs.fdegree = s.fdegree
inner join college c on cs.fcntrcode = c.FCOLLCODE
where ifnull(cs.FRECPTDATE,'') <>'' and cs.fcollcode = '{$college_code}'
and cs.fdegree = '{$degree}'
and cs.fappear{$examno} = 'A'
order by s.fname";
//var_dump($get_subject_data);
$lobj_get_subject_data = $aobj_context->mobj_db->GetAll($get_subject_data);
$first=true;
$sl_no=1;
$k2=1;
$pdf->SetFont('Times','',10);
$oldsub = "";
$oldsection = "";
$newsub = "";
$newsection = "";
$pdf->page_absent_count=0;
foreach($lobj_get_subject_data as $key => $value)
{
if($pdf->GetY() > 270)
{
$new_y=$pdf->GetY();
$first=true;
}
if($first)
{
$pdf->Cell(190,1,'','T',1,'C');
if($k2 != 1)
{
$pdf->Ln(4);
$pdf->SetY(-20);
$pdf->SetFont('Arial','',7);
$pdf->page_absent_count=0;
$pdf->Ln(5);
$pdf->Cell(0,3,'IP Address : '.$_SERVER['REMOTE_ADDR'].", Date ".$pdf->date_1,'0',1,'R');
}
$pdf->AddPage();
$pdf->Rect(5,05,200,288);
$pdf->SetMargins(10,10);
$pdf->SetFont('Times','B',10);
$pdf->Cell(0,6,"Collegewise Candidates list",0,1,'C');
$pdf->Ln(1);
$pdf->SetFont('Times','',11);
$pdf->Cell(0,4,'Degree : '.$pdf->Degree_name,0,1,'C');
$pdf->Ln(1);
$pdf->Cell(0,4,$pdf->Exam,0,1,'C');
$pdf->SetFont('Times','B',11);
$pdf->Ln(2);
$pdf->Cell(10,6,'Sl.No.','1',0,'C');
$pdf->Cell(20,6,'Reg. No.','1',0,'C');
$pdf->Cell(70,6,'Name','1',0,'C');
$pdf->Cell(90,6,'Exam Centre','1',1,'C');
$first=false;
}
$pdf->SetFont('Times','',9);
$pdf->Cell(10,6,$sl_no,'LTR',0,'C');
$pdf->Cell(20,6,$value['fregno'],'LTR',0,'L');
$pdf->Cell(70,6,$value['name1'],'LTR',0,'L');
$pdf->Cell(90,6,$value['collname1'],'LTR',1,'L');
if($value['collname2'] != '' || $value['name2'] != '')
{
$pdf->Cell(10,6,' ','LRB',0,'C');
$pdf->Cell(20,6,' ','LRB',0,'L');
$pdf->Cell(70,6,$value['name2'],'LBR',0,'L');
$pdf->Cell(90,6,$value['collname2'],'LRB',1,'L');
}
$count++;
$row_cnt++;
++$sl_no;
++$k2;
}
$pdf->Cell(190,1,'','T',1,'C');
$pdf->Ln(4);
$pdf->SetY(-20);
$pdf->SetFont('Arial','I',8);
$pdf->page_absent_count=0;
$pdf->Ln(5);
$pdf->Cell(0,3,'IP Address : '.$_SERVER['REMOTE_ADDR'].", Date ".$pdf->date_1,'0',1,'R');
$pdf->Output("Exam_Collegewise_Candidates_list.pdf","D");
}
?>
|