r1605 + split IPv4 space and IPv4 SLB into 2 distinct pages
[racktables] / inc / help.php
1 <?php
2 /*
3 *
4 * This file contains help rendering functions for RackTables.
5 *
6 */
7
8 // Generate a link to the help tab.
9 function genHelpLink ($tabno)
10 {
11 global $root;
12 return "${root}?page=help&tab=${tabno}";
13 }
14
15 // Checks if a topic is present for page and tab and render a hinting element;
16 // do nothing otherwise.
17 function lookupHelpTopic ($pageno, $tabno)
18 {
19 global $helptab;
20 if (!isset ($helptab[$pageno][$tabno]))
21 return;
22 echo "<li style='position: absolute; top: 80px; right: 0px;'><a style='background-color: #f0f0f0; border: 0;' href='" . genHelpLink ($helptab[$pageno][$tabno]);
23 echo "' alt='Help' title='Help is available for this page'>";
24 printImageHREF ('helphint');
25 echo '</a>';
26 return;
27 }
28
29 // Prints the help page content.
30 function renderHelpTab ($tabno)
31 {
32 switch ($tabno)
33 {
34 default:
35 startPortlet ('Oops!');
36 echo __FUNCTION__ . ": There was no help text found for help tab '${tabno}'";
37 finishPortlet();
38 break;
39 }
40 }
41
42 ?>