public function Get9thpvtRSlip()
 {
     //DebugBreak()  ;
     $this->load->helper('url');
     $sess = 1;
     $class = 9;
     $year = 2016;
     $stdName = $_POST["std_name"];
     $Fname = $_POST["fath_name"];
     $Fnic = $_POST["fnic"];
     $FormNo = $_POST["form_no"];
     $rno = $_POST["cur_exm_roll_no"];
     $this->load->model('RollNoSlip_model');
     $studeninfo = array('data' => $this->RollNoSlip_model->getPVT9thrslip($stdName, $Fname, $Fnic, $rno, $FormNo, $class, $year, $sess));
     if ($studeninfo['data'] == 0) {
         $datamsg = array('message' => 'Record Not Found');
         $this->load->view('Privateslips/9thpvtSlip.php', $datamsg);
     } else {
         $rno = $studeninfo['data']['info'][0]['Rno'];
         $filepath = base_url() . 'assets/' . $studeninfo['data']['info'][0]['picpath'];
         $filepath = 'assets/img/download.jpg';
         $isexists = file_exists($filepath);
         if (!$isexists) {
             $datamsg = array('message' => 'Picture Not Exists.');
             $this->load->view('Privateslips/9thpvtSlip.php', $datamsg);
         } else {
             $temp = "{$rno}@{$class}@{$sess}@{$year}";
             $image = $this->set_barcode($temp);
             $studeninfo['data']['info'][0]['barcode'] = $image;
             $this->load->library('PDFF');
             $pdf = new PDFF('P', 'in', "A4");
             $pdf->SetAutoPageBreak(true, 2);
             $pdf->AddPage();
             //$html = $this->load->view('Privateslips/MatricRollNo', $studeninfo['data']['info'][0], true);
             $this->makepdf9thclass($pdf, $studeninfo['data']['info'][0]);
             // $pdf->writeHTML($html, true, false, true, false, '');
             $pdf->Output($rno . '.pdf', 'I');
         }
     }
 }
 public function MatricRollNoGroupwise()
 {
     // DebugBreak()  ;
     $this->load->helper('url');
     //Load the library
     $this->load->library('html2pdf');
     $grp_cd = $this->uri->segment(3);
     $sess = 1;
     $class = 10;
     $year = 2016;
     $this->load->library('session');
     $Logged_In_Array = $this->session->all_userdata();
     $user = $Logged_In_Array['logged_in'];
     //DebugBreak();
     /* $this->load->library('Pdf');
        $pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
        $pdf->setHeaderData('',0,'','',array(0,0,0), array(255,255,255) );  
        $pdf->SetPrintHeader(false);
        $pdf->SetPrintFooter(false);
        $pdf->SetTitle('Matric Roll Number Slips 2016');
        $pdf->SetHeaderMargin(2);
        $pdf->setFooterMargin(1);
        $pdf->SetFont('helvetica', '', 8);
        $pdf->SetAutoPageBreak(TRUE, 0);
        $pdf->SetAuthor('BiseGrw');
        $pdf->SetMargins(4, 6, 4, true);*/
     $this->load->library('PDFF');
     $pdf = new PDFF('P', 'in', "A4");
     $pdf->SetAutoPageBreak(true, 2);
     // $pdf->Open();
     // $pdf->SetMargins(25.4,25.4,25.4,25.4);
     $Inst_Id = $user['Inst_Id'];
     $this->load->model('RollNoSlip_model');
     $sub_cd = '';
     if ($grp_cd == 1) {
         $sub_cd = 8;
         $grp_cd = 1;
     } else {
         if ($grp_cd == 7) {
             $sub_cd = 78;
             $grp_cd = 1;
         } else {
             if ($grp_cd == 8) {
                 $sub_cd = 43;
                 $grp_cd = 1;
             }
         }
     }
     $studeninfo = array('data' => $this->RollNoSlip_model->get10thrslipWith_Grp_CD($class, $year, $sess, $grp_cd, $Inst_Id, $sub_cd));
     $template_pdf = '';
     $totalslips = count($studeninfo['data']['slip']);
     $studentslip = array();
     $tempdata = array();
     for ($i = 0; $i < count($studeninfo['data']['info']); $i++) {
         $rno = $studeninfo['data']['info'][$i]['Rno'];
         $tempdata['info'] = array();
         $temp = "{$rno}@{$class}@{$sess}@{$year}@{$Inst_Id}";
         $image = $this->set_barcode($temp);
         $studeninfo['data']['info'][$i]['barcode'] = $image;
         $tempdata['info'] = $studeninfo['data']['info'][$i];
         for ($j = 0; $j < $totalslips; $j++) {
             if ($rno == $studeninfo['data']['slip'][$j]['rno']) {
                 $tempdata['info']['slips'][] = $studeninfo['data']['slip'][$j];
             }
         }
         if (count($tempdata['info']) > 0) {
             $pdf->AddPage();
             //$html = $this->load->view('RollNoSlip/MatricRollNoCombine',  $tempdata['info'], true);
             $this->makepdf($pdf, $tempdata['info']);
             break;
         }
     }
     $pdf->Output($Inst_Id . '.pdf', 'I');
     /* if($this->html2pdf->create('downlaod')) {
        if($class == 10)
        redirect('RollNoSlip/TenthStd');
        else if($class == 9)
        redirect('RollNoSlip/NinthStd');
        }      */
 }
