Example #1
0
             $my_vlan = new Vlan_database($v_id);
             array_push($handlers, "handleEvent('" . $_SERVER['SCRIPT_NAME'] . "?tab=" . $_GET['tab'] . "&pluginID=" . $_GET['pluginID'] . "&className=" . $_GET['className'] . "&family=vlan&v_id=" . $v_id . "')");
             array_push($data, $my_vlan->get_vlan_id());
             array_push($data, $my_vlan->get_name());
             array_push($data, $my_vlan->get_status());
             array_push($data, $my_vlan->get_location_name());
             array_push($data, $my_vlan->get_assigned_to_name());
             array_push($data, $my_vlan->get_vlan_distinguisher());
             array_push($filters, $my_vlan->get_status());
         }
         $form->setSortable(true);
         // or false for not sortable
         $form->setHeadings($heading);
         $form->setData($data);
         $form->setEventHandler($handlers);
         $form->setFilter($filters);
         //set the table size
         $form->setTableWidth("1024px");
         $form->setTitleWidth("20%");
         //export the search result into csv
         echo "<div id='csv_block' style='clear:both; float:left; margin-bottom:5px; margin-top:10px;'><input type='button' onclick='csv_report(\"plugins/IP%20Manager/export_csv.php?report_name=vlan_report&vlan_id=showALL\")' value='Export to CSV' /></div>";
         echo $form->showForm();
     }
 }
 //update VLAN information when the update is called
 if (isset($_POST['updateInfo'])) {
     $my_vlan = new Vlan_database($v_id);
     $my_vlan->set_name($_POST["name"]);
     $my_vlan->set_status($_POST["status"]);
     $my_vlan->set_location($_POST["location"]);
     $my_vlan->set_assigned_to($_POST["assign"]);