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.137.159.163


Current Path : /proc/thread-self/root/var/www/html/pgadm/admin-src/
Upload File :
Current File : //proc/thread-self/root/var/www/html/pgadm/admin-src/PrintDocumentVerification.php

<?php
$main_src = substr($_SERVER['SCRIPT_FILENAME'], 0, strlen($_SERVER['SCRIPT_FILENAME']) - 7);
$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 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);
        $this->SetTitle("Document Verification ");

        // set bacground image
        $this->SetFillColor(248, 248, 255);
        $img_path = $this->aobj_context->main_src . "/img/vku_logo.jpg";

        if (file_exists($img_path)) {
            $this->Image($img_path, 6, 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', 'BU', 14);
        $this->Cell(0, 5, 'PG Admissions 2020-21', '0', 1, 'C');
        $this->SetFont('Times', 'B', 16);
        $this->ln(0);
        
        // $dt = date("d-m-Y");
        // var_dump($dt); 
        // var_dump($this->current_date);
        // var_dump($this->current_date);
        $this->Cell(0, 5, 'Document Verification Acknowledgement', '0', 1, 'C');
        
        
        // var_dump($this->doe);
       // $this->Cell(0, 6, " Degree Group: " . $this->aobj_context->mobj_data["deggrp"], "0", 1, "C");
      //  $this->Cell(0, 6, " Degree Range: " . $this->aobj_context->mobj_data["fdegfrom"] . ' - ' . $this->aobj_context->mobj_data["fdegto"], "0", 1, "C");
        // restore auto-page-break status
        $this->SetAutoPageBreak($auto_page_break, $bMargin);
        // set the starting point for the page content
    }

    public function Footer()
    {

        $this->SetFont('Times','B',10);
        $this->SetY(-20);
        $this->Cell(0, 5, 'Signature of Student       ', '0', 0, 'L');
        $this->Cell(0, 5, 'Signature of Verifier       ', '0', 1, 'R');

        $this->SetY(-15);
        $this->SetFont('helvetica', 'I', 8);
        // var_dump();
        if($this->CurOrientation == 'P')
        {
            $this->Cell(60, 10, 'IP : ' . $_SERVER["REMOTE_ADDR"], 0, 0, 'L');
            $this->Cell(60, 10, 'Date : ' . date("d-m-Y h:i:s A"), 0, 0, 'C');
            $this->Cell(60, 10, 'Page ' . $this->getPageNumGroupAlias() . '/' . $this->getPageGroupAlias(), 0, 1, 'R');
        }
        else {
            $this->Cell(90, 10, 'IP : ' . $_SERVER["REMOTE_ADDR"], 0, 0, 'L');
            $this->Cell(90, 10, 'Date : ' . date("d-m-Y h:i:s A"), 0, 0, 'C');
            $this->Cell(90, 10, 'Page ' . $this->getPageNumGroupAlias() . '/' . $this->getPageGroupAlias(), 0, 1, 'R');
        }

    }
}

class ReprtObject
{

    public function DefaultConstructor($aobj_context)
    {
        $this->aobj_context = $aobj_context;
        $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

        $this->ip = $_SERVER["REMOTE_ADDR"];
        $get_date = "select DATE_FORMAT(now(), '%d/%m/%Y') as now_date";
        $obj = $this->aobj_context->mobj_db->GetRow($get_date);
        $this->reportType = $aobj_context->mobj_data["rtype"];

        $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);
// var_dump($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->FUNIVCODE = $lobj_get_coll_name['FUNIVCODE'];

        $this->current_date = $obj['now_date'];        
        $deggrp = $this->aobj_context->mobj_data["deggrp"];

       $get_coll_name = "select concat(fdeggrp, ' - ', fdescpn) as fdeggrp 
        from deggrp where fdeggrp = '{$deggrp}'";
        $lobj_get_degree = $this->aobj_context->mobj_db->GetRow($get_coll_name);
        
