[Mod] Античит

SuffeRiNG64

Писатель
Регистрация
21 Сен 2009
Сообщения
2
Реакции
7
В базу
Код:
CREATE TABLE `cheaters` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `added` datetime NOT NULL default '0000-00-00 00:00:00',
  `userid` int(10) NOT NULL default '0',
  `torrentid` int(10) NOT NULL default '0',
  `client` varchar(255) NOT NULL default '',
  `rate` varchar(255) NOT NULL default '',
  `beforeup` varchar(255) NOT NULL default '',
  `upthis` varchar(255) NOT NULL default '',
  `timediff` varchar(255) NOT NULL default '',
  `userip` varchar(15) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;


в корень
cheaters.php
PHP:
<?

require "include/bittorrent.php";

dbconn();

loggedinorreturn();

if (get_user_class() < UC_MODERATOR)
stderr("Sorry", "Zugriff verweigert  Verschwinde von hier.");

stdhead("Cheaters");

begin_main_frame();
begin_frame("Mцgliche Cheater:", true);

// Will: added this for page links
$res = mysql_query("SELECT COUNT(*) FROM cheaters $limit") or sqlerr();
$row = mysql_fetch_array($res);
$count = $row[0];

list($pagertop, $pagerbottom, $limit) = pager(30, $count, "cheaters.php?");
print("$pagertop");
// end

?>
<script type="text/javascript" src="java_klappe.js"></script>

<form action="takecheaters.php" method=post>

<script language="JavaScript" type="text/javascript">
<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}

function check2(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}
// End -->
</script>

<?

print("<table width=100%>");

