Merge branch 'platal-0.9.17'
[platal.git] / include / xnet.inc.php
index d2104e0..a8431e3 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once('platal.inc.php');
-require_once('globals.inc.php');
-require_once('xnet/session.inc.php');
-$globals = new PlatalGlobals('XnetSession');
-XnetSession::init();
+define('PL_GLOBALS_CLASS', 'PlatalGlobals');
+define('PL_SESSION_CLASS', 'XnetSession');
+define('PL_PAGE_CLASS', 'XnetPage');
 
-// {{{ function new_skinned_page()
-
-function new_skinned_page($tpl_name, $refuse_access = false)
-{
-    global $page, $globals;
-    require_once("xnet/page.inc.php");
-    if (!$page instanceof XnetPage) {
-        $page = new XnetPage($tpl_name, $type);
-    } else {
-        $page->changeTpl($tpl_name, $type);
-    }
-    if ($refuse_access) {
-        $page->kill("Vous n'avez pas les droits suffisants pour accéder à cette page");
-    }
-}
-
-// }}}
-// {{{ function new_annu_page()
-
-function new_annu_page($tpl_name)
-{
-    global $globals;
-    new_skinned_page($tpl_name, 
-                     !may_update()
-                     && (!is_member()  || $globals->asso('pub') != 'public')
-                     && $globals->asso('cat') != 'Promotions');
-}
-
-// }}}
+require_once dirname(dirname(__FILE__)) . '/core/include/platal.inc.php';
+require_once 'common.inc.php';
 
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>