Nouveau fichier
This commit is contained in:
parent
08ba9e2dc8
commit
c053b35a7e
111
htdocs/admin/commande.php
Normal file
111
htdocs/admin/commande.php
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
* $Source$
|
||||||
|
*/
|
||||||
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
{
|
||||||
|
print "Forbidden";
|
||||||
|
llxfooter();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// positionne la variable pour le test d'affichage de l'icone
|
||||||
|
|
||||||
|
$commande_addon_var = COMMANDE_ADDON;
|
||||||
|
$commande_addon_var_pdf = COMMANDE_ADDON_PDF;
|
||||||
|
$commande_rib_number_var = COMMANDE_RIB_NUMBER;
|
||||||
|
|
||||||
|
$commande_addon_var = COMMANDE_ADDON;
|
||||||
|
|
||||||
|
if ($action == 'setmod')
|
||||||
|
{
|
||||||
|
$sql = "REPLACE INTO llx_const SET name = 'COMMANDE_ADDON', value='".$value."', visible=0";
|
||||||
|
|
||||||
|
if ($db->query($sql))
|
||||||
|
{
|
||||||
|
// la constante qui a été lue en avant du nouveau set
|
||||||
|
// on passe donc par une variable pour avoir un affichage cohérent
|
||||||
|
$commande_addon_var = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$dir = "../includes/modules/commande/";
|
||||||
|
|
||||||
|
print_titre("Configuration des commandes");
|
||||||
|
|
||||||
|
print_titre("Module de numérotation");
|
||||||
|
|
||||||
|
print '<table class="border" cellpadding="3" cellspacing="0">';
|
||||||
|
print '<TR class="liste_titre">';
|
||||||
|
print '<td>Nom</td><td>Info</td>';
|
||||||
|
print '<td align="center">Activé</td><td> </td>';
|
||||||
|
print "</TR>\n";
|
||||||
|
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
|
$dir = "../includes/modules/commande/";
|
||||||
|
$handle = opendir($dir);
|
||||||
|
if ($handle)
|
||||||
|
{
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (substr($file, 0, 13) == 'mod_commande_' && substr($file, strlen($file)-3, 3) == 'php')
|
||||||
|
{
|
||||||
|
$file = substr($file, 0, strlen($file)-4);
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/commande/".$file.".php");
|
||||||
|
|
||||||
|
$modCommande = new $file;
|
||||||
|
|
||||||
|
print '<tr class="pair"><td>'.$modCommande->nom."</td><td>\n";
|
||||||
|
print $modCommande->info();
|
||||||
|
print '</td><td align="center">';
|
||||||
|
|
||||||
|
if ($commande_addon_var == "$file")
|
||||||
|
{
|
||||||
|
print '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0"></a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print " ";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</td><td>\n";
|
||||||
|
|
||||||
|
print '<a href="commande.php?action=setmod&value='.$file.'">activer</a>';
|
||||||
|
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "Erreur";
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
|
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||||
|
?>
|
||||||
55
htdocs/includes/modules/commande/mod_commande_ivoire.php
Normal file
55
htdocs/includes/modules/commande/mod_commande_ivoire.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
* $Source$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
Class mod_commande_ivoire
|
||||||
|
{
|
||||||
|
Function mod_commande_ivoire()
|
||||||
|
{
|
||||||
|
$this->nom = "Ivoire";
|
||||||
|
}
|
||||||
|
|
||||||
|
Function info()
|
||||||
|
{
|
||||||
|
return "Renvoie le numéro sous la forme numérique la plus simple 1,2,3, ...";
|
||||||
|
}
|
||||||
|
|
||||||
|
function commande_get_num($obj_soc=0)
|
||||||
|
{
|
||||||
|
global $db;
|
||||||
|
|
||||||
|
$sql = "SELECT count(*) FROM llx_commande WHERE fk_statut > 0";
|
||||||
|
|
||||||
|
if ( $db->query($sql) )
|
||||||
|
{
|
||||||
|
$row = $db->fetch_row(0);
|
||||||
|
|
||||||
|
$num = $row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$y = strftime("%y",time());
|
||||||
|
|
||||||
|
return $num;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
64
htdocs/includes/modules/modDon.class.php
Normal file
64
htdocs/includes/modules/modDon.class.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?PHP
|
||||||
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
* $Source$
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
class modDon
|
||||||
|
{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialisation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
Function modDon($DB)
|
||||||
|
{
|
||||||
|
$this->db = $DB ;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
Function init()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Activation du module
|
||||||
|
*/
|
||||||
|
|
||||||
|
$sql = array(
|
||||||
|
);
|
||||||
|
|
||||||
|
for ($i = 0 ; $i < sizeof($sql) ; $i++)
|
||||||
|
{
|
||||||
|
$this->db->query($sql[$i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Function remove()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user