print("<table border=0 width=100% cellspacing=1 cellpadding=4>");
print("<tr align=center><td class=tablecat>#</td>
<td class=tablecat>Benutzer</td>
<td class=tablecat>Registriert am</td>
<td class=tablecat>Torrent</td>
<td class=tablecat>Client</td>
<td class=tablecat>Speed</td>
<td class=tablecat>Uploaded</td>
<td class=tablecat>Zeit</td>
<td class=tablecat>IP</td>
<td class=tablecat>Entfernen</td></tr>\n");

$res = mysql_query("SELECT * FROM cheaters ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res))
{
$rrr = mysql_query("SELECT id, username, class, webseed, downloaded, uploaded FROM users WHERE id = $arr[userid]");
$aaa = mysql_fetch_assoc($rrr);

$rrr2 = mysql_query("SELECT name FROM torrents WHERE id = $arr[torrentid]");
$aaa2 = mysql_fetch_assoc($rrr2);

if($aaa["downloaded"] > 0)
{
$ratio = number_format($aaa["uploaded"] / $aaa["downloaded"], 3);
}
else
{
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

$uppd = mksize($arr["upthis"]);


print("<tr><td align=center width=10>$arr[id]</td>");
print("<td align=left><b><a href=userdetails.php?id=$aaa[id]>$aaa[username]</a></b></td>");
print("<td align=center>$arr[added]</td>");
print("<td align=center><u><a href=details.php?id=$arr[torrentid]>$arr[torrentid]</a></u></td>");
print("<td align=center>$arr[client]</td>");
print("<td align=center>$arr[rate]/s</td>");
print("<td align=center>$uppd</td>");
print("<td align=center>$arr[timediff] sec</td>");
print("<td align=center>$arr[userip]</td>");
print("<td class=\"tableb\" valign=\"top\" width=10><input type=\"checkbox\" name=\"remove[]\" value=\"" . $arr["id"] . "\"/></td>");
}
if (get_user_class() >= UC_MODERATOR)
{
?>
<tr>
<td class="tableb" colspan="11" align="right">
<input type="button" value="Alle entfernen" onclick="this.value=check(this.form.elements['remove[]'])"/> <input type="hidden" name="nowarned" value="nowarned"><input type="submit" name="submit" value="Дnderungen ьbernehmen"></td>
</tr>
</table></form>
<?
}

// will: added this for page links
print("<br>$pagertop");
// end

end_frame();
end_main_frame();
stdfoot();
die;

?>



в корень
takecheaters.php
PHP:
<?

require "include/bittorrent.php";

dbconn();

loggedinorreturn();

if (get_user_class() < UC_MODERATOR)
stderr("Извините", "Отказанно в доступе");

stdhead("Cheaters");

begin_main_frame();
begin_frame("Возможные читеры:", true);

// Will: added this for page links
$res = mysql_query("SELECT COUNT(*) FROM cheaters $limit") or sqlerr();
$row = mysql_fetch_array($res);
$count = $row[0];

list($pagertop, $pagerbottom, $limit) = pager(30, $count, "cheaters.php?");
print("$pagertop");
// end

?>
<script type="text/javascript" src="java_klappe.js"></script>

<form action="takecheaters.php" method=post>

<script language="JavaScript" type="text/javascript">
<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}

function check2(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}
// End -->
</script>

<?

print("<table width=100%>");

print("<table border=0 width=100% cellspacing=1 cellpadding=4>");
print("<tr align=center><td class=tablecat>#</td>
<td class=tablecat>Пользователь</td>
<td class=tablecat>Регистрация</td>
<td class=tablecat>Поток</td>
<td class=tablecat>Клиент</td>
<td class=tablecat>Скорость</td>
<td class=tablecat>Отданно</td>
<td class=tablecat>Скачанно</td>
<td class=tablecat>Айпи</td>
<td class=tablecat>Удаляют</td></tr>\n");

$res = mysql_query("SELECT * FROM cheaters ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res))
{
$rrr = mysql_query("SELECT id, username, class, webseed, downloaded, uploaded FROM users WHERE id = $arr[userid]");
$aaa = mysql_fetch_assoc($rrr);

$rrr2 = mysql_query("SELECT name FROM torrents WHERE id = $arr[torrentid]");
$aaa2 = mysql_fetch_assoc($rrr2);

if($aaa["downloaded"] > 0)
{
$ratio = number_format($aaa["uploaded"] / $aaa["downloaded"], 3);
}
else
{
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

$uppd = mksize($arr["upthis"]);


print("<tr><td align=center width=10>$arr[id]</td>");
print("<td align=left><b><a href=userdetails.php?id=$aaa[id]>$aaa[username]</a></b></td>");
print("<td align=center>$arr[added]</td>");
print("<td align=center><u><a href=details.php?id=$arr[torrentid]>$arr[torrentid]</a></u></td>");
print("<td align=center>$arr[client]</td>");
print("<td align=center>$arr[rate]/s</td>");
print("<td align=center>$uppd</td>");
print("<td align=center>$arr[timediff] sec</td>");
print("<td align=center>$arr[userip]</td>");
print("<td class=\"tableb\" valign=\"top\" width=10><input type=\"checkbox\" name=\"remove[]\" value=\"" . $arr["id"] . "\"/></td>");
}
if (get_user_class() >= UC_MODERATOR)
{
?>
<tr>
<td class="tableb" colspan="11" align="right">
<input type="button" value="Удалить всех" onclick="this.value=check(this.form.elements['remove[]'])"/> <input type="hidden" name="nowarned" value="nowarned"><input type="submit" name="submit" value="Изменить"></td>
</tr>
</table></form>
<?
}

// will: added this for page links
print("<br>$pagertop");
// end

end_frame();
end_main_frame();
stdfoot();
die;

?>
 
А с переводом беда!? Завтра выложу переведенный.
 
А с переводом беда!? Завтра выложу переведенный.

так как учу немецки переводил с помощью бота сам, но там явно не всё правильно

Вот оригинал на английском

PHP:
<?

require "include/bittorrent.php";

dbconn();

loggedinorreturn();

if (get_user_class() < UC_MODERATOR)
stderr("Sorry", "Zugriff verweigert  Verschwinde von hier.");

stdhead("Cheaters");

begin_main_frame();
begin_frame("Mцgliche Cheater:", true);

// Will: added this for page links
$res = mysql_query("SELECT COUNT(*) FROM cheaters $limit") or sqlerr();
$row = mysql_fetch_array($res);
$count = $row[0];

list($pagertop, $pagerbottom, $limit) = pager(30, $count, "cheaters.php?");
print("$pagertop");
// end

?>
<script type="text/javascript" src="java_klappe.js"></script>

<form action="takecheaters.php" method=post>

<script language="JavaScript" type="text/javascript">
<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}

function check2(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}
// End -->
</script>

<?

print("<table width=100%>");

print("<table border=0 width=100% cellspacing=1 cellpadding=4>");
print("<tr align=center><td class=tablecat>#</td>
<td class=tablecat>Benutzer</td>
<td class=tablecat>Registriert am</td>
<td class=tablecat>Torrent</td>
<td class=tablecat>Client</td>
<td class=tablecat>Speed</td>
<td class=tablecat>Uploaded</td>
<td class=tablecat>Zeit</td>
<td class=tablecat>IP</td>
<td class=tablecat>Entfernen</td></tr>\n");

$res = mysql_query("SELECT * FROM cheaters ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res))
{
$rrr = mysql_query("SELECT id, username, class, webseed, downloaded, uploaded FROM users WHERE id = $arr[userid]");
$aaa = mysql_fetch_assoc($rrr);

$rrr2 = mysql_query("SELECT name FROM torrents WHERE id = $arr[torrentid]");
$aaa2 = mysql_fetch_assoc($rrr2);

if($aaa["downloaded"] > 0)
{
$ratio = number_format($aaa["uploaded"] / $aaa["downloaded"], 3);
}
else
{
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

$uppd = mksize($arr["upthis"]);


print("<tr><td align=center width=10>$arr[id]</td>");
print("<td align=left><b><a href=userdetails.php?id=$aaa[id]>$aaa[username]</a></b></td>");
print("<td align=center>$arr[added]</td>");
print("<td align=center><u><a href=details.php?id=$arr[torrentid]>$arr[torrentid]</a></u></td>");
print("<td align=center>$arr[client]</td>");
print("<td align=center>$arr[rate]/s</td>");
print("<td align=center>$uppd</td>");
print("<td align=center>$arr[timediff] sec</td>");
print("<td align=center>$arr[userip]</td>");
print("<td class=\"tableb\" valign=\"top\" width=10><input type=\"checkbox\" name=\"remove[]\" value=\"" . $arr["id"] . "\"/></td>");
}
if (get_user_class() >= UC_MODERATOR)
{
?>
<tr>
<td class="tableb" colspan="11" align="right">
<input type="button" value="Alle entfernen" onclick="this.value=check(this.form.elements['remove[]'])"/> <input type="hidden" name="nowarned" value="nowarned"><input type="submit" name="submit" value="Дnderungen ьbernehmen"></td>
</tr>
</table></form>
<?
}

// will: added this for page links
print("<br>$pagertop");
// end

end_frame();
end_main_frame();
stdfoot();
die;

?>
 
так как учу немецки переводил с помощью бота сам, но там явно не всё правильно
Вот оригинал на английском
PHP:
<?
require "include/bittorrent.php";
dbconn();
loggedinorreturn();
if (get_user_class() < UC_MODERATOR)
stderr("Sorry", "Zugriff verweigert  Verschwinde von hier.");
stdhead("Cheaters");
begin_main_frame();
begin_frame("Mцgliche Cheater:", true);
// Will: added this for page links
$res = mysql_query("SELECT COUNT(*) FROM cheaters $limit") or sqlerr();
$row = mysql_fetch_array($res);
$count = $row[0];
list($pagertop, $pagerbottom, $limit) = pager(30, $count, "cheaters.php?");
print("$pagertop");
// end
?>
<script type="text/javascript" src="java_klappe.js"></script>
<form action="takecheaters.php" method=post>
<script language="JavaScript" type="text/javascript">
<!-- Begin
var checkflag = "false";
function check(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}
function check2(field) {
if (checkflag == "false") {
for (i = 0; i < field.length; i++) {
field[i].checked = true;}
checkflag = "true";
return "Auswahl wieder enfernern"; }
else {
for (i = 0; i < field.length; i++) {
field[i].checked = false; }
checkflag = "false";
return "Alle auswдhlen"; }
}
// End -->
</script>
<?
print("<table width=100%>");
print("<table border=0 width=100% cellspacing=1 cellpadding=4>");
print("<tr align=center><td class=tablecat>#</td>
<td class=tablecat>Benutzer</td>
<td class=tablecat>Registriert am</td>
<td class=tablecat>Torrent</td>
<td class=tablecat>Client</td>
<td class=tablecat>Speed</td>
<td class=tablecat>Uploaded</td>
<td class=tablecat>Zeit</td>
<td class=tablecat>IP</td>
<td class=tablecat>Entfernen</td></tr>\n");
$res = mysql_query("SELECT * FROM cheaters ORDER BY added DESC $limit") or sqlerr(__FILE__, __LINE__);
while ($arr = mysql_fetch_assoc($res))
{
$rrr = mysql_query("SELECT id, username, class, webseed, downloaded, uploaded FROM users WHERE id = $arr[userid]");
$aaa = mysql_fetch_assoc($rrr);
$rrr2 = mysql_query("SELECT name FROM torrents WHERE id = $arr[torrentid]");
$aaa2 = mysql_fetch_assoc($rrr2);
if($aaa["downloaded"] > 0)
{
$ratio = number_format($aaa["uploaded"] / $aaa["downloaded"], 3);
}
else
{
$ratio = "---";
}
$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";
$uppd = mksize($arr["upthis"]);
print("<tr><td align=center width=10>$arr[id]</td>");
print("<td align=left><b><a href=userdetails.php?id=$aaa[id]>$aaa[username]</a></b></td>");
print("<td align=center>$arr[added]</td>");
print("<td align=center><u><a href=details.php?id=$arr[torrentid]>$arr[torrentid]</a></u></td>");
print("<td align=center>$arr[client]</td>");
print("<td align=center>$arr[rate]/s</td>");
print("<td align=center>$uppd</td>");
print("<td align=center>$arr[timediff] sec</td>");
print("<td align=center>$arr[userip]</td>");
print("<td class=\"tableb\" valign=\"top\" width=10><input type=\"checkbox\" name=\"remove[]\" value=\"" . $arr["id"] . "\"/></td>");
}
if (get_user_class() >= UC_MODERATOR)
{
?>
<tr>
<td class="tableb" colspan="11" align="right">
<input type="button" value="Alle entfernen" onclick="this.value=check(this.form.elements['remove[]'])"/> <input type="hidden" name="nowarned" value="nowarned"><input type="submit" name="submit" value="Дnderungen ьbernehmen"></td>
</tr>
</table></form>
<?
}
// will: added this for page links
print("<br>$pagertop");
// end
end_frame();
end_main_frame();
stdfoot();
die;
?>

поправка не английский а немецкий
 
есть защита от:RatioMaster-1.8.6. если есть поделтесь

Добавлено через 12 минут
вот:powered by TBDev v2.0 Yuna Scatari Edition (18.05.07) Pre 6 RC 0 V-IX Copyright © 2001-2009
самый лучший в своём роде и не виснить
 
Назад
Сверху