summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d538a27)
raw | patch | inline | side by side (parent: d538a27)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 May 2006 04:17:41 +0000 (04:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 May 2006 04:17:41 +0000 (04:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3549 594d385d-05f5-0310-b6e9-bd551577e9d8
html/helpviewer.php | patch | blob | history | |
include/functions_helpviewer.inc | patch | blob | history |
diff --git a/html/helpviewer.php b/html/helpviewer.php
index dbd868b47d4f2869d9365bf6f6b5828d41424ce1..dddf0cd8b0c6a72bfc98f5165e399cf00460c508 100644 (file)
--- a/html/helpviewer.php
+++ b/html/helpviewer.php
@require_once ("functions.inc");
@require_once ("functions_helpviewer.inc");
-error_reporting(0);
+error_reporting(E_ALL);
+restore_error_handler();
header("Content-type: text/html; charset=UTF-8");
session_start();
$index =$defaultpage;
$forward ="node1.html";
+
/* Every class which is called within a tab, stores its name in the Session.
* If $_SESSION['current_class_for_help'] isset,
* get the helpfile specified in the xml file and display it.
* Display management
*/
+$files = array();
+$f = opendir($helpdir);
+while($file = readdir($f)){
+ $files[$file]=$file;
+}
+
+/* Some replacements */
+$backwardlink = "<a href=\"?pg=%s\" class=\"maintitlebar\">
+ <img src='images/back.png' align=\"middle\" alt=\""._("previous")."\" border=\"0\">
+ </a>";
+
+$forwardlink = "<a href=\"?pg=%s\" class=\"maintitlebar\">
+ <img src='images/forward.png' align=\"middle\" alt=\""._("next")."\" border=\"0\">
+ </a>";
+
+
+$back = $for ="";
+if($helpobject['file'] == "index.html"){
+ $back = " ";
+ $for = sprintf($forwardlink, $prefix."1".$suffix);
+}else{
+ $current = preg_replace("/^".$prefix."/","",$helpobject['file']);
+ $current = preg_replace("/\.html$/","",$current);
+
+ if(isset($files[$prefix.($current+1).$suffix])) {
+ $for = sprintf($forwardlink, $prefix.($current+1).$suffix);
+ }
+ if(isset($files[$prefix.($current-1).$suffix])) {
+ $back = sprintf($backwardlink, $prefix.($current-1).$suffix);
+ }
+ if(($current-1) == 0){
+ $back = sprintf($backwardlink, "index.html");
+ }
+}
+
+
/* If there is no helpdir or file defined, display the index */
if(isset($_POST['search'])){
$helpdir = "../doc/guide/user/".$helpobject['lang']."/html/";
$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
/* I don't know why, but we must use utf8_encode to avoid dispplay errors */
+ $smarty->assign("backward",$back);
+ $smarty->assign("forward" ,$for);
$display= utf8_encode( $header.$smarty->fetch(get_template_path('help.tpl')));
echo $display;
index 64d256a180f1779b2e000be2db1aa7620d7bc25b..44938a19bd55726ad52719eb192e43e4347e7342 100644 (file)
/* This function genereates the Index */
-function genIndex($arr)
+function genIndex()
{
global $helpobject;
$str = "";
$test = new pluglist($_SESSION['config'],NULL);
+ $current_hl = "";
foreach($_SESSION['helpobject']['helpconf'] as $id => $attrs){
$path = $test -> get_path($id);
$exists = true;
}
$name = $attrs['NAME'];
$file = "index.html";
- $path = $plug;
+ //$path = $plug;
if($exists){
$str .= "<p style='padding-left:20px;'><a href='?plug=".$id."'><b>"._($name)."</b></a></p>";
}else{
{
$str = preg_replace("/HREF=\"http/i","target=\"_blank\" href=\"http",$str);
$str = preg_replace("/HREF=\"/","href=\"".$link."?pg=",$str);
-// $str=str_replace("HREF=\"","href=\"".$link."?pg=",$str);
+ $str=str_replace("HREF=\"","href=\"".$link."?pg=",$str);
return($str);
}