4if (empty($conf) || !is_object($conf)) {
5 print
"Error, template page can't be called as URL";
10if (!empty($search_array_options) && is_array($search_array_options)) {
11 if (empty($search_options_pattern)) {
12 $search_options_pattern =
'search_options_';
15 foreach ($search_array_options as $key => $val) {
17 $tmpkey = preg_replace(
'/'.$search_options_pattern.
'/',
'', $key);
18 if (is_array($val) && array_key_exists(
'start', $val) && array_key_exists(
'end', $val)) {
21 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startyear='.
dol_print_date($val[
'start'],
'%Y');
22 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startmonth='.
dol_print_date($val[
'start'],
'%m');
23 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startday='.
dol_print_date($val[
'start'],
'%d');
24 $param .=
'&'.$search_options_pattern.$tmpkey.
'_starthour='.
dol_print_date($val[
'start'],
'%H');
25 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startmin='.
dol_print_date($val[
'start'],
'%M');
27 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endyear='.
dol_print_date($val[
'end'],
'%Y');
28 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endmonth='.
dol_print_date($val[
'end'],
'%m');
29 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endday='.
dol_print_date($val[
'end'],
'%d');
30 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endhour='.
dol_print_date($val[
'end'],
'%H');
31 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endmin='.
dol_print_date($val[
'end'],
'%M');
36 foreach ($val as $val2) {
37 $param .=
'&'.$search_options_pattern.$tmpkey.
'[]='.urlencode($val2);
40 $param .=
'&'.$search_options_pattern.$tmpkey.
'='.urlencode($val);
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).