diff --git a/composer.json b/composer.json index 91ae5225..f02ad64e 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,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/constants.php b/include/constants.php index ecfc6b07..36ca958d 100644 --- a/include/constants.php +++ b/include/constants.php @@ -1,6 +1,6 @@ 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 b6a440bd..4b653451 100644 --- a/public/details.php +++ b/public/details.php @@ -243,7 +243,7 @@ JS; while($a = mysql_fetch_assoc($r)) { $lang = "
| ".$title." |