Location: PHPKode > projects > OpenCabling > opencabling/confirm_toggle_vlan_port.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';
?>

</head>
<body>
<?php

$action=$_REQUEST['action'];
$object=$_REQUEST['object'];
$port=$_REQUEST['port'];
$vlanname_id=$_REQUEST['vlanname_id'];

include "opendb.php";

if ($action=="add") {
  $sql="select * from vlannames where vlanname_id=$vlanname_id and obj_id=$object";
  $query=mysql_query($sql,$mysql_conn);
  $result=mysql_fetch_assoc($query);
  print "Are you sure you want to <b>add</b> the following port configuration?";
  print "<table><tr><td align=right><b>Port:</b></td><td>".$port."</td></tr>";
  print "<tr><td align=right><b>VLAN Name:</b></td><td>".$result['name']."</td></tr>";
  print "<tr><td align=right><b>VLAN ID:</b></td><td>".$result['vlanid']."</td></tr>";
  print "<tr><td align=right><b>Local ID:</b></td><td>".$result['localid']."</td></tr>";
  print "<tr><td></td><td align=right>";
  print "<form method=post action='toggle_vlan_port.php'>";
  print "<input type=hidden name=object value='$object'></input>";
  print "<input type=hidden name=port value='$port'></input>";
  print "<input type=hidden name=vlanname_id value='$vlanname_id'></input>";
  print "<input type=hidden name=action value='$action'></input>";
  print "<input type=submit value='OK'></input>";
  print "</td></tr></table>";
} else if ($action=="remove") {
  $sql="select * from vlannames where vlanname_id=$vlanname_id and obj_id=$object";
  $query=mysql_query($sql,$mysql_conn);
  $result=mysql_fetch_assoc($query);
  print "Are you sure you want to <b>remove</b> the following port configuration?";
  print "<table><tr><td align=right><b>Port:</b></td><td>".$port."</td></tr>";
  print "<tr><td align=right><b>VLAN Name:</b></td><td>".$result['name']."</td></tr>";
  print "<tr><td align=right><b>VLAN ID:</b></td><td>".$result['vlanid']."</td></tr>";
  print "<tr><td align=right><b>Local ID:</b></td><td>".$result['localid']."</td></tr>";
  print "<tr><td></td><td align=right>";
  print "<form method=post action='toggle_vlan_port.php'>";
  print "<input type=hidden name=object value='$object'></input>";
  print "<input type=hidden name=port value='$port'></input>";
  print "<input type=hidden name=vlanname_id value='$vlanname_id'></input>";
  print "<input type=hidden name=action value='$action'></input>";
  print "<input type=submit value='OK'></input>";
  print "</td></tr></table>";
}

?>
</body>
</html>
Return current item: OpenCabling