Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
User Posts

Go to Profile

this is to put the rss symbol in the address bar so people do not have to scroll to the bottom of your page for the rss.

in every theme that you use on the site add this to the header.php after <head> and before </head>:

<link rel="alternate" type="application/rss+xml" title="" href=rss.php />



in the tittle you can put your website name.
Now this will only work if you have the free leech installed. I took this from torrent strike and modified it a little so it will work here. it also has where you can add a category number for categories that always stay free leech so when you turn off free leech they stay on. now it is just a normal click here sentence but you could always replace that with a button.

in admincp.php find:

if ($action=="freetorrents"){

stdhead("Free Leech Torrent Management");

navmenu();



$search = trim($search);



if ($search != '' ){

$whereand = "AND name LIKE " . sqlesc("%$search%") . "";

}





$res2 = mysql_query("SELECT COUNT(*) FROM torrents WHERE freeleech='1' $whereand");

$row = mysql_fetch_array($res2);

$count = $row[0];



$perpage = 50;



list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=freetorrents&");



begin_frame("Free Leech Torrent Management");



print("<CENTER><form method=get action=?>\n");

print("<input type=hidden name=action value=torrentmanage>\n");

print("" . SEARCH . ": <input type=text size=30 name=search>\n");

print("<input type=submit value='Search'>\n");

print("</form></CENTER>\n");



echo $pagertop;

?>

<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">

<tr>

<td class=table_head align=center>Name</td>

<td class=table_head align=center>Visible</td>

<td class=table_head align=center>Banned</td>

<td class=table_head align=center>Seeders</td>

<td class=table_head align=center>Leechers</td>

<td class=table_head align=center>Edit?</td>

</tr>

<?

$rqq = "SELECT id, name, seeders, leechers, visible, banned FROM torrents WHERE freeleech='1' $whereand ORDER BY name $limit";

$resqq = mysql_query($rqq);



while ($row = mysql_fetch_array($resqq)){

extract ($row);



$char1 = 35; //cut name length

$smallname = CutName(htmlspecialchars($row["name"]), $char1);



echo "<tr><td class=table_col1>" . $smallname . "</td><td class=table_col2>$row[visible]</td><td class=table_col1>$row[banned]</td><td class=table_col2>$row[seeders]</td><td class=table_col1>$row[leechers]</td><td class=table_col2><a href=\"torrents-edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><font size=1 face=Verdana>EDIT</a></td></tr>\n";

}



echo "</table></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}
and replace with:




#======================================================================#

# Free Torrents

#======================================================================#



if ($action=="freetorrents"){

stdhead("Free Leech Torrent Management");

navmenu();

begin_frame("Free Leech Torrent Management");

$search = trim($search);



if ($search != '' ){

$whereand = "AND name LIKE " . sqlesc("%$search%") . "";

}



if ($do=="setallfree") {

mysql_query("UPDATE torrents SET freeleech='1' WHERE freeleech='0'");

print("<font size=2 color=red><center>Success, All torrents have been set free..</b></center></font><br>\n");



}else



if ($do=="setallnormal") {

mysql_query("UPDATE torrents SET freeleech='0' WHERE freeleech='1' AND category!='50'");

print("<font size=2 color=red><center><b>Success, All torrents have been set normal..</b></center></font><br>\n");



}



$res2 = mysql_query("SELECT COUNT(*) FROM torrents WHERE freeleech='1' $whereand");

$row = mysql_fetch_array($res2);

$count = $row[0];



$perpage = 50;



list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=freetorrents&");



print("<CENTER><form method=get action=?>\n");

print("<input type=hidden name=action value=torrentmanage>\n");

print("" . SEARCH . ": <input type=text size=30 name=search>\n");

print("<input type=submit value='Search'>\n");

print("</form></CENTER>\n");



echo "<br>";

print("<font size=2><center>Click <a href=admincp.php?action=freetorrents&do=setallfree><b><u>here</b></u></a> to set all torrents free.. </center></font><br><br> <font size=2><center>Click <a href=admincp.php?action=freetorrents&do=setallnormal><b><u>here</u></b></a> to set all torrents normal..</center></font> \n");



echo $pagertop;

?>

<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">

<tr>

<td class=table_head align=center>Name</td>

<td class=table_head align=center>Visible</td>

<td class=table_head align=center>Banned</td>

<td class=table_head align=center>Seeders</td>

<td class=table_head align=center>Leechers</td>

<td class=table_head align=center>Edit?</td>

</tr>

<?

$rqq = "SELECT id, name, seeders, leechers, visible, banned FROM torrents WHERE freeleech='1' $whereand ORDER BY name $limit";

$resqq = mysql_query($rqq);



while ($row = mysql_fetch_array($resqq)){

extract ($row);



$char1 = 35; //cut name length

$smallname = CutName(htmlspecialchars($row["name"]), $char1);



echo "<tr><td class=table_col1>" . $smallname . "</td><td class=table_col2>$row[visible]</td><td class=table_col1>$row[banned]</td><td class=table_col2>$row[seeders]</td><td class=table_col1>$row[leechers]</td><td class=table_col2><a href=\"torrents-edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><font size=1 face=Verdana>EDIT</a></td></tr>\n";

}



echo "</table></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}

#======================================================================#

# END Free Torrents

#======================================================================#







now if you want to change the number of the category that always stays free then find this code and change the number to your category number:





category!='50'




now you can go into the free leech in your staff cp and use the function. i have tested this on v2.03 and it works. i am also working on a code that will set certain categories automatically to freeleech on upload so if you have any ideas let me know. enjoy :)
My site was blocked — 2008-02-17 23:13:51 in General Chat
you can get some good cheap hosting here [url="http://jmhservices.com/"]http://jmhservices.com/[/url]
nice  :)  thank you very much
thanks for the help for the parts left out :)
in mysql create:

