Esempio n. 1
0
 public function user_menu_list_get()
 {
     if (!$this->get('type')) {
         return $this->response(array('status' => 'error', 'msg' => 'Required fields missing in your request', 'error_code' => 1), 200);
     }
     $type = $this->get("type");
     if ($type == "forms") {
         $table = "safety_forms";
         $folder = "safety_forms";
     } else {
         return $this->response(array("status" => "errror", "msg" => "Unknown Error Occurred!! Try Again...", "error_code" => 2), 200);
     }
     $data = $this->api_model->get_menu_detail($table, array("is_display" => 1));
     $user = array();
     $i = 0;
     if (count($data) > 0) {
         foreach ($data as $list) {
             $user[$i]['id'] = $list['id'];
             $user[$i]['title'] = $list['title'];
             $user[$i]['url'] = get_img_dir() . 'assets/images/frontend/' . $folder . '/' . $list['pdf_file'];
             $i = $i + 1;
         }
         return $this->response(array("status" => "success", "user" => $user), 200);
     } else {
         return $this->response(array("status" => "errror", "msg" => "Unknown Error Occurred!! Try Again...", "error_code" => 2), 200);
     }
 }
Esempio n. 2
0
 function index()
 {
     $this->load->model("product1_model");
     $country_list = $this->checkout_model->get_data("countries");
     $state_list = $this->checkout_model->get_data("states");
     $this->data['countries'] = $country_list;
     $this->data['states'] = $state_list;
     $this->load->model("cart_model");
     $tax = $this->cart_model->get_other_cost("tax_amt");
     $ship_cost = $this->cart_model->get_other_cost("ship_amt");
     if (!$this->session->userdata('tax_amt')) {
         $tax_amt = $this->session->set_userdata("tax_amt", $tax);
     }
     if (!$this->session->userdata('ship_amt')) {
         $ship_amt = $this->session->set_userdata("ship_amt", $ship_cost);
     }
     $this->data['cat_data'] = $this->product1_model->get_product("category", NULL);
     $this->data['img_url'] = get_img_dir();
     foreach ($this->data['cat_data'] as $key => $value) {
         $this->data['p_count'] = $this->product1_model->get_product_count("products", array("cat" => $value['id'], "is_active" => 1));
         $this->data['cat_data'][$key]['p_count'] = count($this->data['p_count']);
     }
     if ($this->session->userdata("email1") != '' && !$this->session->userdata('billing_info') && !$this->session->userdata('shipping_info')) {
         $userid = $this->session->userdata("user_id");
         $email = $this->session->userdata("email1");
         $billing_address = $this->checkout_model->get_address1(array("type" => "ba", "userid" => $userid));
         $billing_info = array('name' => $billing_address['name'], 'company_name' => $billing_address['company_name'], 'email' => $this->session->userdata("email1"), 'phone' => $billing_address['phone'], 'address' => $billing_address['address'], 'state' => $billing_address['state'], 'city' => $billing_address['city'], 'country' => $billing_address['country'], 'zip_code' => $billing_address['zip_code'], 'type' => 'ba');
         $this->session->set_userdata('billing_info', $billing_info);
         $shipping_address = $this->checkout_model->get_address1(array("type" => "sa", "userid" => $userid));
         $shipping_info = array('name' => $shipping_address['name'], 'company_name' => $shipping_address['company_name'], 'email' => $shipping_address['email'], 'phone' => $shipping_address['phone'], 'address' => $shipping_address['address'], 'state' => $shipping_address['state'], 'city' => $shipping_address['city'], 'country' => $shipping_address['country'], 'zip_code' => $shipping_address['zip_code'], 'type' => "sa");
         $this->session->set_userdata('shipping_info', $shipping_info);
     }
     $this->data['title'] = "Checkout";
     $this->data['billing_information'] = $this->load->view("checkout/billing_information", $this->data, true);
     $this->data['shipping_information'] = $this->load->view("checkout/shipping_information", $this->data, true);
     $this->data['payment_information'] = $this->load->view("checkout/payment_information", $this->data, true);
     $this->data['order_information'] = $this->load->view("checkout/order_information", $this->data, true);
     if (count($this->cart->contents()) > 0) {
         $this->layout->view("checkout/checkout", "frontend");
     } else {
         redirect('');
     }
 }
Esempio n. 3
0
          
          <!-- rwo default --> 
          <div class="row" data-row="default">


               <aside class="col-sm-12 bg-white inner-full">
                 <div class="inner-content">
                     <h1>About Us</h1>
                     <hr />

                    <?php 
echo $info[0]['content'];
?>

                    <img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" data-src="<?php 
