/**
  * Zeigt die einzelnen Contents an.
  *
  * @param int $number Anzahl Einträge pro Seite
  */
 private function _view($number = 15)
 {
     $this->_tplfile = 'content.tpl';
     $this->_mysql->query("SELECT COUNT(*) as 'count' FROM `content`");
     $count = $this->_mysql->fetcharray('assoc');
     $count = $count['count'];
     $page = Page::get_current_page($this->_gpc['GET']);
     $pages_nav = Page::get_static_pagesnav_array($count, $number, $this->_gpc['GET']);
     $start = ($page - 1) * $number;
     $this->_mysql->query("SELECT `content_ID` , `content_title` , `content_text` ,\n\t\tDATE_FORMAT(`content_time`, '{$this->_timeformat}') as 'content_time', `content_archiv`\n\t\tFROM `content` \n\t\tORDER BY `content_archiv` ASC, `content_time`,`content_changed_time` LIMIT {$start}, {$number}");
     $this->_mysql->saverecords('assoc');
     $content_data = $this->_mysql->get_records();
     $this->_smarty->assign('contents', $content_data);
     $this->_smarty->assign('pages', $pages_nav);
 }
 /**
  * Zeigt die einzelnen Contents an.
  *
  * @param int $number Anzahl Einträge pro Seite
  */
 private function _view($number = 20)
 {
     $this->_tplfile = 'module.tpl';
     if ($this->_isformsend()) {
         $this->_updmods();
     }
     $this->_mysql->query("SELECT COUNT(*) as 'count' FROM `modules`");
     $count = $this->_mysql->fetcharray('assoc');
     $count = $count['count'];
     $page = Page::get_current_page($this->_gpc['GET']);
     $pages_nav = Page::get_static_pagesnav_array($count, $number, $this->_gpc['GET']);
     $start = ($page - 1) * $number;
     $this->_mysql->query("SELECT `modules_ID`, `modules_name`, `modules_file`, `modules_template_support`, `modules_mail_support`, `modules_status` FROM `modules` LIMIT {$start}, {$number}");
     $this->_mysql->saverecords('assoc');
     $modules_data = $this->_mysql->get_records();
     $this->_smarty->assign('modules', $modules_data);
     $this->_smarty->assign('pages', $pages_nav);
     $this->_smarty->assign('info', $this->_getinfo(true));
 }
 /**
  * Zeigt die einzelnen Contents an.
  *
  * @param int $number Anzahl Einträge pro Seite
  */
 private function _view($number = 20)
 {
     $this->_tplfile = 'menu.tpl';
     if ($this->_isformsend()) {
         $this->_updView();
     }
     $this->_mysql->query("SELECT COUNT(*) as 'count' FROM `menu`");
     $count = $this->_mysql->fetcharray('assoc');
     $count = $count['count'];
     $page = Page::get_current_page($this->_gpc['GET']);
     $pages_nav = Page::get_static_pagesnav_array($count, $number, $this->_gpc['GET']);
     $start = ($page - 1) * $number;
     $menu_data = $this->_getMenues($start, $number, false);
     foreach ($menu_data as $key => $value) {
         $str = "";
         for ($i = 0; $i < $value['level']; $i++) {
             $str .= "&nbsp;&nbsp;&nbsp;&nbsp;";
         }
         $menu_data[$key]['menu_space'] = $str;
         $menu_data[$key]['menu_name'] = htmlentities($value['menu_name']);
     }
     $this->_smarty->assign('menus', $menu_data);
     $this->_smarty->assign('pages', $pages_nav);
     $this->_smarty->assign('positions', $this->_getPos(7));
 }
 /**
  * Zeigt die Gallery an, genauer einen Teil der Bilder zu der gehörenden Gallery.
  * Eine Gallery kann in mehrere Seiten unterteilt sein, je nach der Anzahl der Bilder.
  * Eine Gallery kann eine übergeordnete Kategorie haben, jedoch keine übergeordnete Gallery.
  * @global int gallery_pics_x Number of pictures in x
  * @global int $gallery_pics_y Number of pictures in y
  * @param int $gal_ID Gallery-ID
  */
 private function _showGallery($gal_ID)
 {
     $this->_tplfile = 'gallery_album.tpl';
     /* Anzeige-Config-Daten auslesen */
     include_once USER_DIR . 'config/user-config.inc.php';
     /*Aktuelle Seite ermitteln */
     $page = Page::get_current_page($this->_gpc['GET']);
     //Ein paar Daten berechnen
     $bildproseite = (int) (GALLERY_PICS_X * GALLERY_PICS_Y);
     $start = (int) (($page - 1) * $bildproseite);
     //Anzahl Eintraege
     $this->_mysql->query("SELECT * FROM gallery_eintraege WHERE fid_album = '{$gal_ID}'");
     $number = $this->_mysql->num_rows();
     //Eintraege und Albenname abrufen
     $this->_mysql->query("SELECT `gallery_eintraege`.`fid_bild` as 'img_ID', `gallery_alben`.`name`, `gallery_alben`.`ref_ID`\n\t\t\t\t\t\t\tFROM `gallery_eintraege`,`gallery_alben`\n\t\t\t\t\t\t\tWHERE `gallery_alben`.`ID` = '{$gal_ID}' AND `gallery_eintraege`.`fid_album` = '{$gal_ID}'\n\t\t\t\t\t\t\tORDER BY `gallery_eintraege`.`sequence`\n\t\t\t\t\t\t\tLIMIT {$start},{$bildproseite}");
     $this->_mysql->saverecords('assoc');
     $gallery_imgs = $this->_mysql->get_records();
     $gallery_name = $gallery_imgs[0]['name'];
     $cat_ID = $gallery_imgs[0]['ref_ID'];
     $pages_array = Page::get_static_pagesnav_array($number, $bildproseite, $this->_gpc['GET']);
     $root = $this->_getRoot($cat_ID, true);
     //Smarty-Variablen belegen
     $this->_smarty->assign('root', $root);
     $this->_smarty->assign("pages", $pages_array);
     $this->_smarty->assign("gallery", $gallery_imgs);
     $this->_smarty->assign(array('thispage' => $page, 'number' => $number, 'gal_ID' => $gal_ID, 'top_ID' => $root[count($root) - 1]['ID'], 'gallery_name' => $gallery_name, 'breakline' => GALLERY_PICS_X));
 }