[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> 5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: fichinter.php,v 1.17 2005/09/02 22:28:27 eldy Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/fichinter.php,v $ 23 */ 24 25 /** 26 \file htdocs/admin/fichinter.php 27 \ingroup fichinter 28 \brief Page d'administration/configuration du module FicheInter 29 \version $Revision: 1.17 $ 30 */ 31 32 require ("./pre.inc.php"); 33 34 $langs->load("admin"); 35 $langs->load("interventions"); 36 37 llxHeader(); 38 39 if (!$user->admin) 40 accessforbidden(); 41 42 43 $ficheinter_addon_var_pdf = FICHEINTER_ADDON_PDF; 44 45 46 if ($_GET["action"] == 'setpdf') 47 { 48 $sql = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'FICHEINTER_ADDON_PDF' ;"; 49 $db->query($sql);$sql =''; 50 $sql = "INSERT INTO ".MAIN_DB_PREFIX."const (name,value,visible) VALUES 51 ('FICHEINTER_ADDON_PDF','".$_GET["value"]."',0) ; "; 52 53 if ($db->query($sql)) 54 { 55 // la constante qui a été lue en avant du nouveau set 56 // on passe donc par une variable pour avoir un affichage cohérent 57 $ficheinter_addon_var_pdf = $_GET["value"]; 58 } 59 } 60 61 $dir = "../includes/modules/fichinter/"; 62 63 64 print_titre($langs->trans("InterventionsSetup")); 65 66 print "<br>"; 67 68 print_titre($langs->trans("TemplatePDFInterventions")); 69 70 print '<table class="noborder" width="100%">'; 71 print '<tr class="liste_titre">'; 72 print '<td>'.$langs->trans("Name").'</td>'; 73 print '<td>'.$langs->trans("Description").'</td>'; 74 print '<td align="center">'.$langs->trans("Activated").'</td>'; 75 print '<td> </td>'; 76 print "</tr>\n"; 77 78 clearstatcache(); 79 80 $var=true; 81 82 $handle=opendir($dir); 83 while (($file = readdir($handle))!==false) 84 { 85 if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,4) == 'pdf_') 86 { 87 $name = substr($file, 4, strlen($file) -16); 88 $classname = substr($file, 0, strlen($file) -12); 89 90 $var=!$var; 91 92 print '<tr '.$bc[$var].'><td>'; 93 echo "$name"; 94 print "</td><td>\n"; 95 require_once($dir.$file); 96 $obj = new $classname(); 97 98 print $obj->description; 99 100 print '</td><td align="center">'; 101 102 if ($ficheinter_addon_var_pdf == "$name") 103 { 104 print img_tick(); 105 } 106 else 107 { 108 print " "; 109 } 110 111 print "</td><td>\n"; 112 113 print '<a href="fichinter.php?action=setpdf&value='.$name.'">'.$langs->trans("Activate").'</a>'; 114 115 print '</td></tr>'; 116 } 117 } 118 closedir($handle); 119 120 print '</table>'; 121 122 123 $db->close(); 124 125 llxFooter('$Date: 2005/09/02 22:28:27 $ - $Revision: 1.17 $'); 126 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |