Revision 527 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** @author Lars Tiefland* @copyright 2016*//*** Shop_position_model** @package WebanOS CI* @author Lars Tiefland* @copyright 2016* @version $Id: Shop_position_model.php 528 2016-09-15 11:20:18Z lars $* @access public*/class Shop_position_model extends CI_Model{private $position = array();/*** Shop_position_model::__construct()* zeit auf allen Shop-Seiten den Pfad zur aktuellen Seite an.** @return*/public function __construct(){parent::__construct();$this->load->model('category_model', 'category');}/*** Shop_position_model::get_position()** Liest die aktuelle Positon aus und gibt diese zurück** @param mixed $father* @return*/public function get_position($father){$pos = array();$sql = 'SELECT*FROMdirectoryWHEREID = ?ANDlanguage="DE"';$res = $this->db->query($sql, array($father));$row = $res->row_array();$id = $row["ID"];$father = $row["Father"];$row["link"] = $this->category->get_link($id, 2);$pos[] = $row;while ($father != -1){$res = $this->db->query($sql, array($father));$row = $res->row_array();$id = $row["ID"];$father = $row["Father"];$row["link"] = $this->category->get_link($id, 2);$pos[] = $row;}$this->position = array_reverse($pos);return $this->position;}}?>