r1202 + all options have moved into the database
[racktables] / index.php
index 0b5b866204d8713695a0f9c8349ce486c75f7e4a..18f9f58aa84221f88ba141b17f25f4e5dfe3490c 100644 (file)
--- a/index.php
+++ b/index.php
@@ -10,16 +10,32 @@ echo "<link rel=stylesheet type='text/css' href=pi.css />\n";
 echo "<link rel=icon href='" . getFaviconURL() . "' type='image/x-icon' />";
 echo "<style type='text/css'>\n";
 // Print style information
-foreach ($color as $statecode => $colorcode)
+foreach (array ('F', 'A', 'U', 'T', 'Th', 'Tw', 'Thw') as $statecode)
 {
        echo "td.state_${statecode} {\n";
-       echo "text-align: center;\n";
-       echo "background-color: #${colorcode};\n";
-       echo "font: bold 10px Verdana, sans-serif;\n";
+       echo "\ttext-align: center;\n";
+       echo "\tbackground-color: #" . (getConfigVar ('color_' . $statecode)) . ";\n";
+       echo "\tfont: bold 10px Verdana, sans-serif;\n";
        echo "}\n\n";
 }
 ?>
+.validation-error {
+       border:1px solid red;
+}
+
+.validation-success {
+       border:1px solid green;
+}
        </style>
+       <script language='javascript' type='text/javascript' src='live_validation.js'></script>
+       <script type="text/javascript">
+       function init() {
+               document.add_new_range.range.setAttribute('match', "^\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\/\\d\\d?$");
+
+               Validate.init();
+       }
+       window.onload=init;
+       </script>
        </head>
 <body>
  <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%' class=maintable>