mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with
a vlue that is list name, separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters into user cookies. New: Can select to see number or amount or both, for graph boxes.
This commit is contained in:
parent
741fb7f03a
commit
87713c49ac
19
ChangeLog
19
ChangeLog
|
|
@ -61,17 +61,20 @@ For developers:
|
|||
- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
|
||||
Fix also several bugs with old code.
|
||||
- Qual: All nowrap properties are now using CSS class nowrap.
|
||||
- New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a vlue that is list name,
|
||||
separated by a coma, of other POST parameters, Dolibarr will automatically save this parameters
|
||||
into user cookies.
|
||||
|
||||
WARNING: This may create regression for some external modules, but was necessary to make
|
||||
|
||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
|
||||
1) We started to clean hooks code.
|
||||
If your hook want to modify value of $actions, it's role
|
||||
of your hook to modify it. Dolibarr hook code will not decide this for your module anymore.
|
||||
If your action class for hook was returning a string or an array, instead your module must
|
||||
set $actionclassinstance->results (to return array)
|
||||
or $actionclassinstance->resprints (to return string)
|
||||
to return same thing. The return value must be replaced by a "return 0";
|
||||
If your hook want to modify value of $actions, it's role of your hook to modify it. Dolibarr
|
||||
hook code will no more decide this for your module. If your action class for hook was returning
|
||||
a string or an array, instead your module must set $actionclassinstance->results (to return array)
|
||||
or $actionclassinstance->resprints (to return string) to return same thing. The return value must
|
||||
be replaced by a "return 0";
|
||||
Goal is to fix old compatibility code that does not match hook specifications:
|
||||
http://wiki.dolibarr.org/index.php/Hooks_system
|
||||
|
||||
|
|
@ -80,7 +83,7 @@ All content added must be tagged by a '<div>' with css class="login_block_elem"
|
|||
|
||||
3) Some methods object->addline used a first parameter that was object->id, some not. Of course
|
||||
this was not a good pratice, since object->id is already known so no need to provide it as
|
||||
parameter. All methods addline in this case were modified to remove this information.
|
||||
parameter. All methods addline in this case were modified to remove this parameter.
|
||||
|
||||
|
||||
***** ChangeLog for 3.4 compared to 3.3.* *****
|
||||
|
|
|
|||
|
|
@ -77,18 +77,23 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||
'sublink'=>'',
|
||||
'subtext'=>$langs->trans("Filter"),
|
||||
'subpicto'=>'filter.png',
|
||||
'subclass'=>'linkobject',
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
if ($user->rights->facture->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year';
|
||||
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb';
|
||||
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
|
||||
|
||||
$shownb=(! empty($conf->global->FACTURE_BOX_GRAPH_SHOW_NB));
|
||||
$showtot=(! isset($conf->global->FACTURE_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->FACTURE_BOX_GRAPH_SHOW_TOT));
|
||||
$shownb=GETPOST($param_shownb,'alpha',4);
|
||||
$showtot=GETPOST($param_showtot,'alpha',4);
|
||||
if (empty($shownb) && empty($showtot)) $showtot=1;
|
||||
$nowarray=dol_getdate(dol_now(),true);
|
||||
$endyear=(GETPOST('param'.$this->boxcode.'year')?GETPOST('param'.$this->boxcode.'year','int'):$nowarray['year']);
|
||||
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||
$startyear=$endyear-1;
|
||||
$mode='customer';
|
||||
$userid=0;
|
||||
|
|
@ -183,11 +188,17 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" value="'.$endyear.'">';
|
||||
$stringtoshow.='<a href="'.$_SERVER["PHP_SELF"].'?action='.$refreshaction.'">';
|
||||
$stringtoshow.=img_picto($langs->trans("Refresh"),'refresh.png');
|
||||
$stringtoshow.='</a>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
|
||||
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
|
||||
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth");
|
||||
$stringtoshow.=' ';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT");
|
||||
$stringtoshow.='<br>';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow.='<input type="image" src="'.img_picto($langs->trans("Refresh"),'refresh.png','','',1).'">';
|
||||
$stringtoshow.='</form>';
|
||||
$stringtoshow.='</div>';
|
||||
if ($shownb && $showtot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,18 +76,23 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||
'sublink'=>'',
|
||||
'subtext'=>$langs->trans("Filter"),
|
||||
'subpicto'=>'filter.png',
|
||||
'subclass'=>'linkobject',
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year';
|
||||
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb';
|
||||
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php';
|
||||
|
||||
$shownb=(! empty($conf->global->FACTURE_BOX_GRAPH_SHOW_NB));
|
||||
$showtot=(! isset($conf->global->FACTURE_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->FACTURE_BOX_GRAPH_SHOW_TOT));
|
||||
$shownb=GETPOST($param_shownb,'alpha',4);
|
||||
$showtot=GETPOST($param_showtot,'alpha',4);
|
||||
if (empty($shownb) && empty($showtot)) $showtot=1;
|
||||
$nowarray=dol_getdate(dol_now(),true);
|
||||
$endyear=(GETPOST('param'.$this->boxcode.'year')?GETPOST('param'.$this->boxcode.'year','int'):$nowarray['year']);
|
||||
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||
$startyear=$endyear-1;
|
||||
$mode='supplier';
|
||||
$userid=0;
|
||||
|
|
@ -182,11 +187,17 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" value="'.$endyear.'">';
|
||||
$stringtoshow.='<a href="'.$_SERVER["PHP_SELF"].'?action='.$refreshaction.'">';
|
||||
$stringtoshow.=img_picto($langs->trans("Refresh"),'refresh.png');
|
||||
$stringtoshow.='</a>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
|
||||
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
|
||||
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfBillsByMonth");
|
||||
$stringtoshow.=' ';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfBillsByMonthHT");
|
||||
$stringtoshow.='<br>';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow.='<input type="image" src="'.img_picto($langs->trans("Refresh"),'refresh.png','','',1).'">';
|
||||
$stringtoshow.='</form>';
|
||||
$stringtoshow.='</div>';
|
||||
if ($shownb && $showtot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,18 +77,23 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||
'sublink'=>'',
|
||||
'subtext'=>$langs->trans("Filter"),
|
||||
'subpicto'=>'filter.png',
|
||||
'subclass'=>'linkobject',
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year';
|
||||
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb';
|
||||
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
|
||||
|
||||
$shownb=(! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_NB));
|
||||
$showtot=(! isset($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT));
|
||||
$shownb=GETPOST($param_shownb,'alpha',4);
|
||||
$showtot=GETPOST($param_showtot,'alpha',4);
|
||||
if (empty($shownb) && empty($showtot)) $showtot=1;
|
||||
$nowarray=dol_getdate(dol_now(),true);
|
||||
$endyear=(GETPOST('param'.$this->boxcode.'year')?GETPOST('param'.$this->boxcode.'year','int'):$nowarray['year']);
|
||||
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||
$startyear=$endyear-1;
|
||||
$mode='customer';
|
||||
$userid=0;
|
||||
|
|
@ -183,11 +188,17 @@ class box_graph_orders_permonth extends ModeleBoxes
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" value="'.$endyear.'">';
|
||||
$stringtoshow.='<a href="'.$_SERVER["PHP_SELF"].'?action='.$refreshaction.'">';
|
||||
$stringtoshow.=img_picto($langs->trans("Refresh"),'refresh.png');
|
||||
$stringtoshow.='</a>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
|
||||
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
|
||||
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth");
|
||||
$stringtoshow.=' ';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT");
|
||||
$stringtoshow.='<br>';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow.='<input type="image" src="'.img_picto($langs->trans("Refresh"),'refresh.png','','',1).'">';
|
||||
$stringtoshow.='</form>';
|
||||
$stringtoshow.='</div>';
|
||||
if ($shownb && $showtot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,18 +76,23 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||
'sublink'=>'',
|
||||
'subtext'=>$langs->trans("Filter"),
|
||||
'subpicto'=>'filter.png',
|
||||
'subclass'=>'linkobject',
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year';
|
||||
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb';
|
||||
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php';
|
||||
|
||||
$shownb=(! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_NB));
|
||||
$showtot=(! isset($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->COMMANDE_BOX_GRAPH_SHOW_TOT));
|
||||
$shownb=GETPOST($param_shownb,'alpha',4);
|
||||
$showtot=GETPOST($param_showtot,'alpha',4);
|
||||
if (empty($shownb) && empty($showtot)) $showtot=1;
|
||||
$nowarray=dol_getdate(dol_now(),true);
|
||||
$endyear=(GETPOST('param'.$this->boxcode.'year')?GETPOST('param'.$this->boxcode.'year','int'):$nowarray['year']);
|
||||
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||
$startyear=$endyear-1;
|
||||
$mode='supplier';
|
||||
$userid=0;
|
||||
|
|
@ -182,11 +187,17 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" value="'.$endyear.'">';
|
||||
$stringtoshow.='<a href="'.$_SERVER["PHP_SELF"].'?action='.$refreshaction.'">';
|
||||
$stringtoshow.=img_picto($langs->trans("Refresh"),'refresh.png');
|
||||
$stringtoshow.='</a>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
|
||||
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
|
||||
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfOrdersByMonth");
|
||||
$stringtoshow.=' ';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfOrdersByMonthHT");
|
||||
$stringtoshow.='<br>';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow.='<input type="image" src="'.img_picto($langs->trans("Refresh"),'refresh.png','','',1).'">';
|
||||
$stringtoshow.='</form>';
|
||||
$stringtoshow.='</div>';
|
||||
if ($shownb && $showtot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,22 +73,27 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||
$this->info_box_head = array(
|
||||
'text' => $text,
|
||||
'limit'=> dol_strlen($text),
|
||||
'graph'=> 1,
|
||||
'graph'=> 1, // Set to 1 if it's a box graph
|
||||
'sublink'=>'',
|
||||
'subtext'=>$langs->trans("Filter"),
|
||||
'subpicto'=>'filter.png',
|
||||
'subclass'=>'linkobject',
|
||||
'target'=>'none' // Set '' to get target="_blank"
|
||||
);
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$param_year='DOLUSERCOOKIE_param'.$this->boxcode.'year';
|
||||
$param_shownb='DOLUSERCOOKIE_param'.$this->boxcode.'shownb';
|
||||
$param_showtot='DOLUSERCOOKIE_param'.$this->boxcode.'showtot';
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php';
|
||||
|
||||
$shownb=(! empty($conf->global->PROPAL_BOX_GRAPH_SHOW_NB));
|
||||
$showtot=(! isset($conf->global->PROPAL_BOX_GRAPH_SHOW_TOT) || ! empty($conf->global->PROPAL_BOX_GRAPH_SHOW_TOT));
|
||||
$shownb=GETPOST($param_shownb,'alpha',4);
|
||||
$showtot=GETPOST($param_showtot,'alpha',4);
|
||||
if (empty($shownb) && empty($showtot)) $showtot=1;
|
||||
$nowarray=dol_getdate(dol_now(),true);
|
||||
$endyear=(GETPOST('param'.$this->boxcode.'year')?GETPOST('param'.$this->boxcode.'year','int'):$nowarray['year']);
|
||||
$endyear=(GETPOST($param_year,'',4)?GETPOST($param_year,'int',4):$nowarray['year']);
|
||||
$startyear=$endyear-1;
|
||||
$mode='customer';
|
||||
$userid=0;
|
||||
|
|
@ -188,11 +193,17 @@ class box_graph_propales_permonth extends ModeleBoxes
|
|||
});
|
||||
});
|
||||
</script>';
|
||||
$stringtoshow.='<div class="center hideobject" id="idfilter'.$this->boxcode.'">';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" value="'.$endyear.'">';
|
||||
$stringtoshow.='<a href="'.$_SERVER["PHP_SELF"].'?action='.$refreshaction.'">';
|
||||
$stringtoshow.=img_picto($langs->trans("Refresh"),'refresh.png');
|
||||
$stringtoshow.='</a>';
|
||||
$stringtoshow.='<div class="center hideobject divboxfilter" id="idfilter'.$this->boxcode.'">'; // hideobject is to start hidden
|
||||
$stringtoshow.='<form class="flat formboxfilter" method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
$stringtoshow.='<input type="hidden" name="action" value="'.$refreshaction.'">';
|
||||
$stringtoshow.='<input type="hidden" name="DOL_AUTOSET_COOKIE" value="'.$param_year.','.$param_shownb.','.$param_showtot.'">';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_shownb.'"'.($shownb?' checked="true"':'').'"> '.$langs->trans("NumberOfProposalsByMonth");
|
||||
$stringtoshow.=' ';
|
||||
$stringtoshow.='<input type="checkbox" name="'.$param_showtot.'"'.($showtot?' checked="true"':'').'"> '.$langs->trans("AmountOfProposalsByMonthHT");
|
||||
$stringtoshow.='<br>';
|
||||
$stringtoshow.=$langs->trans("Year").' <input class="flat" size="4" type="text" name="'.$param_year.'" value="'.$endyear.'">';
|
||||
$stringtoshow.='<input type="image" src="'.img_picto($langs->trans("Refresh"),'refresh.png','','',1).'">';
|
||||
$stringtoshow.='</form>';
|
||||
$stringtoshow.='</div>';
|
||||
if ($shownb && $showtot)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
|
|||
|
||||
|
||||
/**
|
||||
* Standard method to show a box (usage by boxes not mandatory, a box can still use its own function)
|
||||
* Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
|
|
@ -160,7 +160,7 @@ class ModeleBoxes // Can't be abtract as it is instanciated to build "empty"
|
|||
}
|
||||
print ' ';
|
||||
if (! empty($head['sublink'])) print '<a href="'.$head['sublink'].'"'.(empty($head['target'])?' target="_blank"':'').'>';
|
||||
if (! empty($head['subpicto'])) print img_picto($head['subtext'], $head['subpicto'], 'class="" id="idsubimg'.$this->boxcode.'"');
|
||||
if (! empty($head['subpicto'])) print img_picto($head['subtext'], $head['subpicto'], 'class="'.(empty($head['subclass'])?'':$head['subclass']).'" id="idsubimg'.$this->boxcode.'"');
|
||||
if (! empty($head['sublink'])) '</a>';
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -171,8 +171,8 @@ function dol_shutdown()
|
|||
*
|
||||
* @param string $paramname Name of parameter to found
|
||||
* @param string $check Type of check (''=no check, 'int'=check it's numeric, 'alpha'=check it's alpha only, 'array'=check it's array)
|
||||
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
||||
* @return string Value found or '' if check fails
|
||||
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie)
|
||||
* @return string Value found, or '' if check fails
|
||||
*/
|
||||
function GETPOST($paramname,$check='',$method=0)
|
||||
{
|
||||
|
|
@ -180,16 +180,13 @@ function GETPOST($paramname,$check='',$method=0)
|
|||
elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:'';
|
||||
elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]:'';
|
||||
elseif ($method==3) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:'');
|
||||
else return 'BadParameter';
|
||||
elseif ($method==4) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:(isset($_COOKIE[$paramname])?$_COOKIE[$paramname]:''));
|
||||
else return 'BadThirdParameterForGETPOST';
|
||||
|
||||
if (! empty($check))
|
||||
{
|
||||
// Check if numeric
|
||||
if ($check == 'int' && ! preg_match('/^[-\.,0-9]+$/i',$out))
|
||||
{
|
||||
$out=trim($out);
|
||||
$out='';
|
||||
}
|
||||
if ($check == 'int' && ! is_numeric($out)) $out='';
|
||||
// Check if alpha
|
||||
elseif ($check == 'alpha')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -162,10 +162,17 @@ if (! empty($_SERVER['DOCUMENT_ROOT'])) set_include_path($_SERVER['DOCUMENT_ROOT
|
|||
// Include the conf.php and functions.lib.php
|
||||
require_once 'filefunc.inc.php';
|
||||
|
||||
/*var_dump("Define dolgetprefix ".$_SERVER["SERVER_NAME"]." - ".$_SERVER["DOCUMENT_ROOT"]." - ".DOL_DOCUMENT_ROOT." - ".DOL_URL_ROOT);
|
||||
var_dump("Cookie ".join($_COOKIE,','));
|
||||
var_dump("Cookie ".$_SERVER["HTTP_COOKIE"]);
|
||||
var_dump("Cookie ".$_SERVER["HTTP_USER_AGENT"]);*/
|
||||
// If there is a POST parameter to tell to save automatically some POST params into a cookies, we do it
|
||||
if (! empty($_POST["DOL_AUTOSET_COOKIE"]))
|
||||
{
|
||||
$tmplist=explode(',',$_POST["DOL_AUTOSET_COOKIE"]);
|
||||
foreach ($tmplist as $value)
|
||||
{
|
||||
//var_dump('setcookie key='.$value.' value='.$_POST[$value]);
|
||||
setcookie($value, empty($_POST[$value])?'':$_POST[$value], empty($_POST[$value])?0:(time()+(86400*354)), '/'); // keep cookie 1 year
|
||||
if (empty($_POST[$value])) unset($_COOKIE[$value]);
|
||||
}
|
||||
}
|
||||
|
||||
// Init session. Name of session is specific to Dolibarr instance.
|
||||
$prefix=dol_getprefix();
|
||||
|
|
|
|||
|
|
@ -1354,9 +1354,15 @@ tr.box_pair {
|
|||
font-family:<?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family:<?php print $fontlist ?>;
|
||||
.formboxfilter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.formboxfilter input[type=image]
|
||||
{
|
||||
top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Ok, Warning, Error
|
||||
|
|
|
|||
|
|
@ -1521,10 +1521,14 @@ tr.box_pair td, tr.box_impair td, td.box_pair, td.box_impair
|
|||
/*border-bottom: 1px solid white;*/
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
.formboxfilter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.formboxfilter input[type=image]
|
||||
{
|
||||
top: 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1648,10 +1648,14 @@ background: #f4f4f4;
|
|||
font-family: <?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
.formboxfilter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.formboxfilter input[type=image]
|
||||
{
|
||||
top: 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1654,10 +1654,14 @@ background: #c0c4c7;
|
|||
border: 0px;
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
.formboxfilter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.formboxfilter input[type=image]
|
||||
{
|
||||
top: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1557,7 +1557,6 @@ span.butAction, span.butActionDelete {
|
|||
}
|
||||
|
||||
#undertopmenu {
|
||||
/* background-image: url("<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/gradient.gif',1) ?>"); */
|
||||
background-repeat: repeat-x;
|
||||
margin-top: <?php echo ($dol_hide_topmenu?'6':'0'); ?>px;
|
||||
}
|
||||
|
|
@ -1941,9 +1940,15 @@ tr.box_pair {
|
|||
font-family: <?php print $fontlist ?>;
|
||||
}
|
||||
|
||||
tr.fiche {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
.formboxfilter {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.formboxfilter input[type=image]
|
||||
{
|
||||
top: 5px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user