Revision 420 | Revision 527 | Zur aktuellen Revision | Blame | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed
<?php/*** @author Lars Tiefland* @copyright 2016*//*** Aktion_model** Aktonen für die Startseite** @package* @author* @copyright Lars Tiefland* @version 2016* @access public*/class Aktion_model extends CI_Model{/*** Aktion_model::get_aktion()** @param mixed $aktion_id* @return*/public function get_aktion($aktion_id){}/*** Aktion_model::get_aktion_items()** @param mixed $aktion_id* @return*/public function get_aktion_items($aktion_id){$res = $this->db->get_where('artikel_2_Aktionen',array('Aktionen'=>$aktion_id,'language'=>$GLOBALS['INI']['language'],));$items = $res->result_array();return $items;}/*** Aktion_model::get_cur_aktion()** @param string $rubrik* @return*/public function get_cur_aktion($rubrik = 'Home'){$aktionen=array();$res = $this->db->get_where('Aktionen', 'kategorie="'.$rubrik.'" AND CURDATE() BETWEEN von AND `bis`');while ($row = $res->unbuffered_row('array')){$row['bilder'] = $this->get_aktionen_items($row['ID']);$row['items']=$this->aktion->get_aktion_items($row['ID']);if (isset($row['config']) && $row['config']){$row['config'] = unserialize($row['config']);}$aktionen[]=$row;}return $aktionen;}/*** Aktion_model::get_aktionen_items()** @param mixed $aktion_id* @return*/private function get_aktionen_items($aktion_id){$this->db->order_by('rang', 'ASC');$resultItems = $this->db->get_where('aktionen_item', array('aktion_id' => $aktion_id));while ($rowItems = $resultItems->unbuffered_row('array')){$bilder[] = $rowItems;}return $bilder;}}?>