CREATE TABLE `uploadapp` (

 `id` int(10) unsigned NOT NULL auto_increment,

 `active` tinyint(1) NOT NULL default '1',

 `userid` int(10) NOT NULL default '0',

 `applied` datetime NOT NULL default '0000-00-00 00:00:00',

 `grpacct` tinyint(1) NOT NULL default '0',

 `grpname` varchar(100) NOT NULL default '',

 `grpdes` varchar(4) NOT NULL default '',

 `content` longtext NOT NULL,

 `comment` longtext NOT NULL,

 `seeding` tinyint(1) NOT NULL default '0',

 `othergrps` tinyint(1) NOT NULL default '0',

 `seedtime` varchar(100) NOT NULL default '',

 `modcomments` text NOT NULL,

 `votes` text NOT NULL,

 PRIMARY KEY  (`id`),

 UNIQUE KEY `users` (`userid`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
open admincp.php and find:




<td align="center"><a href=admincp.php?action=style><img src="images/admin/themes.gif" border=0 width=32 height=32><BR>Theme Management</a><BR></td>





add after:





<td align="center"><a href=uploadapp.php><img src="images/admin/uploadervote.gif" border=0 width=32 height=32><br>Uploader Applications</a><BR></td>





now open torrents-upload.php and find:





show_error_msg("Error","You do not have permission to upload",1);





replace with:





show_error_msg("Error","<font size=2>You do not have permission to upload.<br> Please click </font><a href=uploadapp.php><font color=red size=2><b>here</b></font></a> <font size=2>to fill out an uploader application.</font>",1);





now make a file with this code and call it uploadapp.php and upload to your server:





<?



require_once("backend/functions.php");

dbconn(false);

stdhead("Upload Application");



if ($_POST["form"]=="") {

if (!$CURUSER || $CURUSER["class"] < "5"){

  $CURUSER["uploadpos"] == 'no'?0:2;

}else

 $form=10;

} else

$form=$_POST["form"];

if($form==0) {

$res=mysql_query("SELECT * FROM uploadapp WHERE userid=".$CURUSER["id"]) or die(mysql_error());

if(mysql_num_rows($res)) {

 $row=mysql_fetch_array($res);

 $form=4;

}

}



$debug=0;

$upreq = 1;

$upreqn = $upreq * 1073741824;





if($debug) {

begin_frame("Debug Box");

print("<table>");

print("<form action=\"uploadapp.php\" method=\"post\" enctype=\"multipart/form-data\" name=\"debug\" id=\"uploadapp\">");

tr("User Class","&nbsp;&nbsp;".get_user_class($CURUSER["class"]),1);

tr("Variables",

"form = " . $form. "<br>".

"user = " . $_POST["user"]. "<br>".

"groupacct = " . $_POST["groupacct"]. "<br>".

"grouname = " . unesc($_POST["groupname"]). "<br>".

"groupdes = " . unesc($_POST["groupdes"]). "<br>".

"joined = " . unesc($_POST["joined"]). "<br>".

"ratio = " . unesc($_POST["ratio"]). "<br>".

"upk =". unesc($_POST["upk"]). "<br>".

"rbseed = ".unesc($_POST["rbseed"]).

 "<br>rbrelease = ".unesc($_POST["rbrelease"]).

 "<br>rbstime = ".unesc($_POST["rbstime"]) . "<br>".

"plans =". unesc($_POST["plans"]). "<br>".

"comment =". unesc($_POST["comment"]). "<br>".

"",1);

tr("View forms","<input type=\"radio\" name=\"form\" value=\"0\" ". ($form==0?"checked":""). ">Upload App".

"<input name=\"form\" type=\"radio\" value=\"3\" ".($form==3?"checked":"").">Moderator+ Page".

"<input type=\"submit\" name=\"SubmitD\" value=\"Change Forms\">",1);

print("</table> </form>");



end_frame();

}

if($form>=10 && $CURUSER["class"] < "5") {

begin_frame("Invalid Request");

end_frame();

} else if($form==0) {

begin_frame("Uploaders Application");

?>

<Center><BR><BR><b>Please use the application form below to apply for the right to UPLOAD torrents to this tracker<br>once you have submitted please await our staff vote.<br><BR>You will receive a PM once the voting has completed.<BR><BR></b></center>

<form action="uploadapp.php" method="post" enctype="multipart/form-data" name="uploadapp" id="uploadapp">

<center><table border=1 style='border-collapse: collapse' bordercolor=#646262 cellpadding=4>

<?



if ($CURUSER["downloaded"] > 0)

$ratio = $CURUSER['uploaded'] / $CURUSER['downloaded'];

else if ($CURUSER["uploaded"] > 0)

$ratio = 1;

else

$ratio = 0;



tr("User","&nbsp;&nbsp;<input name=\"user\" type=\"hidden\" value=\"". $CURUSER['id']."\">".$CURUSER['username'],1);

//tr("Is this a Group Account?","<input type=\"radio\" name=\"groupacct\" value=\"1\">Yes".

// "<input name=\groupacct\" type=\"radio\" value=\"0\" checked>No",1);

//tr("","<h2><center>For Group Applications only</center></h2>",1);

//tr("Group Name","<input name=\"groupname\" type=\"text\" id=\"groupname\" size=\"50\" maxlength=\"50\">",1);

//tr("Group ID<br>(3 char designator)","<input name=\"groupdes\" type=\"text\" id=\"groupdes\" size=\"7\" maxlength=\"3\">",1);

//tr("","<h2><center>For All Applicants</center></h2>",1);

tr("Joined Date","&nbsp;&nbsp;<input name=\"joined\" type=\"hidden\" value=\"".$CURUSER['added']."\">".$CURUSER['added'],1);

tr("My Ratio is at or above 1.0","&nbsp;&nbsp;<input name=\"ratio\" type=\"hidden\" value=\"".($ratio>=1?"ok":"not ok")."\">".($ratio>=1?"Yes":"No"),1);

$upreqm=$CURUSER['uploaded']>=$upreqn;

tr("I meet or exceed ". $upreq ." gb uploaded transfer","&nbsp;&nbsp;<input name=\"upk\" type=\"hidden\" value=\"".($upreqm?"yes":"no")."\">".($upreqm?"Yes":"No"),1);

tr("Content I plan on uploading<br>(not restricted to)","<textarea name=\"plans\" cols=\"50\" rows=\"2\" wrap=\"VIRTUAL\"></textarea>",1);

tr("Why I should be given upload access","<textarea name=\"comment\" cols=\"50\" rows=\"4\" wrap=\"VIRTUAL\"></textarea>",1);

?>

</table></center>

<p>I know how to seed (including the creation of torrent files) torrents?<br>

<input type="radio" name="rbseed" value="1">

Yes<br>

<input name="rbseed" type="radio" value="0" checked>

No</p>

<p>I understand that I am not allowed to upload banned releases, or other group releases that are officially not allowed on this tracker.<br>

<input type="radio" name="rbrelease" value="1">

Yes<br>

<input name="rbrelease" type="radio" value="0" checked>

No</p>

<p>I understand that I am to seed torrents for at least 24 hours, or at least two other leechers have become seeders.<br>

<input type="radio" name="rbstime" value="1">

Yes<br>

<input name="rbstime" type="radio" value="0" checked>

No</p>

<br>

<input name="form" type="hidden" value="1">

<center><input type="submit" name="Submit" value="Send Application"><center>

</form><br><BR>

<?

end_frame();



} else if ($form==1) {



begin_frame("Uploaders Application Request");

$qry="INSERT INTO uploadapp (userid,applied,grpacct,grpname,grpdes,content,comment,seeding,othergrps,seed

ime) ".

"VALUES (". $_POST["user"].", ".

 implode(",",array_map("sqlesc",array(

get_date_time(),

  $_POST["groupacct"],

  $_POST["groupname"],

  $_POST["groupdes"],

  $_POST["plans"],

  $_POST["comment"],

$_POST["rbseed"],

  $_POST["rbrelease"],

  $_POST["rbstime"]))).")";

$ret=mysql_query($qry);

if (!$ret) {

 if (mysql_errno() == 1062)

  print("Application already on file<br>");

 else

 print("mysql puked: ".mysql_error());

} else

print("<center><h2>Your application has been successfully sent to the review board</h2><br><BR>You can check back on your voting progress at any time by following this link again.<br></center>");





end_frame();

} else if($form==2) {

begin_frame("Uploaders Application Request");

print("<h2>You already have upload capabilities</h2>");

end_frame();

} else if($form==4) {

begin_frame("Your Application Request");

 $votesyes=$votesno==0;

  if($row["votes"]!="") {

$votes=explode(" ",$row["votes"]);

for($i=0;$i<count($votes);$i++)

{

$votei=explode(":",$votes[$i]);

$votei[1]?$votesyes++:$votesno++;

}

  }

  print("Upload Application Is Still Under Review:<br><BR><b>Current Voting status:</b> Yes = ".$votesyes." &nbsp;&nbsp; No = ".$votesno);

  print("<br>The Polls are ".($row["active"]=="0"?"Closed":"Open").".");

end_frame();

} else if($form>=10) {

begin_frame("Uploaders Voting Booth");

if($form==11) {

$res=mysql_query("SELECT * FROM uploadapp WHERE id=".$_POST["pollid"]) or die(mysql_error());

$row=mysql_fetch_array($res);

 $votesyes=$votesno=$voted=0;

  if($row["votes"]!="") {

$votes=explode(" ",$row["votes"]);

for($i=0;$i<count($votes);$i++)

{

$votei=explode(":",$votes[$i]);

if($CURUSER["id"]==$votei[0]) $voted++;

$votei[1]?$votesyes++:$votesno++;

}

  }

if($_POST["ballet"] && $voted==0) {

 $votes=($row["votes"]!=""?$row["votes"]." ":"").implode(":",array($CURUSER["id"],$_POST["ballet"]=="Yes"?1:0));

 mysql_query("UPDATE uploadapp SET votes='".$votes."' WHERE id=".$_POST["pollid"]);

 print("Vote for ".$_POST["pollid"]." recieved (".$_POST["ballet"].")<br>");

} else if($_POST["closepoll"]) {

  print("Request to close Polling for ".$_POST["pollid"]." recieved<br>");

  if(count($votes)<5) {

print("Request denied, requires 5 votes to close");

  } else {

mysql_query("UPDATE uploadapp SET active='0' WHERE id=".$_POST["pollid"]);

$tvotes=$votesyes+$votesno;

$votea=$votesyes>$votesno;

$modcomment = gmdate("Y-m-d") . " - Upload Application: ".($votea?"Accepted":"Denied")." (Yes = ".$votesyes." No = ".$votesno." (".

number_format((($votea?$votesyes:$votesno)/$tvotes)*100,3)."%)";

print($modcomment."<br>");

if($votea) {

$mq="UPDATE users SET uploadpos='yes',class='".UC_UPLOADER."',modcomment=CONCAT(modcomment,".sqlesc($modcomment."\n").") WHERE id=".$row["userid"];

mysql_query($mq);

print("Updating User Records...<br>");

$dt = sqlesc(get_date_time());

$msg = sqlesc("Congrats, You have been accepted as a new Uploader!.\n");

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, ".$row["userid"].", $dt, $msg, 0)") or die(mysql_error());

} else {

$mq="UPDATE users SET modcomment=CONCAT(modcomment,".sqlesc($modcomment."\n").") WHERE id=".$row["userid"];

mysql_query($mq);

$dt = sqlesc(get_date_time());

$msg = sqlesc("sorry, You have been denied as a new Uploader.\n");

mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, ".$row["userid"].", $dt, $msg, 0)") or die(mysql_error());

}

 }

} else if($_POST["removepoll"]) {

 mysql_query("DELETE FROM uploadapp where id=".$_POST["pollid"]);

 print("Poll ".$_POST["pollid"]." removed from database");

} else if($_POST["addcomment"]) {

 print ("Comment: ".sqlesc($_POST["newcomments"])."<br>");

  if(($_POST["newcomments"])) {

$un=sqlesc($CURUSER["username"].": ".$_POST["newcomments"]."\n");

  $mq="UPDATE uploadapp SET modcomments=CONCAT(modcomments,".$un.") WHERE id=".$_POST["pollid"];

  mysql_query($mq);

  print("Added coment to poll ".$_POST["pollid"]);

 }

}

 

}

