Location: PHPKode > projects > OpenCabling > opencabling/new_connection.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta>
<link rel="stylesheet" href="css/opencabling.css" type="text/css"></link>
<?php
require_once 'js/functions.js';
require_once 'phplayersmenu.inc.php';
$mid->printHeader();
?>

</head>
<body>
<?php

$mid->printMenu('hormenu1');

print "<B>New Connection definition</B>";

$start_object=$_REQUEST['object'];
$start_item=$_REQUEST['item'];

include "opendb.php";

print "<form name='choose' id='choose' action='create_connection.php'>";
print "<br>";
print "<table border=0><tr><td align=right><span class=normaltext>Type of Connection:</span></td>";
print "<td colspan=2><select name='conn_type'>";
print "<option values='Choose'>Choose</option>";

$sql="select * from conntypes order by description";
$query=mysql_query($sql,$mysql_conn);
while ($result=mysql_fetch_assoc($query)) {
  print "<option value='".$result['id_conn_type']."']>".$result['description']."</option>";
}
print "</select></td></tr>";
print "<tr><td align=right><span class=normaltext>Name:</span></td>";
print "<td><textarea name='conn_name' rows=2 cols=25></textarea></td>";
print "</tr>";
print "<tr><td align=right><span class=normaltext>Description:</span></td>";
print "<td><textarea name='conn_description' rows=4 cols=25></textarea></td>";
print "</tr>";
print "<tr><td align=right><span class=normaltext>From object:</span></td>";
print "<td><input type=text size=5 name=start_id id='start_id' value='".$start_object."' onchange='ShowObjectName(\"start_id\",\"start_name\")'></input>";
print "<input type=text readonly name=start_name id='start_name'></input></td>";
print "<td><button onClick='ChooseObject(\"start_id\",\"start_name\")' type='button'>Browse</button></td>";
print "</tr>";
print "<tr><td align=right><span class=normaltext>Item:</span></td>";
print "<td><input type=text name=start_item value='".$start_item."'></input></td>";
print "</tr>";
print "<tr><td align=right><span class=normaltext>To object:</span></td>";
print "<td><input type=text size=5 name=end_id id='end_id' onchange='ShowObjectName(\"end_id\",\"end_name\")'></input>";
print "<input type=text readonly name=end_name id='end_name'></input></td>";
print "<td><button onClick='ChooseObject(\"end_id\",\"end_name\")' type='button'>Browse</button></td>";
print "</tr>";
print "<tr><td align=right><span class=normaltext>Item:</span></td>";
print "<td><input type=text name=end_item></input></td>";
print "</tr>";
print "<tr><td></td><td><input type=submit value='Create Connection'></input></td></tr>";
print "</table>";

if ($start_object<>"") {
     echo "<script lang=javascript>ShowObjectName(\"start_id\",\"start_name\");</script>";
}
mysql_close($mysql_conn);
?>

<?php
$mid->printFooter();
?>
     
</body>
</html>
Return current item: OpenCabling