root/trunk/RackTables/find_object_ip_helper.php

Revision 2225, 1.2 kB (checked in by pilot, 3 months ago)
  • use MAXSELSIZE, where it wasn't yet
  • consider using constructIPv4Address()
Line 
1 <?php
2     require 'inc/init.php';
3     // This is our context.
4     $pageno = 'objects';
5     $tabno = 'default';
6     fixContext();
7     if (!permitted())
8     {
9         renderAccessDenied();
10         die;
11     }
12 ?>
13 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" style="height: 100%;">
15 <head>
16  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
17 <?php
18 echo '<title>' . getTitle ($pageno, $tabno) . "</title>\n";
19 echo "<link rel=stylesheet type='text/css' href=pi.css />\n";
20 echo "<link rel=icon href='" . getFaviconURL() . "' type='image/x-icon' />";
21 ?>
22 </head>
23 <body style="height: 100%;">
24 <form action="javascript:;">
25 <div style="background-color: #f0f0f0; border: 1px solid #3c78b5; padding: 10px; height: 100%; text-align: center; margin: 5px;">
26 <h2>Pick address:</h2><br><br>
27 <input type=hidden id='ip'>
28 <select size=<?php echo getConfigVar ('MAXSELSIZE'); ?> id="addresses">
29 <?php renderAllIPv4Allocations(); ?>
30 </select><br><br>
31 <input type='submit' value='Proceed' onclick='if (getElementById("ip")!="") { opener.document.getElementById("remoteip").value=getElementById("ip").value; window.close();}'>
32 </div>
33 </form>
34 </body>
35 </html>
36
Note: See TracBrowser for help on using the browser.