print("<h1>Recent Uploader Applications</h1>");

$res=mysql_query("SELECT * FROM uploadapp ORDER BY applied DESC") or die(mysql_error());

if(!mysql_num_rows($res)) print("<h1>None");

else {

?>

<table border=1 style='border-collapse: collapse' bordercolor=#646262>

<tr><td>Poll #</td>

<td>Username</td>

<td><span title=" Application Date &amp; Join Date " class="popup">App date</span></td>

<td><span title=" Group Affiliated Application " class="popup">Group</span></td>

<td><span title=" Purposed Content to deliver" class="popup">Content</span></td>

<td><span title=" Comments Left to us ops to sway us to vote yes" class="popup">Comments</span></td>

<td><span title=" Does User Pass Ratio Requirement?" class="popup">Ratio</span></td>

<td><span title=" Does User Pass Upload Transmission Requirement?" class="popup"><?=$upreq?>gb+</span></td>

<td><span title=" Does User know how to seed torrents?" class="popup">Seeding</span></td>

<td><span title=" Does User acknowledge other groups right to only upload their titles?" class="popup">Groups</span></td>

<td><span title=" Does User acknowledge minimal seeding times?" class=popup">Seeder<br>Time</span></td>

<td>Voting Poll</td>

</tr>

<?  

while($row=mysql_fetch_array($res))

{

  $resu=mysql_query("SELECT * FROM users where id = ".$row["userid"])  or die(mysql_error());

  $rowu=mysql_fetch_array($resu);

  $voted=$tvotes=$votesyes=$votesno=0;

  if($row["votes"]!="") {

$votes=explode(" ",$row["votes"]);

for($i=0;$i<count($votes);$i++)

{

$votei=explode(":",$votes[$i]);

if($CURUSER["id"]==$votei[0]) $voted++;

$votei[1]?$votesyes++:$votesno++;

$tvotes++;

}

  }

if ($rowu["downloaded"] > 0)

 $ratio = $rowu['uploaded'] / $rowu['downloaded'];

else if ($rowu["uploaded"] > 0)

 $ratio = 1;

else

 $ratio = 0;

?>

<tr>

  <form action="uploadapp.php" method="post" enctype="multipart/form-data" name="poll<?=$row["id"]?>" id="uploadapp">

  <input name="form" type="hidden" value="11">

<input name="pollid" type="hidden" value="<?=$row["id"]?>">

<td><?=$row["id"]?></td>

<td><a href=account-details.php?id=<?=$row["userid"]?>><?=$rowu["username"]?></a></td>

<td><?=$row["applied"]?></td>

<td <?=($row["grpacct"]?"bgcolor=\"#FFFF00\">(".unesc($row["grpdes"]).")&nbsp;".unesc($row["grpname"]):">N/A")?></td>

<td><?=$row["content"]?></td>

<td><?=$row["comment"]?></td>

<td bgcolor="<?=($ratio>=1?"#00FF00":"#FF0000")?>"></td>

<td bgcolor="<?=($rowu["uploaded"]>=$upreqn?"#00FF00":"#FF0000")?>"></td>

<td bgcolor="<?=($row["seeding"]?"#00FF00":"#FF0000")?>"></td>

<td bgcolor="<?=($row["othergrps"]?"#00FF00":"#FF0000")?>"></td>

 <td bgcolor="<?=($row["seedtime"]?"#00FF00":"#FF0000")?>"></td>

 <td rowspan="2"><?=($voted||!$row["active"]?$votesyes." Yes<br>".$votesno." No"

 :"Votes: ".$tvotes."<br>".

 "<input name=\"ballet\" type=\"submit\" value=\"Yes\">".

"<input name=\"ballet\" type=\"submit\" value=\"No\">").

(($CURUSER["class"]>=UC_ADMINISTRATOR&&$row["active"])?"<input name=\"closepoll\" type=\"submit\" value=\"Close Poll\">":

 "<br>".($row["active"]?"<br><font color=#00FF00>Poll Open</font>":"<br><font color=#FF0000>Poll Closed</font>")).

($CURUSER["class"]>=7?"<br><input name=\"removepoll\" type=\"submit\" value=\"Remove Poll\">":"")

?></td></tr>  </form><tr>

  <form action="uploadapp.php" method="post" enctype="multipart/form-data" name="poll<?=$row["id"]?>" id="uploadapp">

  <input name="form" type="hidden" value="11">

<input name="pollid" type="hidden" value="<?=$row["id"]?>">

<td>&nbsp</td>

<td>Comments from Mods</td>

<td colspan="4"><textarea name="modcomments" rows="5" cols="50"><?=$row["modcomments"]?></textarea></td>

<td colspan="5"><input name="newcomments" type="text" value="" maxlength="80"><br><input type="submit" name="addcomment" value="Add Comment"></td>

  </form>

</tr>

<?  

 }

 print("</table>");

}





