Fix contextpage lost on submitting form or sorting
This commit is contained in:
parent
c7065cc3b8
commit
5db6bcd4a8
@ -128,9 +128,10 @@ if ($result)
|
||||
if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($statut != '') $param.="&statut=".$statut;
|
||||
if ($date_select) $param.="&date_select=".$date_select;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_lastname) $param.="&search_lastname=".$search_lastname;
|
||||
if ($search_login) $param.="&search_login=".$search_login;
|
||||
if ($search_acount) $param.="&search_account=".$search_account;
|
||||
|
||||
@ -155,6 +155,7 @@ llxHeader('',$langs->trans("Agenda"),$help_url);
|
||||
$listofextcals=array();
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($actioncode != '') $param.="&actioncode=".$actioncode;
|
||||
if ($resourceid > 0) $param.="&resourceid=".$resourceid;
|
||||
|
||||
@ -354,7 +354,8 @@ if ($result)
|
||||
}
|
||||
|
||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||
|
||||
@ -381,7 +381,8 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($socid > 0) $param.='&socid='.$socid;
|
||||
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
|
||||
if ($orderday) $param.='&orderday='.$orderday;
|
||||
|
||||
@ -72,6 +72,7 @@ $title=$langs->trans("SpecialExpensesArea");
|
||||
if ($mode == 'sconly') $title=$langs->trans("SocialContributionsPayments");
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($mode == 'sconly') $param='&mode=sconly';
|
||||
if ($sortfield) $param.='&sortfield='.$sortfield;
|
||||
|
||||
@ -1438,6 +1438,7 @@ else
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param='&socid='.$socid;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($day) $param.='&day='.$day;
|
||||
if ($month) $param.='&month='.$month;
|
||||
|
||||
@ -792,6 +792,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
$param='&socid='.$socid;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($day) $param.='&day='.$day;
|
||||
if ($month) $param.='&month='.$month;
|
||||
|
||||
@ -121,6 +121,7 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -203,6 +203,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
$param.=(GETPOST("orphelins")?"&orphelins=1":"");
|
||||
$param.=($search_ref?"&search_ref=".urlencode($search_ref):"");
|
||||
|
||||
@ -127,7 +127,8 @@ if ($result)
|
||||
$var=true;
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
|
||||
|
||||
@ -138,7 +138,8 @@ if ($resql)
|
||||
$var=true;
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
|
||||
|
||||
@ -322,7 +322,7 @@ if (is_array($coll_list)) {
|
||||
//print load_fiche_titre($vatsup);
|
||||
|
||||
//print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<tr class=\"liste_titre liste_titre_topborder\">";
|
||||
print '<td align="left">'.$langs->trans("Num")."</td>";
|
||||
print '<td align="left">'.$langs->trans("Supplier")."</td>";
|
||||
print "<td>".$langs->trans("VATIntra")."</td>";
|
||||
|
||||
@ -479,7 +479,7 @@ else
|
||||
|
||||
//print table headers for this quadri - expenses now
|
||||
//imprime les en-tete de tables pour ce quadri - maintenant les d<>penses
|
||||
print '<tr class="liste_titre">';
|
||||
print '<tr class="liste_titre liste_titre_topborder">';
|
||||
print '<td align="left">'.$elementsup.'</td>';
|
||||
print '<td align="left">'.$productsup.'</td>';
|
||||
if ($modetax == 0)
|
||||
|
||||
@ -134,7 +134,8 @@ if ($result)
|
||||
$var=true;
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($typeid) $param.='&typeid='.$typeid;
|
||||
|
||||
|
||||
|
||||
@ -369,6 +369,7 @@ if ($result)
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
$param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall);
|
||||
$param.='&type='.urlencode($type).'&view='.urlencode($view);
|
||||
|
||||
@ -170,6 +170,7 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
$param.='&search_contract='.$search_contract;
|
||||
$param.='&search_name='.$search_name;
|
||||
|
||||
@ -256,7 +256,8 @@ if ($resql)
|
||||
$expedition = new Expedition($db);
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
|
||||
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
|
||||
if ($search_company) $param.= "&search_company=".$search_company;
|
||||
|
||||
@ -141,7 +141,8 @@ if ($result)
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($socid) $param.="&socid=".$socid;
|
||||
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
|
||||
if ($search_company) $param.="&search_company=".urlencode($search_company);
|
||||
|
||||
@ -397,6 +397,7 @@ if ($resql)
|
||||
|
||||
$param='';
|
||||
if ($socid > 0) $param.='&socid='.$socid;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($orderday) $param.='&orderday='.$orderday;
|
||||
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
|
||||
|
||||
@ -104,6 +104,7 @@ if ($resql)
|
||||
$var=true;
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||
if ($search_label) $param.="&search_label=".$search_user;
|
||||
|
||||
@ -73,7 +73,8 @@ $pagenext = $page + 1;
|
||||
if (! $sortfield) $sortfield="p.ref";
|
||||
if (! $sortorder) $sortorder="ASC";
|
||||
|
||||
$contextpage='productservicelist';
|
||||
// Initialize context for list
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'productservicelist';
|
||||
if ($type === '1') { $contextpage='servicelist'; if ($search_type=='') $search_type='1'; }
|
||||
if ($type === '0') { $contextpage='productlist'; if ($search_type=='') $search_type='0'; }
|
||||
|
||||
@ -334,7 +335,8 @@ else
|
||||
}
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($search_categ > 0) $param.="&search_categ=".$search_categ;
|
||||
if ($sref) $param="&sref=".$sref;
|
||||
if ($search_ref_supplier) $param="&search_ref_supplier=".$search_ref_supplier;
|
||||
|
||||
@ -108,7 +108,8 @@ if ($result)
|
||||
llxHeader("",$langs->trans("ListOfWarehouses"),$help_url);
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post" name="formulaire">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -305,16 +305,14 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$params='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
|
||||
if ($search_entity != '') $params.= '&search_entity='.urlencode($search_entity);
|
||||
if ($search_fk_product != '') $params.= '&search_fk_product='.urlencode($search_fk_product);
|
||||
if ($search_batch != '') $params.= '&search_batch='.urlencode($search_batch);
|
||||
if ($search_fk_user_creat != '') $params.= '&search_fk_user_creat='.urlencode($search_fk_user_creat);
|
||||
if ($search_fk_user_modif != '') $params.= '&search_fk_user_modif='.urlencode($search_fk_user_modif);
|
||||
if ($search_import_key != '') $params.= '&search_import_key='.urlencode($search_import_key);
|
||||
|
||||
|
||||
if ($search_entity != '') $params.= '&search_entity='.urlencode($search_entity);
|
||||
if ($search_fk_product != '') $params.= '&search_fk_product='.urlencode($search_fk_product);
|
||||
if ($search_batch != '') $params.= '&search_batch='.urlencode($search_batch);
|
||||
if ($search_fk_user_creat != '') $params.= '&search_fk_user_creat='.urlencode($search_fk_user_creat);
|
||||
if ($search_fk_user_modif != '') $params.= '&search_fk_user_modif='.urlencode($search_fk_user_modif);
|
||||
if ($search_import_key != '') $params.= '&search_import_key='.urlencode($search_import_key);
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
// Add $param from extra fields
|
||||
foreach ($search_array_options as $key => $val)
|
||||
|
||||
@ -90,8 +90,8 @@ $year = GETPOST('year','int');
|
||||
if ($search_status == '') $search_status=-1; // -1 or 1
|
||||
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$contextpage='projectlist';
|
||||
// Initialize context for list
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'projectlist';
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array($contextpage));
|
||||
@ -308,7 +308,8 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sday) $param.='&sday='.$day;
|
||||
if ($smonth) $param.='&smonth='.$smonth;
|
||||
if ($syear) $param.='&syear=' .$syear;
|
||||
@ -346,7 +347,8 @@ if ($resql)
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
|
||||
|
||||
// Show description of content
|
||||
|
||||
@ -58,8 +58,8 @@ $day = GETPOST('day','int');
|
||||
$month = GETPOST('month','int');
|
||||
$year = GETPOST('year','int');
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$contextpage='tasklist';
|
||||
// Initialize context for list
|
||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'tasklist';
|
||||
|
||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||
$hookmanager->initHooks(array($contextpage));
|
||||
@ -314,6 +314,7 @@ if ($resql)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param='';
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sday) $param.='&sday='.$day;
|
||||
if ($smonth) $param.='&smonth='.$smonth;
|
||||
|
||||
@ -333,7 +333,8 @@ if ($sql_select)
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$param="&socid=".$socid."&type_element=".$type_element;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr);
|
||||
if ($sref) $param.= "&sref=".urlencode($sref);
|
||||
if ($month) $param.= "&month=".$month;
|
||||
|
||||
@ -438,7 +438,8 @@ if ($resql)
|
||||
$i = 0;
|
||||
|
||||
$param='';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($sall != '') $param .= "&sall=".urlencode($sall);
|
||||
if ($search_categ > 0) $param.='&search_categ='.urlencode($search_categ);
|
||||
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
|
||||
|
||||
@ -277,7 +277,8 @@ if ($result)
|
||||
}
|
||||
|
||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||
|
||||
@ -2226,13 +2226,6 @@ table.liste, table.noborder, table.formdoc, div.noborder {
|
||||
-webkit-border-radius: 0.2em;
|
||||
border-radius: 0.2em;*/
|
||||
}
|
||||
/*
|
||||
#tablelines tr.liste_titre:first-child td, form.formnoborder div, tr.liste_titre.trnoborder td {
|
||||
border-top-width: 1px;
|
||||
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-top-style: solid;
|
||||
}
|
||||
*/
|
||||
.liste_titre_add td, .liste_titre_add .tagtd
|
||||
{
|
||||
border-top-width: 1px;
|
||||
@ -2617,6 +2610,11 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
|
||||
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
|
||||
text-shadow: none !important;
|
||||
}
|
||||
tr.liste_titre_topborder td {
|
||||
border-top-width: <?php echo $borderwith; ?>px;
|
||||
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-top-style: solid;
|
||||
}
|
||||
.liste_titre td a {
|
||||
text-shadow: none !important;
|
||||
color: rgb(<?php echo $colortexttitle; ?>);
|
||||
|
||||
@ -2483,6 +2483,11 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
|
||||
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
|
||||
text-shadow: none !important;
|
||||
}
|
||||
tr.liste_titre_topborder td {
|
||||
border-top-width: <?php echo $borderwith; ?>px;
|
||||
border-top-color: rgb(<?php echo $colortopbordertitle1 ?>);
|
||||
border-top-style: solid;
|
||||
}
|
||||
.liste_titre td a {
|
||||
text-shadow: none !important;
|
||||
color: rgb(<?php echo $colortexttitle; ?>);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user