<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2007 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
+
require_once('platal.inc.php');
-require_once('xorg/globals.inc.php');
+require_once('globals.inc.php');
require_once('xorg/session.inc.php');
-XorgGlobals::init();
-XorgGlobals::setlocale();
+$globals = new PlatalGlobals('XorgSession');
XorgSession::init();
-require_once('platal/page.inc.php');
-
// {{{ class XorgPage
class XorgPage extends PlatalPage
{
- // {{{ function XorgPage()
-
- function XorgPage($tpl, $type=SKINNED)
+ function XorgPage($tpl, $type = SKINNED)
{
$this->PlatalPage($tpl, $type);
}
- // }}}
- // {{{ function run()
-
function run()
{
- global $globals;
- if ($this->_page_type != NO_SKIN) {
- $this->assign('menu', $globals->menu->menu());
+ 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/'.S::v('skin'));
+ $this->_run('skin/' . $skin);
}
-
- // }}}
}
// }}}
{
// {{{ function XorgAdmin()
- function XorgAdmin($tpl, $type=SKINNED)
+ function XorgAdmin($tpl, $type = SKINNED)
{
$this->XorgPage($tpl, $type);
check_perms();
}
// }}}
-// {{{ function new_admin_table_editor()
-
-function new_admin_table_editor($table, $idfield, $idedit=false)
-{
- array_walk($_GET, 'unfix_gpc_magic');
- array_walk($_POST, 'unfix_gpc_magic');
- array_walk($_REQUEST, 'unfix_gpc_magic');
-
- 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:
?>