diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index aab798d1301d8..cf44cccce2b72 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -99,11 +99,11 @@ if (empty($reshook)) $searchform.=$hookmanager->resPrint; else $searchform=$hookmanager->resPrint; -print ''; print "\n"; print "\n"; -print '
'; +print '
'; +print ''; //print '
'; print '
'."\n"; print $searchform; diff --git a/htdocs/document.php b/htdocs/document.php index e5566b1aee6e1..6758a5f76c01e 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -52,6 +52,7 @@ function llxHeader() { } */ function llxFooter() { } + require 'main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -177,4 +178,4 @@ function llxFooter() { } readfile($original_file_osencoded); -?> +?> \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9d0a0fdbcfe98..e46e91b0318af 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -162,6 +162,11 @@ function analyse_sql_and_script(&$var, $type) // 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"]);*/ + // Init session. Name of session is specific to Dolibarr instance. $prefix=dol_getprefix(); $sessionname='DOLSESSID_'.$prefix; @@ -992,11 +997,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs } $themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity; if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache']; - if (GETPOST('dol_hide_topmenu')) $themeparam.='&dol_hide_topmenu=1'; - if (GETPOST('dol_hide_leftmenu')) $themeparam.='&dol_hide_leftmenu=1'; - if (GETPOST('dol_optimize_smallscreen')) $themeparam.='&dol_optimize_smallscreen=1'; - if (GETPOST('dol_no_mouse_hover')) $themeparam.='&dol_no_mouse_hover=1'; - if (GETPOST('dol_use_jmobile')) $themeparam.='&dol_use_jmobile=1'; + if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu'); } + if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu'); } + if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen'); } + if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover'); } + if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile'); } //print 'themepath='.$themepath.' themeparam='.$themeparam;exit; print ''."\n"; @@ -1132,7 +1137,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs print ''."\n"; } // jQuery jMobile - if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile)) + if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0)) { print ''."\n"; } diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 5d3290a259d35..864bd9cb5af63 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -196,4 +196,4 @@ function llxFooter() { } if (is_object($db)) $db->close(); -?> +?> \ No newline at end of file