Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / front / central.php @ b67d8923

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

1
<?php
2
//ryxeo drop to new main page
3
header('Location: /glpi/plugins/anet_epacks/front/plugin_anet_epacks.view_array_recap.php');
4

    
5
/*
6
 * @version $Id: central.php 7763 2009-01-06 18:44:50Z moyo $
7
 -------------------------------------------------------------------------
8
 GLPI - Gestionnaire Libre de Parc Informatique
9
 Copyright (C) 2003-2009 by the INDEPNET Development Team.
10

11
 http://indepnet.net/   http://glpi-project.org
12
 -------------------------------------------------------------------------
13

14
 LICENSE
15

16
 This file is part of GLPI.
17

18
 GLPI is free software; you can redistribute it and/or modify
19
 it under the terms of the GNU General Public License as published by
20
 the Free Software Foundation; either version 2 of the License, or
21
 (at your option) any later version.
22

23
 GLPI is distributed in the hope that it will be useful,
24
 but WITHOUT ANY WARRANTY; without even the implied warranty of
25
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26
 GNU General Public License for more details.
27

28
 You should have received a copy of the GNU General Public License
29
 along with GLPI; if not, write to the Free Software
30
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
31
 --------------------------------------------------------------------------
32
 */
33

    
34
// ----------------------------------------------------------------------
35
// Original Author of file:
36
// Purpose of file:
37
// ----------------------------------------------------------------------
38

    
39
define('GLPI_ROOT', '..');
40
$NEEDED_ITEMS=array("central","tracking","computer","printer","monitor","peripheral","networking","software","user","group","setup","planning","phone","reminder","enterprise","contract");
41
include (GLPI_ROOT."/inc/includes.php");
42

    
43

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

    
69
        commonHeader($LANG["title"][0],$_SERVER['PHP_SELF']);
70

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

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

    
83
        if (!isset($_GET["sort"])) $_GET["sort"]="";
84
        if (!isset($_GET["order"])) $_GET["order"]="";
85

    
86
        // Greet the user
87

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

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

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

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

    
131
                        break;
132
                default :
133
                        showCentralMyView();
134
                        break;
135
        }
136

    
137

    
138

    
139

    
140
commonFooter();
141

    
142
?>
Redmine Appliance - Powered by TurnKey Linux