Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

ryxeo-glpi-git / plugins / pdf / inc / plugin_pdf.profile.class.php @ 7b214c36

Historique | Voir | Annoter | Télécharger (2,87 ko)

1 7b214c36 Eric Seigne
<?php
2
/*
3
  ----------------------------------------------------------------------
4
  GLPI - Gestionnaire Libre de Parc Informatique
5
  Copyright (C) 2003-2008 by the INDEPNET Development Team.
6
  
7
  http://indepnet.net/   http://glpi-project.org/
8
  ----------------------------------------------------------------------
9
  
10
  LICENSE
11
  
12
  This file is part of GLPI.
13
  
14
  GLPI is free software; you can redistribute it and/or modify
15
  it under the terms of the GNU General Public License as published by
16
  the Free Software Foundation; either version 2 of the License, or
17
  (at your option) any later version.
18
  
19
  GLPI is distributed in the hope that it will be useful,
20
  but WITHOUT ANY WARRANTY; without even the implied warranty of
21
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
  GNU General Public License for more details.
23
  
24
  You should have received a copy of the GNU General Public License
25
  along with GLPI; if not, write to the Free Software
26
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27
  ------------------------------------------------------------------------
28
 */
29
30
// ----------------------------------------------------------------------
31
// Original Author of file: Remi Collet
32
// Purpose of file:
33
// ----------------------------------------------------------------------
34
35
class PluginPdfProfile extends CommonDBTM {
36
        
37
        function PluginPdfProfile()
38
        {
39
                $this->table="glpi_plugin_pdf_profiles";
40
            $this->type=-1;
41
        }
42
        
43
        //if profile deleted
44
        function cleanProfiles($ID) {
45
        
46
                global $DB;
47
                $query = "DELETE FROM glpi_plugin_pdf_profiles WHERE ID='$ID' ";
48
                $DB->query($query);
49
        }
50
        
51
        function showForm($target,$ID){
52
                global $LANG,$LANGPDF,$DB;
53
54
                if (!haveRight("profile","r")) return false;
55
                $canedit=haveRight("profile","w");
56
57
                if (!($ID && $this->getFromDB($ID))) {
58
                        $this->getEmpty();
59
                }
60
                
61
                echo "<div align='center'>";
62
                echo "<form action='".$_SERVER['PHP_SELF']."' method='post'>";
63
                echo "<table class='tab_cadre' cellpadding='5'>"; 
64
                echo "<tr><th colspan='2'>".$LANGPDF["config"][7]. "</th></tr>\n";
65
                        
66
67
                echo "<tr class='tab_bg_1'>";
68
                echo "<td>".$LANGPDF["title"][1].":</td><td>";
69
                dropdownYesNo("use",(isset($this->fields["use"])?$this->fields["use"]:''));
70
                echo "</td></tr>\n";        
71
72
                if ($canedit){
73
                        echo "<tr class='tab_bg_1'>";
74
                        echo "<td colspan='2' align='center'>";
75
                        echo "<input type='hidden' name='ID' value=$ID>";
76
77
                        if ($this->fields["ID"]){
78
                                echo "<input type='submit' name='update' value=\"".$LANG["buttons"][7]."\" class='submit'>&nbsp;";
79
                                echo "<input type='submit' name='delete' value=\"".$LANG["buttons"][6]."\" class='submit'>";
80
                        } else {
81
                                echo "<input type='submit' name='add' value=\"".$LANG["buttons"][8]."\" class='submit'>";
82
                        }
83
                        echo "</td></tr>\n";
84
                }
85
86
                echo "</table>";
87
                echo "</form>";
88
                echo "</div>";        
89
        }        
90
}
91
        
92
?>
Redmine Appliance - Powered by TurnKey Linux