OSDN Git Service

d8cd60e268cc8312f153af78bb9bb0398dbdfe54
[embrj/master.git] / index.php
1 <?php
2 $dabr_start = microtime(1);
3
4 // I18N support information here
5 $language = "en_GB";
6 putenv("LANG=" . $language);
7 setlocale(LC_ALL, $language);
8
9 // Set the text domain as "messages"
10 $domain = "messages";
11 bindtextdomain($domain, "i/Locale");
12 bind_textdomain_codeset($domain, 'UTF-8');
13 textdomain($domain);
14
15 header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
16 header('Last-Modified: ' . date('r'));
17 header('Cache-Control: no-store, no-cache, must-revalidate');
18 header('Cache-Control: post-check=0, pre-check=0', false);
19 header('Pragma: no-cache');
20 header('Content-Type: text/html; charset=utf-8');
21
22 require 'config.php';
23 require 'i/common/menu.php';
24 require 'i/common/user.php';
25 require 'i/common/theme.php';
26 require 'i/common/twitter.php';
27 require 'i/common/settings.php';
28 require 'i/common/codebird.php';
29 require 'i/common/css.php';
30
31 //      Initial menu items to show even when not logged in.
32 menu_register(array (
33         'about' => array (
34                 'callback' => 'about_page',
35                 'display' => '🛈' // Perhaps â„¹ http://www.fileformat.info/info/unicode/char/1f6c8/index.htm
36         ),
37         'logout' => array (
38                 'security' => true,
39                 'callback' => 'logout_page',
40                 'display' => 'î Š'
41         ),
42         'oauth' => array(
43                 'callback' => 'user_oauth',
44                 'hidden' => 'true',
45         ),
46         'widgets' => array(
47                 'callback' => 'css',
48                 'hidden'   => 'true',
49         ),
50 ));
51
52 function logout_page() {
53         user_logout();
54         header("Location: " . BASE_URL); /* Redirect browser */
55         exit;
56 }
57
58 function about_page() {
59         theme('page', 'About', theme('about'));
60 }
61
62 session_start();
63 menu_execute_active_handler();