summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c81f96)
raw | patch | inline | side by side (parent: 1c81f96)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Jun 2005 06:29:38 +0000 (06:29 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 7 Jun 2005 06:29:38 +0000 (06:29 +0000) |
html/helpviewer.php | [new file with mode: 0644] | patch | blob |
html/main.php | patch | blob | history | |
ihtml/themes/altlinux/framework.tpl | patch | blob | history | |
ihtml/themes/default/framework.tpl | patch | blob | history |
diff --git a/html/helpviewer.php b/html/helpviewer.php
--- /dev/null
+++ b/html/helpviewer.php
@@ -0,0 +1,67 @@
+<?php
+/*
+ This code is part of GOsa (https://gosa.gonicus.de)
+ Copyright (C) 2003 Cajus Pollmeier
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* Basic setup, remove eventually registered sessions */
+@require_once ("../include/php_setup.inc");
+@require_once ("functions.inc");
+
+session_start ();
+
+/* Logged in? Simple security check */
+if (!isset($_SESSION['ui'])){
+ gosa_log ("Error: helpviewer.php called without session");
+ echo "<b>"._("Help is not available if you are not logged in.")."</b>";
+ exit;
+}
+
+/* Set template compile directory */
+$config= $_SESSION['config'];
+if (isset ($config->data['MAIN']['COMPILE'])){
+ $smarty->compile_dir= $config->data['MAIN']['COMPILE'];
+} else {
+ $smarty->compile_dir= '/var/spool/gosa/';
+}
+
+/* Language setup */
+if ($config->data['MAIN']['LANG'] == ""){
+ $lang= get_browser_language();
+} else {
+ $lang= $config->data['MAIN']['LANG'];
+}
+$lang.=".UTF-8";
+putenv("LANGUAGE=");
+putenv("LANG=$lang");
+setlocale(LC_ALL, $lang);
+$GLOBALS['t_language']= $lang;
+$GLOBALS['t_gettext_message_dir'] = $BASE_DIR.'/locale/';
+
+/* Set the text domain as 'messages' */
+$domain = 'messages';
+bindtextdomain($domain, "$BASE_DIR/locale");
+textdomain($domain);
+@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, $lang, "Setting language to");
+
+/* Get plugin list */
+$plist= $_SESSION['plist'];
+
+echo "Help...";
+
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
diff --git a/html/main.php b/html/main.php
index af4f52d67c42fbc4dc41aa406a0f3046be658fae..99746264a3a9908548202c82d70ad156084d15dc 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* show web frontend */
$smarty->assign ("date", date("l, dS F Y H:i:s O"));
$smarty->assign ("must", "<font class=\"must\">*</font>");
+if (isset($plug)){
+ $plug= "?plug=$plug";
+} else {
+ $plug= "";
+}
if ($_SESSION['js']==FALSE){
$smarty->assign("javascript", "false");
+ $smarty->assign("help_method", "href='helpviewer.php$plug' target='_new'");
} else {
$smarty->assign("javascript", "true");
+ $smarty->assign("help_method", "href='' onClick=\"window.open('helpviewer.php$plug','{t}GOsa help{/t}','width=600,height=700')\"");
}
$smarty->assign ("username", $ui->username);
$smarty->assign ("go_logo", get_template_path('images/go_logo.png'));
$smarty->assign ("go_help", get_template_path('images/help.png'));
$plist->gen_menu();
$smarty->assign ("menu", $plist->menu);
-if (isset($plug)){
- $smarty->assign ("plug", "?plug=$plug");
-} else {
- $smarty->assign ("plug", "");
-}
+$smarty->assign ("plug", "$plug");
+
$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
index b8ed5da13f605c7786c43484428c7632e522515e..4c1ac5cd2d5863c7f63adc639d89f734af7191b5 100644 (file)
</a>
</td>
<td>
- <a class=maintitlebar style="margin-left:35px; vertical-align:middle;">
+ <a class=maintitlebar style="margin-left:35px; vertical-align:middle;" {$help_method}>
<img src='{$go_help}' align="middle" border="0" alt="GOSA2"> {t}Help{/t}
</a>
</td>
index 7813effbb9e2b3f507c90bad849edd5357a4c94c..239e725f6a64855b9284b9f956373edb876d9e68 100644 (file)
</a>
</td>
<td>
- <a class=maintitlebar style="margin-left:35px; vertical-align:middle;">
+ <a class=maintitlebar style="margin-left:35px; vertical-align:middle;" {$help_method}>
<img src='{$go_help}' align="middle" border="0" alt="GOSA2"> {t}Help{/t}
</a>
</td>