ryxeo-glpi-git / ajax / planning.php @ b67d8923
Historique | Voir | Annoter | Télécharger (3,39 ko)
1 |
<?php
|
---|---|
2 |
/*
|
3 |
* @version $Id: planning.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: Julien Dombre
|
33 |
// Purpose of file:
|
34 |
// ----------------------------------------------------------------------
|
35 |
|
36 |
define('GLPI_ROOT','..'); |
37 |
|
38 |
$AJAX_INCLUDE=1; |
39 |
include (GLPI_ROOT."/inc/includes.php"); |
40 |
|
41 |
// Send UTF8 Headers
|
42 |
header("Content-Type: text/html; charset=UTF-8"); |
43 |
header_nocache(); |
44 |
|
45 |
checkCentralAccess(); |
46 |
|
47 |
$split=split(":",$CFG_GLPI["planning_begin"]); |
48 |
$global_begin=intval($split[0]); |
49 |
$split=split(":",$CFG_GLPI["planning_end"]); |
50 |
$global_end=intval($split[0]); |
51 |
if (isset($_POST["ID"])&&$_POST["ID"]>0){ |
52 |
echo "<input type='hidden' name='plan[ID]' value='".$_POST["ID"]."'>"; |
53 |
} |
54 |
|
55 |
if (isset($_POST["begin_date"])&&!empty($_POST["begin_date"])){ |
56 |
$begin=strtotime($_POST["begin_date"]); |
57 |
} else {
|
58 |
$begin=strtotime(date("Y-m-d")." 12:00:00"); |
59 |
} |
60 |
if (isset($_POST["end_date"])&&!empty($_POST["end_date"])){ |
61 |
$end=strtotime($_POST["end_date"]); |
62 |
} else {
|
63 |
$end=strtotime(date("Y-m-d")." 13:00:00"); |
64 |
} |
65 |
|
66 |
$state=0; |
67 |
if (isset($_POST["state"])){ |
68 |
$state=$_POST["state"]; |
69 |
} |
70 |
|
71 |
$begin_date=date("Y-m-d",$begin); |
72 |
$end_date=date("Y-m-d",$end); |
73 |
$begin_hour=date("H:i",$begin); |
74 |
$end_hour=date("H:i",$end); |
75 |
|
76 |
echo "<table class='tab_cadre' cellpadding='2'>"; |
77 |
if (isset($_POST["author"])&&isset($_POST["entity"])){ |
78 |
echo "<tr class='tab_bg_2'><td>".$LANG["planning"][9].": </td>"; |
79 |
echo "<td>"; |
80 |
dropdownUsers("plan[id_assign]",$_POST["author"],"own_ticket",-1,1,$_POST["entity"]); |
81 |
echo "</td></tr>"; |
82 |
} |
83 |
|
84 |
echo "<tr class='tab_bg_2'><td>".$LANG["search"][8].": </td><td>"; |
85 |
showCalendarForm($_POST['form'],"plan[begin_date]",$begin_date); |
86 |
echo "</td></tr>"; |
87 |
|
88 |
echo "<tr class='tab_bg_2'><td>".$LANG["reservation"][12].": </td>"; |
89 |
echo "<td>"; |
90 |
dropdownHours("plan[begin_hour]",$begin_hour,1); |
91 |
echo "</td></tr>"; |
92 |
|
93 |
echo "<tr class='tab_bg_2'><td>".$LANG["search"][9].": </td><td>"; |
94 |
showCalendarForm($_POST['form'],"plan[end_date]",$end_date); |
95 |
echo "</td></tr>"; |
96 |
|
97 |
echo "<tr class='tab_bg_2'><td>".$LANG["reservation"][13].": </td>"; |
98 |
echo "<td>"; |
99 |
dropdownHours("plan[end_hour]",$end_hour,1); |
100 |
echo "</td></tr>"; |
101 |
|
102 |
echo "<tr class='tab_bg_2'><td>".$LANG["state"][0].": </td>"; |
103 |
echo "<td>"; |
104 |
dropdownPlanningState("plan[state]",$state); |
105 |
echo "</td></tr>"; |
106 |
|
107 |
echo "</table>"; |
108 |
|
109 |
|
110 |
?>
|