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 : 18.224.60.132


Current Path : /proc/thread-self/root/var/www/oasis/Report_details/
Upload File :
Current File : //proc/thread-self/root/var/www/oasis/Report_details/degreeDetailsReport.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);
include_once("stringspliter.php");
require_once("/var/www/html/aws/aws-autoloader.php");
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;

ini_set('max_execution_time', 300);
ini_set("memory_limit", "500M");

class ra_invigilators_dairy extends TCPDF
{
    function DefaultConstructor($aobj_context)
    {
        session_start();
        $this->aobj_context = $aobj_context;
        $this->pdf = new TCPDF();
        $this->pdf = $this;

        $this->ip = $_SERVER["REMOTE_ADDR"];
        $get_coll_name = "select FUNIVNAME as 'FUNIVNAME', funivcode, FUNIVADD1 as 'state', pdf_logo_path From control";
        $lobj_get_coll_name = $this->aobj_context->mobj_db->GetRow($get_coll_name);

        $this->FUNIVNAME = $lobj_get_coll_name['FUNIVNAME'];
        $this->funivcode = $lobj_get_coll_name['funivcode'];
        $this->s_state = $lobj_get_coll_name['state'];
        $this->f_year = $lobj_get_coll_name['f_year'];
        $this->pdf_logo_path = $lobj_get_coll_name['pdf_logo_path'];
		$this->degree = $aobj_context->mobj_data['degreeid'];
		$this->examno = $aobj_context->mobj_data['examno'];
        $this->collcode = $_SESSION['collcode'];
        $this->funivcode = $_SESSION['FUNIVCODE'];

        $get_coll_name = "select FUNIVNAME as 'FUNIVNAME',FUNIVCODE, FUNIVADD1 as 'state', pdf_logo_path From control";
        $lobj_get_coll_name = $this->aobj_context->mobj_db->GetRow($get_coll_name);

        $get_data = "SELECT c.FCOLLCODE, CONCAT(c.FCOLLCODE, ' - ', c.FCOLLNAME,', ',c.FTOWN) AS FCOLLNAME FROM college c where c.FCOLLCODE='{$this->collcode}'";
        $obj_student = $this->aobj_context->mobj_db->GetRow($get_data);

		$query1="SELECT fdegree,fdescpn ,CONCAT(fexamno,' - ',fexamname) AS examno FROM degree where fdegree='{$this->degree}' and fexamno='{$this->examno}'";
		$res= $this->aobj_context->mobj_db->GetRow($query1);
	    $this->descpn=$res['fdescpn'];
        $this->exam=$res['examno'];
	
        $this->college_details = $obj_student['FCOLLNAME'];
        $this->degree_details  = " College : {$this->FCOLLNAME}";

        $this->headeractive = true;
     
    }

    function Header()
    {
        if ($FUNIVCODE == '031') {
            if (!empty($this->pdf_logo_path)) {
                $img_logo_path = $this->aobj_context->main_src . '/' . $this->aobj_context->mobj_data["db"] . "/img/report_uni_logo.jpg";
                $this->pdf->Image($img_logo_path, 60, 4, 80);
                $this->pdf->Ln(10);
            }
        } else {
            if (!empty($this->pdf_logo_path)) {
                $img_logo_path = $this->aobj_context->main_src . '/' . $this->aobj_context->mobj_data["db"] . '/' . $this->pdf_logo_path;
                $this->pdf->Image($img_logo_path, 5, 2, 20);
            }
            $this->pdf->SetFont('Times', 'B', 15);
            $this->pdf->ln(5);
            $this->pdf->cell(0, 3, $this->FUNIVNAME . "", "0", 1, "C");
            $this->pdf->SetFont('Times', 'B', 8);
            $this->pdf->cell(0, 6, $this->s_state, "0", 1, "C");
        }
        $this->pdf->SetFont('Times', 'B', 12);
        $this->pdf->cell(0, 6, "College : $this->college_details ", "0", 1, "C");
        $this->pdf->SetFont('Times', 'B', 12);


        $this->pdf->Cell(0, 7, "Degree Details", "0", 1, "C");
        $this->pdf->Cell(0, 5, "Degree  : " .$this->degree. " - " .$this->descpn."     Semester :". $this->exam, "0", 0, "C");
    }

    function Footer()
    {
        $this->SetY(-15);
        $this->pdf->SetFont('Times', 'B', 8);
        $this->Cell(140, 6, 'Printed   : IP Address : ' . $this->ip . " Date " . $this->current_date, '0', 0, 'L');
        $this->Cell(40, 6, 'Page ' . $this->PageNo() . '', 0, 1, 'R');
    }

   
    function writepdf($data)
{

    $pdf = $this->pdf;
    $pdf->SetMargins(15, 10, 10, 10);
    $pdf->AddPage('L');
    $pdf->ln(35);
    $table3 = '<style>
            td {
                border: 0.5px solid black;
            }
            .lable {
                font-weight: bold;
                font-size:9px;
            }
                 .lablewithoblod {
           
                font-size:8px;
            }

        </style>
        <table cellpadding="3" cellspacing="0">
        <tr nobr="true">
                <td width="50" align="center" class="lable">Degree Group</td>
                <td width="40" align="center" class="lable">Total Subject</td>
                <td width="46" align="center" class="lable">Next Exam.No</td>
                <td width="100" align="center" class="lable">Var Subject</td>
                <td width="40" align="center" class="lable">Credit</td>
                <td width="50" align="center" class="lable">Min. Credit</td>
                <td width="50" align="center" class="lable">Max. Credit</td>
                <td width="380" align="center" class="lable">Eligibility</td>
            
            </tr>';
 
        $slno = 0;
        foreach ($data as $key => $value){
            
        if($value['FTHEORY']=="T"){
            $thpr="Theory";
        }else if($value['FTHEORY']=="F"){
            $thpr="Practicle";
        }
            
            $table3 .= '<tr>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["fdeggrp"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["FTOTSUB"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["FNEXTEXAM"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["fvarsub"].'</td>';					
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["fcredit"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["FMINCREDIT"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["FMAXCREDIT"].'</td>';
            $table3 .= '<td align="center" class="lablewithoblod">'.$value["FELIGRM"].'</td>';
       
            $table3 .= '</tr>';	
    }
    $table3.='</table>';
    $pdf->writeHTMLCell(188, 0, $x, $y, $table3, false,1, false, true, '', false);
    $pdf->ln(40);
}

    function SendOutput()
    {
        $this->pdf->Output("detail_Degree_Report.pdf", "I");
    }
}

function degreeDetailsReport($aobj_context)
{
    $aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

    $class_obj = new ra_invigilators_dairy();
    $class_obj->DefaultConstructor($aobj_context);
	$degree = $aobj_context->mobj_data['degreeid'];
	$examno = $aobj_context->mobj_data['examno'];
    $query = "SELECT  fdeggrp,FTOTSUB,FNEXTEXAM,fvarsub,fcredit,FMINCREDIT,FMAXCREDIT, 
              CONCAT(FELIGREM01,FELIGREM02) AS FELIGRM FROM degree 
			  WHERE fdegree='{$degree}' AND fexamno='{$examno}'";
    $res1 = $aobj_context->mobj_db->GetAll($query);
	$class_obj->writepdf($res1);
  
    $class_obj->SendOutput();
}
?>