ryxeo-glpi-git / plugins / pdf / inc / plugin_pdf.preference.class.php @ 7b214c36
Historique | Voir | Annoter | Télécharger (2,47 ko)
1 |
<?php
|
---|---|
2 |
|
3 |
/*
|
4 |
----------------------------------------------------------------------
|
5 |
GLPI - Gestionnaire Libre de Parc Informatique
|
6 |
Copyright (C) 2003-2008 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 |
// Original Author of file: BALPE Dévi
|
32 |
// Purpose of file:
|
33 |
// ----------------------------------------------------------------------
|
34 |
|
35 |
class PluginPdfPreferences extends CommonDBTM { |
36 |
|
37 |
function PluginPdfPreferences() { |
38 |
$this->table = "glpi_plugin_pdf_preference"; |
39 |
} |
40 |
|
41 |
function showForm($target,$post) { |
42 |
global $LANGPDF, $LANG, $DB, $CFG_GLPI; |
43 |
|
44 |
//Save user preferences
|
45 |
if (isset ($post['plugin_pdf_user_preferences_save'])) { |
46 |
$DB->query("DELETE from glpi_plugin_pdf_preference WHERE user_id =" . $_SESSION["glpiID"] . " and cat=" . $post["plugin_pdf_inventory_type"]); |
47 |
|
48 |
for ($i = 0; $i < $post['indice']; $i++) |
49 |
if (isset ($post["check" . $i])) |
50 |
$DB->query("INSERT INTO `glpi_plugin_pdf_preference` (`id` ,`user_id` ,`cat` ,`table_num`) VALUES (NULL , '".$_SESSION["glpiID"]."', '".$post["plugin_pdf_inventory_type"]."', '" . $i . "');"); |
51 |
|
52 |
} |
53 |
|
54 |
echo "<div align='center' id='pdf_type'>"; |
55 |
//echo "<table class='tab_cadre_fixe'>";
|
56 |
//echo "<tr class='tab_bg_1' align='center'><th colspan='6'>".$LANGPDF["title"][1]."</th></tr>";
|
57 |
//echo "</td></tr>";
|
58 |
//echo "<tr class='tab_bg_1' align='center'><td>";
|
59 |
plugin_pdf_menu_computer($_SERVER['PHP_SELF'],-1,false); |
60 |
//echo "</td></tr>";
|
61 |
//echo "<tr class='tab_bg_1' align='center'><td>";
|
62 |
plugin_pdf_menu_software($_SERVER['PHP_SELF'],-1,false); |
63 |
//echo "</td></tr>";
|
64 |
//echo "</table>";
|
65 |
echo "</div>"; |
66 |
} |
67 |
} |
68 |
?>
|