Structures the classes:
[dotclear.git] / page.auth.admin.php
1 <?php
2
3 class xorgLoginPage extends dcUrlHandlers {
4 static public function page($args) {
5 switch ($args) {
6 case 'xorg.php':
7 self::dispatchForm();
8 default:
9 self::p404();
10 }
11 }
12
13 static protected function dispatchForm() {
14 # If we have a session cookie, go to index.php
15 if (isset($_SESSION['sess_user_id']))
16 {
17 header('Location: http://murphy.m4x.org/~x2003bruneau/dotclear/admin/index.php');
18 }
19
20 # Loading locales for detected language
21 $dlang = http::getAcceptLanguage();
22 if ($dlang) {
23 l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main');
24 }
25
26 global $core;
27 $msg = $err = null;
28 header('Content-Type: text/html; charset=UTF-8');
29 ?>
30 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
31 <html xmlns="http://www.w3.org/1999/xhtml"
32 xml:lang="en" lang="en">
33 <head>
34 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
35 <meta http-equiv="Content-Script-Type" content="text/javascript" />
36 <meta http-equiv="Content-Style-Type" content="text/css" />
37 <meta http-equiv="Content-Language" content="en" />
38 <meta name="MSSmartTagsPreventParsing" content="TRUE" />
39 <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />
40 <meta name="GOOGLEBOT" content="NOSNIPPET" />
41 <title><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></title>
42
43 <?php
44 echo dcPage::jsLoadIE7();
45 echo dcPage::jsCommon();
46 ?>
47
48 <style type="text/css">
49 @import url(style/default.css);
50 </style>
51 <?php
52 # --BEHAVIOR-- loginPageHTMLHead
53 $core->callBehavior('loginPageHTMLHead');
54 ?>
55 </head>
56
57 <body id="dotclear-admin" class="auth">
58
59 <form action="xorg.php" method="post" id="login-screen">
60 <h1><?php echo html::escapeHTML(DC_VENDOR_NAME); ?></h1>
61
62 <?php
63 if ($err) {
64 echo '<div class="error">'.$err.'</div>';
65 }
66 if ($msg) {
67 echo '<p class="message">'.$msg.'</p>';
68 }
69
70 {
71 echo
72 '<fieldset>'.
73 '<p><a href="http://murphy.m4x.org/~x2003bruneau/dotclear/auth/Xorg?path=/~x2003bruneau/dotclear/admin/index.php">Via Polytechnique.org</a></p>' .
74 '<p><a href="http://murphy.m4x.org/~x2003bruneau/dotclear/admin/auth.php">Via le formulaire</a></p>' .
75 '</fieldset>'.
76
77 '<p>'.__('You must accept cookies in order to use the private area.').'</p>';
78
79 if ($core->auth->allowPassChange()) {
80 echo '<p><a href="auth.php?recover=1">'.__('I forgot my password').'</a></p>';
81 }
82 }
83 ?>
84 </form>
85
86 <script type="text/javascript">
87 //<![CDATA[
88 $('input[@name="user_id"]').get(0).focus();
89 //]]>
90 </script>
91
92 </body>
93 </html>
94 <?php
95 exit;
96 }
97 }
98
99 ?>