end_frame();

}

//end_frame();

stdfoot();

?>



and that should be it. i hope you enjoy.
in mysql create:

CREATE TABLE `censor` (

 `word` varchar(10) NOT NULL default '',

 `censor` varchar(10) NOT NULL default ''

) ENGINE=MyISAM DEFAULT CHARSET=latin1;



INSERT INTO `censor` VALUES ('fuck', 'f**k');
now open functions.php and find:




// Smilies

require_once("backend/smilies.php");

reset($smilies);

while (list($code, $url) = each($smilies))

$s = str_replace($code, "<img border=0 src=" . $site_config['SITEURL'] . "/images/smilies/$url>", $s);





add after:





//censored words

$result = mysql_query("SELECT * FROM censor");

while ($row = mysql_fetch_assoc($result))

 $s = str_replace($row['word'], $row['censor'], $s);





now open admincp.php and find:





<td align="center"><a href=admincp.php?action=style><img src="images/admin/themes.gif" border=0 width=32 height=32><BR>Theme Management</a><BR></td>





add this after:





<td align="center"><a href=admincp.php?action=censor><img src="images/admin/settings.png" border=0 width=32 height=32><BR>Censor</a><BR></td>





now at the end of the page befor the ?> add:





#======================================================================#

# Word Censor Filter

