30if (!defined(
'NOCSRFCHECK')) {
31 define(
'NOCSRFCHECK', 1);
33if (!defined(
'NOTOKENRENEWAL')) {
34 define(
'NOTOKENRENEWAL', 1);
37if (!defined(
'NOREQUIREMENU')) {
38 define(
'NOREQUIREMENU', 1);
42require_once
'../main.inc.php';
45 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
50$right = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'left' :
'right');
51$left = ($langs->trans(
"DIRECTION") ==
'rtl' ?
'right' :
'left');
59if (empty($dolibarr_nocache) &&
GETPOST(
'cache',
'int')) {
60 header(
'Cache-Control: max-age='.
GETPOST(
'cache',
'int').
', public');
62 header(
'Expires: '.gmdate(
'D, d M Y H:i:s',
dol_now(
'gmt') +
GETPOST(
'cache',
'int')).
' GMT');
64 header(
'Pragma: token=public');
67 header(
'Cache-Control: no-cache');
70$title = $langs->trans(
"Search");
73$head =
'<!-- Quick access -->'.
"\n";
76top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
87$hookmanager->initHooks(array(
'searchform'));
92if ($conf->use_javascript_ajax && 1 == 2) {
93 if (!is_object($form)) {
94 $form =
new Form($db);
97 $searchform .=
'<br><br>'.$form->selectArrayAjax(
'searchselectcombo', DOL_URL_ROOT.
'/core/ajax/selectsearchbox.php', $selected,
'',
'', 0, 1,
'minwidth300', 1, $langs->trans(
"Search"), 0);
100 $showtitlebefore =
GETPOST(
'showtitlebefore',
'int');
101 $arrayresult = array();
102 include DOL_DOCUMENT_ROOT.
'/core/ajax/selectsearchbox.php';
105 $accesskeyalreadyassigned = array();
106 foreach ($arrayresult as $key => $val) {
107 $tmp = explode(
'?', $val[
'url']);
108 $urlaction = $tmp[0];
109 $keysearch =
'search_all';
112 if (empty($accesskeyalreadyassigned[$val[
'label'][0]])) {
113 $accesskey = $val[
'label'][0];
114 $accesskeyalreadyassigned[$accesskey] = $accesskey;
117 $searchform .=
printSearchForm($urlaction, $urlaction, $val[
'label'],
'minwidth200', $keysearch, $accesskey, $key, $val[
'img'], $showtitlebefore, ($i > 0 ? 0 : 1));
124$parameters = array(
'searchform'=>$searchform);
125$reshook = $hookmanager->executeHooks(
'printSearchForm', $parameters);
126if (empty($reshook)) {
127 $searchform .= $hookmanager->resPrint;
129 $searchform = $hookmanager->resPrint;
134print
"<!-- Begin SearchForm -->\n";
135print
'<div class="center"><div class="center" style="padding: 6px;">';
136print
'<style>.menu_titre { padding-top: 7px; }</style>';
137print
'<div id="blockvmenusearch" class="tagtable center searchpage">'.
"\n";
141print
"\n<!-- End SearchForm -->\n";
144print
'</body></html>'.
"\n";
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Ouput html header of a page.
printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey='', $prefhtmlinputname='', $img='', $showtitlebefore=0, $autofocus=0)
Show a search area.