ryxeo-glpi-git / front / ocsng.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,27 ko)
1 |
<?php
|
---|---|
2 |
|
3 |
/*
|
4 |
* @version $Id: ocsng.php 7875 2009-01-23 15:16:47Z moyo $
|
5 |
-------------------------------------------------------------------------
|
6 |
GLPI - Gestionnaire Libre de Parc Informatique
|
7 |
Copyright (C) 2003-2009 by the INDEPNET Development Team.
|
8 |
|
9 |
http://indepnet.net/ http://glpi-project.org
|
10 |
-------------------------------------------------------------------------
|
11 |
|
12 |
LICENSE
|
13 |
|
14 |
This file is part of GLPI.
|
15 |
|
16 |
GLPI is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
18 |
the Free Software Foundation; either version 2 of the License, or
|
19 |
(at your option) any later version.
|
20 |
|
21 |
GLPI is distributed in the hope that it will be useful,
|
22 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
GNU General Public License for more details.
|
25 |
|
26 |
You should have received a copy of the GNU General Public License
|
27 |
along with GLPI; if not, write to the Free Software
|
28 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
29 |
--------------------------------------------------------------------------
|
30 |
*/
|
31 |
|
32 |
// ----------------------------------------------------------------------
|
33 |
// Original Author of file:
|
34 |
// Purpose of file:
|
35 |
// ----------------------------------------------------------------------
|
36 |
|
37 |
$NEEDED_ITEMS = array ( |
38 |
"ocsng",
|
39 |
"computer",
|
40 |
"device",
|
41 |
"printer",
|
42 |
"networking",
|
43 |
"peripheral",
|
44 |
"monitor",
|
45 |
"software",
|
46 |
"infocom",
|
47 |
"phone",
|
48 |
"tracking",
|
49 |
"enterprise",
|
50 |
"setup",
|
51 |
"admininfo"
|
52 |
); |
53 |
|
54 |
define('GLPI_ROOT', '..'); |
55 |
include (GLPI_ROOT . "/inc/includes.php"); |
56 |
|
57 |
checkRight("ocsng", "w"); |
58 |
|
59 |
commonHeader($LANG["ocsng"][0], $_SERVER['PHP_SELF'], "utils","ocsng"); |
60 |
if (isset ($_SESSION["ocs_import"])) |
61 |
unset ($_SESSION["ocs_import"]); |
62 |
if (isset ($_SESSION["ocs_link"])) |
63 |
unset ($_SESSION["ocs_link"]); |
64 |
if (isset ($_SESSION["ocs_update"])) |
65 |
unset ($_SESSION["ocs_update"]); |
66 |
|
67 |
if (isset($_GET["ocs_server_id"]) && $_GET["ocs_server_id"]) { |
68 |
$name = ""; |
69 |
if (isset($_GET["ocs_server_id"])) |
70 |
$_SESSION["ocs_server_id"] = $_GET["ocs_server_id"]; |
71 |
|
72 |
$sql = "SELECT name from glpi_ocs_config where ID='" . $_SESSION["ocs_server_id"]."'"; |
73 |
$result = $DB->query($sql); |
74 |
if ($DB->numrows($result) > 0) { |
75 |
$datas = $DB->fetch_array($result); |
76 |
$name = " : " . $datas["name"]; |
77 |
} |
78 |
echo "<div align='center'><table border='0'><tr><td>"; |
79 |
echo "<img src=\"" . $CFG_GLPI["root_doc"] . "/pics/logoOcs.png\" alt='" . $LANG["ocsng"][0] . "' title='" . $LANG["ocsng"][0] . "' ></td>"; |
80 |
echo "</tr></table></div>"; |
81 |
|
82 |
echo "<div align='center'><table class='tab_cadre' cellpadding='5'>"; |
83 |
echo "<tr><th>" . $LANG["ocsng"][0] . " " . $name . "</th></tr>"; |
84 |
|
85 |
echo "<tr class='tab_bg_1'><td align='center'><a href=\"ocsng.sync.php\"><b>" . $LANG["ocsng"][1] . "</b></a></td></tr>"; |
86 |
|
87 |
echo "<tr class='tab_bg_1'><td align='center'><a href=\"ocsng.import.php\"><b>" . $LANG["ocsng"][2] . "</b></a></td> </tr>"; |
88 |
|
89 |
echo "<tr class='tab_bg_1'><td align='center'><a href=\"ocsng.link.php\"><b>" . $LANG["ocsng"][4] . "</b></a></td> </tr>"; |
90 |
|
91 |
echo "<tr class='tab_bg_1'><td align='center'><a href=\"ocsng.clean.php\"><b>" . $LANG["ocsng"][3] . "</b></a></td> </tr>"; |
92 |
|
93 |
echo "</table></div>"; |
94 |
|
95 |
ocsManageDeleted($_SESSION["ocs_server_id"]); |
96 |
} else {
|
97 |
ocsChooseServer($_SERVER['PHP_SELF']); |
98 |
} |
99 |
commonFooter(); |
100 |
?>
|