Révision 610f86d6
htdocs/index.php~ | ||
---|---|---|
1 |
<?php |
|
2 |
/* |
|
3 |
* @version $Id: index.php 7763 2009-01-06 18:44:50Z moyo $ |
|
4 |
------------------------------------------------------------------------- |
|
5 |
GLPI - Gestionnaire Libre de Parc Informatique |
|
6 |
Copyright (C) 2003-2009 by the INDEPNET Development Team. |
|
7 |
|
|
8 |
http://indepnet.net/ http://glpi-project.org |
|
9 |
------------------------------------------------------------------------- |
|
10 |
|
|
11 |
LICENSE |
|
12 |
|
|
13 |
This file is part of GLPI. |
|
14 |
|
|
15 |
GLPI is free software; you can redistribute it and/or modify |
|
16 |
it under the terms of the GNU General Public License as published by |
|
17 |
the Free Software Foundation; either version 2 of the License, or |
|
18 |
(at your option) any later version. |
|
19 |
|
|
20 |
GLPI is distributed in the hope that it will be useful, |
|
21 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
22 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
23 |
GNU General Public License for more details. |
|
24 |
|
|
25 |
You should have received a copy of the GNU General Public License |
|
26 |
along with GLPI; if not, write to the Free Software |
|
27 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
28 |
-------------------------------------------------------------------------- |
|
29 |
*/ |
|
30 |
|
|
31 |
// ---------------------------------------------------------------------- |
|
32 |
// Original Author of file: |
|
33 |
// Purpose of file: |
|
34 |
// ---------------------------------------------------------------------- |
|
35 |
|
|
36 |
// Test si config_db n'existe pas on lance l'installation |
|
37 |
|
|
38 |
define('GLPI_ROOT', '.'); |
|
39 |
|
|
40 |
include (GLPI_ROOT . "/config/based_config.php"); |
|
41 |
if(!file_exists(GLPI_CONFIG_DIR . "/config_db.php")) { |
|
42 |
include (GLPI_ROOT . "/inc/common.function.php"); |
|
43 |
glpi_header("install/install.php"); |
|
44 |
die(); |
|
45 |
} |
|
46 |
else |
|
47 |
{ |
|
48 |
include (GLPI_ROOT . "/inc/includes.php"); |
|
49 |
$_SESSION["glpitest"]='testcookie'; |
|
50 |
|
|
51 |
// For compatibility reason |
|
52 |
if (isset($_GET["noCAS"])) { |
|
53 |
$_GET["noAUTO"]=$_GET["noCAS"]; |
|
54 |
} |
|
55 |
|
|
56 |
checkAlternateAuthSystems(true,isset($_GET["redirect"])?$_GET["redirect"]:""); |
|
57 |
|
|
58 |
// Send UTF8 Headers |
|
59 |
header("Content-Type: text/html; charset=UTF-8"); |
|
60 |
// Start the page |
|
61 |
|
|
62 |
|
|
63 |
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; |
|
64 |
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">"; |
|
65 |
echo "<head><title>AbulEdu.net - Login</title>\n"; |
|
66 |
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8 \" />\n"; |
|
67 |
echo "<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\n"; |
|
68 |
//ryxeo |
|
69 |
echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/navbar.css' type='text/css' />\n"; |
|
70 |
echo "<link rel='stylesheet' type='text/css' href='".$CFG_GLPI["root_doc"]."/css/abuledunet-vert.css' media='screen' title='Style par défaut de AbulÉdu.Net' />\n"; |
|
71 |
echo '<link rel="shortcut icon" type="images/x-icon" href="'.$CFG_GLPI["root_doc"].'/pics/favicon.ico" />'; |
|
72 |
|
|
73 |
// Appel CSS |
|
74 |
echo '<link rel="stylesheet" href="'.$CFG_GLPI["root_doc"].'/css/styles.css" type="text/css" media="screen" />'; |
|
75 |
// surcharge CSS hack for IE |
|
76 |
echo "<!--[if lte IE 6]>" ; |
|
77 |
echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/styles_ie.css' type='text/css' media='screen' >\n"; |
|
78 |
echo "<![endif]-->"; |
|
79 |
echo "<script type=\"text/javascript\"><!--document.getElementById('var_login_name').focus();--></script>"; |
|
80 |
|
|
81 |
echo "</head>"; |
|
82 |
|
|
83 |
// Body with configured stuff |
|
84 |
//ryxeo |
|
85 |
echo "<body>"; |
|
86 |
|
|
87 |
echo " <div id=\"page\"> |
|
88 |
<div id=\"top\"> |
|
89 |
<a href=\"/index\" |
|
90 |
title=\"Retouner directement à la page d'accueil\" |
|
91 |
id=\"link_home\"><h1>AbulÉdu.net</h1></a> |
|
92 |
</div> |
|
93 |
<div id=\"navbar\"> |
|
94 |
<ul> |
|
95 |
<li><a href=\"http://www.abuledu.org\" id=\"navbar_www\" title=\"Le projet AbulÉdu\" class=\"ttip\">AbulÉdu</a></li> |
|
96 |
<li><a href=\"http://www.abuledu.org/leterrier/\" id=\"navbar_leterrier\" title=\"Les logiciels libres pédagogiques fait par des enseignants dans le cadre du projet AbulÉdu\" class=\"ttip\">LeTerrier</a></li> |
|
97 |
<li><a href=\"http://libre.pedagosite.net/\" id=\"navbar_pedagosite\" title=\"Consultez les ressources pédagogiques réalisées par des enseignants et participez en envoyant vos contributions sur libre.pedagosite.net\" class=\"ttip\">Pédagosite</a></li> |
|
98 |
<li><a href=\"http://docs.abuledu.org/\" id=\"navbar_doc\" title=\"Toute la documentation d'AbulÉdu est disponible sur ce site internet\" class=\"ttip\">Documentation</a></li> |
|
99 |
|
|
100 |
<li><a href=\"http://forum.abuledu.org/\" id=\"navbar_forum\" title=\"Les forums\" class=\"ttip\">Forums</a></li> |
|
101 |
<li><a href=\"http://planete.abuledu.org/\" id=\"navbar_actu\" title=\"Suivez toute l'actualité du projet AbulÉdu sur la planète\" class=\"ttip\">Planète</a></li> |
|
102 |
<li><a href=\"http://www.abuledu.com/\" id=\"navbar_aepro\" title=\"AbulEdu.PRO vous propose un certain nombre de services professionnels.\" class=\"ttip\">Services PRO</a></li> |
|
103 |
<li id=\"active\"><a href=\"http://www.abuledu.net/\" id=\"navbar_anet\" title=\"AbulEdu.NET vous permet de gérer vos demandes d'interventions ou de superviser votre parc de serveurs. Ce service n'est disponible qu'aux abonnés au service AbulEdu.NET\" class=\"ttip\">AbulEdu.NET</a></li> |
|
104 |
<li><a href=\"http://servecole.abuledu.info/admin.php\" id=\"navbar_webadmin\" title=\"Administration de votre serveur AbulÉdu. Attention, Cet outil n'est accessible que si vous êtes à l'interieur d'un réseau AbulÉdu !\" class=\"ttip\">WebAdmin</a></li> |
|
105 |
</ul> |
|
106 |
<p> </p> |
|
107 |
</div> |
|
108 |
|
|
109 |
<div id=\"navigation\"> |
|
110 |
<div id=\"navWiki\"> |
|
111 |
<h2>Liens rapides</h2> |
|
112 |
<ul> |
|
113 |
<li><a href=\"http://www.abuledu.net/epack/new\">Enregistrement d'un epack</a></li> |
|
114 |
<li><a href=\"https://secure.ryxeo.com/glpi/index2.php\">Accès partenaires</a></li> |
|
115 |
<li><a href=\"forget.php\">Demander un mot de passe</a></li> |
|
116 |
</ul> |
|
117 |
</div> |
|
118 |
<div id=\"nav_connexion\"> |
|
119 |
<h2>Connexion</h2> |
|
120 |
<div id=\"user_top_bar\"> |
|
121 |
<div id=\"box_unlogged\" class=\"identification_box\"> |
|
122 |
<li><a href=\"http://www.abuledu.net/aide.pdf\">Aide AbulEdu.NET 2009</a></li> |
|
123 |
</div> |
|
124 |
</div> |
|
125 |
</div> |
|
126 |
</div> |
|
127 |
<div id=\"main\">\n"; |
|
128 |
|
|
129 |
|
|
130 |
// contenu |
|
131 |
echo "<div id='contenulogin'>"; |
|
132 |
|
|
133 |
echo "<div id='logo-login'>"; |
|
134 |
|
|
135 |
echo nl2br(unclean_cross_side_scripting_deep($CFG_GLPI['text_login'])); |
|
136 |
|
|
137 |
echo "</div>"; |
|
138 |
|
|
139 |
echo "<div id='boxlogin'>"; |
|
140 |
|
|
141 |
echo "<form action='login.php' method='post'>"; |
|
142 |
|
|
143 |
// Other CAS |
|
144 |
if (isset($_GET["noAUTO"])) { |
|
145 |
echo "<input type='hidden' name='noAUTO' value='1' />"; |
|
146 |
} |
|
147 |
|
|
148 |
// redirect to tracking |
|
149 |
if (isset($_GET["redirect"])){ |
|
150 |
manageRedirect($_GET["redirect"]); |
|
151 |
echo '<input type="hidden" name="redirect" value="'.$_GET['redirect'].'">'; |
|
152 |
} |
|
153 |
|
|
154 |
echo "<fieldset>"; |
|
155 |
echo '<legend>'.$LANG["login"][10].'</legend>'; |
|
156 |
|
|
157 |
|
|
158 |
echo '<div class="row"><span class="label"><label>'.$LANG["login"][6].' : </label></span><span class="formw"> <input type="text" name="login_name" id="login_name" size="15" /></span></div>'; |
|
159 |
|
|
160 |
|
|
161 |
echo '<div class="row"><span class="label"><label>'.$LANG["login"][7].' : </label></span><span class="formw"><input type="password" name="login_password" id="login_password" size="15" /> </span></div>'; |
|
162 |
|
|
163 |
|
|
164 |
|
|
165 |
|
|
166 |
|
|
167 |
echo "</fieldset>"; |
|
168 |
echo '<p ><span> <input type="submit" name="submit" value="'.$LANG["buttons"][2].'" class="submit" /></span></p>'; |
|
169 |
echo "</form>"; |
|
170 |
|
|
171 |
echo "<script type='text/javascript' >\n"; |
|
172 |
echo "document.getElementById('login_name').focus();"; |
|
173 |
echo "</script>"; |
|
174 |
|
|
175 |
echo "<p><a href=\"forget.php\">Mot de passe oublié ?</a></p>"; |
|
176 |
echo "</div>"; // fin box login |
|
177 |
|
|
178 |
|
|
179 |
|
|
180 |
echo "<div class='error'>"; |
|
181 |
echo "<noscript><p>"; |
|
182 |
echo $LANG["login"][26]; |
|
183 |
echo "</p></noscript>"; |
|
184 |
if (isset($_GET['error'])){ |
|
185 |
switch ($_GET['error']){ |
|
186 |
case 1 : // cookie error |
|
187 |
echo $LANG["login"][27]; |
|
188 |
break; |
|
189 |
case 2 : // GLPI_SESSION_DIR not writable |
|
190 |
echo $LANG["install"][50].": ".GLPI_SESSION_DIR; |
|
191 |
break; |
|
192 |
} |
|
193 |
} |
|
194 |
echo "</div>"; |
|
195 |
|
|
196 |
|
|
197 |
// Affichage autorisee FAQ |
|
198 |
if ($CFG_GLPI["public_faq"]){ |
|
199 |
echo '<div id="box-faq"><a href="front/helpdesk.faq.php">[ '.$LANG["knowbase"][24].' ]</a></div>'; |
|
200 |
} |
|
201 |
|
|
202 |
|
|
203 |
echo "</div>"; // fin contenu login |
|
204 |
|
|
205 |
if ($CFG_GLPI["debug"]==DEMO_MODE){ |
|
206 |
echo "<div align='center'"; |
|
207 |
|
|
208 |
$query="SELECT count(*) |
|
209 |
FROM `glpi_event_log` |
|
210 |
WHERE message LIKE '%logged in%'"; |
|
211 |
|
|
212 |
$query2="SELECT date |
|
213 |
FROM `glpi_event_log` |
|
214 |
ORDER BY date ASC |
|
215 |
LIMIT 1"; |
|
216 |
|
|
217 |
$DB=new DB; |
|
218 |
$result=$DB->query($query); |
|
219 |
$result2=$DB->query($query2); |
|
220 |
$nb_login=$DB->result($result,0,0); |
|
221 |
$date=$DB->result($result2,0,0); |
|
222 |
|
|
223 |
echo '<b>'.$nb_login.'</b> logins since '.$date ; |
|
224 |
|
|
225 |
echo "</div>"; |
|
226 |
} |
|
227 |
|
|
228 |
echo "<div id='footer-login'>"; |
|
229 |
echo "<a href=\"http://glpi-project.org/\" title=\"Powered By Indepnet\" >"; |
|
230 |
echo 'GLPI version '.(isset($CFG_GLPI["version"])?$CFG_GLPI["version"]:"").' Copyright (C) 2003-'.date("Y").' INDEPNET Development Team.'; |
|
231 |
echo "</a>"; |
|
232 |
echo "</div>"; |
|
233 |
|
|
234 |
} |
|
235 |
// Appel de cron |
|
236 |
if ($CFG_GLPI["debug"]!=DEMO_MODE){ |
|
237 |
callCron(); |
|
238 |
} |
|
239 |
|
|
240 |
//ryxeo |
|
241 |
echo " </div> |
|
242 |
<p id=\"footer\"> |
|
243 |
<a id=\"ryxeo\" href=\"http://www.ryxeo.com\"> |
|
244 |
<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/abuledu/logo_ryxeo.png\" alt=\"Hébergé par RyXeo\"/> |
|
245 |
</a> |
|
246 |
<!-- |
|
247 |
accueil.txt · Dernière modification: 2007/06/07 19:46 par bafriss · --> |
|
248 |
|
|
249 |
<a href=\"http://www.ubuntu-fr.org/\" title=\"Squelette wiki inspire de celui de ubuntu-fr.org\">Squelette wiki inspire de celui de ubuntu-fr.org !</a> |
|
250 |
- Propulsé par AbulEdu.NET |
|
251 |
</div> |
|
252 |
</div> |
|
253 |
"; |
|
254 |
|
|
255 |
echo "</body></html>"; |
|
256 |
|
|
257 |
// End |
|
258 |
|
|
259 |
|
|
260 |
?> |
Formats disponibles : Unified diff