ryxeo-glpi-git / htdocs / index_normal.php @ 7c12ea40
Historique | Voir | Annoter | Télécharger (9,42 ko)
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 |
error_reporting(0); |
37 |
|
38 |
// Test si config_db n'existe pas on lance l'installation
|
39 |
|
40 |
define('GLPI_ROOT', '.'); |
41 |
|
42 |
include (GLPI_ROOT . "/config/based_config.php"); |
43 |
if(!file_exists(GLPI_CONFIG_DIR . "/config_db.php")) { |
44 |
include (GLPI_ROOT . "/inc/common.function.php"); |
45 |
glpi_header("install/install.php");
|
46 |
die();
|
47 |
} |
48 |
else
|
49 |
{ |
50 |
include (GLPI_ROOT . "/inc/includes.php"); |
51 |
$_SESSION["glpitest"]='testcookie'; |
52 |
|
53 |
// For compatibility reason
|
54 |
if (isset($_GET["noCAS"])) { |
55 |
$_GET["noAUTO"]=$_GET["noCAS"]; |
56 |
} |
57 |
|
58 |
checkAlternateAuthSystems(true,isset($_GET["redirect"])?$_GET["redirect"]:""); |
59 |
|
60 |
// Send UTF8 Headers
|
61 |
header("Content-Type: text/html; charset=UTF-8"); |
62 |
// Start the page
|
63 |
|
64 |
|
65 |
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; |
66 |
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">"; |
67 |
echo "<head><title>support.AbulEdu.net - Login</title>\n"; |
68 |
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8 \" />\n"; |
69 |
echo "<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\n"; |
70 |
//ryxeo
|
71 |
echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/navbar.css' type='text/css' />\n"; |
72 |
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"; |
73 |
echo '<link rel="shortcut icon" type="images/x-icon" href="'.$CFG_GLPI["root_doc"].'/pics/favicon.ico" />'; |
74 |
|
75 |
// Appel CSS
|
76 |
echo '<link rel="stylesheet" href="'.$CFG_GLPI["root_doc"].'/css/styles.css" type="text/css" media="screen" />'; |
77 |
// surcharge CSS hack for IE
|
78 |
echo "<!--[if lte IE 6]>" ; |
79 |
echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/styles_ie.css' type='text/css' media='screen' >\n"; |
80 |
echo "<![endif]-->"; |
81 |
echo "<script type=\"text/javascript\"><!--document.getElementById('var_login_name').focus();--></script>"; |
82 |
|
83 |
echo "</head>"; |
84 |
|
85 |
// Body with configured stuff
|
86 |
//ryxeo
|
87 |
echo "<body>"; |
88 |
|
89 |
echo " <div id=\"page\"> |
90 |
<div id=\"top\">
|
91 |
<a href=\"/index\"
|
92 |
title=\"Retouner directement à la page d'accueil\"
|
93 |
id=\"link_home\"><h1>AbulÉdu.net</h1></a>
|
94 |
</div>
|
95 |
<div id=\"navbar\">
|
96 |
<ul>
|
97 |
<li><a href=\"http://www.abuledu.org\" id=\"navbar_www\" title=\"Le projet AbulÉdu\" class=\"ttip\">AbulÉdu</a></li>
|
98 |
<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>
|
99 |
<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>
|
100 |
<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>
|
101 |
|
102 |
<li><a href=\"http://forum.abuledu.org/\" id=\"navbar_forum\" title=\"Les forums\" class=\"ttip\">Forums</a></li>
|
103 |
<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>
|
104 |
<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>
|
105 |
<li id=\"active\"><a href=\"http://support.abuledu.net/\" id=\"navbar_anet\" title=\"Support.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>
|
106 |
<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>
|
107 |
</ul>
|
108 |
<p> </p>
|
109 |
</div>
|
110 |
|
111 |
<div id=\"navigation\">
|
112 |
<div id=\"navWiki\">
|
113 |
<h2>Liens rapides</h2>
|
114 |
<ul>
|
115 |
<li><a href=\"http://support.abuledu.net/epack/new\">Enregistrement d'un epack</a></li>
|
116 |
<li><a href=\"http://support.abuledu.net/epack/commande\">Accès grossistes</a></li>
|
117 |
<li><a href=\"https://secure.ryxeo.com/glpi/index2.php\">Accès partenaires</a></li>
|
118 |
<li><a href=\"/forget.php\">Demander un mot de passe</a></li>
|
119 |
</ul>
|
120 |
</div>
|
121 |
<div id=\"nav_connexion\">
|
122 |
<h2>Connexion</h2>
|
123 |
<div id=\"user_top_bar\">
|
124 |
<div id=\"box_unlogged\" class=\"identification_box\">
|
125 |
<li><a href=\"http://support.abuledu.net/aide.pdf\">Aide AbulEdu.NET 2009</a></li>
|
126 |
</div>
|
127 |
</div>
|
128 |
</div>
|
129 |
</div>
|
130 |
<div id=\"main\">\n";
|
131 |
|
132 |
|
133 |
// contenu
|
134 |
echo "<div id='contenulogin'>"; |
135 |
|
136 |
echo "<div id='logo-login'>"; |
137 |
|
138 |
echo nl2br(unclean_cross_side_scripting_deep($CFG_GLPI['text_login'])); |
139 |
|
140 |
echo "</div>"; |
141 |
|
142 |
echo "<div id='boxlogin'>"; |
143 |
|
144 |
echo "<form action='login.php' method='post'>"; |
145 |
|
146 |
// Other CAS
|
147 |
if (isset($_GET["noAUTO"])) { |
148 |
echo "<input type='hidden' name='noAUTO' value='1' />"; |
149 |
} |
150 |
|
151 |
// redirect to tracking
|
152 |
if (isset($_GET["redirect"])){ |
153 |
manageRedirect($_GET["redirect"]); |
154 |
echo '<input type="hidden" name="redirect" value="'.$_GET['redirect'].'">'; |
155 |
} |
156 |
|
157 |
echo "<fieldset>"; |
158 |
echo '<legend>'.$LANG["login"][10].'</legend>'; |
159 |
|
160 |
|
161 |
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>'; |
162 |
|
163 |
|
164 |
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>'; |
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
echo "</fieldset>"; |
171 |
echo '<p ><span> <input type="submit" name="submit" value="'.$LANG["buttons"][2].'" class="submit" /></span></p>'; |
172 |
echo "</form>"; |
173 |
|
174 |
echo "<script type='text/javascript' >\n"; |
175 |
echo "document.getElementById('login_name').focus();"; |
176 |
echo "</script>"; |
177 |
|
178 |
echo "<p><a href=\"forget.php\">Mot de passe oublié ?</a></p>"; |
179 |
echo "</div>"; // fin box login |
180 |
|
181 |
|
182 |
|
183 |
echo "<div class='error'>"; |
184 |
echo "<noscript><p>"; |
185 |
echo $LANG["login"][26]; |
186 |
echo "</p></noscript>"; |
187 |
if (isset($_GET['error'])){ |
188 |
switch ($_GET['error']){ |
189 |
case 1 : // cookie error |
190 |
echo $LANG["login"][27]; |
191 |
break;
|
192 |
case 2 : // GLPI_SESSION_DIR not writable |
193 |
echo $LANG["install"][50].": ".GLPI_SESSION_DIR; |
194 |
break;
|
195 |
} |
196 |
} |
197 |
echo "</div>"; |
198 |
|
199 |
|
200 |
// Affichage autorisee FAQ
|
201 |
if ($CFG_GLPI["public_faq"]){ |
202 |
echo '<div id="box-faq"><a href="front/helpdesk.faq.php">[ '.$LANG["knowbase"][24].' ]</a></div>'; |
203 |
} |
204 |
|
205 |
|
206 |
echo "</div>"; // fin contenu login |
207 |
|
208 |
if ($CFG_GLPI["debug"]==DEMO_MODE){ |
209 |
echo "<div align='center'"; |
210 |
|
211 |
$query="SELECT count(*) |
212 |
FROM `glpi_event_log`
|
213 |
WHERE message LIKE '%logged in%'";
|
214 |
|
215 |
$query2="SELECT date |
216 |
FROM `glpi_event_log`
|
217 |
ORDER BY date ASC
|
218 |
LIMIT 1";
|
219 |
|
220 |
$DB=new DB; |
221 |
$result=$DB->query($query); |
222 |
$result2=$DB->query($query2); |
223 |
$nb_login=$DB->result($result,0,0); |
224 |
$date=$DB->result($result2,0,0); |
225 |
|
226 |
echo '<b>'.$nb_login.'</b> logins since '.$date ; |
227 |
|
228 |
echo "</div>"; |
229 |
} |
230 |
|
231 |
echo "<div id='footer-login'>"; |
232 |
echo "<a href=\"http://glpi-project.org/\" title=\"Powered By Indepnet\" >"; |
233 |
echo 'GLPI version '.(isset($CFG_GLPI["version"])?$CFG_GLPI["version"]:"").' Copyright (C) 2003-'.date("Y").' INDEPNET Development Team.'; |
234 |
echo "</a>"; |
235 |
echo "</div>"; |
236 |
|
237 |
} |
238 |
// Appel de cron
|
239 |
if ($CFG_GLPI["debug"]!=DEMO_MODE){ |
240 |
callCron(); |
241 |
} |
242 |
|
243 |
//ryxeo
|
244 |
echo " </div> |
245 |
<p id=\"footer\">
|
246 |
<a id=\"ryxeo\" href=\"http://www.ryxeo.com\">
|
247 |
<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/abuledu/logo_ryxeo.png\" alt=\"Hébergé par RyXeo\"/> |
248 |
</a>
|
249 |
<!--
|
250 |
accueil.txt · Dernière modification: 2007/06/07 19:46 par bafriss · -->
|
251 |
|
252 |
<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>
|
253 |
- Propulsé par AbulEdu.NET
|
254 |
</div>
|
255 |
</div>
|
256 |
";
|
257 |
|
258 |
echo "</body></html>"; |
259 |
|
260 |
// End
|
261 |
|
262 |
|
263 |
?>
|