} } } } else { //show the current vlan if nothing else is called $form = new Form("auto", 2); $v_id = $_GET['v_id']; $my_vlan = new Vlan_database($v_id); $data = array(); //put data in the form 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_notes()); array_push($data, $my_vlan->get_vlan_distinguisher()); //create the headings for these $heading = array("VLAN Information"); //create the fields $titles = array("VLAN ID", "Name", "Status", "Location", "Assigned To", "Notes", "VLAN Distinguisher"); $keys = array("id", "name", "status", "location", "assign", "notes", "distinguish"); $fieldType = array("static", "default", "drop_down", "drop_down", "drop_down", "text_area", "default"); $location = Location::get_locations(); $status = array("RESERVED" => "RESERVED", "ASSIGNED" => "ASSIGNED"); $assign = Contact::get_groups(); //insert everything into the form $form->setSortable(true); // or false for not sortable $form->setHeadings($heading); $form->setType($status);