diff --git a/lang/chs/lang_functions.php b/lang/chs/lang_functions.php index 15325322..7bbb9b1f 100644 --- a/lang/chs/lang_functions.php +++ b/lang/chs/lang_functions.php @@ -326,6 +326,9 @@ $lang_functions = array 'text_torrent_to_approval' => '有 %s%u 个待审核的种子%s', 'std_confirm_remove' => '确定要删除吗?', 'select_an_user_class' => '选择一个用户等级', + 'input_check_all' => "全选", + 'input_uncheck_all' => "全不选", + 'select_at_least_one_record' => '至少选择一条记录!', ); ?> diff --git a/lang/cht/lang_functions.php b/lang/cht/lang_functions.php index 6318b138..d1f50e6b 100644 --- a/lang/cht/lang_functions.php +++ b/lang/cht/lang_functions.php @@ -333,6 +333,9 @@ $lang_functions = array 'text_torrent_to_approval' => '有 %s%u 個待審核的種子%s', 'std_confirm_remove' => '確定要刪除嗎?', 'select_an_user_class' => '選擇一個用戶等級', + 'input_check_all' => "全選", + 'input_uncheck_all' => "全不選", + 'select_at_least_one_record' => '至少選擇一條記錄!', ); ?> diff --git a/lang/en/lang_functions.php b/lang/en/lang_functions.php index 8bd3479c..421ec32a 100644 --- a/lang/en/lang_functions.php +++ b/lang/en/lang_functions.php @@ -334,6 +334,9 @@ $lang_functions = array 'text_torrent_to_approval' => 'There %s%u not approval torrent%s.', 'std_confirm_remove' => 'Are you sure you want to delete it?', 'select_an_user_class' => 'Select an user class', + 'input_check_all' => "Check All", + 'input_uncheck_all' => "Uncheck All", + 'select_at_least_one_record' => 'Select at least one record!', ); ?> diff --git a/public/cheaterbox.php b/public/cheaterbox.php index a3d80e01..8015a412 100644 --- a/public/cheaterbox.php +++ b/public/cheaterbox.php @@ -9,12 +9,18 @@ user_can('staffmem', true); 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(); $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(); @@ -25,7 +31,7 @@ $count = get_row_count("cheaters"); if (!$count){ stderr($lang_cheaterbox['std_oho'], $lang_cheaterbox['std_no_suspect_detected']); } -$perpage = 10; +$perpage = 50; list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "cheaterbox.php?"); stdhead($lang_cheaterbox['head_cheaterbox']); ?> @@ -61,7 +67,7 @@ while ($row = mysql_fetch_array($cheatersres)) print("".gettime($row['added'])."" . get_username($row['userid']) . "" . $row['hit'] . "" . $torrent . "".mksize($row['uploaded']).($upspeed ? " @ ".mksize($upspeed)."/s" : "")."".mksize($row['downloaded']).($lespeed ? " @ ".mksize($lespeed)."/s" : "")."".$row['anctime']." sec"."".$row['seeders']."".$row['leechers']."".htmlspecialchars($row['comment'])."".$dealtwith."\n"); } ?> - + ");