Example #1
0
 public function __construct()
 {
     parent::__construct();
     // Form data
     $this->step = filter_input(INPUT_POST, 'step');
     $this->postcode = filter_input(INPUT_POST, 'postcode');
     $this->cat_id = filter_input(INPUT_POST, 'cat_id');
     $this->prod_id = filter_input(INPUT_POST, 'prod_id');
     $this->prod_rate = filter_input(INPUT_POST, 'prod_rate');
     $this->d_date = filter_input(INPUT_POST, 'd_date');
     $this->c_date = filter_input(INPUT_POST, 'c_date');
     $this->prf_time = filter_input(INPUT_POST, 'prf_time');
     $this->cust_name = filter_input(INPUT_POST, 'cust_name');
     $this->cust_address = filter_input(INPUT_POST, 'cust_address', FILTER_SANITIZE_STRING);
     $this->cust_postcode = filter_input(INPUT_POST, 'cust_postcode');
     $this->cust_phone = filter_input(INPUT_POST, 'cust_phone', FILTER_SANITIZE_NUMBER_INT);
     $this->cust_email = filter_input(INPUT_POST, 'cust_email');
     $this->p_method = filter_input(INPUT_POST, 'p_method');
     $this->cust_city = filter_input(INPUT_POST, 'cust_city');
     $this->odr_id = filter_input(INPUT_POST, 'odr_id');
     // Number of days
     $date1 = date_create($this->d_date);
     $date2 = date_create($this->c_date);
     $this->diff = date_diff($date1, $date2);
     $this->add_days_price = ($this->diff->format('%a') - 1) * $this->setting->add_day;
     if (isset($this->step) && $this->step == 'display_categories') {
         $this->display_categories();
     } else {
         if (isset($this->step) && $this->step == 'set_dates') {
             $this->set_dates();
         } else {
             if (isset($this->step) && $this->step == 'display_products') {
                 $this->display_products();
             } else {
                 if (isset($this->step) && $this->step == 'customer_form') {
                     $this->customer_form();
                 } else {
                     if (isset($this->step) && $this->step == 'final_form') {
                         $this->final_form();
                     } else {
                         if (isset($_POST['coupon']) && !empty($_POST['coupon'])) {
                             $this->final_form();
                         } else {
                             if (isset($this->step) && $this->step == 'submit_quote') {
                                 $this->submit_quote();
                             } else {
                                 $this->postcode();
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 public function __construct()
 {
     parent::__construct();
 }