        $aobj_context->deggrp = $lobj_get_degree['fdeggrp'];
        $this->pdf = new MYPDF('P');
        $this->pdf->aobj_context = $aobj_context;
    }

    public function Header($pdf)
    {          
          

       
        /*$pdf->Cell(12, 7, "", "LRB", 0, "C");
        $pdf->Cell(26, 7, "", "LRB", 0, "C");
        $pdf->Cell(22, 7, "", "LRB", 0, "C");
        $pdf->Cell(60, 7, "", "LRB", 0, "C");
        $pdf->Cell(22, 7, "", "LRB", 0, "C");
        $pdf->Cell(18, 7, "", "LRB", 0, "C");
        $pdf->Cell(18, 7, "", "LRB", 0, "C");
        $pdf->Cell(21, 7, "Karnataka", "LRB", 1, "C");
        $pdf->SetFont('Times', '', 12);*/
       
    }

    public function Report($data,$docs_status,$res_prevmarks,$res_lanmarks,$res_totmarks,$optdeg, $copy)
    {
        $pdf = $this->pdf;

        $pdf->SetMargins(10, 40);
        $pdf->startPageGroup();
        $pdf->AddPage("P");
        // var_dump($res_prevmarks[0][0]);
        // var_dump($res_lanmarks[0][0]);
        // var_dump($res_totmarks[0][0]);
        // var_dump($data['fcategory_ver'],$data['FCATEGORY']);
        // var_dump($data);

        if($data['fcategory_ver'] == $data['FCATEGORY'] && $data['fcategory_ver'] == null){
            $fcat = '';
        }else if($data['fcategory_ver'] !== $data['FCATEGORY']){
            $fcat = ' ('.$data['fcategory_ver'].')';
        }
        // var_dump($fcat);

        if($data['fhk_ver'] == $data['FHK'] && $data['fhk_ver'] == null){
            $fhkv = '';
        }else if($data['fhk_ver'] !== $data['FHK']){
            $fhkv = ' ('.$data['fhk_ver'].')';
        }

        if($data['fhandicap_ver'] == $data['FHANDICAP'] && $data['fhandicap_ver'] == null){
            $fhandiv = '';
        }else if($data['fhandicap_ver'] !== $data['FHANDICAP']){
            $fhandiv = ' ('.$data['fhandicap_ver'].')';
        }

        // if($data['fsports_ver'] == $data['FSPORTS'] && $data['fsports_ver'] == null){
        //     $fsportsv = '';
        // }else if($data['fsports_ver'] !== $data['FSPORTS']){
        //     $fsportsv = ' ('.$data['fsports_ver'].')';
        // }

        if($data['FSPORTS'] == 'Yes'){
            $fsportsv = ' ('.$data['fsptsmarks'].')';
        }else{
            $fsportsv = '';
        }
        

        if($data['fdefence_ver'] == $data['FDEFENCE'] && $data['fdefence_ver'] == null){
            $fdefencev = '';
        }else if($data['fdefence_ver'] !== $data['FDEFENCE']){
            $fdefencev = ' ('.$data['fdefence_ver'].')';
        }

        if($data['fpdp_ver'] == $data['fpdp'] && $data['fpdp_ver'] == null){
            $fpdpv = '';
        }else if($data['fpdp_ver'] !== $data['fpdp']){
            $fpdpv = ' ('.$data['fpdp_ver'].')';
        }
        // var_dump($fpdpv);
        // var_dump($data['fpdp_ver'],$data['fpdp']);

        if($data['fgah_ver'] == $data['fgah'] && $data['fgah_ver'] == null){
            $fgahv = '';
        }else if($data['fgah_ver'] !== $data['fgah']){
            $fgahv = ' ('.$data['fgah_ver'].')';
        }
        if($data['fcof_ver'] == $data['fcof'] && $data['fcof_ver'] == null){
            $fcofv = '';
        }else if($data['fcof_ver'] !== $data['fcof']){
            $fcofv = ' ('.$data['fcof_ver'].')';
        }

        if($data['fincome_ver'] == $data['FINCOME'] && $data['fincome_ver'] == null){
            $fincomev = '';
        }else if($data['fincome_ver'] !== $data['FINCOME']){
            $fincomev = ' ('.$data['fincome_ver'].')';
        }
        if($data['fncc_ver'] == 'Yes'){
            $fnccv = ' ('. $data['fnccmarks'].')';
        }else{
            $fnccv = '';
        }

        if($data['fnss_ver'] == 'Yes'){
            $fnssv = ' ('. $data['fnssmarks'].')';
        }else{
            $fnssv = '';
        }

        if($data['frar_ver'] == 'Yes'){
            $frarv = ' ('. $data['frarmarks'].')';
        }else{
            $frarv = '';
        }

        $oldCode = "";
        $newCode = "";
        $sl_no = 1;
        $first = true;
        $j = 0;
        // var_dump($exattendancelist);
        // var_dump($data['GM']);
        // var_dump($data);
        // var_dump($data["fcategory"]);
        $pdf->ln(-10);
        
        $pdf->SetFont('Times','BU',14);
        $pdf->Cell(0, 5, 'Status - '.$data["fapprsts"], '0', 1, 'C');
        $pdf->SetFont('Times','B',12);
        $pdf->Cell(153, 5, $copy.' Copy' , '0', 0, 'L');
        $pdf->SetFont('Times','B',12);        
        $pdf->Cell(180, 5, ' Date : '.$data["todaydate"] , '0', 1, 'L');
        // $pdf->ln(4);

        $pdf->SetFont('Times','B',12);
        
		$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">I. Student Details</h3>';
		$x = $pdf->GetX();
		$y = $pdf->GetY();
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
        // var_dump($data);
        $pdf->SetFont('Times','',10);
        $table1 = '<style>
			td {
			    border: 0.5px solid black;
			}
			.lable {
				font-weight: bold;
			}
		 </style>
		<table cellpadding="3" cellspacing="0">
			<tr nobr="true">
				<td width="100" class="lable">Name</td>
                <td width="140" colspan="3" >'.$data["FNAME"].'</td>
                <td width="120" class="lable">Application No. </td>
                <td width="155" colspan="3" >'.$data["FAPPNO"].'</td>                		
		    </tr>';



        $table1 .='<tr nobr="true">
                <td width="100" class="lable">Degree </td>
                <td width="140" colspan="3" >'.$data["FQDEGREE"].'</td>                	
                <td width="120" class="lable">Applied Date </td>
                <td width="155" colspan="3" >'.$data["paydate"].'</td>			
            </tr>';        
        $table1 .='<tr nobr="true">
            <td width="100" class="lable">Category </td>
            <td width="140">'.$data["FCATEGORY"].$fcat.'</td>            
            <td width="120" class="lable">Income  </td>
            <td width="155">'.$data["FINCOME"].$fincomev.'</td>			
        </tr>';
        $table1 .='<tr nobr="true">            
            <td width="100" class="lable">HK/NHK  </td>
            <td width="140">'.$data["fhkk"].$fhkv.'</td>			
            <td width="120" class="lable">Differently Abled  </td>
            <td width="155">'.$data["FHANDICAP"].$fhandiv.'</td>
        </tr>';
        $table1 .='<tr nobr="true">
            <td width="100" class="lable">Sports Quota </td>
            <td width="140" colspan="3" >'.$data["FSPORTS"].$fsportsv.'</td>
            <td width="120" class="lable">NCC  </td>
            <td width="155">'.$data["fncc_ver"].$fnccv.'</td>			
        </tr>';
        $table1 .='<tr nobr="true">
            <td width="100" class="lable">NSS </td>
            <td width="140" colspan="3" >'.$data["fnss_ver"].$fnssv.'</td>
            <td width="120" class="lable">Rovers and Rangers  </td>
            <td width="155">'.$data["frar_ver"].$frarv.'</td>			
        </tr>';
        $table1 .='<tr nobr="true">
            <td width="100" class="lable">Defence </td>
            <td width="140" colspan="3" >'.$data["FDEFENCE"].$fdefencev.'</td>
            <td width="120" class="lable">Project Displaced Person  </td>
            <td width="155">'.$data["fpdp"].$fpdpv.'</td>			
        </tr>';
        $table1 .='<tr nobr="true">
            <td width="100" class="lable">Gadinadu/Horanadu </td>
            <td width="140" colspan="3" >'.$data["fgah"].$fgahv.'</td>
            <td width="120" class="lable">Devadasi/HIV infected  </td>
            <td width="155">'.$data["fcof"].$fcofv.'</td>			
        </tr>';
		

		
		
				
		$table1 .= '</table>';	

		$pdf->SetX(11);
		
		$pdf->writeHTML($table1, false, true, false, false, 'L');                                              
        $pdf->ln(2);
        $pdf->SetFont('Times','B',12);
		$html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">II. Document Status</h3>';
		$x = $pdf->GetX();
		$y = $pdf->GetY();
		$pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);


        $table2 = '<style>
        td, th {
            border: 0.5px solid black;
        }
     </style>
    <table cellpadding="2" cellspacing="0">
        <tr nobr="true">
            <th width="50" align="center"><b>Sl. No.</b></th>
            <th width="100" align="center"><b>Document Name</b></th>
            <th width="100" align="center"><b>Document Status</b></th>
            <th width="270" align="center"><b>Remarks</b></th>
        </tr>';
    $i = 1;
    $fprefix = "";
    $fprefix = $res_optopns[0]['fprefix'];
    $pdf->SetFont('Times', '', 11);
    // var_dump($docs_status);
    foreach($docs_status as $value)
    {
        
        $table2 .= '<tr nobr="true">
        <td width="50" align="center">'.$i.'</td>
        <td width="100" align="left">'.$value['fdocname'].'</td>
        <td width="100" align="center">'.$value['fstatus'].'</td>
        <td width="270" align="left">'.$value['fremarks'].'</td>			
        </tr>';
        
        $i++;
        
    }    

    
    $table2 .='</table>';
    
    $pdf->SetX(11);
    
    $pdf->writeHTML($table2, false, true, false, false, 'L');

    $pdf->ln(5);
    
    $pdf->SetFont('Times','B',12);
    $pdf->ln(2);
    $html = '<h3 style="background-color: #918988; color: rgb(255, 255, 255);">III. Marks Details</h3>';
    $x = $pdf->GetX();
    $y = $pdf->GetY();
    $pdf->writeHTMLCell(188,0,$x,$y,$html, false,1, false, true, '', false);
    
    $pdf->SetFont('Times', '', 10);
    
    
		if(count($res_totmarks) > 0 || count($res_lanmarks) >0 || count($res_prevmarks) >0 )
		{
            // $data['FQDEGREE']
            if($data['FQDEGREE'] == "BE") {
                $table7 = '<style>
				td, th {
                        border: 0.5px solid black;
                    }
                </style>
                <table cellpadding="2" cellspacing="0">				
                <thead>
                <tr nobr="true">
                <th width="50" colspan="2" align="center"><b>Sem VII / Year</b></th>
                <th width="50" colspan="2" align="center"><b>Sem VIII / Year</b></th>
                </tr>';
                $table7 .= '<tr nobr="true">
                <th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
                <th width="25" align="center"><b>Obt</b></th>
                </tr></thead>';
            }

            
			$table6 = '<style>
				td, th {
					border: 0.5px solid black;
				}
			</style>
			<table cellpadding="2" cellspacing="0">				
				<thead>
				<tr nobr="true">
				<th width="20" rowspan="2" align="center"><b>Sl. No</b></th>
				<th width="115" align="center" rowspan="2"><b>Subject</b></th>
				<th width="50" colspan="2" align="center"><b>Sem I / Year</b></th>
				<th width="50" colspan="2" align="center"><b>Sem II / Year</b></th>
				<th width="50" colspan="2" align="center"><b>Sem III / Year</b></th>
				<th width="50" colspan="2" align="center"><b>Sem IV / Year</b></th>
				<th width="50" colspan="2" align="center"><b>Sem V / Year</b></th>
                <th width="50" colspan="2" align="center"><b>Sem VI / Year</b></th>
				<th width="50" colspan="2" align="center"><b>Total Marks</b></th>
				<th width="35" align="center" rowspan="2"><b>%</b></th>
			</tr>
			<tr nobr="true">
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
				<th width="25" align="center"><b>Obt</b></th>
				<th width="25" align="center"><b>Max</b></th>
                <th width="25" align="center"><b>Obt</b></th>
			</tr>
				</thead>
			<tr nobr="true">
				<th width="520" colspan="7" align="left"><b> Semester Total marks</b></th>
			</tr>';//Percentage
                $i = 1;
                // var_dump($res_totmarks);
			foreach($res_totmarks as $value) 
			{	
				$table6 .= '<tr nobr="true">
						<td width="20" align="center">'.$i.'</td>
						<td width="115" align="left">'.$value['fsubname'].'</td>
						<td width="25" align="center">'.$value['famm'].'</td>
						<td width="25" align="center">'.$value['famo'].'</td>
						<td width="25" align="center">'.$value['fbmm'].'</td>
						<td width="25" align="center">'.$value['fbmo'].'</td>
						<td width="25" align="center">'.$value['fcmm'].'</td>
						<td width="25" align="center">'.$value['fcmo'].'</td>
						<td width="25" align="center">'.$value['fdmm'].'</td>
						<td width="25" align="center">'.$value['fdmo'].'</td>
						<td width="25" align="center">'.$value['femm'].'</td>
						<td width="25" align="center">'.$value['femo'].'</td>
						<td width="25" align="center">'.$value['ffmm'].'</td>
                        <td width="25" align="center">'.$value['ffmo'].'</td>';
                if($data['FQDEGREE'] == "BE") {        
                    $table7 .= '<tr nobr="true">
                    <td width="25" align="center">'.$value['fgmm'].'</td>
                    <td width="25" align="center">'.$value['fgmo'].'</td>
                    <td width="25" align="center">'.$value['fhmm'].'</td>
                    <td width="25" align="center">'.$value['fhmo'].'</td>
                    </tr>';
                }

				$table6 .=	'<td width="25" align="center">'.$value['fmaxmarks'].'</td>
						<td width="25" align="center">'.$value['fsecmarks'].'</td>
						<td width="35" align="center">'.$value['fpercent'].'</td>
                    </tr>
                    <tr nobr="true">
                        <td width="435" align="right"><b>Status</b></td>
                        <td width="85" colspan="2" align="left"><b>'.$value[0].'</b></td>
                    </tr>';
					$i++;
            } 
            if($optdeg == 'MAKN' || $optdeg == 'MAEN' || $optdeg == 'MAKN1' || $optdeg == 'MAEN1' ){
                $table6.='<tr nobr="true">
                        <th width="520" colspan="7" align="left"><b> Language Details</b></th>
                    </tr>';	
                foreach($res_lanmarks as $value) 
                {	
                    $table6 .= '<tr nobr="true">
                            <td width="20" align="center">'.$i.'</td>
                            <td width="115" align="left">'.$value['fsubname'].'</td>
                            <td width="25" align="center">'.$value['famm'].'</td>
                            <td width="25" align="center">'.$value['famo'].'</td>
                            <td width="25" align="center">'.$value['fbmm'].'</td>
                            <td width="25" align="center">'.$value['fbmo'].'</td>
                            <td width="25" align="center">'.$value['fcmm'].'</td>
                            <td width="25" align="center">'.$value['fcmo'].'</td>
                            <td width="25" align="center">'.$value['fdmm'].'</td>
                            <td width="25" align="center">'.$value['fdmo'].'</td>
                            <td width="25" align="center">'.$value['femm'].'</td>
                            <td width="25" align="center">'.$value['femo'].'</td>
                            <td width="25" align="center">'.$value['ffmm'].'</td>
                            <td width="25" align="center">'.$value['ffmo'].'</td>';
                    // if($data['FQDEGREE'] == "BE") {        
                    //     $table6 .= '<td width="25" align="center">'.$value['fgmm'].'</td>
                    //     <td width="25" align="center">'.$value['fgmo'].'</td>
                    //     <td width="25" align="center">'.$value['fhmm'].'</td>
                    //     <td width="25" align="center">'.$value['fhmo'].'</td>';
                    // }                            
                    $table6 .= '<td width="25" align="center">'.$value['fmaxmarks'].'</td>
                            <td width="25" align="center">'.$value['fsecmarks'].'</td>
                            <td width="35" align="center">'.$value['fpercent'].'</td>
                        </tr>';
                        $i++;
                }
                $table6 .='
                <tr nobr="true">
                            <td width="435" align="right"><b>Status</b></td>
                            <td width="85" colspan="2" align="left"><b>'.$res_totmarks[0][0].'</b></td>
                        </tr>';
            }
            $table6 .='                                    
            <tr nobr="true">
					<th width="520" colspan="7" align="left"><b> Details of the marks obtained in all the optional subjects in qualifying Degree Examination</b></th>
				</tr>';
			foreach($res_prevmarks as $value) 
			{	
				$table6 .= '<tr nobr="true">
						<td width="20" align="center">'.$i.'</td>
						<td width="115" align="left">'.$value['fsubname'].'</td>
						<td width="25" align="center">'.$value['famm'].'</td>
						<td width="25" align="center">'.$value['famo'].'</td>
						<td width="25" align="center">'.$value['fbmm'].'</td>
						<td width="25" align="center">'.$value['fbmo'].'</td>
						<td width="25" align="center">'.$value['fcmm'].'</td>
						<td width="25" align="center">'.$value['fcmo'].'</td>
						<td width="25" align="center">'.$value['fdmm'].'</td>
						<td width="25" align="center">'.$value['fdmo'].'</td>
						<td width="25" align="center">'.$value['femm'].'</td>
						<td width="25" align="center">'.$value['femo'].'</td>
						<td width="25" align="center">'.$value['ffmm'].'</td>
                        <td width="25" align="center">'.$value['ffmo'].'</td>';
                // if($data['FQDEGREE'] == "BE") {        
                //     $table6 .= '<td width="25" align="center">'.$value['fgmm'].'</td>
                //     <td width="25" align="center">'.$value['fgmo'].'</td>
                //     <td width="25" align="center">'.$value['fhmm'].'</td>
                //     <td width="25" align="center">'.$value['fhmo'].'</td>';
                // }                            
				$table6 .= '<td width="25" align="center">'.$value['fmaxmarks'].'</td>
						<td width="25" align="center">'.$value['fsecmarks'].'</td>
                        <td width="35" align="center">'.$value['fpercent'].'</td>
                        
					</tr>';
                    $i++;
                    // var_dump($value);
            }
            $table6 .='
            <tr nobr="true">
                        <td width="435" align="right"><b>Status</b></td>
                        <td width="85" colspan="2" align="left"><b>'.$res_totmarks[0][0].'</b></td>
                    </tr>';
			$table6 .='</table>';
			$pdf->SetX(11);
            $pdf->writeHTML($table6, true, false, true, false, 'L');
            if($data['FQDEGREE'] == "BE") {
                $table7 .='</table>';
                $pdf->SetX(11);
                $pdf->writeHTML($table7, true, false, true, false, 'L');
            }
            
		}

        

        
        

    }       



    public function SendOutput()
    {
        // ob_end_clean();
        $this->pdf->Output("DocumentVerficationAck.pdf", "I");
    }
}

