r1564 + give Collapsible Textareas a try
[racktables] / index.php
CommitLineData
b325120a 1<?php
e673ee24
DO
2
3require 'inc/init.php';
4authorize();
5
6echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
7echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">'."\n";
8echo '<head><title>' . getTitle ($pageno, $tabno) . "</title>\n";
9echo "<link rel=stylesheet type='text/css' href=pi.css />\n";
10echo "<link rel=icon href='" . getFaviconURL() . "' type='image/x-icon' />";
11echo "<style type='text/css'>\n";
12// Print style information
9c0b0016 13foreach (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>
a30489ac
DO
30 <script language='javascript' type='text/javascript' src='js/live_validation.js'></script>
31 <script language='javascript' type='text/javascript' src='js/Resize.js'></script>
5f26cb85 32 <script language='javascript' type='text/javascript' src='js/collapsible_textareas.js'></script>
2a201216
DY
33 <script type="text/javascript">
34 function init() {
35 document.add_new_range.range.setAttribute('match', "^\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\/\\d\\d?$");
36
37 Validate.init();
38 }
39 window.onload=init;
40 </script>
e673ee24
DO
41 </head>
42<body>
43 <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%' class=maintable>
44 <tr class=mainheader>
c4d215e8 45 <td colspan=2>
e673ee24
DO
46 <table width='100%' cellspacing=0 cellpadding=2 border=0>
47 <tr>
1db97c25 48 <td valign=top><a href='http://racktables.org/'><?php printImageHREF ('logo'); ?></a></td>
b325120a 49 <td valign=top><div class=greeting><?php printGreeting(); ?></div></td>
e673ee24
DO
50 </tr>
51 </table>
52 </td>
53 </tr>
54
55 <tr>
c4d215e8 56 <td class="menubar" colspan=2>
e673ee24
DO
57 <table border="0" width="100%" cellpadding="3" cellspacing="0">
58 <tr>
b325120a 59<?php showPathAndSearch ($pageno); ?>
e673ee24
DO
60 </tr>
61 </table>
62 </td>
63 </tr>
64
65 <tr>
b325120a 66<?php
e673ee24
DO
67 showTabs ($pageno, $tabno);
68?>
69 </tr>
70
71 <tr>
c4d215e8 72 <td colspan=2>
b325120a 73<?php
e45a78d7
DO
74if (isset ($tabhandler[$pageno][$tabno]))
75{
3bebaebd
DO
76 if (isset ($page[$pageno]['bypass']) && isset ($page[$pageno]['bypass_type']))
77 {
78 switch ($page[$pageno]['bypass_type'])
79 {
80 case 'uint':
81 assertUIntArg ($page[$pageno]['bypass']);
82 break;
83 default:
84 showError ("Dispatching error for bypass parameter");
85 break;
86 }
87 $tabhandler[$pageno][$tabno] ($_REQUEST[$page[$pageno]['bypass']]);
88 }
e45a78d7
DO
89 else
90 $tabhandler[$pageno][$tabno] ();
91}
92elseif (isset ($page[$pageno]['handler']))
e673ee24
DO
93 $page[$pageno]['handler'] ($tabno);
94else
b43ee65d 95 showError ("Failed to find handler for page '${pageno}', tab '${tabno}'");
e673ee24
DO
96?>
97 </td>
98 </tr>
99 </table>
100</body>
101</html>