Merge pull request #362 from marcosgdf/coding-style
Lower-cased Header function
This commit is contained in:
commit
41af1cec79
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -552,7 +552,7 @@ if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confir
|
||||
}
|
||||
else
|
||||
{
|
||||
Header("Location: liste.php");
|
||||
header("Location: liste.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
*/
|
||||
|
||||
@ -125,7 +125,7 @@ if ($action == 'add')
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
Header("Location: boxes.php");
|
||||
header("Location: boxes.php");
|
||||
$db->commit();
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user