示例#1
0
                                    logMessage(getCurrentUID(), 0, "User took seat " . $seat->seat_name . " at LAN " . $lan->name . " [" . $lan->id . "]");
                                }
                            }
                        } else {
                            $master->AddWarning("Invalid seat!");
                        }
                    } else {
                        $master->AddWarning("Invalid seat");
                    }
                } else {
                    $master->AddWarning("You have no tickets which allow you to take a seat!");
                }
                break;
            }
            break;
        case 'unsit':
            $seat = new lan_seats();
            $seat->lan_id = getCurrentLID();
            $seat->user_id = getCurrentUID();
            $seat->find();
            if ($seat->fetch()) {
                $seat->user_id = 0;
                $seat->update();
                $master->AddWarning("Removed your seat selection.");
                logMessage(getCurrentUID(), 0, "User removed reservation on seat " . $seat->seat_name . " at LAN " . $lan->name . " [" . $lan->id . "]");
            } else {
                $master->AddWarning("There was a problem removing your seat selection.");
            }
            break;
    }
}