4 require 'inc/interface.php';
5 require 'inc/init.php';
7 // no ctx override is necessary
12 header ('Content-Type: text/html; charset=UTF-8');
13 // Only store the tab name after clearance is got. Any failure is unhandleable.
14 if (isset ($_REQUEST['tab']) and ! isset ($_SESSION['RTLT'][$pageno]['dont_remember']))
15 $_SESSION['RTLT'][$pageno] = array ('tabname' => $tabno, 'time' => time());
17 // call the main handler - page or tab handler.
18 // catch exception and show its error message instead of page/tab content
20 if (isset ($tabhandler[$pageno][$tabno]))
21 call_user_func ($tabhandler[$pageno][$tabno], getBypassValue());
22 elseif (isset ($page[$pageno]['handler']))
23 $page[$pageno]['handler'] ($tabno);
25 showError ("Failed to find handler for page '${pageno}', tab '${tabno}'");
26 $content = ob_get_clean();
27 } catch (Exception
$e) {
30 showError ("Unhandled exception: " . $e->getMessage());
35 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
36 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en" lang
="en">
37 <head
><title
><?php
echo getTitle ($pageno); ?
></title
>
38 <?php
printPageHeaders(); ?
>
41 <table border
=0 cellpadding
=0 cellspacing
=0 width
="100%" height
="100%" class="maintable">
42 <tr
class="mainheader"><td
>
43 <table width
="100%" cellspacing
="0" cellpadding
="2" border
="0">
45 <td valign
=top
><a href
="http://racktables.org/"><?php
printImageHREF ('logo'); ?
></a
></td
>
46 <td valign
=top
><div
class=greeting
><?php
printGreeting(); ?
></div
></td
>
50 <tr
><td
class="menubar">
51 <table border
="0" width
="100%" cellpadding
="3" cellspacing
="0">
52 <tr
><?php
showPathAndSearch ($pageno); ?
></tr
>
55 <tr
><td
><?php
showTabs ($pageno, $tabno); ?
></td
></tr
>
56 <tr
><td
><?php
showMessageOrError(); ?
></td
></tr
>
57 <tr
><td
><?php
echo $content; ?
></td
></tr
>
63 } catch (Exception
$e) {
67 clearMessages(); // prevent message appearing in foreign tab