Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / index_travaux.php @ b67d8923

Historique | Voir | Annoter | Télécharger (6,02 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
// 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>GLPI 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
        echo '<link rel="shortcut icon" type="images/x-icon" href="'.$CFG_GLPI["root_doc"].'/pics/favicon.ico" />';
69

    
70
        // Appel CSS
71
        echo '<link rel="stylesheet"  href="'.$CFG_GLPI["root_doc"].'/css/styles.css" type="text/css" media="screen" />';
72
        // surcharge CSS hack for IE 
73
        echo "<!--[if lte IE 6]>" ; 
74
        echo "<link rel='stylesheet' href='".$CFG_GLPI["root_doc"]."/css/styles_ie.css' type='text/css' media='screen' >\n"; 
75
        echo "<![endif]-->";
76
        echo "<script type=\"text/javascript\"><!--document.getElementById('var_login_name').focus();--></script>";
77

    
78
        echo "</head>";
79

    
80
        // Body with configured stuff
81
        echo "<body>";
82
        // contenu
83

    
84
echo "
85

86
<p style=\"margin-left: 50px; font-size: 18pt\">Site web en cours de maintenance ...</p>
87

88
<div style=\"position: absolute; top: 0px; left: 50px; height: 388px; width: 398px; margin-top:100px;margin-left: auto;margin-right: auto;background:url('pics/maintenance.gif')  no-repeat;\"></div>
89

90
";
91

    
92
/*
93
        echo "<div id='contenulogin'>";
94
        
95
        echo "<div id='logo-login'>";
96

97
        echo nl2br(unclean_cross_side_scripting_deep($CFG_GLPI['text_login']));
98

99
        
100
        echo "</div>";
101

102
        echo "<div id='boxlogin'>";
103

104
        echo "<form action='login.php' method='post'>";
105

106
        // Other CAS 
107
        if (isset($_GET["noAUTO"])) {
108
                echo "<input type='hidden' name='noAUTO' value='1' />";
109
        }
110

111
        // redirect to tracking
112
        if (isset($_GET["redirect"])){
113
                manageRedirect($_GET["redirect"]);
114
                echo '<input type="hidden" name="redirect" value="'.$_GET['redirect'].'">';
115
        }
116

117
        echo "<fieldset>";
118
        echo '<legend>'.$LANG["login"][10].'</legend>';
119

120

121
        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>';
122

123

124
        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>';
125

126

127

128
        echo "</fieldset>";
129
        echo '<p ><span> <input type="submit" name="submit" value="'.$LANG["buttons"][2].'" class="submit" /></span></p>';
130
        echo "</form>";
131

132
        echo "<script type='text/javascript' >\n";
133
        echo "document.getElementById('login_name').focus();";
134
        echo "</script>";
135

136
        echo "<p><a href=\"forget.php\">Mot de passe oublié ?</a></p>";
137
        echo "</div>";  // fin box login
138

139

140

141
        echo "<div class='error'>";
142
        echo "<noscript><p>";
143
        echo $LANG["login"][26];
144
        echo "</p></noscript>";
145
        if (isset($_GET['error'])){
146
                switch ($_GET['error']){
147
                        case 1 : // cookie error
148
                                echo $LANG["login"][27];
149
                                break;
150
                        case 2 : // GLPI_SESSION_DIR not writable
151
                                echo $LANG["install"][50].": ".GLPI_SESSION_DIR;
152
                                break;
153
                }
154
        }
155
        echo "</div>";
156

157

158
        // Affichage autorisee FAQ
159
        if ($CFG_GLPI["public_faq"]){
160
                echo '<div id="box-faq"><a href="front/helpdesk.faq.php">[ '.$LANG["knowbase"][24].' ]</a></div>';
161
        }
162
        
163

164
        echo "</div>"; // fin contenu login
165

166
        if ($CFG_GLPI["debug"]==DEMO_MODE){
167
                echo "<div align='center'";
168

169
                $query="SELECT count(*) 
170
                        FROM `glpi_event_log` 
171
                        WHERE message LIKE '%logged in%'";
172

173
                $query2="SELECT date 
174
                        FROM `glpi_event_log` 
175
                        ORDER BY date ASC 
176
                        LIMIT 1";
177

178
                $DB=new DB;
179
                $result=$DB->query($query);
180
                $result2=$DB->query($query2);
181
                $nb_login=$DB->result($result,0,0);
182
                $date=$DB->result($result2,0,0);
183

184
                echo '<b>'.$nb_login.'</b> logins since '.$date ;
185

186
                echo "</div>";
187
        }
188

189

190
        echo "<div id='footer-login'>";
191
        echo "<a href=\"http://glpi-project.org/\" title=\"Powered By Indepnet\"  >";
192
        echo 'GLPI version '.(isset($CFG_GLPI["version"])?$CFG_GLPI["version"]:"").' Copyright (C) 2003-'.date("Y").' INDEPNET Development Team.';
193
        echo "</a>";
194
        echo "</div>";
195

196
*/
197

    
198
}
199
// Appel de cron
200
if ($CFG_GLPI["debug"]!=DEMO_MODE){
201
        callCron();
202
}
203

    
204

    
205
echo "</body></html>";
206

    
207
// End
208

    
209

    
210
?>
Redmine Appliance - Powered by TurnKey Linux