2004-10-19 20:58:50 +02:00
|
|
|
|
<?php
|
2004-07-13 16:56:09 +02:00
|
|
|
|
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
2006-06-02 22:47:27 +02:00
|
|
|
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
|
|
|
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
|
|
|
|
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
|
|
|
|
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
2003-06-19 14:38:34 +02:00
|
|
|
|
*
|
|
|
|
|
|
* 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$
|
|
|
|
|
|
*/
|
2004-08-29 14:01:58 +02:00
|
|
|
|
|
2005-08-22 21:39:55 +02:00
|
|
|
|
/**
|
|
|
|
|
|
\file htdocs/admin/propale.php
|
2004-08-29 14:01:58 +02:00
|
|
|
|
\ingroup propale
|
|
|
|
|
|
\brief Page d'administration/configuration du module Propale
|
|
|
|
|
|
\version $Revision$
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2003-06-19 14:38:34 +02:00
|
|
|
|
require("./pre.inc.php");
|
|
|
|
|
|
|
2004-08-29 14:01:58 +02:00
|
|
|
|
$langs->load("admin");
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$langs->load("bills");
|
2005-06-11 13:11:17 +02:00
|
|
|
|
$langs->load("propal");
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$langs->load("other");
|
2004-08-29 14:01:58 +02:00
|
|
|
|
|
2004-02-28 18:30:49 +01:00
|
|
|
|
if (!$user->admin)
|
|
|
|
|
|
accessforbidden();
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
/*
|
|
|
|
|
|
* Actions
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
2004-07-13 16:56:09 +02:00
|
|
|
|
if ($_POST["action"] == 'nbprod')
|
2003-09-23 13:55:51 +02:00
|
|
|
|
{
|
2005-10-13 23:39:38 +02:00
|
|
|
|
dolibarr_set_const($db, "PROPALE_NEW_FORM_NB_PRODUCT",$_POST["value"]);
|
2005-08-22 21:39:55 +02:00
|
|
|
|
Header("Location: propale.php");
|
2005-10-13 23:39:38 +02:00
|
|
|
|
exit;
|
2003-09-23 13:55:51 +02:00
|
|
|
|
}
|
2006-04-29 00:54:02 +02:00
|
|
|
|
|
2006-06-02 11:10:52 +02:00
|
|
|
|
if ($_GET["action"] == 'activate_classifiedinvoiced')
|
2006-06-02 10:53:03 +02:00
|
|
|
|
{
|
2006-06-02 11:06:27 +02:00
|
|
|
|
dolibarr_set_const($db, "PROPALE_CLASSIFIED_INVOICED_WITH_ORDER", "1");
|
2006-06-02 10:53:03 +02:00
|
|
|
|
Header("Location: propale.php");
|
|
|
|
|
|
exit;
|
|
|
|
|
|
}
|
2006-06-02 11:10:52 +02:00
|
|
|
|
else if ($_GET["action"] == 'disable_classifiedinvoiced')
|
2006-06-02 10:53:03 +02:00
|
|
|
|
{
|
|
|
|
|
|
dolibarr_del_const($db, "PROPALE_CLASSIFIED_INVOICED_WITH_ORDER");
|
|
|
|
|
|
Header("Location: propale.php");
|
|
|
|
|
|
exit;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2004-07-13 16:56:09 +02:00
|
|
|
|
if ($_GET["action"] == 'set')
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$type='propal';
|
|
|
|
|
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type) VALUES ('".$_GET["value"]."','".$type."')";
|
2005-08-22 21:39:55 +02:00
|
|
|
|
if ($db->query($sql))
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2004-07-13 16:56:09 +02:00
|
|
|
|
if ($_GET["action"] == 'del')
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
2006-06-09 11:03:41 +02:00
|
|
|
|
$type='propal';
|
|
|
|
|
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
|
|
|
|
|
$sql .= " WHERE nom = '".$_GET["value"]."' AND type = '".$type."'";
|
2005-08-22 21:39:55 +02:00
|
|
|
|
if ($db->query($sql))
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
if ($_GET["action"] == 'setdoc')
|
2003-07-25 01:40:02 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$db->begin();
|
|
|
|
|
|
|
2005-06-11 13:11:17 +02:00
|
|
|
|
if (dolibarr_set_const($db, "PROPALE_ADDON_PDF",$_GET["value"]))
|
2003-07-25 01:40:02 +02:00
|
|
|
|
{
|
2005-06-11 13:11:17 +02:00
|
|
|
|
// La constante qui a <20>t<EFBFBD> lue en avant du nouveau set
|
|
|
|
|
|
// on passe donc par une variable pour avoir un affichage coh<6F>rent
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$conf->global->PROPALE_ADDON_PDF = $_GET["value"];
|
2003-07-25 01:40:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2005-06-11 13:11:17 +02:00
|
|
|
|
// On active le modele
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$type='propal';
|
2006-06-09 11:03:41 +02:00
|
|
|
|
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX."document_model";
|
|
|
|
|
|
$sql_del .= " WHERE nom = '".$_GET["value"]."' AND type = '".$type."'";
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$result1=$db->query($sql_del);
|
|
|
|
|
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom,type) VALUES ('".$_GET["value"]."','".$type."')";
|
|
|
|
|
|
$result2=$db->query($sql);
|
|
|
|
|
|
if ($result1 && $result2)
|
2003-07-25 01:40:02 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$db->commit();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
$db->rollback();
|
2003-07-25 01:40:02 +02:00
|
|
|
|
}
|
2003-09-01 00:54:47 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2004-08-18 16:29:33 +02:00
|
|
|
|
if ($_GET["action"] == 'setmod')
|
2003-09-01 00:54:47 +02:00
|
|
|
|
{
|
2005-08-22 21:39:55 +02:00
|
|
|
|
// \todo Verifier si module numerotation choisi peut etre activ<69>
|
|
|
|
|
|
// par appel methode canBeActivated
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-08-18 16:29:33 +02:00
|
|
|
|
if (dolibarr_set_const($db, "PROPALE_ADDON",$_GET["value"]))
|
2003-09-01 00:54:47 +02:00
|
|
|
|
{
|
|
|
|
|
|
// la constante qui a <20>t<EFBFBD> lue en avant du nouveau set
|
|
|
|
|
|
// on passe donc par une variable pour avoir un affichage coh<6F>rent
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$conf->global->PROPALE_ADDON = $_GET["value"];
|
2003-09-01 00:54:47 +02:00
|
|
|
|
}
|
2003-07-25 01:40:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2005-06-11 13:11:17 +02:00
|
|
|
|
|
2003-09-01 00:54:47 +02:00
|
|
|
|
/*
|
2005-06-11 13:11:17 +02:00
|
|
|
|
* Affiche page
|
2003-09-01 00:54:47 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
llxHeader('',$langs->trans("PropalSetup"));
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$dir = "../includes/modules/propale/";
|
|
|
|
|
|
$html=new Form($db);
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
2005-02-12 22:50:40 +01:00
|
|
|
|
print_titre($langs->trans("PropalSetup"));
|
2003-09-01 00:54:47 +02:00
|
|
|
|
|
2005-08-22 21:39:55 +02:00
|
|
|
|
/*
|
|
|
|
|
|
* Module num<EFBFBD>rotation
|
|
|
|
|
|
*/
|
|
|
|
|
|
print "<br>";
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print_titre($langs->trans("ProposalsNumberingModules"));
|
2004-02-21 00:40:13 +01:00
|
|
|
|
|
2005-08-22 21:39:55 +02:00
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
|
print '<td>'.$langs->trans("Name")."</td>\n";
|
|
|
|
|
|
print '<td>'.$langs->trans("Description")."</td>\n";
|
|
|
|
|
|
print '<td nowrap>'.$langs->trans("Example")."</td>\n";
|
2005-08-22 21:52:22 +02:00
|
|
|
|
print '<td align="center" width="60">'.$langs->trans("Activated").'</td>';
|
2006-04-29 00:54:02 +02:00
|
|
|
|
print '<td align="center" width="16">'.$langs->trans("Info").'</td>';
|
2005-08-22 21:39:55 +02:00
|
|
|
|
print '</tr>'."\n";
|
2003-09-01 00:54:47 +02:00
|
|
|
|
|
|
|
|
|
|
clearstatcache();
|
|
|
|
|
|
|
|
|
|
|
|
$handle = opendir($dir);
|
|
|
|
|
|
if ($handle)
|
|
|
|
|
|
{
|
2005-08-22 21:39:55 +02:00
|
|
|
|
$var=true;
|
|
|
|
|
|
while (($file = readdir($handle))!==false)
|
2003-09-01 00:54:47 +02:00
|
|
|
|
{
|
2005-08-22 21:39:55 +02:00
|
|
|
|
if (substr($file, 0, 12) == 'mod_propale_' && substr($file, strlen($file)-3, 3) == 'php')
|
|
|
|
|
|
{
|
|
|
|
|
|
$file = substr($file, 0, strlen($file)-4);
|
|
|
|
|
|
|
|
|
|
|
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".$file.".php");
|
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$module = new $file;
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
2006-05-09 13:33:01 +02:00
|
|
|
|
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
|
|
|
|
|
print $module->info();
|
|
|
|
|
|
print '</td>';
|
2006-04-29 00:54:02 +02:00
|
|
|
|
|
|
|
|
|
|
// Examples
|
|
|
|
|
|
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
2005-08-22 21:52:22 +02:00
|
|
|
|
print '<td align="center">';
|
2006-04-29 00:54:02 +02:00
|
|
|
|
if ($conf->global->PROPALE_ADDON == "$file")
|
2005-08-22 21:39:55 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
print img_tick($langs->trans("Activated"));
|
2005-08-22 21:39:55 +02:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Activate").'</a>';
|
2005-08-22 21:39:55 +02:00
|
|
|
|
}
|
2005-08-22 21:52:22 +02:00
|
|
|
|
print '</td>';
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
// Info
|
|
|
|
|
|
$htmltooltip='';
|
|
|
|
|
|
$nextval=$module->getNextValue();
|
|
|
|
|
|
if ($nextval != $langs->trans("NotAvailable"))
|
|
|
|
|
|
{
|
|
|
|
|
|
$htmltooltip='<b>'.$langs->trans("NextValue").'</b>: '.$nextval;
|
|
|
|
|
|
}
|
|
|
|
|
|
print '<td align="center" '.$html->tooltip_properties($htmltooltip).'>';
|
|
|
|
|
|
print ($htmltooltip?img_help(0):'');
|
|
|
|
|
|
print '</td>';
|
2005-08-22 21:39:55 +02:00
|
|
|
|
|
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
}
|
2003-09-01 00:54:47 +02:00
|
|
|
|
}
|
2005-08-22 21:39:55 +02:00
|
|
|
|
closedir($handle);
|
2003-09-01 00:54:47 +02:00
|
|
|
|
}
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print "</table><br>\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-09-01 00:54:47 +02:00
|
|
|
|
/*
|
2006-04-29 00:54:02 +02:00
|
|
|
|
* Modeles de documents
|
2003-09-01 00:54:47 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print_titre($langs->trans("ProposalsPDFModules"));
|
2003-09-01 00:54:47 +02:00
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
// Defini tableau def de modele propal
|
2003-07-07 15:43:02 +02:00
|
|
|
|
$def = array();
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$sql = "SELECT nom";
|
|
|
|
|
|
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
|
|
|
|
|
$sql.= " WHERE type = 'propal'";
|
2005-06-11 13:11:17 +02:00
|
|
|
|
$resql=$db->query($sql);
|
|
|
|
|
|
if ($resql)
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$i = 0;
|
|
|
|
|
|
$num_rows=$db->num_rows($resql);
|
|
|
|
|
|
while ($i < $num_rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
$array = $db->fetch_array($resql);
|
|
|
|
|
|
array_push($def, $array[0]);
|
|
|
|
|
|
$i++;
|
|
|
|
|
|
}
|
2003-07-07 15:43:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
dolibarr_print_error($db);
|
2003-07-07 15:43:02 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2003-06-19 14:38:34 +02:00
|
|
|
|
$dir = "../includes/modules/propale/";
|
|
|
|
|
|
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print "<table class=\"noborder\" width=\"100%\">\n";
|
2004-12-06 21:35:23 +01:00
|
|
|
|
print "<tr class=\"liste_titre\">\n";
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print " <td width=\"140\">".$langs->trans("Name")."</td>\n";
|
|
|
|
|
|
print " <td>".$langs->trans("Description")."</td>\n";
|
2006-04-29 00:54:02 +02:00
|
|
|
|
print '<td align="center" width="60">'.$langs->trans("Activated")."</td>\n";
|
|
|
|
|
|
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
|
|
|
|
|
print '<td align="center" width="16">'.$langs->trans("Info").'</td>';
|
2004-02-21 00:40:13 +01:00
|
|
|
|
print "</tr>\n";
|
2003-06-19 14:38:34 +02:00
|
|
|
|
|
|
|
|
|
|
clearstatcache();
|
|
|
|
|
|
|
|
|
|
|
|
$handle=opendir($dir);
|
|
|
|
|
|
|
2005-06-11 13:11:17 +02:00
|
|
|
|
$var=true;
|
2003-06-19 14:38:34 +02:00
|
|
|
|
while (($file = readdir($handle))!==false)
|
|
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
if (substr($file, strlen($file) -12) == '.modules.php' && substr($file,0,12) == 'pdf_propale_')
|
2003-07-07 15:43:02 +02:00
|
|
|
|
{
|
2006-04-29 00:54:02 +02:00
|
|
|
|
$name = substr($file, 12, strlen($file) - 24);
|
|
|
|
|
|
$classname = substr($file, 0, strlen($file) -12);
|
|
|
|
|
|
|
|
|
|
|
|
$var=!$var;
|
|
|
|
|
|
print "<tr ".$bc[$var].">\n <td>";
|
|
|
|
|
|
print "$name";
|
|
|
|
|
|
print "</td>\n <td>\n";
|
|
|
|
|
|
require_once($dir.$file);
|
|
|
|
|
|
$obj = new $classname($db);
|
|
|
|
|
|
print $obj->description;
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
// Activ<69>
|
|
|
|
|
|
if (in_array($name, $def))
|
|
|
|
|
|
{
|
|
|
|
|
|
print "<td align=\"center\">\n";
|
|
|
|
|
|
if ($conf->global->PROPALE_ADDON_PDF != "$name")
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
|
|
|
|
|
print img_tick($langs->trans("Disable"));
|
|
|
|
|
|
print '</a>';
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
print img_tick($langs->trans("Enabled"));
|
|
|
|
|
|
}
|
|
|
|
|
|
print "</td>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
print "<td align=\"center\">\n";
|
|
|
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">'.$langs->trans("Activate").'</a>';
|
|
|
|
|
|
print "</td>";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Defaut
|
|
|
|
|
|
print "<td align=\"center\">";
|
|
|
|
|
|
if ($conf->global->PROPALE_ADDON_PDF == "$name")
|
|
|
|
|
|
{
|
|
|
|
|
|
print img_tick($langs->trans("Default"));
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
|
|
|
|
|
}
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
|
|
|
|
|
|
// Info
|
|
|
|
|
|
$htmltooltip = '<b>'.$langs->trans("Type").'</b>: '.($obj->type?$obj->type:$langs->trans("Unknown"));
|
|
|
|
|
|
$htmltooltip.='<br><b>'.$langs->trans("Width").'</b>: '.$obj->page_largeur;
|
|
|
|
|
|
$htmltooltip.='<br><b>'.$langs->trans("Height").'</b>: '.$obj->page_hauteur;
|
|
|
|
|
|
$htmltooltip.='<br>'.$langs->trans("FeaturesSupported").':';
|
|
|
|
|
|
$htmltooltip.='<br><b>'.$langs->trans("Logo").'</b>: '.yn($obj->option_logo);
|
|
|
|
|
|
$htmltooltip.='<br><b>'.$langs->trans("PaymentMode").'</b>: '.yn($obj->option_modereg);
|
|
|
|
|
|
$htmltooltip.='<br><b>'.$langs->trans("PaymentConditions").'</b>: '.yn($obj->option_condreg);
|
|
|
|
|
|
print '<td align="center" '.$html->tooltip_properties($htmltooltip).'>'.img_help(0).'</td>';
|
|
|
|
|
|
|
|
|
|
|
|
print "</tr>\n";
|
2003-07-07 15:43:02 +02:00
|
|
|
|
}
|
2003-06-19 14:38:34 +02:00
|
|
|
|
}
|
|
|
|
|
|
closedir($handle);
|
|
|
|
|
|
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
|
2004-07-20 10:20:27 +02:00
|
|
|
|
/*
|
|
|
|
|
|
* Repertoire
|
|
|
|
|
|
*/
|
|
|
|
|
|
print '<br>';
|
2006-03-17 13:24:41 +01:00
|
|
|
|
print_titre($langs->trans("PathToDocuments"));
|
2004-07-20 10:20:27 +02:00
|
|
|
|
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print "<table class=\"noborder\" width=\"100%\">\n";
|
2004-12-06 21:35:23 +01:00
|
|
|
|
print "<tr class=\"liste_titre\">\n";
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print " <td>".$langs->trans("Name")."</td>\n";
|
|
|
|
|
|
print " <td>".$langs->trans("Value")."</td>\n";
|
2004-07-20 10:20:27 +02:00
|
|
|
|
print "</tr>\n";
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("Directory")."</td>\n <td>".$conf->propal->dir_output."</td>\n</tr>\n";
|
2004-12-06 21:35:23 +01:00
|
|
|
|
print "</table>\n<br>";
|
2004-07-20 10:20:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2003-06-19 14:38:34 +02:00
|
|
|
|
/*
|
2004-12-22 23:11:21 +01:00
|
|
|
|
* Formulaire cr<EFBFBD>ation
|
2003-06-19 14:38:34 +02:00
|
|
|
|
*
|
|
|
|
|
|
*/
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print_titre($langs->trans("CreateForm"));
|
2004-12-22 23:11:21 +01:00
|
|
|
|
|
2005-02-12 22:50:40 +01:00
|
|
|
|
print "<form method=\"post\" action=\"propale.php\">";
|
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"nbprod\">";
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print "<table class=\"noborder\" width=\"100%\">";
|
2005-02-12 22:50:40 +01:00
|
|
|
|
print "<tr class=\"liste_titre\">";
|
2004-12-22 23:11:21 +01:00
|
|
|
|
print " <td>".$langs->trans("Name")."</td>\n";
|
|
|
|
|
|
print " <td align=\"left\">".$langs->trans("Value")."</td>\n";
|
|
|
|
|
|
print " <td> </td>\n";
|
2005-06-11 13:11:17 +02:00
|
|
|
|
print "</tr><tr ".$bc[false].">";
|
|
|
|
|
|
print '<td>'.$langs->trans("NumberOfProductLines").'</td>';
|
2005-10-13 23:39:38 +02:00
|
|
|
|
print "<td align=\"left\"><input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".PROPALE_NEW_FORM_NB_PRODUCT."\"></td>";
|
|
|
|
|
|
print '<td><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
2005-02-12 22:50:40 +01:00
|
|
|
|
print '</tr>';
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
print '</form>';
|
2003-06-19 14:38:34 +02:00
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
print '<br>';
|
|
|
|
|
|
|
2006-06-02 10:53:03 +02:00
|
|
|
|
/*
|
|
|
|
|
|
* Class<EFBFBD> factur<EFBFBD>e une propale en m<EFBFBD>me temps que la commande
|
|
|
|
|
|
*
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
if ($conf->commande->enabled)
|
|
|
|
|
|
{
|
|
|
|
|
|
print_titre($langs->trans("ClassifiedInvoiced"));
|
|
|
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
|
|
|
print '<tr class="liste_titre">';
|
|
|
|
|
|
print '<td width="140">'.$langs->trans("Name").'</td>';
|
|
|
|
|
|
print '<td align="center"> </td>';
|
|
|
|
|
|
print '<td align="center">'.$langs->trans("Active").'</td>';
|
|
|
|
|
|
print "</tr>\n";
|
|
|
|
|
|
print "<form method=\"post\" action=\"propale.php\">";
|
|
|
|
|
|
print "<input type=\"hidden\" name=\"action\" value=\"classifiedinvoiced\">";
|
|
|
|
|
|
print "<tr ".$bc[false].">";
|
|
|
|
|
|
print '<td width="80%">'.$langs->trans("ClassifiedInvoicedWithOrder").'</td>';
|
|
|
|
|
|
print '<td align="center">';
|
|
|
|
|
|
if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
print img_tick();
|
|
|
|
|
|
}
|
|
|
|
|
|
print '</td>';
|
|
|
|
|
|
print "<td align=\"center\">";
|
|
|
|
|
|
if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<a href="propale.php?action=activate_classifiedinvoiced">'.$langs->trans("Activate").'</a>';
|
|
|
|
|
|
}
|
|
|
|
|
|
else if($conf->global->PROPALE_CLASSIFIED_INVOICED_WITH_ORDER == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
print '<a href="propale.php?action=disable_classifiedinvoiced">'.$langs->trans("Disable").'</a>';
|
|
|
|
|
|
}
|
|
|
|
|
|
print "</td>";
|
|
|
|
|
|
print '</tr>';
|
|
|
|
|
|
print '</table>';
|
|
|
|
|
|
print '</form>';
|
2006-06-02 22:47:27 +02:00
|
|
|
|
|
|
|
|
|
|
print '<br>';
|
2006-06-02 10:53:03 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2003-06-19 14:38:34 +02:00
|
|
|
|
$db->close();
|
|
|
|
|
|
|
2006-04-29 00:54:02 +02:00
|
|
|
|
llxFooter('$Date$ - $Revision$');
|
2003-06-19 14:38:34 +02:00
|
|
|
|
?>
|