execute(" SELECT session_time FROM arrowchat_chatroom_rooms WHERE author_id = '" . $db->escape_string($userid) . "' AND session_time > " . time() . " - " . $flood_time . " "); if ($result AND $db->count_select() < 1) { if (!empty($chatroom_password) && $chatroom_password != $language[99]) { $type = "2"; $password = $chatroom_password; } if (!empty($chatroom_description)) { $description = $chatroom_description; } if (!empty($chatroom_welcome)) { $welcome = $chatroom_welcome; } $db->execute(" INSERT INTO arrowchat_chatroom_rooms ( author_id, name, type, password, length, session_time, disallowed_groups, description, welcome_message ) VALUES ( '" . $db->escape_string($userid) . "', '" . $db->escape_string($chatroom_name) . "', '" . $type . "', '" . $db->escape_string($password) . "', '" . $db->escape_string($user_chatrooms_length) . "', '" . time() . "', ' ', '" . $db->escape_string($description) . "', '" . $db->escape_string($welcome) . "' ) "); echo "1"; } else { echo "-1"; // Display flood time limit error } } else { echo "-2"; // Display user created chatrooms off error } } else { // Space for error that no chat room name was input } close_session(); exit(0); ?>