ryxeo-glpi-git / front / tracking.php @ b67d8923
Historique | Voir | Annoter | Télécharger (7,18 ko)
1 | b67d8923 | Eric Seigne | <?php
|
---|---|---|---|
2 | /*
|
||
3 | * @version $Id: tracking.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("user","group","tracking","computer","printer","monitor","peripheral","networking","software","enterprise","phone","document"); |
||
38 | include (GLPI_ROOT . "/inc/includes.php"); |
||
39 | |||
40 | checkCentralAccess(); |
||
41 | |||
42 | commonHeader($LANG["title"][10],$_SERVER['PHP_SELF'],"maintain","tracking"); |
||
43 | |||
44 | |||
45 | if (isset($_GET['reset'])&&$_GET['reset']=="reset_before") { |
||
46 | unset($_SESSION['tracking']); |
||
47 | unset($_GET['reset']); |
||
48 | } |
||
49 | |||
50 | if (!isset($_GET['reset'])){ |
||
51 | if (is_array($_GET)) |
||
52 | foreach ($_GET as $key => $val) |
||
53 | if ($key[0]!='_') |
||
54 | $_SESSION['tracking'][$key]=$val; |
||
55 | } |
||
56 | if (isset($_GET['reset'])) unset($_SESSION['tracking']); |
||
57 | |||
58 | if (isset($_SESSION['tracking'])&&is_array($_SESSION['tracking'])) |
||
59 | foreach ($_SESSION['tracking'] as $key => $val) |
||
60 | if (!isset($_GET[$key])) $_GET[$key]=$val; |
||
61 | |||
62 | if (!isset($_GET["sort"])||isset($_GET['reset'])) $_GET["sort"]=""; |
||
63 | if (!isset($_GET["order"])||isset($_GET['reset'])) $_GET["order"]=""; |
||
64 | if (!isset($_GET["start"])||isset($_GET['reset'])) $_GET["start"]=0; |
||
65 | if (!isset($_GET["priority"])||isset($_GET['reset'])) $_GET["priority"]=0; |
||
66 | if (!isset($_GET["tosearch"])||isset($_GET['reset'])) $_GET["tosearch"]="name_contents"; |
||
67 | if (!isset($_GET["search"])||isset($_GET['reset'])) $_GET["search"]=""; |
||
68 | if (!isset($_GET["author"])||isset($_GET['reset'])) $_GET["author"]=0; |
||
69 | if (!isset($_GET["group"])||isset($_GET['reset'])) $_GET["group"]=0; |
||
70 | if (!isset($_GET["assign"])||isset($_GET['reset'])) $_GET["assign"]=0; |
||
71 | if (!isset($_GET["assign_ent"])||isset($_GET['reset'])) $_GET["assign_ent"]=0; |
||
72 | if (!isset($_GET["assign_group"])||isset($_GET['reset'])) $_GET["assign_group"]=0; |
||
73 | if (!isset($_GET["category"])||isset($_GET['reset'])) $_GET["category"]=""; |
||
74 | |||
75 | if (!isset($_GET["status"])||isset($_GET['reset'])) { |
||
76 | // Limited case
|
||
77 | if (!haveRight("show_all_ticket","1")){ |
||
78 | $_GET["status"]="all"; |
||
79 | } else {
|
||
80 | $_GET["status"]="notold"; |
||
81 | } |
||
82 | } |
||
83 | |||
84 | if (!isset($_GET["showfollowups"])||isset($_GET['reset'])) $_GET["showfollowups"]=0; |
||
85 | if (!isset($_GET["item"])||isset($_GET['reset'])) $_GET["item"]=0; |
||
86 | if (!isset($_GET["type"])||isset($_GET['reset'])) $_GET["type"]=0; |
||
87 | if (!isset($_GET["request_type"])||isset($_GET['reset'])) $_GET["request_type"]=0; |
||
88 | |||
89 | if (!isset($_GET["extended"])) $_GET["extended"]=0; |
||
90 | |||
91 | if (!isset($_GET["contains"])||isset($_GET['reset'])) $_GET["contains"]=""; |
||
92 | if (!isset($_GET["contains3"])||isset($_GET['reset'])) $_GET["contains3"]=""; |
||
93 | if (!isset($_GET["date1"])||isset($_GET['reset'])) $_GET["date1"]="0000-00-00"; |
||
94 | if (!isset($_GET["enddate1"])||isset($_GET['reset'])) $_GET["enddate1"]="0000-00-00"; |
||
95 | if (!isset($_GET["datemod1"])||isset($_GET['reset'])) $_GET["datemod1"]="0000-00-00"; |
||
96 | if (!isset($_GET["date2"])||isset($_GET['reset'])) $_GET["date2"]="0000-00-00"; |
||
97 | if (!isset($_GET["enddate2"])||isset($_GET['reset'])) $_GET["enddate2"]="0000-00-00"; |
||
98 | if (!isset($_GET["datemod2"])||isset($_GET['reset'])) $_GET["datemod2"]="0000-00-00"; |
||
99 | if (!isset($_GET["field"])||isset($_GET['reset'])) $_GET["field"]=""; |
||
100 | if (!isset($_GET["only_computers"])||isset($_GET['reset'])) $_GET["only_computers"] = ""; |
||
101 | if (!isset($_GET["recipient"])||isset($_GET['reset'])) $_GET["recipient"]=0; |
||
102 | |||
103 | |||
104 | if ($_GET["date1"]!="0000-00-00"&&$_GET["date2"]!="0000-00-00"&&strcmp($_GET["date2"],$_GET["date1"])<0){ |
||
105 | $tmp=$_GET["date1"]; |
||
106 | $_GET["date1"]=$_GET["date2"]; |
||
107 | $_GET["date2"]=$tmp; |
||
108 | } |
||
109 | |||
110 | if ($_GET["enddate1"]!="0000-00-00"&&$_GET["enddate2"]!="0000-00-00"&&strcmp($_GET["enddate2"],$_GET["enddate1"])<0){ |
||
111 | $tmp=$_GET["enddate1"]; |
||
112 | $_GET["enddate1"]=$_GET["enddate2"]; |
||
113 | $_GET["enddate2"]=$tmp; |
||
114 | } |
||
115 | |||
116 | if (!haveRight("show_all_ticket","1")&&!haveRight("show_assign_ticket",'1')){ |
||
117 | searchSimpleFormTracking($_GET["extended"],$_SERVER['PHP_SELF'],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["group"],$_GET["showfollowups"],$_GET["category"]); |
||
118 | showTrackingList($_SERVER['PHP_SELF'],$_GET["start"],$_GET["sort"],$_GET["order"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_SESSION["glpiID"],$_GET["group"],$_GET["showfollowups"],$_GET["category"]); |
||
119 | } else {
|
||
120 | // show_assign_case
|
||
121 | if (!haveRight("show_all_ticket","1")){ |
||
122 | $_GET["assign"]='mine'; |
||
123 | $_GET["assign_ent"]=0; |
||
124 | // Only one group : no choice
|
||
125 | if ($_SESSION['glpigroups']<=1){ |
||
126 | $_GET["assign_group"]=0; |
||
127 | } |
||
128 | } |
||
129 | if (!$_GET["extended"]){ |
||
130 | searchFormTracking($_GET["extended"],$_SERVER['PHP_SELF'],$_GET["start"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["author"],$_GET["group"],$_GET["showfollowups"],$_GET["category"],$_GET["assign"],$_GET["assign_ent"],$_GET["assign_group"],$_GET["priority"],$_GET["request_type"],$_GET["item"],$_GET["type"]); |
||
131 | } else {
|
||
132 | searchFormTracking($_GET["extended"],$_SERVER['PHP_SELF'],$_GET["start"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["author"],$_GET["group"],$_GET["showfollowups"],$_GET["category"],$_GET["assign"],$_GET["assign_ent"],$_GET["assign_group"],$_GET["priority"],$_GET["request_type"],$_GET["item"],$_GET["type"],$_GET["field"],$_GET["contains"],$_GET["date1"],$_GET["date2"],$_GET["only_computers"],$_GET["enddate1"],$_GET["enddate2"],$_GET["datemod1"],$_GET["datemod2"],$_GET["recipient"]); |
||
133 | } |
||
134 | |||
135 | if (!$_GET["extended"]){ |
||
136 | showTrackingList($_SERVER['PHP_SELF'],$_GET["start"],$_GET["sort"],$_GET["order"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["author"],$_GET["group"],$_GET["showfollowups"],$_GET["category"],$_GET["assign"],$_GET["assign_ent"],$_GET["assign_group"],$_GET["priority"],$_GET["request_type"],$_GET["item"],$_GET["type"]); |
||
137 | } else {
|
||
138 | showTrackingList($_SERVER['PHP_SELF'],$_GET["start"],$_GET["sort"],$_GET["order"],$_GET["status"],$_GET["tosearch"],$_GET["search"],$_GET["author"],$_GET["group"],$_GET["showfollowups"],$_GET["category"],$_GET["assign"],$_GET["assign_ent"],$_GET["assign_group"],$_GET["priority"],$_GET["request_type"],$_GET["item"],$_GET["type"],$_GET["field"],$_GET["contains"],$_GET["date1"],$_GET["date2"],$_GET["only_computers"],$_GET["enddate1"],$_GET["enddate2"],$_GET["datemod1"],$_GET["datemod2"],$_GET["recipient"]); |
||
139 | } |
||
140 | } |
||
141 | |||
142 | commonFooter(); |
||
143 | ?> |