/** * Class constructor * * @return void */ public function __construct() { self::$instance =& $this; // Assign all the class objects that were instantiated by the // bootstrap file (CodeIgniter.php) to local class variables // so that CI can run as one big super object. foreach (is_loaded() as $var => $class) { $this->$var =& load_class($class); } $this->load =& load_class('Loader', 'core'); $this->load->initialize(); log_message('info', 'Controller Class Initialized'); user_logged_in(); //echo $user_type = $this->session->userdata['department']; $valid_method = get_restricted_department(); $user_type = strtolower($this->session->userdata['department']); if(in_array($user_type, $valid_method)) { user_authentication($user_type); } }
<?php $restricted_dept = get_restricted_department(); $restricted = true; if( in_array($this->session->userdata('department'),$restricted_dept)) { $restricted = false; } ?> <div class="col-md-12"> <table width="100%" border="2"> <tr> <td colspan="2"> <div id="regular_customer" style="display:block;"> <table width="100%"> <tr> <td width="50%"> Custome Name : <?php echo $customer_details->companyname ? $customer_details->companyname : $customer_details->name ;?> </td> <td width="50%" align="right"> <?php echo $customer_details->mobile;?> </td> </tr> </table> </div> </td> </tr> </table> <table width="100%" border="2"> <tr> <td colspan="7" align="center"> Job Name : <?php echo $job_data->jobname;?>