0xV3NOMx
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.139.86.58


Current Path : /var/www/oasis/Report_details/
Upload File :
Current File : /var/www/oasis/Report_details/convoreport.php

<?php

function convocationreport($aobj_context)
{	
	session_start();
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);  
   
    $degree = $aobj_context->mobj_data['degree'];
    $college = $_SESSION['collcode'];

    if($degree == "All"){
        $cond = "";
    }else{
        $cond = "and fdegree = '{$degree}'";
    }
    
	$pdf_writer_class=$aobj_context->main_src."/tcpdf/tcpdf.php";
	
	include($pdf_writer_class);		
	$pdf= new TCPDF();
	$pdf->SetFont('Times','',10);



    $page_header_university = "select FUNIVNAME as 'FUNIVNAME',FUNIVCODE,
                                FUNIVADD1 as 'state', pdf_logo_path,
                                ifnull(FEXAMAPPREQ,'F') as FEXAMAPPREQ From control";
	$lobj_page_header_university = $aobj_context->mobj_db->GetRow($page_header_university);

    $get_coll_name = "select fcollname as FCOLLNAME, ftown as FTOWN from college 
                      where fcollcode = '{$college}'";
    $res_coll_name = $aobj_context->mobj_db->GetRow($get_coll_name);  

    $db=$aobj_context->mobj_data["db"];  
    $img_path = $aobj_context->main_src .$db.'/'. $lobj_page_header_university['pdf_logo_path'];
    $FUNIVNAME = $lobj_page_header_university['FUNIVNAME'];
    $STATE = $lobj_page_header_university['state'];
    $COLLNAME = $res_coll_name['FCOLLNAME'];


    $query="select ifnull(fregno, '')as fregno,
            ifnull(fcollcode, '')as fcollcode,
            ifnull(fname, '')as fname,
            ifnull(ffatname, '')as ffatname,
            ifnull(fmotname, '')as fmotname,
            ifnull(fdegree, '')as fdegree,
            ifnull(fcaste, '')as fcaste,
            ifnull(fgender, '')as fgender,
            ifnull(fpercent, '')as fpercent,
            ifnull(fcgpa, '')as fcgpa,
            ifnull(fgrade, '')as fgrade,
            ifnull(fexamdate, '')as fexamdate,
            ifnull(famount, '')as famount,
            ifnull(fpayid, '')as fpayid,
            ifnull(fphotopath, '')as fphotopath,
            date_format(fpaydate, '%d/%m/%Y') as fpaydate from autodcstud 
            where fcollcode = '{$college}' {$cond}";
                            
        $result = $aobj_context->mobj_db->GetAll($query);

        
        $pdf->AddPage('P');
    
        if (file_exists($img_path)) {
            $pdf->Image($img_path, 8, 8, 40, 20);
        }
        $pdf->SetFont('Times', 'B', 16);
        // $pdf->SetY(5);
        $pdf->Cell(0, 7, $FUNIVNAME, 0, 1, 'C');
        $pdf->SetFont('Times', '', 10);
        $pdf->Cell(0, 7, $STATE, 0, 1, 'C');
        $pdf->SetFont('Times', 'B', 12);
        $pdf->Cell(0, 7, $COLLNAME, 0, 1, 'C');
        $pdf->Cell(0, 7, "Convocation Report", 0, 1, 'C');
        $pdf->ln(5);
            
        $pdf->SetFont('Times', 'B', 12);	
        $pdf->Cell(15,7,'Sl. No.','LTR',0,'C');
        $pdf->Cell(30,7,'Reg.No.','LTR',0,'C');
        $pdf->Cell(20,7,'Degree','LTR',0,'C');
        $pdf->Cell(20,7,'Gender','LTR',0,'C');
        $pdf->Cell(15,7,'Caste','LTR',0,'C');
        $pdf->Cell(15,7,'Per(%)','LTR',0,'C');
        $pdf->Cell(15,7,'CGPA','LTR',0,'C');
        $pdf->Cell(15,7,'Grade','LTR',0,'C');
        $pdf->Cell(30,7,'Exam Date','LTR',0,'C');
        $pdf->Cell(20,7,'Amount','LTR',1,'C');										
        $pdf->SetFont('Times','',10);	
        
        $count=1;	
        $z = 1;
        foreach($result as $key => $value)
        {					
            $pdf->Cell(15,7,$count,'LTB',0,'C');			
            $pdf->Cell(30,7,$value['fregno'],'LTB',0,'C');
            $pdf->Cell(20,7,$value['fdegree'],'LTB',0,'C');
            $pdf->Cell(20,7,$value['fgender'],'LTB',0,'C');
            $pdf->Cell(15,7,$value['fcaste'],'LTB',0,'C');
            $pdf->Cell(15,7,$value['fpercent'],'LTB',0,'C');
            $pdf->Cell(15,7,$value['fcgpa'],'LTB',0,'C');
            $pdf->Cell(15,7,$value['fgrade'],'LTB',0,'C');
            $pdf->Cell(30,7,$value['fexamdate'],'LTB',0,'L');
            $pdf->Cell(20,7,$value['famount'],'LTBR',1,'C');
            $count++;
            $z++;

            if($z == 30){
                $pdf->ln(13);
                
                $pdf->Cell(0,4,'Signature of Principal with Seal','',1,'R');
                $z = 0;
                
                $pdf->AddPage('P');
    
                if (file_exists($img_path)) {
                    $pdf->Image($img_path, 8, 8, 40, 20);
                }
                $pdf->SetFont('Times', 'B', 16);
                // $pdf->SetY(5);
                $pdf->Cell(0, 7, $FUNIVNAME, 0, 1, 'C');
                $pdf->SetFont('Times', '', 10);
                $pdf->Cell(0, 7, $STATE, 0, 1, 'C');
                $pdf->SetFont('Times', 'B', 12);
                $pdf->Cell(0, 7, $COLLNAME, 0, 1, 'C');
                $pdf->Cell(0, 7, "Convocation Report", 0, 1, 'C');
                $pdf->ln(5);
                    
                $pdf->SetFont('Times', 'B', 12);	
                $pdf->Cell(15,7,'Sl. No.','LTR',0,'C');
                $pdf->Cell(30,7,'Reg.No.','LTR',0,'C');
                $pdf->Cell(20,7,'Degree','LTR',0,'C');
                $pdf->Cell(20,7,'Gender','LTR',0,'C');
                $pdf->Cell(15,7,'Caste','LTR',0,'C');
                $pdf->Cell(15,7,'Per(%)','LTR',0,'C');
                $pdf->Cell(15,7,'CGPA','LTR',0,'C');
                $pdf->Cell(15,7,'Grade','LTR',0,'C');
                $pdf->Cell(30,7,'Exam Date','LTR',0,'C');
                $pdf->Cell(20,7,'Amount','LTR',1,'C');										
                $pdf->SetFont('Times','',10);
            }
        }
        $pdf->ln(10);
        	
        $pdf->ln(13);
        
        $pdf->Cell(0,4,'Signature of Principal with Seal','',1,'R');
    
	$pdf->Output("convocationreport.pdf","I");
}
?>