Exemplo n.º 1
0
         $where_values['rooms_id'] = $_GET['rooms_id'];
     }
     if (isset($_GET['new_rooms_name'])) {
         $new_values['rooms_name'] = $_GET['new_rooms_name'];
     }
     if (isset($_GET['new_rooms_port'])) {
         $new_values['rooms_port'] = $_GET['new_rooms_port'];
     }
     if (isset($_GET['new_rooms_status'])) {
         $new_values['rooms_status'] = $_GET['new_rooms_status'];
     }
     echo $operation->upd_room(array($new_values, $where_values));
     break;
 case "add_floor":
     if (isset($_GET['floors_name'])) {
         echo $operation->add_floor($_GET['floors_name']);
     } else {
         exit($operation->encode_output(array('status' => 0, 'message' => "Lack of parameters!", 'data' => NULL)));
     }
     break;
 case "del_floor":
     $where_values = array();
     if (isset($_GET['floors_name'])) {
         $where_values['floors_name'] = $_GET['floors_name'];
     }
     if (isset($_GET['floors_id'])) {
         $where_values['floors_id'] = $_GET['floors_id'];
     }
     echo $operation->del_floor($where_values);
     break;
 case "get_floor":