Пример #1
0
function delete_user($user)
{
    include_once './lib/shop_lib.php';
    global $db, $prefix, $shopper;
    // Returning money
    $money = get_total_user_money($user, false);
    if ($money > 0) {
        pay($money, $user, $shopper, false, false);
    }
    $query = $db->DoQuery("SELECT id FROM {$prefix}users WHERE username='******'");
    while ($row = $db->Do_Fetch_Assoc($query)) {
        $db->DoQuery("DELETE FROM {$prefix}banned WHERE id='{$row['id']}'");
    }
    $db->DoQuery("DELETE FROM {$prefix}banned WHERE user_ip_email='{$user}'");
    $db->DoQuery("DELETE FROM {$prefix}groups WHERE username='******'");
    $db->DoQuery("DELETE FROM {$prefix}users WHERE username='******'");
    // Delete bandwidth info
    $db->DoQuery("DELETE FROM {$prefix}bandwidth WHERE user='******'");
    // Delete character sheet
    $db->DoQuery("DELETE FROM {$prefix}userability WHERE username='******'");
    $db->DoQuery("DELETE FROM {$prefix}usercharact WHERE username='******'");
    $db->DoQuery("DELETE FROM {$prefix}objects WHERE owner='{$user}'");
    #$db->DoQuery("DELETE FROM {$prefix}boardmsg WHERE user='******'");
    $db->DoQuery("DELETE FROM {$prefix}boardunread WHERE user='******'");
    $db->DoQuery("DELETE FROM {$prefix}messages WHERE user='******'\n\t\t\tOR room='{$user}'");
    // Clean up logs
    $db->DoQuery("DELETE FROM {$prefix}user_feat WHERE username='******'");
    cleanup_guest_logs($user);
}
Пример #2
0
    exit;
}
//This is used to return to flat http after login
if ($_SERVER["SERVER_PORT"] == 443) {
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: http://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
    exit;
}
// Prevent their username and room from being deleted
if (@$_GET['act'] != "frame") {
    prevent_cleanup();
    cleanup_inactive_users();
    // If the user has just entered as a guest then we need to remove old logs
    // This variable is set in lib/auth.php IF it is set at all
    if (isset($remove_old_guest_logs)) {
        cleanup_guest_logs($x7s->username);
    }
}
// Prevent errors
if (!isset($_GET['act'])) {
    $_GET['act'] = "";
}
// We cannot allow a user to start the frameset without choosing a room
if ($_GET['act'] == "frame" && $x7c->room_name == "") {
    $_GET['errore'] = "noroom";
}
// Test to see if server is running in single room mode
if ($x7c->settings['single_room_mode'] != "") {
    // Set the room name
    $_GET['room'] = $x7c->settings['single_room_mode'];
    // Fix problems with room passwords