diff --git a/composer.json b/composer.json index 703d5ca5..c16556e0 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "geoip2/geoip2": "~2.0", "hashids/hashids": "^4.1", "imdbphp/imdbphp": "^7.0", - "laravel/framework": "^9.0", + "laravel/framework": "9.20.0", "laravel/octane": "^1.2", "laravel/sanctum": "^2.10", "laravel/tinker": "^2.5", diff --git a/include/functions.php b/include/functions.php index bfe68198..ae0eb656 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3962,7 +3962,7 @@ function validusername($username) if (strpos($allowedchars, $username[$i]) === false) return false; - if ($length < 4 || $length > 20) { + if ($length < 3 || $length > 20) { return false; } diff --git a/public/cheaterbox.php b/public/cheaterbox.php index 8015a412..c5a6b46a 100644 --- a/public/cheaterbox.php +++ b/public/cheaterbox.php @@ -12,18 +12,25 @@ if (!empty($_POST['setdealt'])) { if (empty($_POST['delcheater'])) { stderr("Error", $lang_functions['select_at_least_one_record']); } - $res = sql_query ("SELECT id FROM cheaters WHERE dealtwith=0 AND id IN (" . implode(", ", $_POST['delcheater']) . ")"); - while ($arr = mysql_fetch_assoc($res)) - sql_query ("UPDATE cheaters SET dealtwith=1, dealtby = {$CURUSER['id']} WHERE id = {$arr['id']}") or sqlerr(); +// $res = sql_query ("SELECT id FROM cheaters WHERE dealtwith=0 AND id IN (" . implode(", ", $_POST['delcheater']) . ")"); +// while ($arr = mysql_fetch_assoc($res)) +// sql_query ("UPDATE cheaters SET dealtwith=1, dealtby = {$CURUSER['id']} WHERE id = {$arr['id']}") or sqlerr(); + + \App\Models\Cheater::query()->whereIn('id', $_POST['delcheater']) + ->where('dealtwith', 0) + ->update(['dealtwith' => 1, 'dealtby' => $CURUSER['id']]) + ; $Cache->delete_value('staff_new_cheater_count'); } elseif (!empty($_POST['delete'])) { if (empty($_POST['delcheater'])) { stderr("Error", $lang_functions['select_at_least_one_record']); } - $res = sql_query ("SELECT id FROM cheaters WHERE id IN (" . implode(", ", $_POST['delcheater']) . ")"); - while ($arr = mysql_fetch_assoc($res)) - sql_query ("DELETE from cheaters WHERE id = {$arr['id']}") or sqlerr(); +// $res = sql_query ("SELECT id FROM cheaters WHERE id IN (" . implode(", ", $_POST['delcheater']) . ")"); +// while ($arr = mysql_fetch_assoc($res)) +// sql_query ("DELETE from cheaters WHERE id = {$arr['id']}") or sqlerr(); + + \App\Models\Cheater::query()->whereIn('id', $_POST['delcheater'])->delete(); $Cache->delete_value('staff_new_cheater_count'); } diff --git a/public/details.php b/public/details.php index 5a0d4fbd..a0b7efc6 100644 --- a/public/details.php +++ b/public/details.php @@ -251,7 +251,7 @@ JS; while($a = mysql_fetch_assoc($r)) { $lang = "
| ".$title." |