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_';
14 if (empty($extrafieldsobjectkey) && is_object(
$object)) {
15 $extrafieldsobjectkey =
$object->table_element;
17 foreach ($search_array_options as $key => $val) {
19 $tmpkey = preg_replace(
'/'.$search_options_pattern.
'/',
'', $key);
20 if (is_array($val) && array_key_exists(
'start', $val) && array_key_exists(
'end', $val)) {
23 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startyear='.
dol_print_date($val[
'start'],
'%Y');
24 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startmonth='.
dol_print_date($val[
'start'],
'%m');
25 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startday='.
dol_print_date($val[
'start'],
'%d');
26 $param .=
'&'.$search_options_pattern.$tmpkey.
'_starthour='.
dol_print_date($val[
'start'],
'%H');
27 $param .=
'&'.$search_options_pattern.$tmpkey.
'_startmin='.
dol_print_date($val[
'start'],
'%M');
29 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endyear='.
dol_print_date($val[
'end'],
'%Y');
30 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endmonth='.
dol_print_date($val[
'end'],
'%m');
31 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endday='.
dol_print_date($val[
'end'],
'%d');
32 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endhour='.
dol_print_date($val[
'end'],
'%H');
33 $param .=
'&'.$search_options_pattern.$tmpkey.
'_endmin='.
dol_print_date($val[
'end'],
'%M');
38 foreach ($val as $val2) {
39 $param .=
'&'.$search_options_pattern.$tmpkey.
'[]='.urlencode($val2);
43 $tmpkey = preg_replace(
'/'.$search_options_pattern.
'/',
'', $key);
44 if (in_array($extrafields->attributes[$extrafieldsobjectkey][
'type'][$tmpkey], array(
'checkbox',
'chkbxlst'))) {
45 $param .=
'&'.$search_options_pattern.$tmpkey.
'_multiselect='.urlencode($val);
48 if (in_array($extrafields->attributes[$extrafieldsobjectkey][
'type'][$tmpkey], array(
'boolean'))) {
49 $param .=
'&'.$search_options_pattern.$tmpkey.
'_boolean='.urlencode($val);
52 $param .=
'&'.$search_options_pattern.$tmpkey.
'='.urlencode($val);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).