コード例 #1
0
ファイル: View.lib.php プロジェクト: GitBeBest/sf-framwork
 public static function parse($tpl)
 {
     foreach (self::$viewTpl as $key => $file) {
         self::getContent($file, $key);
     }
     self::$content = self::getContent($tpl);
     if (config::get("auto_create_html", false)) {
         $file = $_SERVER[PATH_INFO];
         if ($file) {
             $file = WEBROOT . $file;
             sf::getLib("Files")->write($file, self::$content);
         }
     }
     return self::$content;
 }
コード例 #2
0
ファイル: admin.php プロジェクト: AndreasWebdev/ivcms5
        if ($rights->has('modul', $point['file'])) {
            if (isset($assignment[$point['file']])) {
                $cat = $assignment[$point['file']];
                if ($cat) {
                    $menu[$cat]['children'][] = $point;
                }
            } else {
                $menu[0]['children'][] = $point;
            }
        }
    }
    try {
        $modulrights = $rights->flags('modul', $modul);
        $view->assign('menu', $menu);
        include 'moduls/' . $modul . '.php';
        $view->content(ob_get_clean());
        $view->display();
    } catch (redirect $e) {
        ob_end_clean();
        header('Location: ' . $e->getMessage());
    } catch (ErrorException $e) {
        ob_end_clean();
        echo $e->getMessage();
        echo $e->getTraceAsString();
    } catch (Exception $e) {
        ob_end_clean();
        $view->error($e->getMessage() . $e->getTraceAsString());
        $view->display();
    }
} else {
    $view = new view('login');