shop.balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

layout.php (710B)


      1 <?php
      2 class ModelDesignLayout extends Model {
      3 	public function getLayout($route) {
      4 		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "layout_route WHERE '" . $this->db->escape($route) . "' LIKE route AND store_id = '" . (int)$this->config->get('config_store_id') . "' ORDER BY route DESC LIMIT 1");
      5 
      6 		if ($query->num_rows) {
      7 			return (int)$query->row['layout_id'];
      8 		} else {
      9 			return 0;
     10 		}
     11 	}
     12 	
     13 	public function getLayoutModules($layout_id, $position) {
     14 		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "layout_module WHERE layout_id = '" . (int)$layout_id . "' AND position = '" . $this->db->escape($position) . "' ORDER BY sort_order");
     15 		
     16 		return $query->rows;
     17 	}
     18 }