X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxorg.inc.php;h=282ba964b3a11b1e6921c7443952a8dac9660dc4;hb=2553b7686e0678b8e27858a7c377e73ecb410aec;hp=207f137f0f33a2ad399c68207258a220b70c6202;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/include/xorg.inc.php b/include/xorg.inc.php index 207f137..282ba96 100644 --- a/include/xorg.inc.php +++ b/include/xorg.inc.php @@ -1,6 +1,6 @@ PlatalPage($tpl, $type); - } - - function run() - { - global $globals, $platal; - $this->assign('globals', $globals); - if (isset($platal) && $platal->path == 'register') { - $skin = 'register.tpl'; - } else { - $skin = S::v('skin', 'default.tpl'); - } - $this->_run('skin/' . $skin); - } -} - -// }}} -// {{{ 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); -} - -// }}} +require_once dirname(dirname(__FILE__)) . '/core/include/platal.inc.php'; +require_once 'security.inc.php'; +require_once 'common.inc.php'; // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>