Minor fix
This commit is contained in:
parent
eadbfc7b99
commit
16c9fd79d3
@ -29,7 +29,7 @@ require("./pre.inc.php");
|
|||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
|
|
||||||
if (! $user->rights->mailing->lire || $user->societe_id > 0)
|
if (! $user->rights->mailing->lire || $user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
$dirmod=DOL_DOCUMENT_ROOT."/includes/modules/mailings";
|
$dirmod=DOL_DOCUMENT_ROOT."/includes/modules/mailings";
|
||||||
@ -59,10 +59,21 @@ $search_email=isset($_GET["search_email"])?$_GET["search_email"]:$_POST["search_
|
|||||||
if ($_GET["action"] == 'add')
|
if ($_GET["action"] == 'add')
|
||||||
{
|
{
|
||||||
$modulename=$_GET["module"];
|
$modulename=$_GET["module"];
|
||||||
|
$result=0;
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
foreach ($conf->dol_document_root as $dirmod)
|
||||||
|
{
|
||||||
|
$dir=$dirmod."/includes/modules/mailings/";
|
||||||
|
|
||||||
|
if (is_dir($dir))
|
||||||
|
{
|
||||||
// Chargement de la classe
|
// Chargement de la classe
|
||||||
$file = $dirmod."/".$modulename.".modules.php";
|
$file = $dir."/".$modulename.".modules.php";
|
||||||
$classname = "mailing_".$modulename;
|
$classname = "mailing_".$modulename;
|
||||||
|
|
||||||
|
if (file_exists($file))
|
||||||
|
{
|
||||||
require_once($file);
|
require_once($file);
|
||||||
|
|
||||||
$filtersarray=array();
|
$filtersarray=array();
|
||||||
@ -70,6 +81,9 @@ if ($_GET["action"] == 'add')
|
|||||||
|
|
||||||
$obj = new $classname($db);
|
$obj = new $classname($db);
|
||||||
$result=$obj->add_to_target($_GET["rowid"],$filtersarray);
|
$result=$obj->add_to_target($_GET["rowid"],$filtersarray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -769,6 +769,8 @@ class Contrat extends CommonObject
|
|||||||
if (! $qty) $qty=1;
|
if (! $qty) $qty=1;
|
||||||
if (! $ventil) $ventil=0;
|
if (! $ventil) $ventil=0;
|
||||||
if (! $info_bits) $info_bits=0;
|
if (! $info_bits) $info_bits=0;
|
||||||
|
if (! $pu_ht) $pu_ht=0;
|
||||||
|
if (! $pu_ttc) $pu_ttc=0;
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
$txtva=price2num($txtva);
|
$txtva=price2num($txtva);
|
||||||
|
|||||||
@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Renvoi une version en chaine depuis une version en tableau
|
* \brief Renvoi une version en chaine depuis une version en tableau
|
||||||
\param versionarray Tableau de version (vermajeur,vermineur,autre)
|
* \param versionarray Tableau de version (vermajeur,vermineur,autre)
|
||||||
\return string Chaine version
|
* \return string Chaine version
|
||||||
*/
|
*/
|
||||||
function versiontostring($versionarray)
|
function versiontostring($versionarray)
|
||||||
{
|
{
|
||||||
$string='?';
|
$string='?';
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
|
||||||
*
|
|
||||||
* 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/
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \file htdocs/lib/admin.lib.php
|
|
||||||
* \brief Library of admin functions
|
|
||||||
* \version $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Create a redirect form to paybox form
|
|
||||||
* \return int 1 if OK, -1 if ERROR
|
|
||||||
*/
|
|
||||||
function print_paybox_redirect($PRICE,$EMAIL,$urlok,$urlko="",$ID=0)
|
|
||||||
{
|
|
||||||
global $conf, $langs, $db;
|
|
||||||
|
|
||||||
dol_syslog("Paypal.lib::print_paybox_redirect", LOG_DEBUG);
|
|
||||||
|
|
||||||
|
|
||||||
$IBS_DEVISE="978"; # Euro
|
|
||||||
|
|
||||||
$ModulePaybox="module_linux.cgi";
|
|
||||||
if ($_SERVER["WINDIR"] && eregi("windows",$_SERVER["WINDIR"])) { $ModulePaybox="module_NT_2000.cgi"; }
|
|
||||||
$URLPAYBOX=URL_ROOT.'/cgi-bin/'.$ModulePaybox;
|
|
||||||
if ($conf->global->PAYBOX_CGI_URL) $URLPAYBOX=$conf->global->PAYBOX_CGI_URL;
|
|
||||||
$IBS_SITE=$conf->global->PAYBOX_IBS_SITE;
|
|
||||||
$IBS_RANG=$conf->global->PAYBOX_IBS_RANG;
|
|
||||||
|
|
||||||
if (empty($URLPAYBOX))
|
|
||||||
{
|
|
||||||
dol_print_error('',"Paybox setup param PAYBOX_CGI_URL not defined");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (empty($IBS_SITE))
|
|
||||||
{
|
|
||||||
dol_print_error('',"Paybox setup param PAYBOX_IBS_SITE not defined");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (empty($IBS_RANG))
|
|
||||||
{
|
|
||||||
dol_print_error('',"Paybox setup param PAYBOX_IBS_RANG not defined");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Value to use for test
|
|
||||||
$IBS_SITE="1999888"; # Site test
|
|
||||||
$IBS_RANG="99"; # Rang test
|
|
||||||
|
|
||||||
|
|
||||||
dol_syslog("Paypal.lib::print_paybox_redirect PRICE: ".$PRICE, LOG_DEBUG);
|
|
||||||
|
|
||||||
// Definition des parametres vente produit pour paybox
|
|
||||||
$IBS_CMD="DOL:SITE=dolibarr-ID=".$ID;
|
|
||||||
$IBS_TOTAL=$PRICE*100; # En centimes
|
|
||||||
|
|
||||||
$IBS_MODE=1; # Mode formulaire
|
|
||||||
|
|
||||||
$IBS_PORTEUR=$EMAIL;
|
|
||||||
$IBS_RETOUR="montant:M;ref:R;auto:A;trans:T"; # Format des paramètres du get de validation en reponse (url a definir sous paybox)
|
|
||||||
$IBS_TXT="<center><b>Vous allez être envoyé vers la page de paiement sécurisé Paybox</b><br><i>Merci de patienter quelques secondes...</i><br></center>";
|
|
||||||
$IBS_EFFECTUE=$urlok;
|
|
||||||
$IBS_ANNULE=$urlko;
|
|
||||||
$IBS_REFUSE=$urlko;
|
|
||||||
$IBS_BOUTPI="Continuer";
|
|
||||||
$IBS_BKGD="#FFFFFF";
|
|
||||||
$IBS_WAIT="4000";
|
|
||||||
$IBS_LANG="FRA";
|
|
||||||
|
|
||||||
dol_syslog("Soumission Paybox");
|
|
||||||
dol_syslog("IBS_MODE: $IBS_MODE");
|
|
||||||
dol_syslog("IBS_SITE: $IBS_SITE");
|
|
||||||
dol_syslog("IBS_RANG: $IBS_RANG");
|
|
||||||
dol_syslog("IBS_TOTAL: $IBS_TOTAL");
|
|
||||||
dol_syslog("IBS_DEVISE: $IBS_DEVISE");
|
|
||||||
dol_syslog("IBS_CMD: $IBS_CMD");
|
|
||||||
dol_syslog("IBS_PORTEUR: $IBS_PORTEUR");
|
|
||||||
dol_syslog("IBS_RETOUR: $IBS_RETOUR");
|
|
||||||
dol_syslog("IBS_EFFECTUE: $IBS_EFFECTUE");
|
|
||||||
dol_syslog("IBS_ANNULE: $IBS_ANNULE");
|
|
||||||
dol_syslog("IBS_REFUSE: $IBS_REFUSE");
|
|
||||||
dol_syslog("IBS_BKGD: $IBS_BKGD");
|
|
||||||
dol_syslog("IBS_WAIT: $IBS_WAIT");
|
|
||||||
dol_syslog("IBS_LANG: $IBS_LANG");
|
|
||||||
|
|
||||||
print '<html><body>';
|
|
||||||
print "\n";
|
|
||||||
print '<form action="'.$URLPAYBOX.'" NAME="Submit" method="POST">';
|
|
||||||
print '<input type="hidden" name="IBS_MODE" value="'.$IBS_MODE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_SITE" value="'.$IBS_SITE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_RANG" value="'.$IBS_RANG.'">';
|
|
||||||
print '<input type="hidden" name="IBS_TOTAL" value="'.$IBS_TOTAL.'">';
|
|
||||||
print '<input type="hidden" name="IBS_DEVISE" value="'.$IBS_DEVISE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_CMD" value="'.$IBS_CMD.'">';
|
|
||||||
print '<input type="hidden" name="IBS_PORTEUR" value="'.$IBS_PORTEUR.'">';
|
|
||||||
print '<input type="hidden" name="IBS_RETOUR" value="'.$IBS_RETOUR.'">';
|
|
||||||
print '<input type="hidden" name="IBS_EFFECTUE" value="'.$IBS_EFFECTUE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_ANNULE" value="'.$IBS_ANNULE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_REFUSE" value="'.$IBS_REFUSE.'">';
|
|
||||||
print '<input type="hidden" name="IBS_TXT" value="'.$IBS_TXT.'">';
|
|
||||||
print '<input type="hidden" name="IBS_BKGD" value="'.$IBS_BKGD.'">';
|
|
||||||
print '<input type="hidden" name="IBS_WAIT" value="'.$IBS_WAIT.'">';
|
|
||||||
print '<input type="hidden" name="IBS_LANG" value="'.$IBS_LANG.'">';
|
|
||||||
print '</form>';
|
|
||||||
print "\n";
|
|
||||||
print '<script type="text/javascript" language="javascript">';
|
|
||||||
print ' document.Submit.submit();';
|
|
||||||
print '</script>';
|
|
||||||
print "\n";
|
|
||||||
print '</body></html>';
|
|
||||||
print "\n";
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -114,6 +114,7 @@ if ($mode == 'search')
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
$companystatic=new Societe($db);
|
||||||
|
|
||||||
// Do we click on purge search criteria ?
|
// Do we click on purge search criteria ?
|
||||||
if (isset($_POST["button_removefilter_x"]))
|
if (isset($_POST["button_removefilter_x"]))
|
||||||
@ -215,10 +216,10 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
|||||||
|
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($result)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$params = "&socname=".$socname."&search_nom=".$search_nom."&search_ville=".$search_ville;
|
$params = "&socname=".$socname."&search_nom=".$search_nom."&search_ville=".$search_ville;
|
||||||
@ -292,12 +293,13 @@ if ($result)
|
|||||||
|
|
||||||
while ($i < min($num,$conf->liste_limit))
|
while ($i < min($num,$conf->liste_limit))
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object();
|
$obj = $db->fetch_object($resql);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr $bc[$var]><td>";
|
print "<tr $bc[$var]><td>";
|
||||||
print "<a href=\"".DOL_URL_ROOT."/soc.php?socid=".$obj->rowid."\">";
|
$companystatic->id=$obj->rowid;
|
||||||
print img_object($langs->trans("ShowCompany"),"company");
|
$companystatic->nom=$obj->nom;
|
||||||
print "</a> <a href=\"".DOL_URL_ROOT."/soc.php?socid=".$obj->rowid."\">".$obj->nom."</a></td>\n";
|
print $companystatic->getNomUrl(1,'',24);
|
||||||
|
print "</td>\n";
|
||||||
print "<td>".$obj->ville."</td>\n";
|
print "<td>".$obj->ville."</td>\n";
|
||||||
print "<td>".$obj->idprof1."</td>\n";
|
print "<td>".$obj->idprof1."</td>\n";
|
||||||
print "<td>".$obj->idprof2."</td>\n";
|
print "<td>".$obj->idprof2."</td>\n";
|
||||||
@ -330,7 +332,7 @@ if ($result)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free();
|
$db->free($resql);
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user