68 lines
1.7 KiB
PHP
68 lines
1.7 KiB
PHP
<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
require APPPATH . '/libraries/BaseController.php';
|
|
|
|
/**
|
|
* Class : Employee (Employee Controller)
|
|
* User Class to control all user related operations.
|
|
* @author : Gandhimathi
|
|
* @version : 1.1
|
|
* @since : 07 Apr 2017
|
|
*/
|
|
class payslip extends BaseController
|
|
{
|
|
/**
|
|
* This is default constructor of the class
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->load->model('employeedetails_model');
|
|
$this->isLoggedIn();
|
|
}
|
|
function payslipupload()
|
|
{
|
|
$this->global['pageTitle'] = 'Siddharth : PaySlip Upload';
|
|
|
|
$this->loadViews("payslipupload", $this->global, NULL);
|
|
}
|
|
|
|
function payslipgenerate()
|
|
{
|
|
$this->global['pageTitle'] = 'Siddharth : PaySlip Generator';
|
|
|
|
$this->loadViews("payslipgenerate", $this->global, NULL);
|
|
}
|
|
|
|
function payslipgenerateprint()
|
|
{
|
|
$this->global['pageTitle'] = 'Siddharth : PaySlip Generator print';
|
|
|
|
// Add header to pdf
|
|
//$this->load->view('includes/pdfheader');
|
|
|
|
$this->load->View("payslipgenerateprint", $this->global, NULL);
|
|
|
|
// Get output html
|
|
$php = $this->output->get_output();
|
|
|
|
// Load library
|
|
$this->load->library('dompdf_gen');
|
|
|
|
// Convert to PDF
|
|
$this->dompdf->load_html($php);
|
|
$this->dompdf->render();
|
|
|
|
$data['Attachment'] = FALSE;
|
|
$this->dompdf->stream("payslipgenerate.pdf",$data,$php);
|
|
}
|
|
|
|
function pageNotFound()
|
|
{
|
|
$this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found';
|
|
|
|
$this->loadViews("404", $this->global, NULL, NULL);
|
|
}
|
|
}
|
|
|
|
?>
|