#======================================================================#

if($action == "censor") {

stdhead("Censor");

navmenu();

//Output

if ($_POST['submit'] == 'Add Censor'){

$query = "INSERT INTO censor (word, censor) VALUES ('" . $_POST['word'] . "','" . $_POST['censor'] . "');";

mysql_query($query);

}

if ($_POST['action'] == 'Delete Censor'){

 $aquery = "DELETE FROM censor WHERE word = '" . $_POST['censor'] . "' LIMIT 1";

 mysql_query($aquery);

 }



begin_frame("Edit Censored Words", center);  

/*------------------

|HTML form for Word Censor

------------------*/

?>

<div align="center">

<table width='100%' cellspacing='3' cellpadding='3'>

<tr>

<td bgcolor='#eeeeee' colspan="2"><b><font face="Verdana" size="1">

Client Agent Ban Settings<br /></font><font size="1" face="Times New Roman">

</font></b><font size="1" face="Verdana">These settings control the Censored Words.<font></td>

</tr>

<form id="Add Censor" name="Add Censor" method="POST" action="./admincp.php?action=censor">

<tr>

<td bgcolor='#eeeeee'><font face="Verdana" size="1">Add Word Censor:  <input type="text" name="word" id="word" size="50" maxlength="255" value=""></font></td></tr>

<tr><td bgcolor='#eeeeee'><font face="Verdana" size="1">Censor Word With:  <input type="text" name="censor" id="censor" size="50" maxlength="255" value=""></font></td></tr>

<tr><td bgcolor='#eeeeee' align='left'>

<font size="1" face="Verdana"><input type="submit" name="submit" value="Add Censor"></font></td>

</tr>

</form>



<form id="Delete Censor" name="Delete Censor" method="POST" action="./admincp.php?action=censor">

<tr>

<td bgcolor='#eeeeee'><font face="Verdana" size="1">Remove Censor For: <select name="censor">

<?

/*-------------

|Get the words currently censored

-------------*/

$select = "SELECT word FROM censor ORDER BY word";

$sres = mysql_query($select);

while ($srow = mysql_fetch_array($sres))

{

echo "<option>" . $srow[0] . "</option>\n";

}

echo'</select></font></td></tr><tr><td bgcolor="#eeeeee" align="left">

<font size="1" face="Verdana"><input type="submit" name="action" value="Delete Censor"></font></td>

</tr></form></table><br>';

end_frame();

}

