X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxnet.inc.php;h=e9689e39ced2d4e45052f6ef3a4e0303d9597a77;hb=39337e2d8e5357597a6e14a5e0ba91521f1e2c21;hp=98275a312139501d23291470aefeaa4235602130;hpb=63528107273f1f5de8a83428dbdd70e5f25d3d7f;p=platal.git diff --git a/include/xnet.inc.php b/include/xnet.inc.php index 98275a3..e9689e3 100644 --- a/include/xnet.inc.php +++ b/include/xnet.inc.php @@ -1,6 +1,6 @@ assign('xorg_tpl', $tpl_name); -} - function new_skinned_page($tpl_name) { - return new_page($tpl_name); -} - -// }}} -// {{{ function new_group_page() - -function new_group_page($tpl_name) -{ - global $page, $globals; - - new_page($tpl_name); - - if (!is_member() && !S::has_perms()) { - $page->kill("You have not sufficient credentials"); - } - - $page->useMenu(); - $page->assign('asso', $globals->asso()); - $page->setType($globals->asso('cat')); -} - -// }}} -// {{{ function new_groupadmin_page() - -function new_groupadmin_page($tpl_name) -{ - global $page, $globals; - - new_page($tpl_name); - - if (!may_update()) { - $page->kill("You have not sufficient credentials"); - } - - $page->useMenu(); - $page->assign('asso', $globals->asso()); - $page->setType($globals->asso('cat')); -} - -// }}} -// {{{ function new_admin_page() - -function new_admin_page($tpl_name) -{ - global $page, $globals; - - new_page($tpl_name); - - check_perms(); - - $page->useMenu(); - if ($globals->asso('cat')) { - $page->assign('asso', $globals->asso()); - $page->setType($globals->asso('cat')); + global $page; + require_once("xnet/page.inc.php"); + if (!$page instanceof XnetPage) { + $page = new XnetPage($tpl_name); + } else { + $page->changeTpl($tpl_name); } } -// }}} -// 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: ?>