function Quotations() { parent::__construct(); $this->load->database(); $this->load->model("quotations_model"); $this->load->model("admin/qtemplates_model"); $this->load->model("admin/customers_model"); $this->load->model("admin/staff_model"); $this->load->model("admin/salesteams_model"); $this->load->model("admin/pricelists_model"); $this->load->model("admin/products_model"); $this->load->library('form_validation'); $this->load->helper('pdf_helper'); check_login_customer(); }
function Contracts() { parent::__construct(); $this->load->database(); $this->load->model("contracts_model"); $this->load->model("admin/customers_model"); $this->load->model("admin/staff_model"); $this->load->library('form_validation'); /*cache control*/ $this->output->set_header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . ' GMT'); $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0'); $this->output->set_header('Pragma: no-cache'); $this->output->set_header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); check_login_customer(); }
function change_password() { check_login_customer(); if( $this->form_validation->run('customer_change_password') == FALSE ) { echo '<div class="alert error"><ul>'.validation_errors('<li>','</li>').'</ul></div>'; } elseif( $this->customer_model->check_password() == 0 ) { echo '<div class="alert error">'.$this->lang->line('invalid_pass').'</div>'; } else { if( $this->customer_model->password_update() ) { $session_data = array( "customername" => userdata_customer('email'), "customerhash" => md5( userdata_customer('password').$this->config->item('password_hash') ) ); $this->session->set_userdata($session_data); echo '<div class="alert ok">'.$this->lang->line('update_succesful').'</div>'; } else { echo '<div class="alert error">'.$this->lang->line('technical_problem').'</div>'; } } }