diff --git a/web/inc/main.php b/web/inc/main.php index b3453dce3..51e3afbf2 100644 --- a/web/inc/main.php +++ b/web/inc/main.php @@ -1,7 +1,11 @@ 0 ) { header("Location: /error/"); @@ -89,7 +88,7 @@ function check_error($return_var) { } function check_return_code($return_var,$output) { - if ($return_var != 0) { + if ($return_var != 0) { $error = implode('
', $output); if (empty($error)) $error = __('Error code:',$return_var); $_SESSION['error_msg'] = $error; @@ -107,9 +106,9 @@ function top_panel($user, $TAB) { $panel = json_decode(implode('', $output), true); unset($output); if ( $user == 'admin' ) { - include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/panel.html'); + include(dirname(__FILE__).'/../templates/admin/panel.html'); } else { - include($_SERVER['DOCUMENT_ROOT'].'/templates/user/panel.html'); + include(dirname(__FILE__).'/../templates/user/panel.html'); } }