diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 17b653d6a55..7e699ddd0ad 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -83,7 +83,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index 6ad8d6abcc8..5647ae16839 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -552,7 +552,7 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confir } else { - Header("Location: liste.php"); + header("Location: liste.php"); exit; } } diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index b870ed6037a..02c9539d262 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -130,7 +130,7 @@ if ($_REQUEST["action"] == 'confirm_delete' && $_REQUEST["confirm"] == 'yes' && $result=$subscription->delete($user); if ($result > 0) { - Header("Location: card_subscriptions.php?rowid=".$subscription->fk_adherent); + header("Location: card_subscriptions.php?rowid=".$subscription->fk_adherent); exit; } else diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 3c5150fa7f5..503c4e2183b 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -83,7 +83,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) $id=$adht->create($user->id); if ($id > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -114,7 +114,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) $adht->update($user->id); - Header("Location: ".$_SERVER["PHP_SELF"]."?rowid=".$_POST["rowid"]); + header("Location: ".$_SERVER["PHP_SELF"]."?rowid=".$_POST["rowid"]); exit; } } @@ -123,7 +123,7 @@ if ($action == 'delete' && $user->rights->adherent->configurer) { $adht = new AdherentType($db); $adht->delete($rowid); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index b1112017b80..91c376a32f6 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -70,7 +70,7 @@ else if ($action == 'GENBARCODE_BARCODETYPE_THIRDPARTY') else if ($_POST["action"] == 'setproductusebarcode') { dolibarr_set_const($db, "PRODUIT_USE_BARCODE",$_POST["value"],'chaine',0,'',$conf->entity); - Header("Location: barcode.php"); + header("Location: barcode.php"); exit; } */ diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index e1ca04bb00e..5380e94aec3 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -125,7 +125,7 @@ if ($action == 'add') if (! $error) { - Header("Location: boxes.php"); + header("Location: boxes.php"); $db->commit(); exit; } diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 3cf7e1101ba..18d7aafe3f5 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -159,7 +159,7 @@ if ( ($action == 'update' && empty($_POST["cancel"])) if ($action != 'updateedit' && ! $message) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } } @@ -193,7 +193,7 @@ if ($action == 'addthumb') } else dol_syslog($imgThumbMini); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index f2cdf0bd22e..d6859188a25 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -40,13 +40,13 @@ $action=GETPOST('action','alpha'); if ($action == 'activate_sending') { dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); - Header("Location: confexped.php"); + header("Location: confexped.php"); exit; } else if ($action == 'disable_sending') { dolibarr_del_const($db, "MAIN_SUBMODULE_EXPEDITION",$conf->entity); - Header("Location: confexped.php"); + header("Location: confexped.php"); exit; } // Delivery note @@ -54,13 +54,13 @@ else if ($action == 'activate_delivery') { dolibarr_set_const($db, "MAIN_SUBMODULE_EXPEDITION", "1",'chaine',0,'',$conf->entity); // We must also enable this dolibarr_set_const($db, "MAIN_SUBMODULE_LIVRAISON", "1",'chaine',0,'',$conf->entity); - Header("Location: confexped.php"); + header("Location: confexped.php"); exit; } else if ($action == 'disable_delivery') { dolibarr_del_const($db, "MAIN_SUBMODULE_LIVRAISON",$conf->entity); - Header("Location: confexped.php"); + header("Location: confexped.php"); exit; } diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 7b978bb5c8d..856f5a412d9 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -73,13 +73,13 @@ foreach($modules as $const => $desc) { dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity); } - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } if ($action == 'disable_'.strtolower($const)) { dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const,$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } } diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 6227aa5fb72..0db18adcf80 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -78,7 +78,7 @@ if ($action == 'update') $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer - Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 6fbb135955b..8f7369de21b 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -73,7 +73,7 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_ROUNDING_RULE_TOT", $_POST["MAIN_ROUNDING_RULE_TOT"],'chaine',0,'',$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } } diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index e3e822577ee..b2e924749a4 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -68,7 +68,7 @@ if ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", GETPOST("MAIN_MAIL_AUTOCOPY_TO"),'chaine',0,'',$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 800f10a15d7..123d38f6382 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -185,7 +185,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes') { $db->commit(); - Header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler.'&mesg='.urlencode($langs->trans("MenuDeleted"))); + header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler.'&mesg='.urlencode($langs->trans("MenuDeleted"))); exit ; } else diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index d9e6a2d8baf..617c1fe70b6 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -40,26 +40,26 @@ $action=GETPOST('action','alpha'); if ($action == 'activate_hidemenu') { dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1','chaine',0,'',$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else if ($action == 'disable_hidemenu') { dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED",$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } if ($action == 'activate_layoutmenu') { dolibarr_set_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT", '1','chaine',0,'',$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else if ($action == 'disable_layoutmenu') { dolibarr_del_const($db, "MAIN_MENU_USE_JQUERY_LAYOUT",$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index c142bcde3ea..170e4ad0bce 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -47,7 +47,7 @@ if ($action == 'set' && $user->admin) $result=activateModule($_GET["value"]); $mesg=''; if ($result) $mesg=$result; - Header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg)); + header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg)); exit; } @@ -56,7 +56,7 @@ if ($action == 'reset' && $user->admin) $result=unActivateModule($_GET["value"]); $mesg=''; if ($result) $mesg=$result; - Header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg)); + header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg)); exit; } diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index be361ec177e..e1174df4f2b 100755 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -63,7 +63,7 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity); } - Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index ab8e3b898f3..bee489b5454 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -92,7 +92,7 @@ if ($action == "addnotif") $bon = new BonPrelevement($db); $bon->AddNotification($db,GETPOST('user','int'),$action); - Header("Location: prelevement.php"); + header("Location: prelevement.php"); exit; } @@ -101,7 +101,7 @@ if ($action == "deletenotif") $bon = new BonPrelevement($db); $bon->DeleteNotificationById(GETPOST('notif','int')); - Header("Location: prelevement.php"); + header("Location: prelevement.php"); exit; } diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 9acd06e091d..5d1c218f6a3 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -51,7 +51,7 @@ if ($action == 'setgeneraterule') } else { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } } @@ -102,7 +102,7 @@ if ($action == 'activate_encrypt') if (! $error) { $db->commit(); - Header("Location: security.php"); + header("Location: security.php"); exit; } else @@ -119,7 +119,7 @@ else if ($action == 'disable_encrypt') { dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED",$conf->entity); } - Header("Location: security.php"); + header("Location: security.php"); exit; } @@ -130,7 +130,7 @@ if ($action == 'activate_encryptdbpassconf') { // database value not required //dolibarr_set_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED", "1"); - Header("Location: security.php"); + header("Location: security.php"); exit; } else @@ -145,7 +145,7 @@ else if ($action == 'disable_encryptdbpassconf') { // database value not required //dolibarr_del_const($db, "MAIN_DATABASE_PWD_CONFIG_ENCRYPTED",$conf->entity); - Header("Location: security.php"); + header("Location: security.php"); exit; } else @@ -157,26 +157,26 @@ else if ($action == 'disable_encryptdbpassconf') if ($action == 'activate_pdfsecurity') { dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity); - Header("Location: security.php"); + header("Location: security.php"); exit; } else if ($action == 'disable_pdfsecurity') { dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity); - Header("Location: security.php"); + header("Location: security.php"); exit; } if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_set_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", '1','chaine',0,'',$conf->entity); - Header("Location: security.php"); + header("Location: security.php"); exit; } else if ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK",$conf->entity); - Header("Location: security.php"); + header("Location: security.php"); exit; } diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 22f31b3ff67..2ba43a0aedf 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -49,26 +49,26 @@ if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($_GET["action"] == 'activate_captcha') { dolibarr_set_const($db, "MAIN_SECURITY_ENABLECAPTCHA", '1','chaine',0,'',$conf->entity); - Header("Location: security_other.php"); + header("Location: security_other.php"); exit; } else if ($_GET["action"] == 'disable_captcha') { dolibarr_del_const($db, "MAIN_SECURITY_ENABLECAPTCHA",$conf->entity); - Header("Location: security_other.php"); + header("Location: security_other.php"); exit; } if ($_GET["action"] == 'activate_advancedperms') { dolibarr_set_const($db, "MAIN_USE_ADVANCED_PERMS", '1','chaine',0,'',$conf->entity); - Header("Location: security_other.php"); + header("Location: security_other.php"); exit; } else if ($_GET["action"] == 'disable_advancedperms') { dolibarr_del_const($db, "MAIN_USE_ADVANCED_PERMS",$conf->entity); - Header("Location: security_other.php"); + header("Location: security_other.php"); exit; } diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 34c74319b4f..0b4ea95f577 100755 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -58,7 +58,7 @@ if ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_MAIL_SMS_FROM", $_POST["MAIN_MAIL_SMS_FROM"],'chaine',0,'',$conf->entity); //dolibarr_set_const($db, "MAIN_MAIL_AUTOCOPY_TO", $_POST["MAIN_MAIL_AUTOCOPY_TO"],'chaine',0,'',$conf->entity); - Header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 8b002bd1409..bf9bec788d4 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -43,7 +43,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -57,7 +57,7 @@ if (preg_match('/del_(.*)/',$action,$reg)) $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 1a04f8f86a3..aec3b331d45 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -209,15 +209,15 @@ if ($action == 'add_action') if (! empty($backtopage)) { dol_syslog("Back to ".$backtopage); - Header("Location: ".$backtopage); + header("Location: ".$backtopage); } elseif($idaction) { - Header("Location: ".DOL_URL_ROOT.'/comm/action/fiche.php?id='.$idaction); + header("Location: ".DOL_URL_ROOT.'/comm/action/fiche.php?id='.$idaction); } else { - Header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'); + header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'); } exit; } @@ -255,7 +255,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == 'yes') if ($result >= 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 6c36bb91774..8dff4d7178d 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -80,27 +80,27 @@ if ($action == 'add' || $action == 'update') { if (! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else if ($origin == 'commande') { - Header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); + header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); exit; } elseif ($origin == 'propal') { - Header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); + header("Location: ../comm/propal/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid); exit; } elseif ($origin == 'shipment') { - Header("Location: ../expedition/fiche.php?id=".$originid); + header("Location: ../expedition/fiche.php?id=".$originid); exit; } else { - Header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); + header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); exit; } } @@ -120,27 +120,27 @@ if ($action == 'add' || $action == 'update') { if (! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else if ($origin == 'commande') { - Header("Location: ../commande/contact.php?id=".$originid); + header("Location: ../commande/contact.php?id=".$originid); exit; } elseif ($origin == 'propal') { - Header("Location: ../comm/propal/contact.php?id=".$originid); + header("Location: ../comm/propal/contact.php?id=".$originid); exit; } elseif ($origin == 'shipment') { - Header("Location: ../expedition/fiche.php?id=".$originid); + header("Location: ../expedition/fiche.php?id=".$originid); exit; } else { - Header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); + header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); exit; } } @@ -160,7 +160,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->soci if ($result == 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); + header("Location: ".$_SERVER['PHP_SELF']."?socid=".$socid); exit ; } else diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 2ec4c39c1c7..fc9894caf6d 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -100,7 +100,7 @@ if ($action == 'add') if ($result > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } if ($result == 0) @@ -120,7 +120,7 @@ if ($action == 'clear') $obj = new $classname($db); $obj->clear_target($id); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } @@ -137,12 +137,12 @@ if ($action == 'delete') $obj = new $classname($db); $obj->update_nb($id); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else { - Header("Location: liste.php"); + header("Location: liste.php"); exit; } } diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 96b21b1a192..4eeeb428128 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -448,7 +448,7 @@ if ($action == 'add') { if ($object->create($user) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } $mesg=$object->error; @@ -475,7 +475,7 @@ if ($action == 'settitre' || $action == 'setemail_from' || $actino == 'setreplyt { if ($object->update($user) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } $mesg=$object->error; @@ -533,7 +533,7 @@ if ($action == 'update' && empty($_POST["removedfile"]) && empty($_POST["cancel" { if ($object->update($user) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } $mesg=$object->error; @@ -555,7 +555,7 @@ if ($action == 'confirm_valid' && $confirm == 'yes') { $object->valid($user); setEventMessage($langs->trans("MailingSuccessfullyValidated")); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -580,7 +580,7 @@ if ($action == 'confirm_reset' && $confirm == 'yes') if ($result > 0) { $db->commit(); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -601,7 +601,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') if ($object->delete($object->id)) { $url= (! empty($urlfrom) ? $urlfrom : 'liste.php'); - Header("Location: ".$url); + header("Location: ".$url); exit; } } diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index a5e185690f5..7d31a897cb9 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -48,7 +48,7 @@ if ($_POST["action"] == 'setpricelevel') $soc->fetch($_GET["id"]); $soc->set_price_level($_POST["price_level"],$user); - Header("Location: multiprix.php?id=".$_GET["id"]); + header("Location: multiprix.php?id=".$_GET["id"]); exit; } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 97886d66fd3..e1c0016da5e 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) } else { - Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); + header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); exit; } @@ -144,7 +144,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->prop $result=$object->delete($user); if ($result > 0) { - Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); + header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); exit; } else @@ -177,7 +177,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); } - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } @@ -378,7 +378,7 @@ else if ($action == 'add' && $user->rights->propal->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } else @@ -556,7 +556,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G // This avoid sending mail twice if going out and then back to page $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); setEventMessage($mesg); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -970,7 +970,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('cancel') == $langs->trans('Cancel')) { - Header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit; } @@ -1000,7 +1000,7 @@ else if ($action == 'builddoc' && $user->rights->propal->creer) } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -1081,7 +1081,7 @@ else if ($action == 'up' && $user->rights->propal->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid')); exit; } @@ -1101,7 +1101,7 @@ else if ($action == 'down' && $user->rights->propal->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid')); exit; } @@ -1117,7 +1117,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal-> if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -1155,7 +1155,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal-> if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 9e45b637878..00c24c2951a 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -69,7 +69,7 @@ if (! $error) } else { - Header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); + header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php'); exit; } @@ -88,7 +88,7 @@ if ($action == 'addcontact' && $user->rights->propale->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -121,7 +121,7 @@ else if ($action == 'deletecontact' && $user->rights->propale->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index f0b78a81888..60520d33ab5 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -92,7 +92,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 7dff9bcc60e..d24ac0c2e47 100755 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -222,7 +222,7 @@ if ($resql) if ($num == 1 && $socname) { $obj = $db->fetch_object($resql); - Header("Location: fiche.php?socid=".$obj->rowid); + header("Location: fiche.php?socid=".$obj->rowid); exit; } else diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 3550b5b50b5..3c47b38f2b9 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -46,7 +46,7 @@ $backtopage = GETPOST('backtopage','alpha'); if (GETPOST('cancel') && ! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } @@ -60,12 +60,12 @@ if (GETPOST("action") == 'setremise') { if (! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else { - Header("Location: remise.php?id=".$_GET["id"]); + header("Location: remise.php?id=".$_GET["id"]); exit; } } diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 7d66dfbfb65..1d811b0149c 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -49,7 +49,7 @@ if ($user->societe_id > 0) if (GETPOST('cancel') && ! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } @@ -154,12 +154,12 @@ if ($action == 'setremise') { if (! empty($backtopage)) { - Header("Location: ".$backtopage.'&discountid='.$discountid); + header("Location: ".$backtopage.'&discountid='.$discountid); exit; } else { - Header("Location: remx.php?id=".$_GET["id"]); + header("Location: remx.php?id=".$_GET["id"]); exit; } } diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 0d8ec10ea73..0caf1c80d63 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -61,7 +61,7 @@ if ($action == 'addcontact' && $user->rights->commande->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -99,7 +99,7 @@ else if ($action == 'deletecontact' && $user->rights->commande->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index aa6ff9914f7..5232b23862e 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -90,7 +90,7 @@ else if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } @@ -165,7 +165,7 @@ if ($id > 0 || ! empty($ref)) } else { - Header('Location: index.php'); + header('Location: index.php'); } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index da69da4169b..0569e840d7e 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -130,7 +130,7 @@ else if ($action == 'reopen' && $user->rights->commande->creer) $result = $object->set_reopen($user); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -146,7 +146,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->comm $result=$object->delete($user); if ($result > 0) { - Header('Location: index.php'); + header('Location: index.php'); exit; } else @@ -177,7 +177,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); } - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -383,7 +383,7 @@ else if ($action == 'add' && $user->rights->commande->creer) if ($object_id > 0 && ! $error) { $db->commit(); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); exit; } else @@ -888,7 +888,7 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST(' else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST('cancel') == $langs->trans('Cancel')) { - Header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // Pour reaffichage de la fiche en cours d'edition exit; } @@ -1016,7 +1016,7 @@ else if ($action == 'up' && $user->rights->commande->creer) if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); exit; } @@ -1036,7 +1036,7 @@ else if ($action == 'down' && $user->rights->commande->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); exit; } @@ -1071,7 +1071,7 @@ else if ($action == 'builddoc') // In get or post } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -1234,7 +1234,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G { // Redirect here // This avoid sending mail twice if going out and then back to page - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); exit; } } @@ -1290,7 +1290,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -1327,7 +1327,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 87dfe719398..c0ef16db6fb 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -331,7 +331,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs)) if ($id > 0 && ! $error) { $db->commit(); - Header('Location: '.DOL_URL_ROOT.'/compta/facture.php?facid='.$id); + header('Location: '.DOL_URL_ROOT.'/compta/facture.php?facid='.$id); exit; } else diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index bdd9d28ffbb..e215dbdcca2 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -97,7 +97,7 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu $insertid = $object->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); if ($insertid > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline"); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline"); exit; } else diff --git a/htdocs/compta/bank/admin/bank.php b/htdocs/compta/bank/admin/bank.php index 99ac5b91834..0c63f19dbb5 100644 --- a/htdocs/compta/bank/admin/bank.php +++ b/htdocs/compta/bank/admin/bank.php @@ -65,7 +65,7 @@ if ($action == 'setbankorder') { if (dolibarr_set_const($db, "BANK_SHOW_ORDER_OPTION",GETPOST('value','alpha'),'chaine',0,'',$conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/compta/deplacement/fiche.php b/htdocs/compta/deplacement/fiche.php index 8de8ae47970..df453887ea1 100644 --- a/htdocs/compta/deplacement/fiche.php +++ b/htdocs/compta/deplacement/fiche.php @@ -65,7 +65,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) $result = $object->setStatut(1); if ($result > 0) { - Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else @@ -95,7 +95,7 @@ else if ($action == 'unblock' && $user->rights->deplacement->unvalidate) if ($result > 0) { - Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else @@ -110,7 +110,7 @@ else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->depl $result=$object->delete($id); if ($result >= 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -156,7 +156,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) if ($id > 0) { - Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else @@ -172,7 +172,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) } else { - Header("Location: index.php"); + header("Location: index.php"); exit; } } @@ -196,7 +196,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) if ($result > 0) { - Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } else @@ -206,7 +206,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) } else { - Header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit; } } diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 2ac166d5558..fb6c8de4f5a 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -63,7 +63,7 @@ if ($action == 'update') { if (! empty($cancel)) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } @@ -107,7 +107,7 @@ if ($action == 'update') if ($don->update($user) > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$don->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$don->id); exit; } } @@ -117,7 +117,7 @@ if ($action == 'add') { if (! empty($cancel)) { - Header("Location: index.php"); + header("Location: index.php"); exit; } @@ -159,7 +159,7 @@ if ($action == 'add') if ($don->create($user) > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } } @@ -168,7 +168,7 @@ if ($action == 'add') if ($action == 'delete') { $don->delete($id); - Header("Location: liste.php"); + header("Location: liste.php"); exit; } if ($action == 'commentaire') @@ -180,7 +180,7 @@ if ($action == 'valid_promesse') { if ($don->valid_promesse($id, $user->id) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else $mesg=$don->error; @@ -189,7 +189,7 @@ if ($action == 'set_cancel') { if ($don->set_cancel($id) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else $mesg=$don->error; @@ -198,7 +198,7 @@ if ($action == 'set_paid') { if ($don->set_paye($id, $modepaiement) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else $mesg=$don->error; @@ -207,7 +207,7 @@ if ($action == 'set_encaisse') { if ($don->set_encaisse($id) >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else $mesg=$don->error; @@ -244,7 +244,7 @@ if ($action == 'builddoc') } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$donation->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$donation->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 88fc72f3ebf..069bf26954d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -144,7 +144,7 @@ else if ($action == 'reopen' && $user->rights->facture->creer) $result = $object->set_unpaid($user); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit; } else @@ -162,7 +162,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fact $result = $object->delete(); if ($result > 0) { - Header('Location: '.DOL_URL_ROOT.'/compta/facture/list.php'); + header('Location: '.DOL_URL_ROOT.'/compta/facture/list.php'); exit; } else @@ -197,7 +197,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> } if ($result >= 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit; } } @@ -247,7 +247,7 @@ else if ($action == 'set_thirdparty' && $user->rights->facture->creer) $object->fetch($id); $object->setValueFrom('fk_soc',$socid); - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit; } @@ -928,7 +928,7 @@ else if ($action == 'add' && $user->rights->facture->creer) if ($id > 0 && ! $error) { $db->commit(); - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit; } else @@ -1333,7 +1333,7 @@ else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['sa else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['cancel'] == $langs->trans('Cancel')) { - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // Pour reaffichage de la fiche en cours d'edition + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // Pour reaffichage de la fiche en cours d'edition exit; } @@ -1356,7 +1356,7 @@ else if ($action == 'up' && $user->rights->facture->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']); exit; } // Modify line position (down) @@ -1378,7 +1378,7 @@ else if ($action == 'down' && $user->rights->facture->creer) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']); exit; } @@ -1539,7 +1539,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO // This avoid sending mail twice if going out and then back to page $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); setEventMessage($mesg); - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id); exit; } } @@ -1616,7 +1616,7 @@ else if ($action == 'builddoc') // En get ou en post } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -1654,7 +1654,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -1692,7 +1692,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index d3625faf622..91b56bac497 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -63,7 +63,7 @@ if ($action == 'addcontact' && $user->rights->facture->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -101,7 +101,7 @@ else if ($action == 'deletecontact' && $user->rights->facture->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index f7394051b0d..df048419607 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -94,7 +94,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 161a1a57705..f298fb1dff8 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -69,7 +69,7 @@ if ($action == "new") $result = $object->demande_prelevement($user); if ($result > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -86,7 +86,7 @@ if ($action == "delete") $result = $object->demande_prelevement_delete($user, GETPOST('did')); if ($result == 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } } diff --git a/htdocs/compta/localtax/fiche.php b/htdocs/compta/localtax/fiche.php index 4d761366e9d..cccee441ac5 100644 --- a/htdocs/compta/localtax/fiche.php +++ b/htdocs/compta/localtax/fiche.php @@ -64,7 +64,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($ret > 0) { $db->commit(); - Header("Location: reglement.php"); + header("Location: reglement.php"); exit; } else diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 7e581061b8b..974b266354c 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -189,7 +189,7 @@ if ($action == 'confirm_paiement' && $confirm == 'yes') } if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/compta/facture.php?facid='.$invoiceid; else $loc = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$paiement_id; - Header('Location: '.$loc); + header('Location: '.$loc); exit; } else diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 3d2729d50d7..64a6c7d5228 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -111,7 +111,7 @@ if ($action == 'create' && $_POST["accountid"] > 0 && $user->rights->banque->che $result = $object->generatePdf($_POST["model"], $outputlangs); } - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; } else @@ -132,7 +132,7 @@ if ($action == 'remove' && $id > 0 && $_GET["lineid"] > 0 && $user->rights->banq $result = $object->removeCheck($_GET["lineid"]); if ($result === 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; } else @@ -147,7 +147,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->c $result = $object->delete(); if ($result == 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -174,7 +174,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->c } $result = $object->generatePdf(GETPOST('model'), $outputlangs); - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; } else @@ -209,7 +209,7 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index 535e3a013da..acd041cc5c3 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -79,7 +79,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture-> if ($result > 0) { $db->commit(); - Header("Location: liste.php"); + header("Location: liste.php"); exit; } else @@ -115,7 +115,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, $fac->modelpdf, $outputlangs, $hookmanager); } - Header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; } else diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index d10f051fba3..8539e828ac5 100755 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -50,7 +50,7 @@ if ($_POST["action"] == 'add_payment') if ($_POST["cancel"]) { $loc = DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid; - Header("Location: ".$loc); + header("Location: ".$loc); exit; } @@ -129,7 +129,7 @@ if ($_POST["action"] == 'add_payment') { $db->commit(); $loc = DOL_URL_ROOT.'/compta/sociales/charges.php?id='.$chid; - Header('Location: '.$loc); + header('Location: '.$loc); exit; } else diff --git a/htdocs/compta/payment_sc/fiche.php b/htdocs/compta/payment_sc/fiche.php index 01b5fe1bf01..de865468d60 100644 --- a/htdocs/compta/payment_sc/fiche.php +++ b/htdocs/compta/payment_sc/fiche.php @@ -61,7 +61,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' && if ($result > 0) { $db->commit(); - Header("Location: ".DOL_URL_ROOT."/compta/charges/index.php?mode=sconly"); + header("Location: ".DOL_URL_ROOT."/compta/charges/index.php?mode=sconly"); exit; } else @@ -97,7 +97,7 @@ if ($_REQUEST['action'] == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' && if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $fac, $fac->modelpdf, $outputlangs, $hookmanager); } - Header('Location: fiche.php?id='.$paiement->id); + header('Location: fiche.php?id='.$paiement->id); exit; } else diff --git a/htdocs/compta/prelevement/fiche.php b/htdocs/compta/prelevement/fiche.php index 3560d9ade29..cd99849de9c 100644 --- a/htdocs/compta/prelevement/fiche.php +++ b/htdocs/compta/prelevement/fiche.php @@ -52,7 +52,7 @@ if ( $action == 'confirm_credite' && GETPOST('confirm','alpha') == 'yes') $bon->id = $id; $bon->set_credite(); - Header("Location: fiche.php?id=".$id); + header("Location: fiche.php?id=".$id); exit; } @@ -74,7 +74,7 @@ if ($action == 'infotrans' && $user->rights->prelevement->bons->send) $bon->set_infotrans($user, $dt, GETPOST('methode','alpha')); } - Header("Location: fiche.php?id=".$id); + header("Location: fiche.php?id=".$id); exit; } else @@ -94,11 +94,11 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) if ($error == 0) { - Header("Location: fiche.php?id=".$id); + header("Location: fiche.php?id=".$id); } else { - Header("Location: fiche.php?id=".$id."&error=$error"); + header("Location: fiche.php?id=".$id."&error=$error"); } exit; } diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 934389d9dad..9e4373032db 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -63,21 +63,21 @@ if ($action == 'confirm_rejet') $rej->create($user, $id, GETPOST('motif','alpha'), $daterej, $lipre->bon_rowid, GETPOST('facturer','int')); - Header("Location: ligne.php?id=".$id); + header("Location: ligne.php?id=".$id); exit; } else { dol_syslog("Motif : ".GETPOST('motif','alpha')); dol_syslog("$daterej $time "); - Header("Location: ligne.php?id=".$id."&action=rejet"); + header("Location: ligne.php?id=".$id."&action=rejet"); exit; } } } else { - Header("Location: ligne.php?id=".$id); + header("Location: ligne.php?id=".$id); exit; } } diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 4dc224c73b2..e08b736c7ad 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -68,7 +68,7 @@ if ($action == 'confirm_delete' && $_REQUEST["confirm"] == 'yes') $result=$chargesociales->delete($user); if ($result > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php index 90a0acff0d2..a5e1693c8f2 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/fiche.php @@ -69,7 +69,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($ret > 0) { $db->commit(); - Header("Location: reglement.php"); + header("Location: reglement.php"); exit; } else diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 6d37292f62f..c839f7a24e1 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -155,7 +155,7 @@ abstract class ActionsContactCardCommon $id = $this->object->create($user); if ($id > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -176,7 +176,7 @@ abstract class ActionsContactCardCommon $result = $this->object->delete(); if ($result > 0) { - Header("Location: list.php"); + header("Location: list.php"); exit; } else @@ -189,7 +189,7 @@ abstract class ActionsContactCardCommon { if ($_POST["cancel"]) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); exit; } @@ -211,7 +211,7 @@ abstract class ActionsContactCardCommon if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$this->object->id); exit; } else diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 77928e4d5a0..b1b6aae88fa 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -175,7 +175,7 @@ if (empty($reshook)) $db->commit(); if (! empty($backtopage)) $url=$backtopage; else $url='fiche.php?id='.$id; - Header("Location: ".$url); + header("Location: ".$url); exit; } else @@ -194,7 +194,7 @@ if (empty($reshook)) $result = $object->delete(); if ($result > 0) { - Header("Location: ".DOL_URL_ROOT.'/contact/list.php'); + header("Location: ".DOL_URL_ROOT.'/contact/list.php'); exit; } else diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 20a230be6ba..af8fb76f3b9 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -89,10 +89,10 @@ $filenameurlencoded = dol_sanitizeFileName(urlencode($filename)); //$filename = dol_sanitizeFileName($filename); -Header("Content-Disposition: attachment; filename=\"".$filename."\""); -Header("Content-Length: ".dol_strlen($output)); -Header("Connection: close"); -Header("Content-Type: text/x-vcard; name=\"".$filename."\""); +header("Content-Disposition: attachment; filename=\"".$filename."\""); +header("Content-Length: ".dol_strlen($output)); +header("Connection: close"); +header("Content-Type: text/x-vcard; name=\"".$filename."\""); print $output; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index d68c87aaba5..c01106b7ccf 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -62,7 +62,7 @@ if ($action == 'addcontact' && $user->rights->contrat->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -100,7 +100,7 @@ if ($action == 'deletecontact' && $user->rights->contrat->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } } diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 21e48a81467..4e6b5914fa9 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -92,7 +92,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } } diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 1497dc40730..4c9ba902cd0 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -77,7 +77,7 @@ if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat-> if ($result > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -92,7 +92,7 @@ else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->c if ($result > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -183,7 +183,7 @@ if ($action == 'add' && $user->rights->contrat->creer) $result = $object->create($user,$langs,$conf); if ($result > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { @@ -412,7 +412,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -441,7 +441,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->cont $result=$object->delete($user); if ($result >= 0) { - Header("Location: index.php"); + header("Location: index.php"); return; } else @@ -460,7 +460,7 @@ else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contra $result=$contractline->update($user,1); if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); return; } else @@ -500,7 +500,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -538,7 +538,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/core/admin_extrafields.inc.php b/htdocs/core/admin_extrafields.inc.php index e723cc2ac5b..3bd46c7abf0 100644 --- a/htdocs/core/admin_extrafields.inc.php +++ b/htdocs/core/admin_extrafields.inc.php @@ -53,7 +53,7 @@ if ($action == 'add') $result=$extrafields->addExtraField($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['pos'],$_POST['size'],$elementtype); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -105,7 +105,7 @@ if ($action == 'update') { $extrafields->update_label($_POST['attrname'],$_POST['label'],$_POST['type'],$_POST['size'],$elementtype); } - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -132,7 +132,7 @@ if ($action == 'delete') $result=$extrafields->delete($_GET["attrname"],$elementtype); if ($result >= 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else $mesg=$extrafields->error; diff --git a/htdocs/ecm/docdir.php b/htdocs/ecm/docdir.php index 8aee5bc984d..30a90e1c26d 100644 --- a/htdocs/ecm/docdir.php +++ b/htdocs/ecm/docdir.php @@ -88,7 +88,7 @@ if ($action == 'add' && $user->rights->ecm->setup) { if (! empty($_POST["cancel"])) { - Header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager'); + header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager'); exit; } $ecmdir->ref = trim($_POST["ref"]); @@ -111,7 +111,7 @@ if ($action == 'add' && $user->rights->ecm->setup) if ($id > 0) { - Header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager'); + header("Location: ".DOL_URL_ROOT.'/ecm/index.php?action=file_manager'); exit; } else diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index d52e2e177d6..d034e66af3d 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -148,7 +148,7 @@ if ($action == 'add' && $user->rights->ecm->setup) $id = $ecmdir->create($user); if ($id > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index f74ccc9d02d..a4977cf9861 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -81,7 +81,7 @@ if ($action == 'addcontact' && $user->rights->expedition->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -111,7 +111,7 @@ else if ($action == 'deleteline' && $user->rights->expedition->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 1a4ebb00a6f..812ad7b37e0 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -158,7 +158,7 @@ if ($action == 'add') if (! $error) { $db->commit(); - Header("Location: fiche.php?id=".$object->id); + header("Location: fiche.php?id=".$object->id); exit; } else @@ -178,7 +178,7 @@ else if ($action == 'create_delivery' && $conf->livraison_bon->enabled && $user- $result = $object->create_delivery($user); if ($result > 0) { - Header("Location: ".DOL_URL_ROOT.'/livraison/fiche.php?id='.$result); + header("Location: ".DOL_URL_ROOT.'/livraison/fiche.php?id='.$result); exit; } else @@ -223,7 +223,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expe $result = $object->delete(); if ($result > 0) { - Header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); + header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); exit; } else @@ -281,7 +281,7 @@ else if ($action == 'settrackingnumber' || $action == 'settrackingurl' { if ($shipping->update($user) >= 0) { - Header("Location: fiche.php?id=".$shipping->id); + header("Location: fiche.php?id=".$shipping->id); exit; } $mesg=$shipping->error; @@ -483,7 +483,7 @@ if ($action == 'send' && ! GETPOST('addfile','alpha') && ! GETPOST('removedfile' // This avoid sending mail twice if going out and then back to page $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); setEventMessage($mesg); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } } diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index 4969213df78..e6456babf2b 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -59,7 +59,7 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -89,7 +89,7 @@ else if ($action == 'deletecontact' && $user->rights->ficheinter->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index c4647054f49..1513cc5ee72 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -90,7 +90,7 @@ else if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 82046da91af..275a351441d 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -90,7 +90,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->fichein $outputlangs->setDefaultLang($newlang); } $result=fichinter_create($db, $object, GETPOST('model','alpha'), $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -118,7 +118,7 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich $outputlangs->setDefaultLang($newlang); } $result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->model:GETPOST('model','apha'), $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -237,7 +237,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fich $object->fetch_thirdparty(); $object->delete($user); - Header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter'); + header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter'); exit; } @@ -307,7 +307,7 @@ else if ($action == "addline" && $user->rights->ficheinter->creer) $db->commit(); fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -325,7 +325,7 @@ else if ($action == 'classifybilled' && $user->rights->ficheinter->creer) $result=$object->setBilled(); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } else @@ -379,7 +379,7 @@ else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST( } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } @@ -436,7 +436,7 @@ else if ($action == 'up' && $user->rights->ficheinter->creer) $outputlangs->setDefaultLang($newlang); } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int')); exit; } @@ -457,7 +457,7 @@ else if ($action == 'down' && $user->rights->ficheinter->creer) $outputlangs->setDefaultLang($newlang); } fichinter_create($db, $object, $object->modelpdf, $outputlangs); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('line_id','int')); exit; } @@ -603,7 +603,7 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA { // Redirect here // This avoid sending mail twice if going out and then back to page - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&msg='.urlencode($mesg)); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&msg='.urlencode($mesg)); exit; } } @@ -662,7 +662,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -700,7 +700,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 16b68a89d7d..7d4ca868b5d 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -61,7 +61,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -99,7 +99,7 @@ else if ($action == 'deletecontact' && $user->rights->fournisseur->commande->cre if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index d877dfef3d8..18dd0fcd216 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -87,7 +87,7 @@ if ($_POST["action"] == 'dispatch' && $user->rights->fournisseur->commande->rece if ($result > 0) { - Header("Location: dispatch.php?id=".$_GET["id"]); + header("Location: dispatch.php?id=".$_GET["id"]); exit; } else diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 80530156201..a0aefbd9a73 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -93,7 +93,7 @@ else if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } @@ -196,7 +196,7 @@ if ($object->id > 0) } else { - Header('Location: index.php'); + header('Location: index.php'); } diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 0a3b168063a..ecf15a06384 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -157,7 +157,7 @@ else if ($action == 'reopen' && $user->rights->fournisseur->commande->approuver) $result = $order->setStatus($user,$newstatus); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_REQUEST['id']); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_REQUEST['id']); exit; } else @@ -406,7 +406,7 @@ else if ($action == 'confirm_deleteproductline' && $confirm == 'yes' && $user->r if (! $error) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } } @@ -467,7 +467,7 @@ else if ($action == 'confirm_approve' && $confirm == 'yes' && $user->rights->fou $result = $object->approve($user, $idwarehouse); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -483,7 +483,7 @@ else if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->four $result = $object->refuse($user); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -498,7 +498,7 @@ else if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fo $result = $object->commande($user, $_REQUEST["datecommande"], $_REQUEST["methode"], $_REQUEST['comment']); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -515,7 +515,7 @@ else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->four $result=$object->delete($user); if ($result > 0) { - Header("Location: ".DOL_URL_ROOT.'/fourn/commande/liste.php'); + header("Location: ".DOL_URL_ROOT.'/fourn/commande/liste.php'); exit; } else @@ -536,7 +536,7 @@ else if ($action == 'livraison' && $user->rights->fournisseur->commande->recepti $result = $object->Livraison($user, $date_liv, $_POST["type"], $_POST["comment"]); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else if($result == -3) @@ -561,7 +561,7 @@ else if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->four $result = $object->cancel($user); if ($result > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -583,7 +583,7 @@ else if ($action == 'up' && $user->rights->fournisseur->commande->creer) $outputlangs->setDefaultLang($_REQUEST['lang_id']); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); exit; } else if ($action == 'down' && $user->rights->fournisseur->commande->creer) @@ -598,7 +598,7 @@ else if ($action == 'down' && $user->rights->fournisseur->commande->creer) $outputlangs->setDefaultLang($_REQUEST['lang_id']); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid'])); exit; } @@ -629,7 +629,7 @@ else if ($action == 'builddoc' && $user->rights->fournisseur->commande->creer) / } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -832,7 +832,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G { // Redirect here // This avoid sending mail twice if going out and then back to page - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); exit; } } @@ -890,7 +890,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -928,7 +928,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 4ef95625553..87c55fe2850 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -61,7 +61,7 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -99,7 +99,7 @@ else if ($action == 'deletecontact' && $user->rights->fournisseur->facture->cree if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index a3f1df2bd88..d62ed9d2696 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -88,7 +88,7 @@ else if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } } diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 0782199e2c1..34e2cf02795 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -130,7 +130,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fourn $result=$object->delete($id); if ($result > 0) { - Header('Location: index.php'); + header('Location: index.php'); exit; } else @@ -145,7 +145,7 @@ elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->f $ret = $object->deleteline(GETPOST('lineid')); if ($ret > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } else @@ -601,7 +601,7 @@ elseif ($action == 'reopen' && $user->rights->fournisseur->facture->creer) $result = $object->set_unpaid($user); if ($result > 0) { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } else @@ -748,7 +748,7 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P { // Redirect here // This avoid sending mail twice if going out and then back to page - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&mesg='.urlencode($mesg)); exit; } } @@ -819,7 +819,7 @@ elseif ($action == 'builddoc') } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -854,7 +854,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else @@ -892,7 +892,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if ($result >= 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 3154301214b..ea3a11927ab 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -161,7 +161,7 @@ if ($action == 'add_paiement') } if ($invoiceid > 0) $loc = DOL_URL_ROOT.'/fourn/facture/fiche.php?facid='.$invoiceid; else $loc = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement_id; - Header('Location: '.$loc); + header('Location: '.$loc); exit; } else diff --git a/htdocs/fourn/paiement/fiche.php b/htdocs/fourn/paiement/fiche.php index cbb7798ec21..e8b601fe43c 100644 --- a/htdocs/fourn/paiement/fiche.php +++ b/htdocs/fourn/paiement/fiche.php @@ -73,7 +73,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisse if ($result > 0) { $db->commit(); - Header('Location: '.DOL_URL_ROOT.'/fourn/facture/paiement.php'); + header('Location: '.DOL_URL_ROOT.'/fourn/facture/paiement.php'); exit; } else @@ -91,7 +91,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->fournisse if ($object->valide() >= 0) { $db->commit(); - Header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; } else diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 5a864b7f722..943afb272a9 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -143,7 +143,7 @@ if ($resql) if ($num == 1 && ( isset($_POST["sall"]) || $snom || $sref ) ) { $objp = $db->fetch_object($resql); - Header("Location: fiche.php?id=".$objp->rowid); + header("Location: fiche.php?id=".$objp->rowid); exit; } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 164e3fd3c1d..18dd8191304 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -136,7 +136,7 @@ if ($_POST["action"] == 'add' && $user->rights->ftp->setup) $id = $ecmdir->create($user); if ($id > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index 0ff065ac53f..60c386153b7 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -79,19 +79,19 @@ if ($action == "set") { if ($_POST["pass"] <> $_POST["pass_verif"]) { - Header("Location: etape4.php?error=1&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); + header("Location: etape4.php?error=1&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); exit; } if (dol_strlen(trim($_POST["pass"])) == 0) { - Header("Location: etape4.php?error=2&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); + header("Location: etape4.php?error=2&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); exit; } if (dol_strlen(trim($_POST["login"])) == 0) { - Header("Location: etape4.php?error=3&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); + header("Location: etape4.php?error=3&selectlang=$setuplang".(isset($_POST["login"])?'&login='.$_POST["login"]:'')); exit; } } diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index 136a4e04dd9..5c36dbd04fd 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -92,7 +92,7 @@ if ($action == 'add') if ($ret > 0) { $db->commit(); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$delivery->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$delivery->id); exit; } else @@ -147,7 +147,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio if ($result > 0) { $db->commit(); - Header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); + header("Location: ".DOL_URL_ROOT.'/expedition/index.php'); exit; } else diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a60133ba526..06e0d7df71f 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -240,7 +240,7 @@ if (! defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once DOL_D if (! empty($conf->global->MAIN_NOT_INSTALLED) || ! empty($conf->global->MAIN_NOT_UPGRADED)) { dol_syslog("main.inc: A previous install or upgrade was not complete. Redirect to install page.", LOG_WARNING); - Header("Location: ".DOL_URL_ROOT."/install/index.php"); + header("Location: ".DOL_URL_ROOT."/install/index.php"); exit; } // If an upgrade process is required, we call the install page. @@ -255,7 +255,7 @@ if ((! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_V if ($rescomp > 0) // Programs have a version higher than database. We did not add "&& $rescomp < 3" because we want upgrade process for build upgrades { dol_syslog("main.inc: database version ".$versiontocompare." is lower than programs version ".DOL_VERSION.". Redirect to install page.", LOG_WARNING); - Header("Location: ".DOL_URL_ROOT."/install/index.php"); + header("Location: ".DOL_URL_ROOT."/install/index.php"); exit; } } @@ -761,7 +761,7 @@ if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity' { if ($mc->switchEntity(GETPOST('entity','int')) > 0) { - Header("Location: ".DOL_URL_ROOT.'/'); + header("Location: ".DOL_URL_ROOT.'/'); exit; } } diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index 4736957c830..dc401d61f45 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -42,7 +42,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) $code=$reg[1]; if (dolibarr_set_const($db, $code, 1, 'yesno', 0, '', $conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -56,7 +56,7 @@ if (preg_match('/del_(.*)/',$action,$reg)) $code=$reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 664866030dd..a433dc8cff1 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -50,7 +50,7 @@ if ($action == 'setcodeproduct') { if (dolibarr_set_const($db, "PRODUCT_CODEPRODUCT_ADDON",$value,'chaine',0,'',$conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 9c365c950e8..15d1cfc6b27 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -111,7 +111,7 @@ $cancel <> $langs->trans("Cancel") && if ($cancel == $langs->trans("Cancel")) { $action = ''; - Header("Location: fiche.php?id=".$_POST["id"]); + header("Location: fiche.php?id=".$_POST["id"]); exit; } diff --git a/htdocs/product/document.php b/htdocs/product/document.php index f6d1c8156d0..012133f4eaa 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -85,7 +85,7 @@ if ($action=='delete') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 20ef3342e98..4a53dfe66de 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -94,7 +94,7 @@ if (empty($reshook)) { $object->fetch($id); $result = $object->setValueFrom('fk_product_type', GETPOST('fk_product_type')); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -103,7 +103,7 @@ if (empty($reshook)) { $object->fetch($id); $result = $object->setValueFrom('fk_barcode_type', GETPOST('fk_barcode_type')); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -113,7 +113,7 @@ if (empty($reshook)) $object->fetch($id); //Todo: ajout verification de la validite du code barre en fonction du type $result = $object->setValueFrom('barcode', GETPOST('barcode')); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -225,7 +225,7 @@ if (empty($reshook)) if ($id > 0) { - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } else @@ -334,7 +334,7 @@ if (empty($reshook)) $db->commit(); $db->close(); - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } else @@ -384,7 +384,7 @@ if (empty($reshook)) if ($result > 0) { - Header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.urlencode($object->ref)); + header('Location: '.DOL_URL_ROOT.'/product/liste.php?delprod='.urlencode($object->ref)); exit; } else @@ -470,7 +470,7 @@ if (empty($reshook)) ); if ($result > 0) { - Header("Location: ".DOL_URL_ROOT."/comm/propal.php?id=".$propal->id); + header("Location: ".DOL_URL_ROOT."/comm/propal.php?id=".$propal->id); return; } @@ -555,7 +555,7 @@ if (empty($reshook)) if ($result > 0) { - Header("Location: ".DOL_URL_ROOT."/commande/fiche.php?id=".$commande->id); + header("Location: ".DOL_URL_ROOT."/commande/fiche.php?id=".$commande->id); exit; } } @@ -640,7 +640,7 @@ if (empty($reshook)) if ($result > 0) { - Header("Location: ".DOL_URL_ROOT."/compta/facture.php?facid=".$facture->id); + header("Location: ".DOL_URL_ROOT."/compta/facture.php?facid=".$facture->id); exit; } } @@ -649,7 +649,7 @@ if (empty($reshook)) if (GETPOST("cancel") == $langs->trans("Cancel")) { $action = ''; - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } @@ -1280,7 +1280,7 @@ else } else if ($action != 'create') { - Header("Location: index.php"); + header("Location: index.php"); exit; } } diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 259d25c901c..397828dd5c2 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -179,7 +179,7 @@ if ($action == 'updateprice' && GETPOST('cancel') <> $langs->trans("Cancel")) if (GETPOST('cancel') == $langs->trans("Cancel")) { $action = ''; - Header("Location: fournisseurs.php?id=".$_GET["id"]); + header("Location: fournisseurs.php?id=".$_GET["id"]); exit; } diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index cc3540f4895..cc052401fa0 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -165,7 +165,7 @@ else if ($num == 1 && ($sall || $snom || $sref || $sbarcode) && $action != 'list') { $objp = $db->fetch_object($resql); - Header("Location: fiche.php?id=".$objp->rowid); + header("Location: fiche.php?id=".$objp->rowid); exit; } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 0fe19be03fb..3e9a71a31fc 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -171,7 +171,7 @@ if ($resql) if ($num == 1 && ($sall or $snom or $sref)) { $objp = $db->fetch_object($resql); - Header("Location: fiche.php?id=$objp->rowid"); + header("Location: fiche.php?id=$objp->rowid"); exit; } diff --git a/htdocs/projet/contact.php b/htdocs/projet/contact.php index 213cc3f2e4a..be1890cec4b 100644 --- a/htdocs/projet/contact.php +++ b/htdocs/projet/contact.php @@ -67,7 +67,7 @@ if ($_POST["action"] == 'addcontact' && $user->rights->projet->creer) if ($result >= 0) { - Header("Location: contact.php?id=".$project->id); + header("Location: contact.php?id=".$project->id); exit; } else @@ -105,7 +105,7 @@ if ($_GET["action"] == 'deleteline' && $user->rights->projet->creer) if ($result >= 0) { - Header("Location: contact.php?id=".$project->id); + header("Location: contact.php?id=".$project->id); exit; } else diff --git a/htdocs/projet/document.php b/htdocs/projet/document.php index 6c956596979..f11a7baeaf2 100644 --- a/htdocs/projet/document.php +++ b/htdocs/projet/document.php @@ -84,7 +84,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->projet->s $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index 34c736a09d4..c4d32d3fb96 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -74,7 +74,7 @@ if (GETPOST("cancel") && ! empty($backtopage)) $result=$object->delete($user); if ($result > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -93,7 +93,7 @@ if (GETPOST("cancel") && (GETPOST("comefromclone")==1)) $result=$object->delete($user); if ($result > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -155,7 +155,7 @@ if ($action == 'add' && $user->rights->projet->creer) { $db->commit(); - Header("Location:fiche.php?id=".$object->id); + header("Location:fiche.php?id=".$object->id); exit; } else @@ -241,7 +241,7 @@ if ($action == 'builddoc' && $user->rights->projet->creer) } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } @@ -296,7 +296,7 @@ if ($action == 'confirm_delete' && GETPOST("confirm") == "yes" && $user->rights- $result=$object->delete($user); if ($result > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index 523afef0750..eadd86b5b65 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -124,12 +124,12 @@ if ($action == 'createtask' && $user->rights->projet->creer) { if (! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else if (empty($projectid)) { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks/index.php'.(empty($mode)?'':'?mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks/index.php'.(empty($mode)?'':'?mode='.$mode)); exit; } } @@ -138,13 +138,13 @@ if ($action == 'createtask' && $user->rights->projet->creer) { if (! empty($backtopage)) { - Header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else if (empty($id)) { // We go back on task list - Header("Location: ".DOL_URL_ROOT.'/projet/tasks/index.php'.(empty($mode)?'':'?mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks/index.php'.(empty($mode)?'':'?mode='.$mode)); exit; } } diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 36869d36068..cac8e28ca21 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -66,7 +66,7 @@ if ($action == 'addcontact' && $user->rights->projet->creer) if ($result >= 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); exit; } else @@ -104,7 +104,7 @@ if ($action == 'deleteline' && $user->rights->projet->creer) if ($result >= 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id.($withproject?'&withproject=1':'')); exit; } else @@ -125,7 +125,7 @@ if (! empty($project_ref) && ! empty($withproject)) } else { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); exit; } } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 3e9e7741550..ecc7a302138 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -81,7 +81,7 @@ if (! empty($project_ref) && ! empty($withproject)) } else { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); exit; } } @@ -117,7 +117,7 @@ if ($action=='delete') $ret=dol_delete_file($file); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } @@ -252,7 +252,7 @@ if ($object->id > 0) } else { - Header('Location: index.php'); + header('Location: index.php'); exit; } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index fdac534b81b..d9a6a165d6d 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -73,7 +73,7 @@ if (! empty($project_ref) && ! empty($withproject)) } else { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); } } } diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 66ddbc09da2..848c8073b34 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -98,7 +98,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->projet->s if ($object->delete($user) > 0) { - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -122,7 +122,7 @@ if (! empty($project_ref) && ! empty($withproject)) } else { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.(empty($mode)?'':'&mode='.$mode)); } } } diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 4b658f162b1..430817f405e 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -156,7 +156,7 @@ if (! empty($project_ref) && ! empty($withproject)) } else { - Header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject?'&withproject=1':'').(empty($mode)?'':'&mode='.$mode)); exit; } } diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 97e33167d22..805bb6fe86e 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -45,7 +45,7 @@ if ($action == 'setcodeclient') { if (dolibarr_set_const($db, "SOCIETE_CODECLIENT_ADDON",$value,'chaine',0,'',$conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -58,7 +58,7 @@ if ($action == 'setcodecompta') { if (dolibarr_set_const($db, "SOCIETE_CODECOMPTA_ADDON",$value,'chaine',0,'',$conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else @@ -186,7 +186,7 @@ if ($action == 'setprofid') $idprof="SOCIETE_IDPROF".$value."_UNIQUE"; if (dolibarr_set_const($db, $idprof,$status,'chaine',0,'',$conf->entity) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); + header("Location: ".$_SERVER["PHP_SELF"]); exit; } else diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 870ec8b67cc..0e22c08b86d 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -242,19 +242,19 @@ abstract class ActionsCardCommon if ( $this->object->client == 1 ) { - Header("Location: ".DOL_URL_ROOT."/comm/fiche.php?socid=".$this->object->id); + header("Location: ".DOL_URL_ROOT."/comm/fiche.php?socid=".$this->object->id); return; } else { if ( $this->object->fournisseur == 1 ) { - Header("Location: ".DOL_URL_ROOT."/fourn/fiche.php?socid=".$this->object->id); + header("Location: ".DOL_URL_ROOT."/fourn/fiche.php?socid=".$this->object->id); return; } else { - Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); return; } } @@ -273,7 +273,7 @@ abstract class ActionsCardCommon { if ($_POST["cancel"]) { - Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); exit; } @@ -286,7 +286,7 @@ abstract class ActionsCardCommon $result = $this->object->update($this->object->id, $user, 1, $oldsoccanvas->codeclient_modifiable(), $oldsoccanvas->codefournisseur_modifiable()); if ($result >= 0) { - Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$this->object->id); exit; } else @@ -306,7 +306,7 @@ abstract class ActionsCardCommon if ($result >= 0) { - Header("Location: ".DOL_URL_ROOT."/societe/societe.php?delsoc=".$this->object->nom.""); + header("Location: ".DOL_URL_ROOT."/societe/societe.php?delsoc=".$this->object->nom.""); exit; } else @@ -350,7 +350,7 @@ abstract class ActionsCardCommon } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$this->object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$this->object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index efc39232b9b..a710b1feb88 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -51,12 +51,12 @@ if($_GET["socid"] && $_GET["commid"]) $soc->fetch($_GET["socid"]); $soc->add_commercial($user, $_GET["commid"]); - Header("Location: commerciaux.php?socid=".$soc->id); + header("Location: commerciaux.php?socid=".$soc->id); exit; } else { - Header("Location: commerciaux.php?socid=".$_GET["socid"]); + header("Location: commerciaux.php?socid=".$_GET["socid"]); exit; } } @@ -70,12 +70,12 @@ if($_GET["socid"] && $_GET["delcommid"]) $soc->fetch($_GET["socid"]); $soc->del_commercial($user, $_GET["delcommid"]); - Header("Location: commerciaux.php?socid=".$soc->id); + header("Location: commerciaux.php?socid=".$soc->id); exit; } else { - Header("Location: commerciaux.php?socid=".$_GET["socid"]); + header("Location: commerciaux.php?socid=".$_GET["socid"]); exit; } } diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index f7b0744d98f..2b68c5ad13f 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -94,7 +94,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } } diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index d30e344cd9d..8e76c41d1f8 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -52,12 +52,12 @@ if ($socid && $_GET["select"]) $soc->fetch($_GET["socid"]); $soc->set_parent($_GET["select"]); - Header("Location: lien.php?socid=".$soc->id); + header("Location: lien.php?socid=".$soc->id); exit; } else { - Header("Location: lien.php?socid=".$_GET["socid"]); + header("Location: lien.php?socid=".$_GET["socid"]); exit; } } @@ -72,12 +72,12 @@ if ($socid && $_GET["delsocid"]) $soc->fetch($_GET["socid"]); $soc->remove_parent($_GET["delsocid"]); - Header("Location: lien.php?socid=".$soc->id); + header("Location: lien.php?socid=".$soc->id); exit; } else { - Header("Location: lien.php?socid=".$_GET["socid"]); + header("Location: lien.php?socid=".$_GET["socid"]); exit; } } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 513e5c5554d..b08667613af 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -304,7 +304,7 @@ if (empty($reshook)) $url=$_SERVER["PHP_SELF"]."?socid=".$object->id; if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $url=DOL_URL_ROOT."/comm/fiche.php?socid=".$object->id; else if ($object->fournisseur == 1) $url=DOL_URL_ROOT."/fourn/fiche.php?socid=".$object->id; - Header("Location: ".$url); + header("Location: ".$url); exit; } else @@ -318,7 +318,7 @@ if (empty($reshook)) { if ($_POST["cancel"]) { - Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); exit; } @@ -381,7 +381,7 @@ if (empty($reshook)) if (! $error && ! count($errors)) { - Header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); exit; } else @@ -401,7 +401,7 @@ if (empty($reshook)) if ($result > 0) { - Header("Location: ".DOL_URL_ROOT."/societe/societe.php?delsoc=".urlencode($object->name)); + header("Location: ".DOL_URL_ROOT."/societe/societe.php?delsoc=".urlencode($object->name)); exit; } else @@ -446,7 +446,7 @@ if (empty($reshook)) } else { - Header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); + header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc')); exit; } } diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php index 059136e1757..05fe306facd 100644 --- a/htdocs/user/fiche.php +++ b/htdocs/user/fiche.php @@ -110,7 +110,7 @@ if ($action == 'confirm_disable' && $confirm == "yes" && $candisableuser) $edituser = new User($db); $edituser->fetch($id); $edituser->setstatus(0); - Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } } @@ -133,7 +133,7 @@ if ($action == 'confirm_enable' && $confirm == "yes" && $candisableuser) if (! $message) { $edituser->setstatus(1); - Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } } @@ -153,7 +153,7 @@ if ($action == 'confirm_delete' && $confirm == "yes" && $candisableuser) } else { - Header("Location: index.php"); + header("Location: index.php"); exit; } } @@ -238,7 +238,7 @@ if ($action == 'add' && $canadduser) $db->commit(); - Header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } else diff --git a/htdocs/user/group/fiche.php b/htdocs/user/group/fiche.php index 7d29918ae10..81ca81b717c 100644 --- a/htdocs/user/group/fiche.php +++ b/htdocs/user/group/fiche.php @@ -69,7 +69,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") { $object->fetch($id); $object->delete(); - Header("Location: index.php"); + header("Location: index.php"); exit; } else @@ -108,7 +108,7 @@ if ($action == 'add') { $db->commit(); - Header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else diff --git a/htdocs/user/home.php b/htdocs/user/home.php index a98a7a3b5f8..03a0122489c 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -26,7 +26,7 @@ require '../main.inc.php'; if (! $user->rights->user->user->lire && ! $user->admin) { // Redirection vers la page de l'utilisateur - Header("Location: fiche.php?id=".$user->id); + header("Location: fiche.php?id=".$user->id); exit; } diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 76afed6ebd7..7a63f08bd32 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -102,7 +102,7 @@ if ($action == 'update' && ($caneditfield || $user->admin)) $_SESSION["mainmenu"]=""; // Le gestionnaire de menu a pu changer - Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; } }