Exemple #3
0
 public function NinthRollNoGroupwise()
 {
     $this->load->helper('url');
     //Load the library
     $this->load->library('html2pdf');
     $grp_cd = $this->uri->segment(3);
     $isdownlaod = $this->uri->segment(4);
     $sess = 1;
     $class = 9;
     $year = 2016;
     $this->load->library('session');
     $Logged_In_Array = $this->session->all_userdata();
     $user = $Logged_In_Array['logged_in'];
     $this->load->library('PDFF');
     $pdf = new PDFF('P', 'in', "A4");
     $pdf->SetAutoPageBreak(true, 2);
     $Inst_Id = $user['Inst_Id'];
     $this->load->model('RollNoSlip_model');
     $sub_cd = '';
     if ($grp_cd == 1) {
         $sub_cd = 8;
         $grp_cd = 1;
     } else {
         if ($grp_cd == 7) {
             $sub_cd = 78;
             $grp_cd = 1;
         } else {
             if ($grp_cd == 8) {
                 $sub_cd = 43;
                 $grp_cd = 1;
             }
         }
     }
     $studeninfo = array('data' => $this->RollNoSlip_model->get9thrslipWith_Grp_CD($class, $year, $sess, $grp_cd, $Inst_Id, $sub_cd));
     $template_pdf = '';
     $totalslips = count($studeninfo['data']['slip']);
     $studentslip = array();
     $tempdata = array();
     $isexist = 0;
     for ($i = 0; $i < count($studeninfo['data']['info']); $i++) {
         $rno = $studeninfo['data']['info'][$i]['Rno'];
         $tempdata['info'] = array();
         $temp = "{$rno}@{$class}@{$sess}@{$year}@{$Inst_Id}";
         $image = $this->set_barcode($temp);
         $studeninfo['data']['info'][$i]['barcode'] = $image;
         $tempdata['info'] = $studeninfo['data']['info'][$i];
         $isexist = 0;
         for ($j = 0; $j < $totalslips; $j++) {
             if ($rno == $studeninfo['data']['slip'][$j]['rno']) {
                 $tempdata['info']['slips'][] = $studeninfo['data']['slip'][$j];
                 $isexist = 1;
             }
         }
         if (count($tempdata['info']) > 0) {
             $pdf->AddPage();
             $this->makepdf9thclass($pdf, $tempdata['info']);
         }
     }
     if ($isdownlaod == 1) {
         $pdf->Output($Inst_Id . '.pdf', 'D');
     } else {
         if ($isdownlaod == 2) {
             $pdf->Output($Inst_Id . '.pdf', 'I');
         }
     }
 }