$message = $lang['Reg_Max_Registrations']; } else { $sql = "UPDATE " . REGISTRATION_TABLE . " SET registration_user_ip = '$user_ip', registration_time = $zeit, registration_status = $register_value WHERE topic_id = $topic_id AND registration_user_id = $user_id"; $db->sql_query($sql); $message = $lang['Reg_Change']; } } } else { if (($user->data['user_level'] != ADMIN) && (check_max_registration($topic_id, $register_value) === false)) { $message = sprintf($lang['Reg_Max_Registrations'], $num_max_reg); } else { $sql = "INSERT INTO " . REGISTRATION_TABLE . " (topic_id, registration_user_id, registration_user_ip, registration_time, registration_status) VALUES ($topic_id, $user_id, '$user_ip', $zeit, $register_value)"; $db->sql_query($sql); $message = $lang['Reg_Insert']; } } $redirect_url = append_sid(CMS_PAGE_VIEWTOPIC . '?' . (!empty($forum_id_append) ? ($forum_id_append . '&') : '') . $topic_id_append); meta_refresh(3, $redirect_url);
{ $reg_expired = 0; } $readonly_option1 = ''; $readonly_option2 = ''; $readonly_option3 = ''; if (($self_registered == 1) || ($reg_expired === 1) || ((check_max_registration($topic_id, 1) === false) && (check_user_registered($topic_id, $user->data['user_id'], 1) === false))) { $readonly_option1 = 'disabled="disabled"'; } if (($self_registered == 2) || ($reg_expired === 1) || ((check_max_registration($topic_id, 2) === false) && (check_user_registered($topic_id, $user->data['user_id'], 2) === false))) { $readonly_option2 = 'disabled="disabled"'; } if (($self_registered == 3) || ($reg_expired === 1) || ((check_max_registration($topic_id, 3) === false) && (check_user_registered($topic_id, $user->data['user_id'], 3) === false))) { $readonly_option3 = 'disabled="disabled"'; } $slots_left_option1 = check_slots_left($topic_id, 1); $slots_left_option2 = check_slots_left($topic_id, 2); $slots_left_option3 = check_slots_left($topic_id, 3); switch ($slots_left_option1) { case 0: $slots_left_option1_msg = $lang['Reg_No_Slots_Left']; break; case 1: $slots_left_option1_msg = $lang['Reg_One_Slot_Left'];