';
diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php
index 70a19fc2954..c67aabac974 100644
--- a/htdocs/comm/action/fiche.php
+++ b/htdocs/comm/action/fiche.php
@@ -643,8 +643,8 @@ if ($_GET["id"])
// Confirmation suppression action
if ($_GET["action"] == 'delete')
{
- $html->form_confirm("fiche.php?id=".$_GET["id"],$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete");
- print '
';
+ $ret=$html->form_confirm("fiche.php?id=".$_GET["id"],$langs->trans("DeleteAction"),$langs->trans("ConfirmDeleteAction"),"confirm_delete");
+ if ($ret == 'html') print '
';
}
if ($_REQUEST["action"] == 'edit')
diff --git a/htdocs/comm/adresse_livraison.php b/htdocs/comm/adresse_livraison.php
index 48e45fedbdd..633dca01925 100644
--- a/htdocs/comm/adresse_livraison.php
+++ b/htdocs/comm/adresse_livraison.php
@@ -60,14 +60,14 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
$livraison->tel = $_POST["tel"];
$livraison->fax = $_POST["fax"];
$livraison->note = $_POST["note"];
-
+
if ($_POST["action"] == 'add')
{
$socid = $_POST["socid"];
$origin = $_POST["origin"];
$originid = $_POST["originid"];
$result = $livraison->create($socid, $user);
-
+
if ($result >= 0)
{
if ($origin == commande)
@@ -92,14 +92,14 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update')
$_GET["action"]='create';
}
}
-
+
if ($_POST["action"] == 'update')
{
$socid = $_POST["socid"];
$origin = $_POST["origin"];
$originid = $_POST["originid"];
$result = $livraison->update($_POST["idl"], $socid, $user);
-
+
if ($result >= 0)
{
if ($origin == commande)
@@ -132,7 +132,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes' && $user-
{
$livraison = new AdresseLivraison($db);
$result = $livraison->delete($_GET["idl"], $socid);
-
+
if ($result == 0)
{
Header("Location: adresse_livraison.php?socid=".$socid);
@@ -165,11 +165,11 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
*/
$livraison = new AdresseLivraison($db);
-
+
$societe=new Societe($db);
$societe->fetch($_GET["socid"]);
$head = societe_prepare_head($societe);
-
+
dol_fiche_head($head, 'customer', $societe->nom);
if ($_POST["label"] && $_POST["nom"])
@@ -202,23 +202,23 @@ if ($_GET["action"] == 'create' || $_POST["action"] == 'create')
$livraison->pays_code=$obj->code;
$livraison->pays=$obj->libelle;
}
-
+
print_titre($langs->trans("NewDeliveryAddress"));
print "
\n";
-
+
if ($livraison->error)
{
print '';
print nl2br($livraison->error);
print '
';
}
-
+
print ''."\n";
-
+
}
}
elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
@@ -261,11 +261,11 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
* Fiche societe en mode edition
*/
$livraison = new AdresseLivraison($db);
-
+
$societe=new Societe($db);
$societe->fetch($_GET["socid"]);
$head = societe_prepare_head($societe);
-
+
dol_fiche_head($head, 'customer', $societe->nom);
print_titre($langs->trans("EditDeliveryAddress"));
@@ -344,11 +344,11 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
print '| '.$langs->trans('Country').' | ';
$form->select_pays($livraison->pays_id,'pays_id');
print ' |
';
-
+
print '| '.$langs->trans('Phone').' | |
';
-
+
print '| '.$langs->trans('Fax').' | |
';
-
+
print '| '.$langs->trans('Note').' | |
';
@@ -375,7 +375,7 @@ else
$societe=new Societe($db);
$societe->fetch($livraison->socid);
$head = societe_prepare_head($societe);
-
+
dol_fiche_head($head, 'customer', $societe->nom);
@@ -383,8 +383,8 @@ else
if ($_GET["action"] == 'delete')
{
$html = new Form($db);
- $html->form_confirm("adresse_livraison.php?socid=".$livraison->socid."&idl=".$_GET["idl"],$langs->trans("DeleteDeliveryAddress"),$langs->trans("ConfirmDeleteDeliveryAdress"),"confirm_delete");
- print "
\n";
+ $ret=$html->form_confirm("adresse_livraison.php?socid=".$livraison->socid."&idl=".$_GET["idl"],$langs->trans("DeleteDeliveryAddress"),$langs->trans("ConfirmDeleteDeliveryAdress"),"confirm_delete");
+ if ($ret == 'html') print '
';
}
if ($livraison->error)
@@ -399,53 +399,53 @@ else
{
for ($i = 0 ; $i < $nblignes ; $i++)
{
-
+
print '';
-
+
print '| '.$langs->trans('DeliveryAddressLabel').' | '.$livraison->lignes[$i]->label.' | ';
print ''.$langs->trans('Note').' : '.nl2br($livraison->lignes[$i]->note).' |
';
print '| '.$langs->trans('Name').' | '.$livraison->lignes[$i]->nom.' |
';
-
+
print "| ".$langs->trans('Address')." | ".nl2br($livraison->lignes[$i]->adresse)." |
";
-
+
print '| '.$langs->trans('Zip').' | '.$livraison->lignes[$i]->cp." |
";
print '| '.$langs->trans('Town').' | '.$livraison->lignes[$i]->ville." |
";
-
+
print '| '.$langs->trans('Country').' | '.$livraison->lignes[$i]->pays.' | ';
-
+
print '
| '.$langs->trans('Phone').' | '.dol_print_phone($livraison->lignes[$i]->tel,$livraison->lignes[$i]->pays_code,0,$livraison->socid,'AC_TEL').' |
';
-
+
print '| '.$langs->trans('Fax').' | '.dol_print_phone($livraison->lignes[$i]->fax,$livraison->lignes[$i]->pays_code,0,$livraison->socid,'AC_FAX').' |
';
-
+
print '';
-
+
print '
';
-
-
+
+
/*
*
*/
-
+
print '';
print '
';
}
}
else
{
- print $langs->trans("None");
+ print $langs->trans("None");
}
print '';
@@ -453,7 +453,7 @@ else
/*
* Bouton actions
*/
-
+
if ($_GET["action"] == '')
{
print '';
diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index 6c1a741c11f..38c7926d1b0 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/mailing/mailing.class.php';
$langs->load("mails");
if (! $user->rights->mailing->lire || $user->societe_id > 0)
- accessforbidden();
+accessforbidden();
$message = '';
@@ -89,14 +89,14 @@ if ($_POST["action"] == 'confirm_clone' && $_POST['confirm'] == 'yes')
// Action envoi mailing pour tous
if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
{
- if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
+ if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
{
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
- // on affiche donc juste un message
- $message='
'.$langs->trans("MailingNeedCommand").'
';
- $message.='
';
- $message.='
'.$langs->trans("MailingNeedCommand2").'
';
- $_GET["action"]='';
+ // on affiche donc juste un message
+ $message='
'.$langs->trans("MailingNeedCommand").'
';
+ $message.='
';
+ $message.='
'.$langs->trans("MailingNeedCommand2").'
';
+ $_GET["action"]='';
}
else
{
@@ -133,32 +133,32 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
$resql=$db->query($sql);
if ($resql)
{
- $num = $db->num_rows($resql); // nb of possible recipients
+ $num = $db->num_rows($resql); // nb of possible recipients
- if ($num)
- {
- dol_syslog("fiche.php: nb of targets = ".$num, LOG_DEBUG);
+ if ($num)
+ {
+ dol_syslog("fiche.php: nb of targets = ".$num, LOG_DEBUG);
- // Positionne date debut envoi
- $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$id;
- $resql2=$db->query($sql);
- if (! $resql2)
- {
- dol_print_error($db);
- }
+ // Positionne date debut envoi
+ $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$id;
+ $resql2=$db->query($sql);
+ if (! $resql2)
+ {
+ dol_print_error($db);
+ }
- // Boucle sur chaque adresse et envoie le mail
- $i = 0;
+ // Boucle sur chaque adresse et envoie le mail
+ $i = 0;
- while ($i < $num && $i < $conf->global->MAILING_LIMIT_SENDBYWEB)
- {
+ while ($i < $num && $i < $conf->global->MAILING_LIMIT_SENDBYWEB)
+ {
- $res=1;
+ $res=1;
- $obj = $db->fetch_object($resql);
+ $obj = $db->fetch_object($resql);
- // sendto en RFC2822
- $sendto = eregi_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
+ // sendto en RFC2822
+ $sendto = eregi_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
// Make subtsitutions on topic and body
$other=split(';',$obj->other);
@@ -183,11 +183,11 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
$newsubject=make_substitutions($subject,$substitutionarray);
$newmessage=make_substitutions($message,$substitutionarray);
- // Fabrication du mail
- $mail = new CMailFile($newsubject, $sendto, $from, $newmessage,
- array(), array(), array(),
+ // Fabrication du mail
+ $mail = new CMailFile($newsubject, $sendto, $from, $newmessage,
+ array(), array(), array(),
'', '', 0, $msgishtml);
- $mail->errors_to = $errorsto;
+ $mail->errors_to = $errorsto;
if ($mail->error)
@@ -200,70 +200,70 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
$res=0;
}
- // Envoi du mail
+ // Envoi du mail
if ($res)
{
- $res=$mail->sendfile();
+ $res=$mail->sendfile();
}
- if ($res)
- {
- // Mail envoye avec succes
- $nbok++;
+ if ($res)
+ {
+ // Mail envoye avec succes
+ $nbok++;
- dol_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG);
+ dol_syslog("mailing-send: ok for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG);
- $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
+ $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql.=" SET statut=1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid;
- $resql2=$db->query($sql);
- if (! $resql2)
- {
- dol_print_error($db);
- }
- }
- else
- {
- // Mail en echec
- $nbko++;
+ $resql2=$db->query($sql);
+ if (! $resql2)
+ {
+ dol_print_error($db);
+ }
+ }
+ else
+ {
+ // Mail en echec
+ $nbko++;
- dol_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG);
+ dol_syslog("mailing-send: error for #".$i.($mail->error?' - '.$mail->error:''), LOG_DEBUG);
- $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
+ $sql="UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql.=" SET statut=-1, date_envoi=".$db->idate(gmmktime())." WHERE rowid=".$obj->rowid;
- $resql2=$db->query($sql);
- if (! $resql2)
- {
- dol_print_error($db);
- }
- }
+ $resql2=$db->query($sql);
+ if (! $resql2)
+ {
+ dol_print_error($db);
+ }
+ }
- $i++;
- }
- }
+ $i++;
+ }
+ }
- // Loop finished, set global statut of mail
+ // Loop finished, set global statut of mail
if ($nbko > 0)
{
- $statut=2; // Status 'sent partially' (because at least one error)
+ $statut=2; // Status 'sent partially' (because at least one error)
+ }
+ else
+ {
+ if ($nbok >= $num) $statut=3; // Send to everybody
+ else $statut=2; // Status 'sent partially' (because not send to everybody)
}
- else
- {
- if ($nbok >= $num) $statut=3; // Send to everybody
- else $statut=2; // Status 'sent partially' (because not send to everybody)
- }
- $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$id;
- dol_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG);
- $resql2=$db->query($sql);
- if (! $resql2)
- {
- dol_print_error($db);
- }
+ $sql="UPDATE ".MAIN_DB_PREFIX."mailing SET statut=".$statut." WHERE rowid=".$id;
+ dol_syslog("mailing-send: update global status sql=".$sql, LOG_DEBUG);
+ $resql2=$db->query($sql);
+ if (! $resql2)
+ {
+ dol_print_error($db);
+ }
}
else
{
- dol_syslog($db->error());
- dol_print_error($db);
+ dol_syslog($db->error());
+ dol_print_error($db);
}
$message='';
$_GET["action"] = '';
@@ -274,91 +274,91 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
// Action envoi test mailing
if ($_POST["action"] == 'send' && ! $_POST["cancel"])
{
- $mil = new Mailing($db);
- $result=$mil->fetch($_POST["mailid"]);
+ $mil = new Mailing($db);
+ $result=$mil->fetch($_POST["mailid"]);
- $mil->sendto = $_POST["sendto"];
+ $mil->sendto = $_POST["sendto"];
if (! $mil->sendto)
{
$message='
'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'
';
}
- if ($mil->sendto)
- {
- $arr_file = array();
- $arr_mime = array();
- $arr_name = array();
+ if ($mil->sendto)
+ {
+ $arr_file = array();
+ $arr_mime = array();
+ $arr_name = array();
// Le message est-il en html
$msgishtml=-1; // Inconnu par defaut
if (eregi('[ \t]*',$message)) $msgishtml=1;
- // Pratique les substitutions sur le sujet et message
+ // Pratique les substitutions sur le sujet et message
$mil->sujet=make_substitutions($mil->sujet,$substitutionarrayfortest);
$mil->body=make_substitutions($mil->body,$substitutionarrayfortest);
$mailfile = new CMailFile($mil->sujet,$mil->sendto,$mil->email_from,$mil->body,
- $arr_file,$arr_mime,$arr_name,
+ $arr_file,$arr_mime,$arr_name,
'', '', 0, $msgishtml);
- $result=$mailfile->sendfile();
- if ($result)
- {
- $message='
'.$langs->trans("MailSuccessfulySent",$mil->email_from,$mil->sendto).'
';
- }
- else
- {
- $message='
'.$langs->trans("ResultKo").'
'.$mailfile->error.' '.$result.'
';
- }
+ $result=$mailfile->sendfile();
+ if ($result)
+ {
+ $message='
'.$langs->trans("MailSuccessfulySent",$mil->email_from,$mil->sendto).'
';
+ }
+ else
+ {
+ $message='
'.$langs->trans("ResultKo").'
'.$mailfile->error.' '.$result.'
';
+ }
- $_GET["action"]='';
- $_GET["id"]=$mil->id;
- }
+ $_GET["action"]='';
+ $_GET["id"]=$mil->id;
+ }
}
// Action ajout mailing
if ($_POST["action"] == 'add')
{
- $message='';
+ $message='';
- $mil = new Mailing($db);
+ $mil = new Mailing($db);
- $mil->email_from = trim($_POST["from"]);
- $mil->titre = trim($_POST["titre"]);
- $mil->sujet = trim($_POST["sujet"]);
- $mil->body = trim($_POST["body"]);
+ $mil->email_from = trim($_POST["from"]);
+ $mil->titre = trim($_POST["titre"]);
+ $mil->sujet = trim($_POST["sujet"]);
+ $mil->body = trim($_POST["body"]);
- if (! $mil->titre) $message.=($message?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTitle"));
- if (! $mil->sujet) $message.=($message?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic"));
+ if (! $mil->titre) $message.=($message?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTitle"));
+ if (! $mil->sujet) $message.=($message?'
':'').$langs->trans("ErrorFieldRequired",$langs->trans("MailTopic"));
- if (! $message)
- {
- if ($mil->create($user) >= 0)
- {
- Header("Location: fiche.php?id=".$mil->id);
- exit;
- }
- $message=$mil->error;
- }
+ if (! $message)
+ {
+ if ($mil->create($user) >= 0)
+ {
+ Header("Location: fiche.php?id=".$mil->id);
+ exit;
+ }
+ $message=$mil->error;
+ }
- $message='
'.$message.'
';
- $_GET["action"]="create";
+ $message='
'.$message.'
';
+ $_GET["action"]="create";
}
// Action mise a jour mailing
if ($_POST["action"] == 'update')
{
- $mil = new Mailing($db);
+ $mil = new Mailing($db);
- $mil->id = $_POST["id"];
- $mil->email_from = $_POST["from"];
- $mil->titre = $_POST["titre"];
- $mil->sujet = $_POST["sujet"];
- $mil->body = $_POST["body"];
+ $mil->id = $_POST["id"];
+ $mil->email_from = $_POST["from"];
+ $mil->titre = $_POST["titre"];
+ $mil->sujet = $_POST["sujet"];
+ $mil->body = $_POST["body"];
- if ($mil->update())
- {
- Header("Location: fiche.php?id=".$mil->id);
- }
+ if ($mil->update())
+ {
+ Header("Location: fiche.php?id=".$mil->id);
+ }
}
// Action confirmation validation
@@ -432,21 +432,21 @@ if ($_POST["action"] == 'confirm_reset')
// Action confirmation suppression
if ($_POST["action"] == 'confirm_delete')
{
- if ($_POST["confirm"] == 'yes')
- {
- $mil = new Mailing($db);
- $mil->id = $_GET["id"];
+ if ($_POST["confirm"] == 'yes')
+ {
+ $mil = new Mailing($db);
+ $mil->id = $_GET["id"];
- if ($mil->delete($mil->id))
- {
- Header("Location: index.php");
- }
- }
+ if ($mil->delete($mil->id))
+ {
+ Header("Location: index.php");
+ }
+ }
}
if ($_POST["cancel"] == $langs->trans("Cancel"))
{
- $action = '';
+ $action = '';
}
@@ -466,167 +466,167 @@ if ($_GET["action"] == 'create')
{
// EMailing in creation mode
print '
';
}
else
{
- if ($mil->fetch($_GET["id"]) >= 0)
- {
- $h=0;
- $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
- $head[$h][1] = $langs->trans("MailCard");
- $hselected = $h;
- $h++;
+ if ($mil->fetch($_GET["id"]) >= 0)
+ {
+ $h=0;
+ $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
+ $head[$h][1] = $langs->trans("MailCard");
+ $hselected = $h;
+ $h++;
- $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id;
- $head[$h][1] = $langs->trans('MailRecipients');
- $h++;
+ $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id;
+ $head[$h][1] = $langs->trans('MailRecipients');
+ $h++;
-/*
- $head[$h][0] = DOL_URL_ROOT."/comm/mailing/info.php?id=".$mil->id;
- $head[$h][1] = $langs->trans("MailHistory");
- $h++;
-*/
- dol_fiche_head($head, $hselected, $langs->trans("Mailing"));
+ /*
+ $head[$h][0] = DOL_URL_ROOT."/comm/mailing/info.php?id=".$mil->id;
+ $head[$h][1] = $langs->trans("MailHistory");
+ $h++;
+ */
+ dol_fiche_head($head, $hselected, $langs->trans("Mailing"));
- // Confirmation de la validation du mailing
- if ($_GET["action"] == 'valide')
- {
- $html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valide");
- print '
';
- }
+ // Confirmation de la validation du mailing
+ if ($_GET["action"] == 'valide')
+ {
+ $ret=$html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("ValidMailing"),$langs->trans("ConfirmValidMailing"),"confirm_valide");
+ if ($ret == 'html') print '
';
+ }
- // Confirm reset
- if ($_GET["action"] == 'reset')
- {
- $html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$mil->ref),"confirm_reset");
- print '
';
- }
+ // Confirm reset
+ if ($_GET["action"] == 'reset')
+ {
+ $ret=$html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("ResetMailing"),$langs->trans("ConfirmResetMailing",$mil->ref),"confirm_reset");
+ if ($ret == 'html') print '
';
+ }
- // Confirm delete
- if ($_GET["action"] == 'delete')
- {
- $html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete");
- print '
';
- }
+ // Confirm delete
+ if ($_GET["action"] == 'delete')
+ {
+ $ret=$html->form_confirm("fiche.php?id=".$mil->id,$langs->trans("DeleteAMailing"),$langs->trans("ConfirmDeleteMailing"),"confirm_delete");
+ if ($ret == 'html') print '
';
+ }
- if ($_GET["action"] != 'edit')
- {
- /*
- * Mailing en mode visu
- *
- */
+ if ($_GET["action"] != 'edit')
+ {
+ /*
+ * Mailing en mode visu
+ *
+ */
if ($_GET["action"] == 'sendall')
{
- if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
+ if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
{
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
- // on affiche donc juste un message
- $message='
'.$langs->trans("MailingNeedCommand").'
';
- $message.='
';
- $message.='
'.$langs->trans("MailingNeedCommand2").'
';
- $_GET["action"]='';
+ // on affiche donc juste un message
+ $message='
'.$langs->trans("MailingNeedCommand").'
';
+ $message.='
';
+ $message.='
'.$langs->trans("MailingNeedCommand2").'
';
+ $_GET["action"]='';
}
else
{
$text=$langs->trans('ConfirmSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
- $html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed');
- print '
';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$_REQUEST['id'],$langs->trans('SendMailing'),$text,'sendallconfirmed');
+ if ($ret == 'html') print '
';
}
}
- print '
';
+ print '';
- print '| '.$langs->trans("Ref").' | ';
- print '';
+ print ' |
| '.$langs->trans("Ref").' | ';
+ print '';
print $html->showrefnav($mil,'id');
- print ' |
';
+ print '';
- print '| '.$langs->trans("MailTitle").' | '.$mil->titre.' |
';
- print '| '.$langs->trans("MailFrom").' | '.htmlentities($mil->email_from).' |
';
- print '| '.$langs->trans("Status").' | '.$mil->getLibStatut(4).' |
';
- print '| '.$langs->trans("TotalNbOfDistinctRecipients").' | '.($mil->nbemail?$mil->nbemail:''.$langs->trans("NoTargetYet").'').' |
';
+ print '| '.$langs->trans("MailTitle").' | '.$mil->titre.' |
';
+ print '| '.$langs->trans("MailFrom").' | '.htmlentities($mil->email_from).' |
';
+ print '| '.$langs->trans("Status").' | '.$mil->getLibStatut(4).' |
';
+ print '| '.$langs->trans("TotalNbOfDistinctRecipients").' | '.($mil->nbemail?$mil->nbemail:''.$langs->trans("NoTargetYet").'').' |
';
- $uc = new User($db, $mil->user_creat);
- $uc->fetch();
- print '| '.$langs->trans("CreatedBy").' | '.$uc->getNomUrl(1).' | ';
- print ''.$langs->trans("Date").' | ';
- print ''.dol_print_date($mil->date_creat,"dayhour").' |
';
+ $uc = new User($db, $mil->user_creat);
+ $uc->fetch();
+ print '| '.$langs->trans("CreatedBy").' | '.$uc->getNomUrl(1).' | ';
+ print ''.$langs->trans("Date").' | ';
+ print ''.dol_print_date($mil->date_creat,"dayhour").' |
';
- if ($mil->statut > 0)
- {
- $uv = new User($db, $mil->user_valid);
- $uv->fetch();
- print '| '.$langs->trans("ValidatedBy").' | '.$uv->getNomUrl(1).' | ';
- print ''.$langs->trans("Date").' | ';
- print ''.dol_print_date($mil->date_valid,"dayhour").' |
';
- }
+ if ($mil->statut > 0)
+ {
+ $uv = new User($db, $mil->user_valid);
+ $uv->fetch();
+ print '| '.$langs->trans("ValidatedBy").' | '.$uv->getNomUrl(1).' | ';
+ print ''.$langs->trans("Date").' | ';
+ print ''.dol_print_date($mil->date_valid,"dayhour").' |
';
+ }
- if ($mil->statut > 1)
- {
- print '| '.$langs->trans("SentBy").' | '.$langs->trans("Unknown").' | ';
- print ''.$langs->trans("Date").' | ';
- print ''.dol_print_date($mil->date_envoi,"dayhour").' |
';
- }
+ if ($mil->statut > 1)
+ {
+ print '| '.$langs->trans("SentBy").' | '.$langs->trans("Unknown").' | ';
+ print ''.$langs->trans("Date").' | ';
+ print ''.dol_print_date($mil->date_envoi,"dayhour").' |
';
+ }
- // Sujet
- print '| '.$langs->trans("MailTopic").' | '.$mil->sujet.' |
';
+ // Sujet
+ print '| '.$langs->trans("MailTopic").' | '.$mil->sujet.' |
';
// Message
- print '| '.$langs->trans("MailMessage").' | ';
- print '';
- print dol_htmlentitiesbr($mil->body);
- print ' | ';
- print '
';
+ print '| '.$langs->trans("MailMessage").' | ';
+ print '';
+ print dol_htmlentitiesbr($mil->body);
+ print ' | ';
+ print '
';
- print '
';
+ print '
';
- print "
";
+ print "";
- // Clone confirmation
+ // Clone confirmation
if ($_GET["action"] == 'clone')
{
// Create an array for form
$formquestion=array(
'text' => $langs->trans("ConfirmClone"),
- array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneContent"), 'value' => 1),
- array('type' => 'checkbox', 'name' => 'clone_receviers', 'label' => $langs->trans("CloneReceivers").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true)
+ array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneContent"), 'value' => 1),
+ array('type' => 'checkbox', 'name' => 'clone_receviers', 'label' => $langs->trans("CloneReceivers").' ('.$langs->trans("FeatureNotYetAvailable").')', 'value' => 0, 'disabled' => true)
);
// Paiement incomplet. On demande si motif = escompte ou autre
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$mil->id,$langs->trans('CloneEMailing'),$langs->trans('ConfirmCloneEMailing',$mil->ref),'confirm_clone',$formquestion,'yes');
@@ -636,7 +636,7 @@ else
if ($mesg) print $mesg;
- if ($_GET["action"] == 'sendall')
+ if ($_GET["action"] == 'sendall')
{
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
// on affiche donc juste un message
@@ -644,141 +644,141 @@ else
$message.='
';
}
- if ($message) print "$message
";
+ if ($message) print "$message
";
- /*
- * Boutons d'action
- */
- if ($_GET["action"] == '')
- {
- print "\n\n\n";
+ /*
+ * Boutons d'action
+ */
+ if ($_GET["action"] == '')
+ {
+ print "\n\n
';
- }
+ print '
';
+ }
// Affichage formulaire de TEST
- if ($_GET["action"] == 'test')
- {
- print_titre($langs->trans("TestMailing"));
+ if ($_GET["action"] == 'test')
+ {
+ print_titre($langs->trans("TestMailing"));
- // Create l'objet formulaire mail
- include_once("../../html.formmail.class.php");
- $formmail = new FormMail($db);
- $formmail->fromname = $mil->email_from;
- $formmail->frommail = $mil->email_from;
- $formmail->withsubstit=1;
- $formmail->withfrom=0;
- $formmail->withto=$user->email?$user->email:1;
- $formmail->withtocc=0;
- $formmail->withtopic=0;
- $formmail->withtopicreadonly=1;
- $formmail->withfile=0;
- $formmail->withbody=0;
- $formmail->withbodyreadonly=1;
- $formmail->withcancel=1;
- $formmail->withdeliveryreceipt=0;
- // Tableau des substitutions
- $formmail->substit=$substitutionarrayfortest;
- // Tableau des parametres complementaires du post
- $formmail->param["action"]="send";
- $formmail->param["models"]="body";
- $formmail->param["mailid"]=$mil->id;
- $formmail->param["returnurl"]=DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
+ // Create l'objet formulaire mail
+ include_once("../../html.formmail.class.php");
+ $formmail = new FormMail($db);
+ $formmail->fromname = $mil->email_from;
+ $formmail->frommail = $mil->email_from;
+ $formmail->withsubstit=1;
+ $formmail->withfrom=0;
+ $formmail->withto=$user->email?$user->email:1;
+ $formmail->withtocc=0;
+ $formmail->withtopic=0;
+ $formmail->withtopicreadonly=1;
+ $formmail->withfile=0;
+ $formmail->withbody=0;
+ $formmail->withbodyreadonly=1;
+ $formmail->withcancel=1;
+ $formmail->withdeliveryreceipt=0;
+ // Tableau des substitutions
+ $formmail->substit=$substitutionarrayfortest;
+ // Tableau des parametres complementaires du post
+ $formmail->param["action"]="send";
+ $formmail->param["models"]="body";
+ $formmail->param["mailid"]=$mil->id;
+ $formmail->param["returnurl"]=DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id;
- // Init list of files
- if (! empty($_REQUEST["mode"]) && $_REQUEST["mode"]=='init')
- {
- $formmail->clear_attached_files();
- }
+ // Init list of files
+ if (! empty($_REQUEST["mode"]) && $_REQUEST["mode"]=='init')
+ {
+ $formmail->clear_attached_files();
+ }
- $formmail->show_form();
+ $formmail->show_form();
- print '
';
- }
+ print '
';
+ }
- }
- else
- {
- /*
- * Mailing en mode edition
- */
- print '';
- print "";
- }
- }
+ print "";
+ }
+ }
}
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 0454e59ff0c..f8cdacc5114 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -916,8 +916,8 @@ if ($id > 0 || ! empty($ref))
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$propal->ref),'confirm_clone',$formquestion,'yes');
- print '
';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id,$langs->trans('ClonePropal'),$langs->trans('ConfirmClonePropal',$propal->ref),'confirm_clone',$formquestion,'yes');
+ if ($ret == 'html') print '
';
}
/*
@@ -925,8 +925,8 @@ if ($id > 0 || ! empty($ref))
*/
if ($_GET['action'] == 'delete')
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete');
- print '
';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp'), 'confirm_delete');
+ if ($ret == 'html') print '
';
}
/*
@@ -934,8 +934,8 @@ if ($id > 0 || ! empty($ref))
*/
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
- print '
';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
+ if ($ret == 'html') print '
';
}
/*
@@ -943,8 +943,8 @@ if ($id > 0 || ! empty($ref))
*/
if ($_GET['action'] == 'validate')
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('ValidateProp'), $langs->trans('ConfirmValidateProp'), 'confirm_validate');
- print '
';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?propalid='.$propal->id, $langs->trans('ValidateProp'), $langs->trans('ConfirmValidateProp'), 'confirm_validate');
+ if ($ret == 'html') print '
';
}
@@ -1460,15 +1460,7 @@ if ($id > 0 || ! empty($ref))
print '';
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
- if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes';
- print 'trans("No").'\',\'deleteline'.$i.'\')">';
- }
- else
- {
- print 'id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
- }
+ print 'id.'&action=ask_deleteline&lineid='.$objp->rowid.'">';
}
else
{
@@ -1763,16 +1755,7 @@ if ($id > 0 || ! empty($ref))
// Valid
if ($propal->statut == 0 && $user->rights->propale->valider)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_validate&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmValidateProp')).'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=validate"';
- }
+ print 'id.'&action=validate"';
print '>'.$langs->trans('Validate').'';
}
@@ -1821,16 +1804,7 @@ if ($id > 0 || ! empty($ref))
// Delete
if ($user->rights->propale->supprimer)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=confirm_delete&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.$langs->trans('ConfirmDeleteProp').'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'delete\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'&action=delete"';
- }
+ print 'id.'&action=delete"';
print '>'.$langs->trans('Delete').'';
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 4eca815dc28..cab7c300ba9 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1203,8 +1203,8 @@ else
*/
if ($_GET['action'] == 'delete')
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete');
+ if ($ret == 'html') print ' ';
}
/*
@@ -1225,7 +1225,7 @@ else
$text=$langs->trans('ConfirmValidateOrder',$num);
$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('ValidateOrder'), $text, 'confirm_validate');
- print ' ';
+ if ($ret == 'html') print ' ';
}
/*
@@ -1233,8 +1233,8 @@ else
*/
if ($_GET['action'] == 'close')
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_close');
+ if ($ret == 'html') print ' ';
}
/*
@@ -1242,8 +1242,8 @@ else
*/
if ($_GET['action'] == 'cancel')
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('Cancel'), $langs->trans('ConfirmCancelOrder'), 'confirm_cancel');
+ if ($ret == 'html') print ' ';
}
/*
@@ -1251,8 +1251,8 @@ else
*/
if ($_GET['action'] == 'ask_deleteline' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline');
+ if ($ret == 'html') print ' ';
}
// Clone confirmation
@@ -1264,8 +1264,8 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $html->form_confirm($_SERVER["PHP_SELF"].'?id='.$commande->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$commande->ref),'confirm_clone',$formquestion,'yes');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$commande->id,$langs->trans('CloneOrder'),$langs->trans('ConfirmCloneOrder',$commande->ref),'confirm_clone',$formquestion,'yes');
+ if ($ret == 'html') print ' ';
}
/*
@@ -1638,15 +1638,7 @@ else
print ' | ';
if ($conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
- if ($conf->use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?id='.$id.'&lineid='.$objp->rowid.'&action=confirm_deleteline&confirm=yes';
- print 'trans("No")).'\',\'deleteline'.$i.'\')">';
- }
- else
- {
- print 'rowid.'">';
- }
+ print 'rowid.'">';
}
else
{
@@ -1929,26 +1921,7 @@ else
// Valid
if ($commande->statut == 0 && $commande->total_ttc >= 0 && $numlines > 0 && $user->rights->commande->valider)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- // on verifie si la commande est en numerotation provisoire
- $ref = substr($commande->ref, 1, 4);
- if ($ref == 'PROV')
- {
- $num = $commande->getNextNumRef($soc);
- }
- else
- {
- $num = $commande->ref;
- }
- $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_validate&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmValidateOrder',$num)).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'validate\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=validate"';
- }
+ print 'id.'&action=validate"';
print '>'.$langs->trans('Validate').'';
}
@@ -2004,16 +1977,7 @@ else
{
if ($user->rights->commande->cloturer)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_close&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmCloseOrder')).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'close\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=close"';
- }
+ print 'id.'&action=close"';
print '>'.$langs->trans('Close').'';
}
}
@@ -2024,16 +1988,7 @@ else
$nb_expedition = $commande->nb_expedition();
if ($user->rights->commande->annuler && $nb_expedition == 0)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_cancel&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmCancelOrder')).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'cancel\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=cancel"';
- }
+ print 'id.'&action=cancel"';
print '>'.$langs->trans('CancelOrder').'';
}
}
@@ -2047,16 +2002,7 @@ else
// Delete order
if ($user->rights->commande->supprimer)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- $url = $_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=confirm_delete&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmDeleteOrder')).'\',\''.dol_escape_js($langs->trans("Yes")).'\',\''.dol_escape_js($langs->trans("No")).'\',\'delete\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'&action=delete"';
- }
+ print 'id.'&action=delete"';
print '>'.$langs->trans('Delete').'';
}
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 9fdc9dc0b9b..8aab077fada 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -154,12 +154,12 @@ if ($account || $_GET["ref"])
// Chargement des categories bancaires dans $options
$nbcategories=0;
-
+
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE entity = ".$conf->entity;
$sql.= " ORDER BY label";
-
+
$result = $db->query($sql);
if ($result)
{
@@ -313,8 +313,8 @@ if ($account || $_GET["ref"])
if ($_GET["action"]=='delete')
{
$text=$langs->trans('ConfirmDeleteTransaction');
- $html->form_confirm($_SERVER['PHP_SELF'].'?account='.$acct->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?account='.$acct->id.'&rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
+ if ($ret == 'html') print ' ';
}
diff --git a/htdocs/compta/bank/bankid_fr.php b/htdocs/compta/bank/bankid_fr.php
index e9adb08036c..5ad9ec80254 100644
--- a/htdocs/compta/bank/bankid_fr.php
+++ b/htdocs/compta/bank/bankid_fr.php
@@ -56,7 +56,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
$account->number = trim($_POST["number"]);
$account->cle_rib = trim($_POST["cle_rib"]);
$account->bic = trim($_POST["bic"]);
- $account->iban = trim($_POST["iban_prefix"]);
+ $account->iban = trim($_POST["iban_prefix"]);
$account->iban_prefix = trim($_POST["iban_prefix"]); // deprecated
$account->domiciliation = trim($_POST["domiciliation"]);
$account->proprio = trim($_POST["proprio"]);
@@ -127,17 +127,17 @@ if (($_GET["id"] || $_GET["ref"]) && $_GET["action"] != 'edit')
*/
if ($_GET["action"] == 'delete')
{
- $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
- print ' ';
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
+ if ($ret == 'html') print ' ';
}
// Check BBAN
- if (! checkBanForAccount($account))
+ if (! checkBanForAccount($account))
{
print ''.$langs->trans("RIBControlError").' ';
}
-
-
+
+
print '';
// Ref
@@ -165,23 +165,23 @@ if (($_GET["id"] || $_GET["ref"]) && $_GET["action"] != 'edit')
print '| '.$langs->trans("BankCode").' | ';
print ''.$account->code_banque.' | ';
print ' ';
-
+
print '| '.$langs->trans("DeskCode").' | ';
print ''.$account->code_guichet.' | ';
print ' ';
}
-
+
print '| '.$langs->trans("BankAccountNumber").' | ';
print ''.$account->number.' | ';
print ' ';
-
+
if ($account->useDetailedBBAN())
{
print '| '.$langs->trans("BankAccountNumberKey").' | ';
print ''.$account->cle_rib.' | ';
print ' ';
}
-
+
print '| '.$langs->trans("IBAN").' | ';
print ''.$account->iban_prefix.' | ';
@@ -273,12 +273,12 @@ if ($_GET["id"] && $_GET["action"] == 'edit' && $user->rights->banque->configure
print '| '.$langs->trans("BankCode").' | ';
print ' | ';
print ' ';
-
+
print '| '.$langs->trans("DeskCode").' | ';
print ' | ';
print ' ';
}
-
+
print ''.$langs->trans("BankAccountNumber").' | ';
print ' | ';
print '';
diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php
index 1ed227ee49e..f8eb0f57659 100644
--- a/htdocs/compta/bank/fiche.php
+++ b/htdocs/compta/bank/fiche.php
@@ -289,8 +289,8 @@ else
*/
if ($_GET["action"] == 'delete')
{
- $form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
- print ' ';
+ $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$account->id,$langs->trans("DeleteAccount"),$langs->trans("ConfirmDeleteAccount"),"confirm_delete");
+ if ($ret == 'html') print ' ';
}
print '';
diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php
index 0f682cd6f18..6eafbd96430 100644
--- a/htdocs/compta/bank/ligne.php
+++ b/htdocs/compta/bank/ligne.php
@@ -219,8 +219,8 @@ if ($result)
// Confirmations
if ($_GET["action"] == 'delete_categ')
{
- $html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,$langs->trans("RemoveFromRubrique"),$langs->trans("RemoveFromRubriqueConfirm"),"confirm_delete_categ");
- print ' ';
+ $ret=$html->form_confirm("ligne.php?rowid=".$_GET["rowid"]."&cat1=".$_GET["fk_categ"]."&orig_account=".$orig_account,$langs->trans("RemoveFromRubrique"),$langs->trans("RemoveFromRubriqueConfirm"),"confirm_delete_categ");
+ if ($ret == 'html') print ' ';
}
print '';
@@ -238,7 +238,7 @@ if ($result)
print '| '.$langs->trans("Ref")." | ";
print ''.$objp->rowid.' | ';
print ' ';
-
+
// Author
print '| '.$langs->trans("Author")." | ";
if ($objp->fk_user_author)
diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php
index 9cb129e313c..f69b89d1994 100644
--- a/htdocs/compta/deplacement/fiche.php
+++ b/htdocs/compta/deplacement/fiche.php
@@ -237,11 +237,8 @@ else
*/
if ($_GET["action"] == 'delete')
{
-
- $html = new Form($db);
- $html->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
-
- print ' ';
+ $ret=$html->form_confirm("fiche.php?id=".$id,$langs->trans("DeleteTrip"),$langs->trans("ConfirmDeleteTrip"),"confirm_delete");
+ if ($ret == 'html') print ' ';
}
$soc = new Societe($db);
@@ -253,9 +250,9 @@ else
print ''.$langs->trans("Ref").' | ';
print $deplacement->ref;
print ' | ';
-
+
print '| '.$langs->trans("Type").' | '.$langs->trans($deplacement->type).' | ';
-
+
print '| '.$langs->trans("CompanyVisited").' | ';
print '';
if ($soc->id) print $soc->getNomUrl(1);
@@ -266,13 +263,13 @@ else
$userfee->fetch();
print $userfee->getNomUrl(1);
print ' | ';
-
+
print '| '.$langs->trans("Date").' | ';
print dol_print_date($deplacement->date);
print ' | ';
-
+
print '| '.$langs->trans("FeesKilometersOrAmout").' | '.$deplacement->km.' | ';
-
+
print " ";
print '';
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index c06d69e1e6b..cead2d72e12 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -2004,16 +2004,16 @@ else
if ($_GET['action'] == 'converttoreduc')
{
$text=$langs->trans('ConfirmConvertToReduc');
- $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc');
- print ' ';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('ConvertToReduc'),$text,'confirm_converttoreduc');
+ if ($ret == 'html') print ' ';
}
// Confirmation de la suppression de la facture
if ($_GET['action'] == 'delete')
{
$text=$langs->trans('ConfirmDeleteBill');
- $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('DeleteBill'),$text,'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('DeleteBill'),$text,'confirm_delete');
+ if ($ret == 'html') print ' ';
}
// Confirmation de la validation
@@ -2046,15 +2046,15 @@ else
$text.=$notify->confirmMessage(2,$fac->socid);
}
- $html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ValidateBill'),$text,'confirm_valid');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ValidateBill'),$text,'confirm_valid');
+ if ($ret == 'html') print ' ';
}
// Confirmation du classement payé
if ($_GET['action'] == 'payed' && $resteapayer <= 0)
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedBill',$fac->ref),'confirm_payed');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedBill',$fac->ref),'confirm_payed');
+ if ($ret == 'html') print ' ';
}
if ($_GET['action'] == 'payed' && $resteapayer > 0)
{
@@ -2083,8 +2083,8 @@ else
array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100')
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedPartially',$fac->ref),'confirm_payed_partially',$formquestion);
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('ClassifyPayed'),$langs->trans('ConfirmClassifyPayedPartially',$fac->ref),'confirm_payed_partially',$formquestion);
+ if ($ret == 'html') print ' ';
}
// Confirmation du classement abandonne
@@ -2124,16 +2124,16 @@ else
array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'size' => '100')
);
- $html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$fac->ref),'confirm_canceled',$formquestion);
- print ' ';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$fac->id,$langs->trans('CancelBill'),$langs->trans('ConfirmCancelBill',$fac->ref),'confirm_canceled',$formquestion);
+ if ($ret == 'html') print ' ';
}
}
// Confirmation de la suppression d'une ligne produit
if ($_GET['action'] == 'delete_product_line' && $conf->global->PRODUIT_CONFIRM_DELETE_LINE)
{
- $html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id.'&rowid='.$_GET["rowid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline', '', 'no');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id.'&rowid='.$_GET["rowid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteproductline', '', 'no');
+ if ($ret == 'html') print ' ';
}
// Clone confirmation
@@ -2145,8 +2145,8 @@ else
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
);
// Paiement incomplet. On demande si motif = escompte ou autre
- $html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$fac->ref),'confirm_clone',$formquestion,'yes');
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$fac->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$fac->ref),'confirm_clone',$formquestion,'yes');
+ if ($ret == 'html') print ' ';
}
@@ -3182,19 +3182,7 @@ else
{
if ($user->rights->facture->valider)
{
- print 'use_javascript_ajax && $conf->global->MAIN_CONFIRM_AJAX)
- {
- // We check if number is temporary number
- if (eregi('^\(PROV',$fac->ref)) $num = $fac->getNextNumRef($soc);
- else $num = $fac->ref;
- $url = $_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=confirm_valid&confirm=yes';
- print 'href="#" onClick="dialogConfirm(\''.$url.'\',\''.dol_escape_js($langs->trans('ConfirmValidateBill',$num)).'\',\''.$langs->trans("Yes").'\',\''.$langs->trans("No").'\',\'validate\')"';
- }
- else
- {
- print 'href="'.$_SERVER["PHP_SELF"].'?facid='.$fac->id.'&action=valid"';
- }
+ print 'id.'&action=valid"';
print '>'.$langs->trans('Validate').'';
}
}
diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php
index d6c418bca9e..b79ddc8a35e 100644
--- a/htdocs/compta/paiement.php
+++ b/htdocs/compta/paiement.php
@@ -470,10 +470,9 @@ if ($_GET['action'] == 'create' || $_POST['action'] == 'confirm_paiement' || $_P
if ($_POST["action"] == 'add_paiement')
{
// print '';
- print ' ';
+ print ' ';
$text=$langs->trans('ConfirmCustomerPayment',$totalpaiement,$langs->trans("Currency".$conf->monnaie));
$html->form_confirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion);
- // print ' | ';
}
print "\n";
diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php
index b290ca56e77..4a5fb831671 100644
--- a/htdocs/compta/paiement/cheque/fiche.php
+++ b/htdocs/compta/paiement/cheque/fiche.php
@@ -133,7 +133,7 @@ if ($_POST['action'] == 'builddoc' && $user->rights->banque)
$outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
-
+
$result = $remisecheque->GeneratePdf($_POST["model"], $outputlangs);
if ($result <= 0)
{
@@ -197,8 +197,8 @@ else
*/
if ($_GET['action'] == 'delete')
{
- $html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("DeleteCheckReceipt"), $langs->trans("ConfirmDeleteCheckReceipt"), 'confirm_delete');
+ if ($ret == 'html') print ' ';
}
/*
@@ -207,8 +207,8 @@ else
if ($_GET['action'] == 'valide')
{
$facid = $_GET['facid'];
- $html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide');
- print ' ';
+ $ret=$html->form_confirm('fiche.php?id='.$remisecheque->id, $langs->trans("ValidateCheckReceipt"), $langs->trans("ConfirmValidateCheckReceipt"), 'confirm_valide');
+ if ($ret == 'html') print ' ';
}
}
diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php
index cc97fe3c89c..0ab3bca493f 100644
--- a/htdocs/compta/paiement/fiche.php
+++ b/htdocs/compta/paiement/fiche.php
@@ -143,8 +143,8 @@ dol_fiche_head($head, $hselected, $langs->trans("PaymentCustomerInvoice"));
*/
if ($_GET['action'] == 'delete')
{
- $html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm('fiche.php?id='.$paiement->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
+ if ($ret == 'html') print ' ';
}
/*
@@ -153,8 +153,8 @@ if ($_GET['action'] == 'delete')
if ($_GET['action'] == 'valide')
{
$facid = $_GET['facid'];
- $html->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide');
- print ' ';
+ $ret=$html->form_confirm('fiche.php?id='.$paiement->id.'&facid='.$facid, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide');
+ if ($ret == 'html') print ' ';
}
diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php
index 5ea922c4c15..c983e1b049e 100644
--- a/htdocs/compta/prelevement/fiche.php
+++ b/htdocs/compta/prelevement/fiche.php
@@ -150,8 +150,8 @@ if ($_GET["id"])
if ($_GET["action"] == 'credite')
{
- $html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite");
- print ' ';
+ $ret=$html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite");
+ if ($ret == 'html') print ' ';
}
print '';
diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php
index 36a7ea90034..c286fb36b46 100644
--- a/htdocs/compta/sociales/charges.php
+++ b/htdocs/compta/sociales/charges.php
@@ -262,15 +262,15 @@ if ($chid > 0)
if ($_GET["action"] == 'payed')
{
$text=$langs->trans('ConfirmPaySocialContribution');
- $html->form_confirm($_SERVER["PHP_SELF"]."?id=$cha->id&action=confirm_payed",$langs->trans('PaySocialContribution'),$text,"confirm_payed");
- print ' ';
+ $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=$cha->id&action=confirm_payed",$langs->trans('PaySocialContribution'),$text,"confirm_payed");
+ if ($ret == 'html') print ' ';
}
if ($_GET['action'] == 'delete')
{
$text=$langs->trans('ConfirmDeleteSocialContribution');
- $html->form_confirm($_SERVER['PHP_SELF'].'?id='.$cha->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete');
- print ' ';
+ $ret=$html->form_confirm($_SERVER['PHP_SELF'].'?id='.$cha->id,$langs->trans('DeleteSocialContribution'),$text,'confirm_delete');
+ if ($ret == 'html') print ' ';
}
if ($_GET['action'] == 'edit') print " |