ryxeo-glpi-git / front / tracking.form.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,56 ko)
1 | b67d8923 | Eric Seigne | <?php
|
---|---|---|---|
2 | /*
|
||
3 | * @version $Id: tracking.form.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("group","user","planning","tracking","computer","printer","monitor","peripheral","networking","software","enterprise","phone","document","mailing"); |
||
38 | include (GLPI_ROOT . "/inc/includes.php"); |
||
39 | |||
40 | checkCentralAccess(); |
||
41 | |||
42 | |||
43 | $fup=new Followup(); |
||
44 | $track=new Job(); |
||
45 | |||
46 | commonHeader($LANG["title"][10],$_SERVER['PHP_SELF'],"maintain","tracking"); |
||
47 | if (isset($_POST['update'])){ |
||
48 | checkSeveralRightsOr(array("update_ticket"=>"1","assign_ticket"=>"1","steal_ticket"=>"1","comment_ticket"=>"1","comment_all_ticket"=>"1")); |
||
49 | |||
50 | $track->update($_POST); |
||
51 | logEvent($_POST["ID"], "tracking", 4, "tracking", $_SESSION["glpiname"]." ".$LANG["log"][21]); |
||
52 | |||
53 | glpi_header($CFG_GLPI["root_doc"]."/front/tracking.form.php?ID=".$_POST["ID"]); |
||
54 | |||
55 | |||
56 | }else if (isset($_POST['add'])||isset($_POST['add_close'])) { |
||
57 | checkSeveralRightsOr(array("comment_ticket"=>"1","comment_all_ticket"=>"1","show_assign_ticket"=>"1")); |
||
58 | $newID=$fup->add($_POST); |
||
59 | |||
60 | logEvent($_POST["tracking"], "tracking", 4, "tracking", $_SESSION["glpiname"]." ".$LANG["log"][20]." $newID."); |
||
61 | glpi_header($CFG_GLPI["root_doc"]."/front/tracking.form.php?ID=".$_POST["tracking"]); |
||
62 | |||
63 | } else if (isset($_POST["update_followup"])){ |
||
64 | checkRight("comment_all_ticket","1"); |
||
65 | $fup->update($_POST); |
||
66 | |||
67 | logEvent($_POST["tracking"], "tracking", 4, "tracking", $_SESSION["glpiname"]." ".$LANG["log"][21]." ".$_POST["ID"]."."); |
||
68 | glpi_header($CFG_GLPI["root_doc"]."/front/tracking.form.php?ID=".$_POST["tracking"]); |
||
69 | } else if (isset($_POST["delete_followup"])){ |
||
70 | checkRight("comment_all_ticket","1"); |
||
71 | $fup->delete($_POST); |
||
72 | logEvent($_POST["tracking"], "tracking", 4, "tracking", $_SESSION["glpiname"]." ".$LANG["log"][22]." ".$_POST["ID"]."."); |
||
73 | glpi_header($CFG_GLPI["root_doc"]."/front/tracking.form.php?ID=".$_POST["tracking"]); |
||
74 | } |
||
75 | |||
76 | // Manage All case which does not exist
|
||
77 | if (!isset($_SESSION['glpi_onglet'])||$_SESSION['glpi_onglet']==-1) $_SESSION['glpi_onglet']=1; |
||
78 | if (isset($_GET['onglet'])) { |
||
79 | $_SESSION['glpi_onglet']=$_GET['onglet']; |
||
80 | } |
||
81 | if (isset($_GET["ID"])) |
||
82 | if (showJobDetails($_SERVER['PHP_SELF'],$_GET["ID"])){ |
||
83 | switch($_SESSION['glpi_onglet']){ |
||
84 | default :
|
||
85 | if (!displayPluginAction(TRACKING_TYPE,$_GET["ID"],$_SESSION['glpi_onglet'])){ |
||
86 | showFollowupsSummary($_GET["ID"]); |
||
87 | } |
||
88 | } |
||
89 | } |
||
90 | commonFooter(); |
||
91 | ?> |