2 /***************************************************************************
3 * Copyright (C) 2003-2004 Polytechnique.org *
4 * http://opensource.polytechnique.org/ *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program; if not, write to the Free Software *
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
20 ***************************************************************************/
22 function microtime_float()
24 list($usec, $sec) = explode(" ", microtime());
25 return ((float)$usec +
(float)$sec);
27 $TIME_BEGIN = microtime_float();
32 define("AUTH_PUBLIC", $i++
);
33 define("AUTH_COOKIE", $i++
);
34 define("AUTH_MDP", $i++
);
36 define("PERMS_EXT", "ext");
37 define("PERMS_USER", "user");
38 define("PERMS_ADMIN", "admin");
43 require_once('platal/env.inc.php');
46 // {{{ function redirect
48 function redirect($page)
50 if (count($_SESSION)) {
51 session_write_close();
53 header("Location: $page");
59 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker: