summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c834b95)
raw | patch | inline | side by side (parent: c834b95)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Jun 2005 07:38:00 +0000 (07:38 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 10 Jun 2005 07:38:00 +0000 (07:38 +0000) |
html/helpviewer.php | patch | blob | history | |
ihtml/themes/default/help.tpl | patch | blob | history |
diff --git a/html/helpviewer.php b/html/helpviewer.php
index a9a26825ae6019ab772c90d81d645e91b24a4890..741ce53a6120e0be33071bac6c67dbabbe1c6d9f 100644 (file)
--- a/html/helpviewer.php
+++ b/html/helpviewer.php
##################
*/
-set_error_handler("myone");
$helpdir = HELP_BASEDIR."/en/manual_gosa_en/"; // Folder to use for help files
$defaultpage = "index.html"; // alternative file, shown on error, or on first call
$prefix = "node"; // Prefix of the generated help files
$pre_mark = "<b><u><i>" ; // Sign words with this
$suf_mark = "</i></u></b>"; // and this
-// Only for testing delete this if everything works fine
-function myone($par1,$par2,$par3,$par3)
-{
- print "<br>Seite : ".$par1."<br>Name : ".$par2."<br>Seite : ".$par3."<br>Zeile : ".$par3;
-}
-
+$error_collector= "";
+set_error_handler('gosaRaiseError');
/* Define which tags musst be delete, header, navigation, banner */
$replacements=array();
$replacements['from']=array("@<!DOC.*<BODY >@si",
- "@<DIV[^>]*?>.*?DIV>@si",
- "'<code.*code>'",
- "/<HR>/",
- "@<ADDRESS[^>]*?>.*?ADDRESS>@si",
- "@<\/BODY[^>]*?>.*?HTML>@si",
- "'<TABLE.*>'",
- "/<H1 ALIGN=\"CENTER\">/");
+ "@<DIV[^>]*?>.*?DIV>@si",
+ "'<code.*code>'",
+ "/<HR>/",
+ "@<ADDRESS[^>]*?>.*?ADDRESS>@si",
+ "@<\/BODY[^>]*?>.*?HTML>@si",
+ "'<TABLE.*>'",
+ "/<H1 ALIGN=\"CENTER\">/");
$replacements['to']=array("",
- "",
- "",
- "",
- "",
- "",
- "<table border=1 cellspacing=0 bgcolor=\"#E0E0E0\" width=\"95%\" align=\"center\" cellpadding=\"3\">",
- "<H1>");
+ "",
+ "",
+ "",
+ "",
+ "",
+ "<table border=1 cellspacing=0 bgcolor=\"#E0E0E0\" width=\"95%\" align=\"center\" cellpadding=\"3\">",
+ "<H1>");
/* Default pages */
$smarty->assign("forward" ,"");
$smarty->assign("search_string","");
$smarty->assign("help_contents","<br>".sprintf(_("Can't read any helpfiles from ' %s ', possibly there is no help available."),HELP_BASEDIR."/en/manual_gosa_en/"));
-
+
/* Output html ...*/
$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
$display= $header.$smarty->fetch(get_template_path('help.tpl'));
echo $display;
-
}else{
-
+
/* We prepare to search, all Document for the given keyword */
if(isset($_POST['search'])){
/* Create result list */
$smarty->assign("help_contents",searchlist($arr,$res,$maxresults));
+ /* show some errors */
+ if (isset($_SESSION['errors'])){
+ $smarty->assign("errors", $_SESSION['errors']);
+ }
+ if ($error_collector != ""){
+ $smarty->assign("php_errors", $error_collector."</div>");
+ } else {
+ $smarty->assign("php_errors", "");
+ }
+
/* Output html ...*/
$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
$display= $header.$smarty->fetch(get_template_path('help.tpl'));
if(!isset($_SESSION['search_string'])){
$_SESSION['search_string']="";
}
-
+
$smarty->assign("search_string",$_SESSION['search_string']);
$smarty->assign("index" ,$index);
$smarty->assign("forward" ,$forward);
+ /* show some errors */
+ if (isset($_SESSION['errors'])){
+ $smarty->assign("errors", $_SESSION['errors']);
+ }
+ if ($error_collector != ""){
+ $smarty->assign("php_errors", $error_collector."</div>");
+ } else {
+ $smarty->assign("php_errors", "");
+ }
+
/* Fill page */
$header= "<!-- headers.tpl-->".$smarty->fetch(get_template_path('headers.tpl'));
$display= $header.$smarty->fetch(get_template_path('help.tpl'));
index f009f8e1b831f863c89526a69842bd3491609397..f1c188fefa1a7b0ebefea904b64a14bd1c3543dc 100644 (file)
<body style='background-color:white;background-image:none'>
+{$php_errors}
<form action='helpviewer.php' name='mainform' method='post' enctype='multipart/form-data'>
<div style='background-color:#CDF6BD;width:100%;border-bottom:1px solid #909090'>
<table width="99%">