// End forum Censored Words



no that should be it. you will have to find a pic to use for the cp or you can use the one that is in this code. also i did not change the way the background of the table so if you want it to look like the rest then you will have to change it yourself. i hope you enjoy ^_^
"Ezerbeth, post: 38944":
Yeah but if I'm a member on your site, and my "friend" has a banned IP, I can just send him the torrent and he can leech it at will... so yeah it's a basic security but anyone who's motivated or knows there's no announce ban can work around the ban :\
Edit: I'll look at the announce ban code in the next couple of days when I have some time...

Edit2: Also, before you import the PG file, make sure your IP (range) is not listed in there or you might get some weird unexpected results on your tracker (banning yourself is bad  :D  ) -- mine was.

My big problem with peer guardian is that they use a list not maintained by themselves. Have you ever tried to get an IP removed from it? Remember the BOPM days?? I sure do...... I'll look into using public DNSBL instead of PG for bans, since public DNSBL actually have maintainers and/or automated scripts to remove unjustified banned IPs from the list. (PG sucks!)


but if somebody from my site was letting peeps use theor passkey then i would ban them  :)  i banned myself to see if the banning system works and it did. as far as peer guardian i will stick with them for the moment and i may use some of the DNSBL list. i like the pg because it blocks the anti-piracy peeps, who even if you are not doing anything illegal like to try to put an end to all trackers. thank you for your help.
"Ezerbeth, post: 38921":
I dont see any announce ban code anywhere yet.. so it's kinda pointless if you ask me...

