Exemplo n.º 1
0
 public function __construct($title, $hmenu, $was = 1, $file = null)
 {
     global $allgAr, $menu;
     header('Content-Type: text/html;charset=UTF-8');
     if (AJAXCALL) {
         $this->ajax = true;
         $this->json = array('title' => $title, 'hmenu' => $hmenu);
     } else {
         $this->ajax = false;
         if (!is_null($file)) {
             echo '<div style="display: block; background-color: #FFFFFF; border: 2px solid #ff0000;">!!Man konnte in einer PHP Datei eine spezielle Index angeben. Damit das Design fuer diese Datei anders aussieht. Diese Funktion wurde ersetzt. Weitere Informationen im Forum auf ilch.de ... Thema: <a href="http://www.ilch.de/forum-showposts-13758-p1.html#108812">http://www.ilch.de/forum-showposts-13758-p1.html#108812</a></div>';
         }
         $this->vars = array();
         $this->file = $file;
         // setzte das file standard 0 weil durch was definiert
         $this->was = $was;
         // 0 = smalindex, 1 = normal index , 2 = admin
         $this->design = tpl::get_design();
         $link = $this->htmlfile();
         $this->headerAdds = '';
         $this->bodyendAdds = '';
         $tpl = new tpl($link, 2);
         if ($tpl->list_exists('boxleft')) {
             $tpl->set('boxleft', $this->get_boxes('l', $tpl));
         }
         if ($tpl->list_exists('boxright')) {
             $tpl->set('boxright', $this->get_boxes('r', $tpl));
         }
         // ab 0.6 =  ... menu listen moeglich
         for ($i = 1; $i <= $allgAr['menu_anz']; $i++) {
             if ($tpl->list_exists('menunr' . $i)) {
                 $tpl->set('menunr' . $i, $this->get_boxes($i, $tpl));
             }
         }
         $ar = array('TITLE' => $this->escape_explode($title), 'HMENU' => '<span id="icHmenu">' . $this->escape_explode($hmenu) . '</span>', 'SITENAME' => $this->escape_explode($allgAr['title']), 'hmenuende' => '', 'vmenuende' => '', 'hmenubegi' => '', 'vmenubegi' => '', 'hmenupoint' => '', 'vmenupoint' => '', 'DESIGN' => $this->design);
         $tpl->set_ar($ar);
         $this->html = $tpl->get(0);
         $this->html .= '{EXPLODE}';
         $this->html .= $tpl->get(1);
         unset($tpl);
         $zsave0 = array();
         preg_match_all("/\\{_boxes_([^\\{\\}]+)\\}/", $this->html, $zsave0);
         $this->replace_boxes($zsave0[1]);
         unset($zsave0);
         $this->vars_replace();
         unset($this->vars);
         $this->html = explode('{EXPLODE}', $this->html);
     }
 }