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.17.175.167
<?php
function GenerateMarksEntryReport($aobj_context)
{
session_start();
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$from_exam = $aobj_context->mobj_data["from_exam"];
$to_exam = $aobj_context->mobj_data["to_exam"];
$from_degree = $aobj_context->mobj_data["from_degree"];
$to_degree = $aobj_context->mobj_data["to_degree"];
$from_coll = $aobj_context->mobj_data["from_coll"];
$to_coll = $aobj_context->mobj_data["to_coll"];
$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;
// end global varibales
// echo getnumber_to_word("001"); die();
include($pdf_writer_class);
$pdf= new FPDF();
$pdf->SetFont('Times','',10);
$pdf->SetMargins(18,15);
$pdf->AliasNbPages();
$coll_list = "select distinct stud.FCOLLCODE,stud.FDEGREE,stud.FEXAMNO
from student stud inner join candsum cs on cs.FREGNO = stud.FREGNO
inner join marks m on m.FREGNO = cs.FREGNO
and cs.FYEAR = m.FYEAR
and cs.FEXAMTYPE = m.FEXAMTYPE
and cs.FFRESHEXAM = m.FEXAMNO
inner join degree d on d.fdegree = m.FDEGREE
and m.FEXAMNO = d.FEXAMNO
and m.FYEAR = d.FMEYEAR
and m.FEXAMTYPE = d.FMEEXAMTYP
where stud.FCOLLCODE between '{$from_coll}' and '{$to_coll}'
and m.FMARKS = '-1'
and d.FDEGREE between '{$from_degree}' and '{$to_degree}'
order by stud.FCOLLCODE";
$lobj_page_collList = $aobj_context->mobj_db->GetAll($coll_list);
foreach($lobj_page_collList as $collKey =>$collValue)
{
$college_code = $collValue[FCOLLCODE];
$degree_code = $collValue[FDEGREE];
$exam_code = $collValue[FEXAMNO];
// 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_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_code}' and FEXAMNO='{$exam_code}' ";
$lobj_page_header_degree = $aobj_context->mobj_db->GetRow($page_header_degree);
$page_header_REGROLL = "select FREGROLL from control";
$lobj_page_header_REGROLL = $aobj_context->mobj_db->GetRow($page_header_REGROLL);
$pdf->aobj_context =$aobj_context ;
$pdf->WhichReport = 'MARKS_SUBJECTWISEPENDING';
$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_college['college_name'];
$pdf->Degree_name = $lobj_page_header_degree['Degree_name'];
$pdf->Exam = $lobj_page_header_degree['Exam'];
$pdf->AdmissionYear = $lobj_page_header_degree['FADYEAR'];
$pdf->REGROLL=$lobj_page_header_REGROLL['FREGROLL'];
$pdf->RFROM=strtoupper(substr($sublist_start,-4));
$pdf->RTO=strtoupper(substr($sublist_end,-4));
$pdf->REPORT_STATUS = 'IA Marks Pending';
// end header
$get_subject_data = " select m.FREGNO, stu.FNAME as Name1,
m.FMARKS as MarksVal1,m.FMARKS2 as MarksVal2,
concat(s.FSUBNAME,',[',FSSUBNAME,']') as sub_name,
ifnull(m.FMARKS,-1) as Marks,m.FSUBCODE, s.FSMAXMARKS
from marks m inner join student stu on m.fdegree = stu.fdegree
and m.FREGNO=stu.FREGNO
inner join subject s on m.FSUBCODE=s.FCSUBCODE
inner join candsum cs on m.FREGNO = cs.FREGNO
and cs.FYEAR = m.FYEAR
and cs.FEXAMTYPE = m.FEXAMTYPE
and cs.FFRESHEXAM = m.FEXAMNO
where m.FDEGREE='{$degree_code}'
and m.FEXAMNO='{$exam_code}'
and m.FCOLLCODE='{$college_code}'
and s.FEXAMNO=m.FEXAMNO and m.FDEGREE=s.FDEGREE
and IFNULL(m.FDELETED,'F') ='F'
and m.FMARKS = '-1'
and stu.FEXAMNO between '{$from_exam}' and '{$to_exam}'
group by FCSUBCODE,m.FREGNO order by FCSUBCODE,m.FREGNO";
$lobj_get_subject_data = $aobj_context->mobj_db->GetAll($get_subject_data);
$pdf->Subject_name=$lobj_get_subject_data[0]['FSUBCODE'].' '.$lobj_get_subject_data[0]['sub_name'].', Max: '.$lobj_get_subject_data[0]['FSMAXMARKS'];
$page_header_FEEZEDorNOT = "select if(FMESTATUS{$exam_code} like '%{$lobj_get_subject_data[0]['FSUBCODE']}%','FREEZED (READY TO SEND TO UNIVERSITY)','FREEZING PENDING (TO BE SENT TO UNIVERSITY AFTER FREEZING)') SUB_FREEZ_ADMIN ,
if(FCMESTATUS is null,'',concat('CONFIRMED(',FCMESTATUS,')')) as MESTATUS
from colldeg
where fcollcode='{$college_code}' and fdegree='{$degree_code}'";
$lobj_page_header_FEEZEDorNOT = $aobj_context->mobj_db->GetRow($page_header_FEEZEDorNOT);
$pdf->SetFont('Times','',10);
$Count_subject=1;
$DUP_FCSUBCODE='';
$pdf->page_absent_count=0;
$pdf->total_absent_count=0;
$count=0;
$countVal=0;
$DUP_FCSUBCODE=$lobj_get_subject_data[0]['FSUBCODE'];
$row_cnt=0;
$MismatchSign=0;
$MismatchStart=0;
$pdf->AddPage();PrintFooter($pdf);
foreach($lobj_get_subject_data as $key => $value)
{
if($DUP_FCSUBCODE==$value['FSUBCODE'])
{
$pdf->Cell(10,6,$Count_subject++,0,0,'C');
$pdf->Cell(20,6,$value['FREGNO'],0,0,'L');
$pdf->Cell(70,6,$value['Name1'],0,0,'L');
$pdf->Cell(40,6,$value['Marks'],0,1,'L');
$count++;
$row_cnt++;
if(($row_cnt) > 30)
{
$pdf->SetFont('Times','',10);
$pdf->SetMargins(18,15);
$pdf->AddPage();PrintFooter($pdf);
$row_cnt=0;
}
}
else if($count > 0)
{
$pdf->Subject_name=$value['FSUBCODE'].' '.$value['sub_name'].', Max: '.$value['FSMAXMARKS'];
$page_header_FEEZEDorNOT = "select if(FMESTATUS{$exam_code} like '%{$value['FSUBCODE']}%','FREEZED (READY TO SEND TO UNIVERSITY)','FREEZING PENDING (TO BE SENT TO UNIVERSITY AFTER FREEZING)') SUB_FREEZ_ADMIN ,
if(FCMESTATUS is null,'',concat('CONFIRMED(',FCMESTATUS,')')) as MESTATUS
from colldeg
where fcollcode='{$college_code}'
and fdegree='{$degree_code}'";
$lobj_page_header_FEEZEDorNOT = $aobj_context->mobj_db->GetRow($page_header_FEEZEDorNOT);
$DUP_FCSUBCODE=$value['FSUBCODE'];
$Count_subject=1;
$row_cnt=0;
$pdf->Ln(3);
$pdf->AddPage();PrintFooter($pdf);
$pdf->Cell(10,6,$Count_subject++,0,0,'C');
$pdf->Cell(20,6,$value['FREGNO'],0,0,'L');
$pdf->Cell(70,6,$value['Name1'],0,0,'L');
$pdf->Cell(5,6,$value['Marks'],0,1,'C');
}
}
}
$pdf->Ln(6);
$pdf->SetFont('Arial','',8);
$pdf->Output("report_IA_pending.pdf","D");
}
function PrintFooter($pdf)
{
$get_x1=$pdf->GetX();
$get_y1=$pdf->GetY();
$pdf->SetY(-18);
$new_y=$pdf->GetY();
$pdf->SetDash(1, .3);
$pdf->Line(5,$new_y, 203,$new_y);
$pdf->Line(5,$new_y+.5, 203,$new_y+.5);
$pdf->Ln(1);
$pdf->SetFont('Times','',8);
$ip=$_SERVER["REMOTE_ADDR"];
$pdf->Cell(140,4,'Printed : IP Address : '.$ip.", Date : ".$pdf->date_1,'0',0,'L');
$pdf->SetXY($get_x1,$get_y1);
}
?>
|