r1106 importing RackTables trunk
[racktables] / link_helper.php
CommitLineData
e673ee24
DO
1<?
2 require 'inc/init.php';
3 // This is our context.
4 $pageno = 'objects';
5 $tabno = 'default';
6 authorize();
7?>
8<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
9<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" style="height: 100%;">
10<head>
11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
12<?
13echo '<title>' . getTitle ($pageno, $tabno) . "</title>\n";
14echo "<link rel=stylesheet type='text/css' href=pi.css />\n";
15echo "<link rel=icon href='" . getFaviconURL() . "' type='image/x-icon' />";
16?>
17</head>
18<body style="height: 100%;">
19<form action="javascript:;">
20<div style="background-color: #f0f0f0; border: 1px solid #3c78b5; padding: 10px; height: 100%; text-align: center; margin: 5px;">
21<h2>Choose a port:</h2><br><br>
22<input type=hidden id='remote_port_name'>
23<input type=hidden id='remote_object_name'>
24<select size="30" id="ports">
25<?
26 $type_id = $_REQUEST['type'];
27 $port_id = $_REQUEST['port'];
28 $object_id = $_REQUEST['object_id'];
29 $port_name = $_REQUEST['port_name'];
30 renderEmptyPortsSelect ($port_id, $type_id);
31?>
32</select><br><br>
33<?php
34 echo "<input type='submit' value='Proceed' onclick='".
35 "if (getElementById(\"ports\").value != \"\") {".
36 " 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; ".
37 " window.close();".
38 "}".
39 "'>";
40?>
41</div>
42</form>
43</body>
44</html>