echo get_img_dir();
?>
/container-bottom-img.jpg" class=" about-bottom-img" alt="Got Safety">
                    
                 </div>





           </aside>

            <!-- rwo default --> 
          </div>
          
Esempio n. 4
0
 function remove_cart($rowid, $remove = '')
 {
     if ($remove == "all") {
         $this->cart->destroy();
     } else {
         $data = array('rowid' => $rowid, 'qty' => 0);
         $this->cart->update($data);
     }
     $this->data['img_url'] = get_img_dir();
     $content = $this->load->view("cart/mini_cart", $this->data, TRUE);
     $status = 'success';
     echo json_encode(array('status' => $status, 'subtotal' => $this->cart->total(), 'total_items' => $this->cart->total_items(), 'content' => $content));
 }
			<div aria-label="Large button group" role="group" class="btn-group btn-group-lg">
	<?php 
foreach ($view_link as $data) {
    ?>
		
		
	<a href="<?php 
    echo get_img_dir() . 'assets/images/frontend/posters_attachment/' . $data['f_name'];
    ?>
" target="_blank"><button class="btn btn-default lesson-btn" type="button"> <?php 
    echo $data['language'];
    ?>
 5 X9 </button></a>
	
	<a href="<?php 
    echo get_img_dir() . 'assets/images/frontend/posters_attachment/' . $data['f_name_quiz'];
    ?>
" target="_blank">	<button class="btn btn-default quiz-btn" type="button"> <?php 
    echo $data['language'];
    ?>
 5 X 11</button></a>
		
		<?php 
}
?>
			
			</div>
		</div>
		
		<?php 
echo $view_content[0]['content'];
			<div aria-label="Large button group" role="group" class="btn-group btn-group-lg">
	<?php 
foreach ($view_link as $data) {
    ?>
		
		
	<a href="<?php 
    echo get_img_dir() . 'assets/images/admin/lession_attachment/' . $data['f_name'];
    ?>
" target="_blank"><button class="btn btn-default lesson-btn" type="button"> <?php 
    echo $data['language'];
    ?>
 Lesson</button></a>
	
	<a href="<?php 
    echo get_img_dir() . 'assets/images/admin/lession_attachment/' . $data['f_name_quiz'];
    ?>
" target="_blank">	<button class="btn btn-default quiz-btn" type="button"> <?php 
    echo $data['language'];
    ?>
 Quiz</button></a>
		
		<?php 
}
?>
			
			</div>
		</div>
		
		<?php 
echo $view_content[0]['content'];
Esempio n. 7
0
 /**  Get particular user other pages details after login  **/
 public function get_user_menu_list_get()
 {
     if (!$this->get('user_id') && !$this->get('created_id') && !$this->get('type')) {
         return $this->response(array('status' => 'error', 'msg' => 'Required fields missing in your request', 'error_code' => 1), 200);
     }
     $user_id = $this->get("user_id");
     $created_id = $this->get("created_id");
     $type = $this->get("type");
     if ($type == "report") {
         $table = "inspection_reports";
         $folder = "inspection_reports";
     } else {
         if ($type == "document") {
             $table = "cal_osha";
             $folder = "call_osha";
         } else {
             if ($type == "log") {
                 $table = "logs";
                 $folder = "logs";
             } else {
                 if ($type == "record") {
                     $table = "records";
                     $folder = "records";
                 } else {
                     if ($type == "forms") {
                         $table = "safety_forms";
                         $folder = "safety_forms";
                     } else {
                         return $this->response(array("status" => "errror", "msg" => "Unknown Error Occurred!! Try Again...", "error_code" => 2), 200);
                     }
                 }
             }
         }
     }
     if ($created_id == '8') {
         $created_id = $user_id;
     } else {
         $created_id = $created_id;
     }
     $data = $this->api_model->get_menu_detail($table, array("created_user" => $created_id, "is_display" => 1));
     $user = array();
     $i = 0;
     if (count($data) > 0) {
         foreach ($data as $list) {
             $user[$i]['id'] = $list['id'];
             $user[$i]['title'] = $list['title'];
             $user[$i]['created_user'] = $list['created_user'];
             $user[$i]['created_date'] = $list['created_date'];
             $user[$i]['url'] = get_img_dir() . 'assets/images/frontend/' . $folder . '/' . $list['pdf_file'];
             $i = $i + 1;
         }
         return $this->response(array("status" => "success", "user" => $user), 200);
     } else {
         return $this->response(array("status" => "errror", "msg" => "Unknown Error Occurred!! Try Again...", "error_code" => 2), 200);
     }
 }