Commit | Line | Data |
---|---|---|
b325120a | 1 | <?php |
e673ee24 DO |
2 | |
3 | require 'inc/init.php'; | |
4 | authorize(); | |
5 | ||
6 | echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n"; | |
7 | echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n"; | |
8 | echo '<head><title>' . getTitle ($pageno, $tabno) . "</title>\n"; | |
9 | echo "<link rel=stylesheet type='text/css' href=pi.css />\n"; | |
10 | echo "<link rel=icon href='" . getFaviconURL() . "' type='image/x-icon' />"; | |
11 | echo "<style type='text/css'>\n"; | |
12 | // Print style information | |
9c0b0016 | 13 | foreach (array ('F', 'A', 'U', 'T', 'Th', 'Tw', 'Thw') as $statecode) |
e673ee24 DO |
14 | { |
15 | echo "td.state_${statecode} {\n"; | |
2a201216 | 16 | echo "\ttext-align: center;\n"; |
9c0b0016 | 17 | echo "\tbackground-color: #" . (getConfigVar ('color_' . $statecode)) . ";\n"; |
2a201216 | 18 | echo "\tfont: bold 10px Verdana, sans-serif;\n"; |
e673ee24 DO |
19 | echo "}\n\n"; |
20 | } | |
21 | ?> | |
2a201216 DY |
22 | .validation-error { |
23 | border:1px solid red; | |
24 | } | |
25 | ||
26 | .validation-success { | |
27 | border:1px solid green; | |
28 | } | |
e673ee24 | 29 | </style> |
2a201216 DY |
30 | <script language='javascript' type='text/javascript' src='live_validation.js'></script> |
31 | <script type="text/javascript"> | |
32 | function init() { | |
33 | document.add_new_range.range.setAttribute('match', "^\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\/\\d\\d?$"); | |
34 | ||
35 | Validate.init(); | |
36 | } | |
37 | window.onload=init; | |
38 | </script> | |
e673ee24 DO |
39 | </head> |
40 | <body> | |
41 | <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%' class=maintable> | |
42 | <tr class=mainheader> | |
c4d215e8 | 43 | <td colspan=2> |
e673ee24 DO |
44 | <table width='100%' cellspacing=0 cellpadding=2 border=0> |
45 | <tr> | |
1db97c25 | 46 | <td valign=top><a href='http://racktables.org/'><?php printImageHREF ('logo'); ?></a></td> |
b325120a | 47 | <td valign=top><div class=greeting><?php printGreeting(); ?></div></td> |
e673ee24 DO |
48 | </tr> |
49 | </table> | |
50 | </td> | |
51 | </tr> | |
52 | ||
53 | <tr> | |
c4d215e8 | 54 | <td class="menubar" colspan=2> |
e673ee24 DO |
55 | <table border="0" width="100%" cellpadding="3" cellspacing="0"> |
56 | <tr> | |
b325120a | 57 | <?php showPathAndSearch ($pageno); ?> |
e673ee24 DO |
58 | </tr> |
59 | </table> | |
60 | </td> | |
61 | </tr> | |
62 | ||
63 | <tr> | |
b325120a | 64 | <?php |
e673ee24 DO |
65 | showTabs ($pageno, $tabno); |
66 | ?> | |
67 | </tr> | |
68 | ||
69 | <tr> | |
c4d215e8 | 70 | <td colspan=2> |
b325120a | 71 | <?php |
e45a78d7 DO |
72 | if (isset ($tabhandler[$pageno][$tabno])) |
73 | { | |
3bebaebd DO |
74 | if (isset ($page[$pageno]['bypass']) && isset ($page[$pageno]['bypass_type'])) |
75 | { | |
76 | switch ($page[$pageno]['bypass_type']) | |
77 | { | |
78 | case 'uint': | |
79 | assertUIntArg ($page[$pageno]['bypass']); | |
80 | break; | |
81 | default: | |
82 | showError ("Dispatching error for bypass parameter"); | |
83 | break; | |
84 | } | |
85 | $tabhandler[$pageno][$tabno] ($_REQUEST[$page[$pageno]['bypass']]); | |
86 | } | |
e45a78d7 DO |
87 | else |
88 | $tabhandler[$pageno][$tabno] (); | |
89 | } | |
90 | elseif (isset ($page[$pageno]['handler'])) | |
e673ee24 DO |
91 | $page[$pageno]['handler'] ($tabno); |
92 | else | |
93 | showError ("Failed to find handler for page '${pageno}'"); | |
94 | ?> | |
95 | </td> | |
96 | </tr> | |
97 | </table> | |
98 | </body> | |
99 | </html> |