r2420 - removed script.aculo.us clause
[racktables] / port_link_helper.php
CommitLineData
b325120a 1<?php
e673ee24
DO
2 require 'inc/init.php';
3 // This is our context.
4 $pageno = 'objects';
5 $tabno = 'default';
acc293fc 6 fixContext();
da958e52
DO
7 if (!permitted())
8 {
9 renderAccessDenied();
10 die;
11 }
e673ee24
DO
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" />
b325120a 17<?php
e673ee24
DO
18echo '<title>' . getTitle ($pageno, $tabno) . "</title>\n";
19echo "<link rel=stylesheet type='text/css' href=pi.css />\n";
20echo "<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>Choose a port:</h2><br><br>
27<input type=hidden id='remote_port_name'>
28<input type=hidden id='remote_object_name'>
8b980e24 29<select size=<?php echo getConfigVar ('MAXSELSIZE'); ?> id="ports">
b325120a 30<?php
e673ee24
DO
31 $type_id = $_REQUEST['type'];
32 $port_id = $_REQUEST['port'];
33 $object_id = $_REQUEST['object_id'];
34 $port_name = $_REQUEST['port_name'];
35 renderEmptyPortsSelect ($port_id, $type_id);
36?>
37</select><br><br>
38<?php
39 echo "<input type='submit' value='Proceed' onclick='".
40 "if (getElementById(\"ports\").value != \"\") {".
e1ae3fb4 41 " opener.location=\"${root}process.php?page=object&tab=ports&op=linkPort&object_id=$object_id&port_id=$port_id&port_name=$port_name&remote_port_name=\"+getElementById(\"remote_port_name\").value+\"&remote_object_name=\"+getElementById(\"remote_object_name\").value+\"&remote_port_id=\"+getElementById(\"ports\").value; ".
e673ee24
DO
42 " window.close();".
43 "}".
44 "'>";
45?>
46</div>
47</form>
48</body>
49</html>