X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxorg.inc.php;h=b36d1cbbdb9b95b79271aab5aed4590d3d0c4318;hb=47712f77e9718652c516c85cde99a58d142f67c9;hp=52cd8290da147514c0bd0741abb816b473b94427;hpb=5e2307dcebc38ebb0ffe469967a377eb3baed571;p=platal.git diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 52cd829..b36d1cb 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -1,6 +1,6 @@ PlatalPage($tpl, $type); - } - - function run() - { - global $globals; - $this->assign('globals', $globals); - $this->_run('skin/'.S::v('skin', 'default.tpl')); - } -} - -// }}} -// {{{ class XorgAdmin - -/** Une classe pour les pages réservées aux admins (authentifiés!). - */ -class XorgAdmin extends XorgPage -{ - // {{{ function XorgAdmin() - - function XorgAdmin($tpl, $type = SKINNED) - { - $this->XorgPage($tpl, $type); - check_perms(); - } - - // }}} -} - -// }}} - -function _new_page($type, $tpl_name, $admin=false) -{ - global $page; - if (!empty($admin)) { - $page = new XorgAdmin($tpl_name, $type); - } else { - $page = new XorgPage($tpl_name, $type); - } - - $page->assign('xorg_tpl', $tpl_name); -} - -// {{{ function new_skinned_page() - -function new_skinned_page($tpl_name) -{ - _new_page(SKINNED, $tpl_name); -} - -// }}} -// {{{ function new_admin_page() - -function new_admin_page($tpl_name) -{ - _new_page(SKINNED, $tpl_name, true); -} - -// }}} -// {{{ function new_admin_table_editor() - -function new_admin_table_editor($table, $idfield, $idedit=false) -{ - global $editor; - new_admin_page('table-editor.tpl'); - require_once('xorg.table-editor.inc.php'); - $editor = new XOrgAdminTableEditor($table, $idfield, $idedit); -} - -// }}} - -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>