Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / htdocs / front / helpdesk.public.php @ 2002e233

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

1
<?php
2
/*
3
 * @version $Id: helpdesk.public.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

    
37

    
38
$NEEDED_ITEMS=array("user","tracking","reservation","document","knowbase","computer","printer","networking","peripheral","monitor","software","infocom","phone","enterprise","group");
39

    
40
define('GLPI_ROOT', '..');
41
include (GLPI_ROOT . "/inc/includes.php");
42

    
43
        // Change profile system
44
        if (isset ($_POST['newprofile'])) {
45
                if (isset ($_SESSION["glpiprofiles"][$_POST['newprofile']])) {
46
                        changeProfile($_POST['newprofile']);
47
                        if ($_SESSION["glpiactiveprofile"]["interface"]=="central"){
48
                                glpi_header($CFG_GLPI['root_doc']."/front/central.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

    
57
        // Manage entity change
58
        if (isset($_GET["active_entity"])){
59
                if (!isset($_GET["recursive"])) {
60
                        $_GET["recursive"]=0;
61
                }
62
                changeActiveEntities($_GET["active_entity"],$_GET["recursive"]);
63
                if ($_GET["active_entity"]==$_SESSION["glpiactive_entity"]){
64
                        glpi_header(preg_replace("/FK_entities.*/","",$_SERVER['HTTP_REFERER']));
65
                }
66
        }
67

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

    
73
if (isset($_GET["show"]) && strcmp($_GET["show"],"user") == 0)
74
{
75

    
76
        checkHelpdeskAccess();
77
        //*******************
78
        // Affichage interventions en cours
79
        //******************
80
        if (isset($_POST['add'])&&haveRight("comment_ticket","1")) {
81
                $fup=new Followup();
82
                $newID=$fup->add($_POST);
83

    
84
                logEvent($_POST["tracking"], "tracking", 4, "tracking", $_SESSION["glpiname"]." ".$LANG["log"][20]." $newID.");
85
                glpi_header($_SERVER['HTTP_REFERER']);
86

    
87
        }        
88
        if (!isset($_GET["start"])) $_GET["start"]=0;
89

    
90
        helpHeader($LANG["title"][1],$_SERVER['PHP_SELF'],$_SESSION["glpiname"]);
91

    
92
        if (!isset($_GET["ID"])) {
93
                if (!isset($_GET["start"])) $_GET["start"]=0;
94
                if (!isset($_GET["status"])) $_GET["status"]="all";
95
                if (!isset($_GET["sort"])) $_GET["sort"]="glpi_tracking.status";
96
                if (!isset($_GET["search"])) $_GET["search"]="";
97
                if (!isset($_GET["tosearch"])) $_GET["tosearch"]="name_contents";
98
                if (!isset($_GET["order"])) $_GET["order"]="ASC";
99
                if (!isset($_GET["group"])) $_GET["group"]=0;
100
                if (!isset($_GET["category"])) $_GET["category"]=0;
101
                if (!isset($_GET["showfollowups"])) $_GET["showfollowups"]=0;
102
                if (!isset($_GET["extended"])) $_GET["extended"]=0;
103

    
104
                searchSimpleFormTracking($_GET["extended"],$_SERVER['PHP_SELF'],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["group"],$_GET["showfollowups"],$_GET["category"]);
105
                showTrackingList($_SERVER['PHP_SELF'],$_GET["start"],$_GET["sort"],$_GET["order"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_SESSION["glpiID"],$_GET["group"],$_GET["showfollowups"],$_GET["category"]);
106
        }
107
        else {
108
                if (isset($_POST["update"])){
109
                        $track=new Job();
110
                        $track->update($_POST);
111
                        glpi_header($_SERVER['PHP_SELF']."?show=user&ID=".$_POST["ID"]);
112
                }
113

    
114
                if (showJobDetails($_SERVER['PHP_SELF']."?show=user&ID=".$_GET["ID"],$_GET["ID"]))
115
                        showFollowupsSummary($_GET["ID"]);
116
        }
117
}
118

    
119
//*******************
120
// fin  Affichage Module r�ervation 
121
//*******************
122

    
123

    
124
else {
125
        checkHelpdeskAccess();
126
        helpHeader($LANG["title"][1],$_SERVER['PHP_SELF'],$_SESSION["glpiname"]);
127

    
128
        printHelpDesk($_SESSION["glpiID"],1);
129
}
130

    
131
helpFooter();
132

    
133
?>
Redmine Appliance - Powered by TurnKey Linux