/**
  * @throws EquipmentTypeIDMissingException
  */
 public static function change_location()
 {
     if ($_GET['id']) {
         if ($_GET['nextpage'] == 1) {
             $page_1_passed = true;
         } else {
             $page_1_passed = false;
         }
         if ($page_1_passed == false) {
             $template = new HTMLTemplate("equipment/admin/equipment_type/change_location.html");
             $paramquery = $_GET;
             $paramquery['nextpage'] = "1";
             $params = http_build_query($paramquery, '', '&');
             $template->set_var("params", $params);
             $location_array = Location::list_entries();
             $result = array();
             $counter = 1;
             $location = new Location($value);
             $result[0]['value'] = 0;
             $result[0]['content'] = "none";
             foreach ($location_array as $key => $value) {
                 $location = new Location($value);
                 $result[$counter]['value'] = $value;
                 $result[$counter]['content'] = $location->get_name(true);
                 $counter++;
             }
             $template->set_var("option", $result);
             $template->output();
         } else {
             $equipment_type = new EquipmentType($_GET['id']);
             $paramquery = $_GET;
             $paramquery['action'] = "detail";
             unset($paramquery['nextpage']);
             $params = http_build_query($paramquery, '', '&');
             if ($equipment_type->set_location_id($_POST['location'])) {
                 Common_IO::step_proceed($params, "Equipment Type", "Operation Successful", null);
             } else {
                 Common_IO::step_proceed($params, "Equipment Type", "Operation Failed", null);
             }
         }
     } else {
         throw new EquipmentTypeIDMissingException();
     }
 }