Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / htdocs / front / central.php @ 1c14bcc4

Historique | Voir | Annoter | Télécharger (4,02 ko)

1
<?php
2
/*
3
 * @version $Id: central.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
define('GLPI_ROOT', '..');
37
$NEEDED_ITEMS=array("central","tracking","computer","printer","monitor","peripheral","networking","software","user","group","setup","planning","phone","reminder","enterprise","contract");
38
include (GLPI_ROOT."/inc/includes.php");
39

    
40

    
41
        checkCentralAccess();
42
        // Change profile system
43
        if (isset ($_POST['newprofile'])) {
44
                if (isset ($_SESSION["glpiprofiles"][$_POST['newprofile']])) {
45
                        changeProfile($_POST['newprofile']);
46
                        if ($_SESSION["glpiactiveprofile"]["interface"]=="helpdesk"){
47
                                //ryxeo patch
48
                                glpi_header($CFG_GLPI['root_doc']."/front/helpdesk.abuledu_details.php");
49
                        } else {
50
                                glpi_header($_SERVER['PHP_SELF']);
51
                        }
52
                } else {
53
                        glpi_header(preg_replace("/FK_entities.*/","",$_SERVER['HTTP_REFERER']));
54
                }
55
        }
56
        // Manage entity change
57
        if (isset($_GET["active_entity"])){
58
                if (!isset($_GET["recursive"])) {
59
                        $_GET["recursive"]=0;
60
                }
61
                changeActiveEntities($_GET["active_entity"],$_GET["recursive"]);
62
                if ($_GET["active_entity"]==$_SESSION["glpiactive_entity"]){
63
                        glpi_header(preg_replace("/FK_entities.*/","",$_SERVER['HTTP_REFERER']));
64
                }
65
        }
66

    
67
        commonHeader($LANG["title"][0],$_SERVER['PHP_SELF']);
68

    
69
        // Redirect management
70
        if (isset($_GET["redirect"])){
71
                manageRedirect($_GET["redirect"]);
72
        }
73

    
74
        // show "my view" in first
75
        if (!isset($_SESSION['glpi_viewcentral'])) $_SESSION['glpi_viewcentral']="my";
76
        if (isset($_GET['onglet'])) $_SESSION['glpi_viewcentral']=$_GET['onglet'];
77
        
78
        if (!isset($_GET['start'])) $_GET['start']=0;
79
        if(empty($_GET["start"])) $_GET["start"] = 0;
80

    
81
        if (!isset($_GET["sort"])) $_GET["sort"]="";
82
        if (!isset($_GET["order"])) $_GET["order"]="";
83

    
84
        // Greet the user
85

    
86
        echo "<br><span class='icon_consol'>".$LANG["central"][0]." ";
87

    
88
        echo formatUserName($_SESSION["glpiID"],$_SESSION["glpiname"],$_SESSION["glpirealname"],$_SESSION["glpifirstname"]);
89
        echo ", ".$LANG["central"][1]."</span>";
90

    
91
        echo "<br><br>";
92
        showCentralOnglets($_SERVER['PHP_SELF'],$_SESSION['glpi_viewcentral']);
93

    
94
        switch ($_SESSION['glpi_viewcentral']){
95
                case "global" :
96
                        showCentralGlobalView();
97
                        break;
98
                case "group" :
99
                        showCentralGroupView();
100
                        break;
101
                case "plugins" :
102
                        
103
                        echo "<table class='tab_cadre_central' ><tr><td>";
104
                
105
                        doHook("central_action");
106
                        echo "</td></tr>";
107
                
108
                        echo "</table>";
109
                        
110
                        break;
111
                case "all":
112
                        showCentralMyView();
113
                        echo "<br>";
114
                        showCentralGroupView();
115
                        echo "<br>";
116
                        showCentralGlobalView();
117
                        echo "<br>";
118
                        if (isset($PLUGIN_HOOKS['central_action'])&&count($PLUGIN_HOOKS['central_action'])){
119
                                
120
                                echo "<table class='tab_cadre_central' ><tr><td>";
121
                        
122
                                doHook("central_action");
123
                                echo "</td></tr>";
124
                        
125
                                echo "</table>";
126
                                
127
                        }
128

    
129
                        break;
130
                default :
131
                        showCentralMyView();
132
                        break;
133
        }
134

    
135

    
136

    
137

    
138
commonFooter();
139

    
140
?>
Redmine Appliance - Powered by TurnKey Linux