it is good enough for me because now when somebody reaches my site with a banned address it tells them they can not access the page.
"SpaZiuR, post: 38902":
another stupid questin but this is for what?

this is to help you keep some of the buy guys away.

thank you very much ezerbeth i have tested it and it works like a charm along with this reply to a post i made for banning individual ip. [url="http://www.torrenttrader.org/index.php?showtopic=7209&st=0#entry38874"]http://www.torrenttrader.org/index.php?sho...st=0#entry38874[/url]   :)
I have taken this from Torrentstrike, it seems to work but there is one small problem that is probably easy to fix.

this is the importpg.php file:

<?

// This script downloads/adds/updates peerguardian IP ranges in the bans table.



require_once ("backend/functions.php");

dbconn();



header("Content-type: text/plain");



if (!$CURUSER || $CURUSER["class"]<"7")die;{



$url = "http://mirror.thesynapse.org/phoenixlabs/lists/level1.php";





$f = @fopen($url, "r");

if (!$f)

 show_error_msg("Cannot download: " . htmlspecialchars($url));



mysql_query("DELETE FROM bans WHERE comment LIKE 'PeerGuardian: %'") or sqlerr(__FILE__, __LINE__);



$uid = $CURUSER["id"];

$n = 0;

$o = 0;

$dt = sqlesc(get_date_time());

while (!feof($f))

{

++$o;

$s = rtrim(fgets($f));

$i = strrpos($s, ":");

if (!$i) continue;

$comment = sqlesc("PeerGuardian: " . substr($s, 0, $i));

$s = substr($s, $i + 1);

$i = strpos($s, "-");

$first = ip2long(substr($s, 0, $i));

$last = ip2long(substr($s, $i + 1));

if ($first == -1 || $last == -1) continue;

mysql_query("INSERT INTO bans (added, addedby, comment, first, last) VALUES($dt, $uid, $comment, $first, $last )")or die(mysql_error());

$res = mysql_query($query) or sqlerr(__FILE__, __LINE__);

if (mysql_affected_rows() != 1)

show_error_msg("Database insertion failed (" . htmlspecialchars($query) . ").");

++$n;

}

$o -= $n;

print("Source: " . htmlspecialchars($url) . "\n$n ranges imported, $o line(s) was discarded.");



}