/*function moneyFormatIndia($num)
{
    $explrestunits = "";
    if (strlen($num) > 3) {
        $lastthree = substr($num, strlen($num) - 3, strlen($num));
        $restunits = substr($num, 0, strlen($num) - 3); // extracts the last three digits
        $restunits = (strlen($restunits) % 2 == 1) ? "0" . $restunits : $restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping.
        $expunit = str_split($restunits, 2);
        for ($i = 0; $i < sizeof($expunit); $i++) {
            // creates each of the 2's group and adds a comma to the end
            if ($i == 0) {
                $explrestunits .= (int) $expunit[$i] . ","; // if is first value , convert into integer
            } else {
                $explrestunits .= $expunit[$i] . ",";
            }
        }
        $thecash = $explrestunits . $lastthree;
    } else {
        $thecash = $num;
    }
    return $thecash; // writes the final format where $currency is the currency symbol.
}
*/
function PrintDocumentVerification($aobj_context)
{
    //$univcode = $aobj_context->mobj_data["univcode"];  

    //$fdeggrp = $aobj_context->mobj_data["deggrp"];
    
   // $fdeggrpfrm = $aobj_context->mobj_data["deggrpfrm"];
  //  $fdeggrpto = $aobj_context->mobj_data["deggrpto"];
    //$fdegfrom = $aobj_context->mobj_data["fdegfrom"];
   // $fdegto = $aobj_context->mobj_data["fdegto"];

   $appno = $aobj_context->mobj_data["fappno"];
   $optdeg = $aobj_context->mobj_data["optdeg"];
    //    var_dump($allotno);

    $query = "SELECT DATE_FORMAT(IFNULL(fpaydate,''), '%d/%m/%Y') AS paydate,
    DATE_FORMAT(IFNULL(now(),''), '%d/%m/%Y') AS todaydate,
    IFNULL(fapprstatus,'Pending') AS fapprsts,
    IF(fhk = 'Yes', 'HK', IF(fhk='No', 'NHK', '')) AS fhkk,    
    a.* FROM entstudadm a WHERE fappno = '{$appno}'";
    //    var_dump($query);
    $result = $aobj_context->mobj_db->GetRow($query);
    // $data= $result;
    // var_dump($result["FSPORTS"]);
    // $appno = $result["fappno"];
    
	$query = "SELECT IFNULL(fappno,'') AS fappno, IFNULL(fdoctype,'') AS fdoctype,
    IFNULL(fpath,'') AS fpath,IFNULL(fdeleted,'') AS fdeleted,
    IFNULL(fstatus,'') AS fstatus ,IFNULL(fremarks,'') AS fremarks
    FROM entstuddoc WHERE fappno =  '{$appno}'
    AND fdoctype <> '3_UG'";
    $docs_status = $aobj_context->mobj_db->GetAll($query);
    


    $i= 0 ;
	$docs = array('1_AADHAR' => "Aadhar Card",
	'2_SSLC' => "SSLC Marks Card",
	'3_UG' => "UG Marks Card",
	'4_CASTE' => "Caste certificate",
	'5_INCOME' => "Income certificate",
	'6_HK' => "HK certificate",
	'7_SQC' => "SQC certificate");
	$resultr = array();
	foreach($docs_status as $key=>$value)
	{
		// var_dump($result1[$i]);
	$docs_status[$i] =  $value;
	$docs_status[$i]['fdocname'] = $docs[$value['fdoctype']];
	$i++;
    }
    // var_dump($docs_status);
    

    $query = "select IFNULL(fstatus,'Pending') AS fstatus,b.fsubname, a.* from entprevmarks a inner join entprevcomb b 
	on a.fdegree = b.fdegree
    and a.fsubcode= b.fsubcode where fappno ='{$appno}' 
    AND IFNULL(b.fcombcode,'') <> 'TOT'
    group by a.fappno, a.fsubcode";
	$res_prevmarks = $aobj_context->mobj_db->GetAll($query);

	$query = "select IFNULL(fstatus,'Pending') AS fstatus,b.fsubname, a.* from entprevmarks a inner join entprevcomb b 
	on a.fcombcode = b.fcombcode 
	and a.fsubcode= b.fsubcode where fappno ='{$appno}'
	and a.fcombcode = 'lan'";
	$res_lanmarks = $aobj_context->mobj_db->GetAll($query);

	$query = "SELECT IFNULL(fstatus,'Pending') AS fstatus,b.fsubname, a.* FROM entprevmarks a INNER JOIN entprevcomb b 
	ON a.fdegree = b.fdegree  AND a.fcombcode = b.fcombcode 
	AND a.fsubcode= b.fsubcode WHERE fappno ='{$appno}'
	AND a.fcombcode = 'TOT'
	GROUP BY b.fdegree";
	$res_totmarks = $aobj_context->mobj_db->GetAll($query);

    

    
    $class_obj = new ReprtObject();
    $class_obj->univcode = $univcode;
    $class_obj->DefaultConstructor($aobj_context);

    // If No data found Generate Blank Report
    if (count($result) > 0) {
        $class_obj->Report($result,$docs_status,$res_prevmarks,$res_lanmarks,$res_totmarks,$optdeg, 'Student');
        $class_obj->Report($result,$docs_status,$res_prevmarks,$res_lanmarks,$res_totmarks,$optdeg, 'University');
    }

    $class_obj->SendOutput();

}