?>



now the problem is when i run that it tells me:

Source: [url="http://mirror.thesynapse.org/phoenixlabs/lists/level1.php"]http://mirror.thesynapse.org/phoenixlabs/lists/level1.php[/url]

0 ranges imported, 11521 line(s) was discarded.

so as you can see the script works, but for some reason it will not import to the database. i adapted the script to  TorrentTrader v2.03 as much as i could but i think there is something missing. [size=12px]so if somebody could please help!!!!!!!!![/size]
good i am glad it is working now for you. i did not think about it being a problem there.
"Tanza, post: 38764":
Hi..walker1977Your Code is Coolz ,But Now code is error when USER not login.

Help me Plz.

Big Thanks  :)

Img. at for Code Error!?

[url="http://www.uppic.org/out.php/i32138_SBerror.PNG"][/url]


to tell you the truth i have no idea why you get the error. i know it works on version 2.03. i am not to good with how to fix errors  :D  most of the code i change like this i have to try until it works   :D  . maybe the staff can help you with the errors.

sorry that i can not help you
try setting the number higher if that does not work then i do not know what to tell you
my number may be different than yours because i do not allow guest
it works on 2.3 you may have to change the "2" to the number that coresponds with your normal members.
i never been on your sit until a minute ago   :D  after i saw your comment. as far as i remeber the original code was for something else on here and i adapted it to this. so i guess credit goes to the original coder.  :)
open functions.php and find:

if ($row["nfo"]=='yes') {





replace with:





if ($row["nfo"]=='yes'&& $CURUSER["class"] >= "2") {
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728