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
Nothing found.

Go to Profile

tbh if i was you i would use this [url="http://www.torrenttrader.org/index.php?showtopic=12259&hl="]http://www.torrenttrader.org/index.php?sho...c=12259&hl=[/url] also it saves on queries to the database
np m8 moved to mods completed
there was a problem but it does work

find

print("<tr><td align='left'><b>" .T_("INFO_HASH"). ":</b></td><td>" . $row["info_hash"] . "</td></tr>\n");

print("");
add after




$q = SQL_Query_exec("SELECT `class` FROM `users` WHERE `id` = '".$row['owner']."'");

 $r = mysql_fetch_assoc($q);

 

 # VIP Class By Default...

 $vip = null;

 if ( $r['class'] == 3 )

 {

 $vip = '<img src="/images/star.png" title="VIP" />';

 }





this was missing the ; at the end of the image so gave a syntax error



then



find





print("<tr><td align='left'><b>" .T_("ADDED_BY"). ":</b></td><td><a href='account-details.php?id=" . $row["owner"] . "'>" . $row["username"] . "</a></td></tr>");





replace with





print("<tr><td align='left'><b>" .T_("ADDED_BY"). ":</b></td><td><a href='account-details.php?id=" . $row["owner"] . "'>" . $row["username"] . " $vip</a></td></tr>");



screen

[ADDON] Forums — 2011-11-26 20:07:59 in v2 Only Mods Complete
"stolla, post: 76948":
Ok, that part is sorted now the next error
Fatal error: Call to undefined function autolink() in /var/www/sites/torrents/admincp.php on line 3672

line 3672=autolink("admincp.php?action=forum", "<center><b>Update Completed</b></center>");



function autolink($al_url, $al_msg) {

 stdhead();

 begin_frame("");

 echo "\n<meta http-equiv=\"refresh\" content=\"3; url=$al_url\">\n";

 echo "<b>$al_msg</b>\n";

 echo "\n<b>Redirecting ...</b>\n";

 echo "\n[ <a href='$al_url'>link</a> ]\n";

 end_frame();

 stdfoot();

 exit;

 }


bottom of functions.php b4 the last ?>
i find this easier to use [url="http://www.torrenttrader.org/index.php?showtopic=12259&hl="]http://www.torrenttrader.org/index.php?sho...c=12259&hl=[/url] then u can practically add to it anywhere a user name is shown on the site
moved to mods complete
did this work for you stolla so it can be moved to mods completed ?
mass email — 2011-11-19 23:04:18 in v2 Only Mods Complete
im on your site and ive just done a reset password and that did not come through
try this

<?php

require_once("backend/functions.php");

dbconn(false);

loggedinonly();

$id = 0 + $_GET["id"];

if (!is_valid_id($id))

show_error_msg (T_("ERROR"), ("No Torrent ID, Please dont direct link to this page without an torrent ID"),1);



stdhead("Snatch Details");



$res3 = SQL_Query_exec("select count(snatched.id) from snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.torrentid =" . $_GET[id]);

$row = mysql_fetch_array($res3);

$count = $row[0];

$perpage = 50;



$res6 = SQL_Query_exec("select name, category from torrents where id = $_GET[id]");

$arr6 = mysql_fetch_assoc($res6);

$dt = gmtime() - 180;

$dt = sqlesc(get_date_time($dt));

list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, $_SERVER["PHP_SELF"] . "?id=" . $_GET[id] . "&" );

begin_frame("Snatch Details for <a href=torrents-details.php?id=$_GET[id]><b>" . $arr6["name"] . "</b></a>");

print("<p align=center>The users at the top finished the download most recently</p>");

print("<table width=80% border=1 cellspacing=0 cellpadding=5 align=center class=table_table>\n");

print("<tr><td class=table_table align=center colspan=11>Snatchdetails for: $arr6[name]</td></tr>");

print("<tr>");

print("<td class=table_head align=center><b>Username</b></td>");

print("<td class=table_head align=center><b>Uploaded</b></td>");

print("<td class=table_head align=center><b>Downloaded</b></td>");

print("<td class=table_head align=center><b>Ratio</b></td>");

if ($CURUSER["edit_torrents"] == "yes"){  

print("<td class=table_head align=center><b>Connected</b></td>");  

print("<td class=table_head align=center><b>Stats</b></td>");

}

print("<td class=table_head align=center><b>Startdate</b></td>");

print("<td class=table_head align=center><b>Enddate</b></td>");

print("<td class=table_head align=center><b>Last action</b></td>");

print("<td class=table_head align=center><b>Seed end</b></td>");

print("<td class=table_head align=center><b>Seedtime</b></td>");

print("<td class=table_head align=center><b>Finished</b></td>");

print("<td class=table_head align=center><b>Seeding</b></td>");

print("</tr>");

$res = SQL_Query_exec("select users.id, users.username, users.uploaded, users.downloaded, snatched.userid, UNIX_TIMESTAMP(snatched.start_date) AS st, UNIX_TIMESTAMP(snatched.last_action) AS lt, UNIX_TIMESTAMP(snatched.complete_date) AS ct, UNIX_TIMESTAMP(snatched.seed_end) AS se from snatched inner join users on snatched.userid = users.id inner join torrents on snatched.torrentid = torrents.id where snatched.torrentid =" . $_GET[id] . " ORDER BY snatched.id desc $limit");

while ($arr = mysql_fetch_assoc($res)) {  

$res2 = SQL_Query_exec("SELECT id,donated,title,enabled,warned,last_access FROM users WHERE id=$arr[userid]") or sqlerr(__FILE__, __LINE__);  

$arr2 = mysql_fetch_assoc($res2);  

$res3 = SQL_Query_exec("SELECT * FROM peers WHERE torrent=$_GET[id] AND userid=$arr[userid]");  

$arr3 = mysql_fetch_assoc($res3);  

if ($arr["downloaded"] > 0) {

$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);

$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";  

}  else if ($arr["uploaded"] > 0)  $ratio = "Inf.";

else  $ratio = "---";

$uploaded =mksize($arr["uploaded"]);

$downloaded = mksize($arr["downloaded"]);

$res5 = SQL_Query_exec("SELECT * FROM snatched WHERE torrentid = " . $_GET[id] . " AND userid = ". $arr[userid] ."");  

while ($arr5 = mysql_fetch_assoc($res5)) {

if ($arr5["downloaded"] > 0) {  

$ratio1 = number_format($arr5["uploaded"] / $arr5["downloaded"], 3);  

$ratio1 = "<font color=" . get_ratio_color($ratio1) . ">$ratio1</font>";

} else  if ($arr5["uploaded"] > 0) $ratio1 = "Inf.";

else $ratio1 = "---";

$stime = mkprettytime($arr[se] - $arr[ct]);

print("<tr>");

print("<td class=table_col1 align=center><a href=account-details.php?id=$arr[userid]><b>$arr[username]</b></a></td>");

print("<td class=table_col2 align=center><font class=small><font color=green><u>Global:</u></font></font><br>$uploaded<br><font class=small><font color=green><u>Torrent:</u></font></font><br>". mksize($arr5[uploaded]) ."</td>");

print("<td class=table_col1 align=center><font class=small><font color=green><u>Global:</u></font></font><br>$downloaded<br><font class=small><font color=green><u>Torrent:</u></font></font><br>". mksize($arr5[downloaded]) ."</td>");

print("<td class=table_col2 align=center><font class=small><font color=green><u>Global:</u></font></font><br>$ratio<br><font class=small><font color=green><u>Torrent:</u></font></font><br>$ratio1</td>");

if ($CURUSER["edit_torrents"] == "yes"){  

print("<td class=table_col1 align=center><font class=small><font color=green><u>Client:</u></font></font><br>". $arr5[agent] ."<br><font class=small><font color=green><u>Peer-ID:</u></font></font><br>". $arr5[peer_id] ."</td>");

print("<td class=table_col2 align=center><font class=small><font color=green><u>IP:</u></font></font><br>". $arr5[ip] ."<br><font class=small><font color=green><u>Port:</u></font></font><br>". $arr5[port] ."</td>");

}

print("<td class=table_col1 align=center>". $arr5[start_date] ."</td>");

print("<td class=table_col2 align=center>". $arr5[complete_date] ."</td>");

print("<td class=table_col1 align=center>". $arr5[last_action] ."</td>");

if ($arr3["seeder"] == "yes")

print("<td class=table_col2 align=center><font color=green>Waiting<br>for<br>stats</font></td>");

else

print("<td class=table_col1 align=center>". $arr5[seed_end] ."</td>");

if ($arr3["seeder"] == "yes")

print("<td class=table_col2 align=center><font color=green>Waiting<br>for<br>stats</font></td>");

else

print("<td class=table_col1 align=center>$stime</td>");

print("<td class=table_col2 align=center>" . ($arr5["finished"] == "yes" ? "<b><font color=green>Yes</font>" : "<font color=red>No</font></b>") . "</td>");

print("<td class=table_col1 align=center>" . ($arr3["seeder"] == "yes" ? "<b><font color=green>Yes</font>" : "<font color=red>No</font></b>") . "</td>");

print("</tr>\n");



print("</tr>");  

}

}

print("</table>");

print("$pagerbottom");

end_frame();

stdfoot();

?>


was missing a (
The Develop Network — 2011-11-11 23:43:27 in General Chat
cheers m8 :)
The Develop Network — 2011-11-10 21:50:37 in General Chat
"salfordscripteR, post: 76495":
it will be activated within the hour, do me a favour check your spam ect. let me know if theres any in there.  :)

i got the email (went in junk) but couldnt activate using the link provided
The Develop Network — 2011-11-10 10:39:31 in General Chat
i signed up but it wont let me confirm my account

username

SM as before
uploader app — 2011-11-03 22:08:52 in v2 Only Mods Complete
if you want to test it you will have to demote yourself to member
uploader app — 2011-11-03 19:19:15 in v2 Only Mods Complete
moved to mods complete cheers cooly m8 ;)
uploader app — 2011-11-03 17:58:20 in v2 Only Mods Complete
main credit to walker as i used his code and modified it

sql
 

CREATE TABLE IF NOT EXISTS `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,
`speed` longtext NOT NULL,
`screen` longtext NOT NULL,
`trial` tinyint(1) NOT NULL DEFAULT '0',
`need` tinyint(1) NOT NULL DEFAULT '0',
`seedbox` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `users` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
if you already have the uploader application [url="http://www.torrenttrader.pw/index.php?showtopic=7950&hl=uploader%20application"]http://www.torrenttrader.pw/index.php?sho...r%20application[/url]

just use this sql
 

ALTER TABLE `uploadapp` ADD `speed` longtext NOT NULL;
ALTER TABLE `uploadapp` ADD `screen` longtext NOT NULL;
ALTER TABLE `uploadapp` ADD `trial` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `uploadapp` ADD `need` tinyint(1) NOT NULL DEFAULT '0';
ALTER TABLE `uploadapp` ADD `seedbox` tinyint(1) NOT NULL DEFAULT '0';
uploadapp.php

made to work with short tags off as well
 

<?php
//Uploader application
require_once("backend/functions.php");
dbconn(false);
$site_config["LEFTNAV"] = false;
$site_config["MIDDLENAV"] = false;
$site_config["RIGHTNAV"] = false;
loggedinonly();
stdhead("Upload Application");

?>
<STYLE>
.popup
{
CURSOR: help;
TEXT-DECORATION: none
}
</STYLE>
<?php

if ($_POST["form"]=="") {
if($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 = 10;
$upreqn = $upreq * 1073741824;

if ($debug) {
begin_frame("<font color=2fdceb>Debug Box</font>");
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_name($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>".
"<br>rbtrial = ".unesc($_POST["rbtrial"]) . "<br>".
"<br>rbneed = ".unesc($_POST["rbneed"]) . "<br>".
"<br>rbsteedbox = ".unesc($_POST["rbseedbox"]) . "<br>".
"plans =". unesc($_POST["plans"]). "<br>".
"comment =". unesc($_POST["comment"]). "<br>".
"speed =". unesc($_POST["speed"]). "<br>".
"screen =". unesc($_POST["screen"]). "<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) {
show_error_msg("Error!","Invalid Request!",1);
} else if($form==0) {
begin_frame("");
?>
<center><br><b>Welcome <?php echo $CURUSER['username']?> to the <?php echo $site_config['SITENAME']?> uploader request form. </b><BR><BR /><b>Please use the application form below to apply for the right to upload content to <?php echo $site_config['SITENAME']?>. <br>Once you have submitted your application for approval please wait for our staff to review <BR>your application. You will receive a PM once staff have reviewed your application.<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>
<?php

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("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("What kind of content do you have to offer<br>to our community? <b>Games</b>,<b>Movies</b>,<b>Music</b><br> You will not be restricted to anything <br> that you put here.","<textarea name="plans" cols="50" rows="4" wrap="VIRTUAL"></textarea>",1);
tr("Why I should be given upload access.<br>Please do not say idk or why not etc. <br> your application will just get <br> <b>REJECTED.</b><br>","<textarea name="comment" cols="50" rows="4" wrap="VIRTUAL"></textarea>",1);
tr("Please also provide us with a link to a<br>speedtest result we recommend using <br>www.speedtest.net then copy and paste<br>the link to your result here.","<textarea name="speed" cols="50" rows="2" wrap="VIRTUAL"></textarea>",1);
tr("Please provide us with a screenshot of <br>your stats from another site.","<textarea name="screen" cols="50" rows="2" wrap="VIRTUAL"></textarea>",1);
?>
</table></center><center>
<p>Do you know how to seed and create torrents?.
<input type="radio" name="rbseed" value="1">
Yes
<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.
<input type="radio" name="rbrelease" value="1">
Yes
<input name="rbrelease" type="radio" value="0" checked>
No</p>
<p>I understand that I am to seed torrents for at least 48 hours, or at least until the torrent has two other seeders.
<input type="radio" name="rbstime" value="1">
Yes
<input name="rbstime" type="radio" value="0" checked>
No</p>
<input name="form" type="hidden" value="1">
<p>Do you use a seedbox to upload your torrents?.
<input type="radio" name="rbseedbox" value="1">
Yes
<input name="rbseedbox" type="radio" value="0" checked>
No</p>
<input name="form" type="hidden" value="1">
<p>I understand that i need to upload at least 3 torrents per week to remain a uploader.
<input type="radio" name="rbneed" value="1">
Yes
<input name="rbneed" type="radio" value="0" checked>
No</p>
<input name="form" type="hidden" value="1">
<p>I understand that if my application is accepted it will be on a trial basis.
<input type="radio" name="rbtrial" value="1">
Yes
<input name="rbtrial" type="radio" value="0" checked>
No</p>
<input name="form" type="hidden" value="1"></center>
<center><input type="submit" name="Submit" value="Send Application"><center>
</form><br><BR>
<?php
end_frame();

} else if ($form==1) {

begin_frame("<font color=2fdceb>Uploaders Application Request</font>");
$qry="INSERT INTO uploadapp (userid,applied,grpacct,grpname,grpdes,content,comment,speed,screen,seeding,o
thergrps,seedtime,need,seedbox,trial) ".
"VALUES (". $_POST["user"].", ".
implode(",",array_map("sqlesc",array(
get_date_time(),
$_POST["groupacct"],
$_POST["groupname"],
$_POST["groupdes"],
$_POST["plans"],
$_POST["comment"],
$_POST["speed"],
$_POST["screen"],
$_POST["rbseed"],
$_POST["rbrelease"],
$_POST["rbtrial"],
$_POST["rbneed"],
$_POST["rbseedbox"],
$_POST["rbstime"]))).")";
$ret=mysql_query($qry);
//Start Staff PM
$dt = sqlesc(get_date_time());
$res = mysql_query("SELECT id FROM users LEFT JOIN groups ON users.class=groups.group_id WHERE groups.control_panel='yes'");
while($arr=mysql_fetch_row($res))
mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, $arr[0], $dt, 'A uploader application has been filled in please [url=".%24site_config%5B%22SITEURL"]."/uploadapp.php][/url][url=".%24site_config%5B%22SITEURL"]Click Here [/url] to view the application')") or die(mysql_error());
// End Staff PM
if (!$ret) {
if (mysql_errno() == 1062)
print("Application already on file<br>");
else
print("mysql puked: ".mysql_error());
} else
?>
<center><br><b>Thank you <?php echo $CURUSER['username']?><br /><br /> The staff at <?php echo $site_config['SITENAME']?> have now received your application. </b><BR><b>If you have not heard anything or recieved a pm in the next 72 hours.</b><BR /><b>Please feel free to contact a member of staff </b><BR /><BR /><b>You can check back on your application progress at any time by following this link again.</b><BR><BR><BR><a href="../">Click Here To Go Back To The Main Site</a></center>
<?php


end_frame();
} else if($form==2) {
begin_frame("");
print("<h2>You already have upload capabilities</h2>");
end_frame();
} else if($form==4) {
begin_frame("</font>");
$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++;
}
}
?>
<center><b>Welcome back <?php echo $CURUSER['username']?></b></a></center><br />
<?php
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("");
?>
<center><b>Welcome <?php echo $site_config['SITENAME']?> Staff Member <?php echo $CURUSER['username']?> to the uploaders voting booth</b></a><BR /><BR /><b>Instructions</b><BR><BR><b>1. Please make sure you leave a comment in the mod comment box.</b><BR>
<b>2. Please make sure you also vote as it takes 5 votes to be able to close a application.</b><br><b>3. If you are unsure please ask a member of staff who is a higher rank than yourself.</b><br><br><br></center>
<?php
//adminmenu();
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 class='4',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("Congratulations, Your application has been successful and you have been automatically promoted to uploader. The upload page can be found [url=".%24site_config%5B%22SITEURL"]."/torrents-upload.php][/url][url=".%24site_config%5B%22SITEURL"]Here[/url] welcome to the team.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, On this occasion your application to become a uploader was unsuccessful. If you require any further assistance please contact a member of the staff team.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("");
$res=mysql_query("SELECT * FROM uploadapp ORDER BY applied DESC") or die (mysql_error());
if(!mysql_num_rows($res)) print("<h1>There currently are no uploader applications.");
else {
?>
<table border=1 style='border-collapse: collapse' bordercolor=blue>
<tr><td>App #</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=" Content user plans to upload and share" class="popup">Content</span></td>
<td><span title=" Comments user has left as to why they should be considered" class="popup">Comments</span></td>
<td><span title=" This is a link to the users speedtest" class="popup">SpeedTest</span></td>
<td><span title=" This is a link to the users stats from another site" class="popup">Extra<br>Stats</span></td>
<td><span title=" Does user pass ratio requirement?" class="popup">Ratio</span></td>
<td><span title=" Does user pass the minimum 10GB requirement?" class="popup"><?=$upreq?>GB+</span></td>
<td><span title=" Does User know how to seed torrents and create 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 minimum seeding times?" class=popup">Seeder<br>Time</span></td>
<td><span title=" Does User upload with a seedbox?" class=popup">Seedbox</span></td>
<td><span title=" Does User accept that it is on a trial basis?" class=popup">Trial</span></td>
<td><span title=" Does User accept that they must upload 3 or more torrents per week?" class=popup">3 uploads<br>a week</span></td>
<td>Voting Poll</td>
</tr>
<?php
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<?php echo $row["id"]?>" id="uploadapp">
<input name="form" type="hidden" value="11">
<input name="pollid" type="hidden" value="<?php echo $row["id"]?>">
<td><?php echo $row["id"]?></td>
<td><a href=account-details.php?id=<?php echo $row["userid"]?>><?php echo $rowu["username"]?></a></td>
<td><?php echo$row["applied"]?></td>
<td <?php echo($row["grpacct"]?"bgcolor="#FFFF00">(".unesc($row["grpdes"]).")&nbsp;".unesc($row["grpname"]):">N/A")?></td>
<td><?php echo$row["content"]?></td>
<td><?php echo$row["comment"]?></td>
<td><?php echo$row["speed"]?></td>
<td><?php echo$row["screen"]?></td>
<td bgcolor="<?php echo($ratio>=1?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($rowu["uploaded"]>=$upreqn?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["seeding"]?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["othergrps"]?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["seedtime"]?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["seedbox"]?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["trial"]?"#00FF00":"#FF0000")?>"></td>
<td bgcolor="<?php echo($row["need"]?"#00FF00":"#FF0000")?>"></td>
<td rowspan="2"><?php echo($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["control_panel"]="yes"&&$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["control_panel"]="yes"?"<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<?php echo $row["id"]?>" id="uploadapp">
<input name="form" type="hidden" value="11">
<input name="pollid" type="hidden" value="<?php echo$row["id"]?>">
<td>&nbsp</td>
<td>Comments from Mods</td>
<td colspan="4"><textarea name="modcomments" rows="5" cols="50"><?php echo $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>
<?php
}
print("</table>");
}
end_frame();
}
//end_frame();
stdfoot();
?>




for 2.7 replace

mysql_querywith
 


SQL_Query_exec
this is the line u need to put it in

mysql_query("UPDATE users SET title=".sqlesc($title).",logintrys='$logintrys', downloaded='$downloaded', uploaded='$uploaded', signature=".sqlesc($signature).", avatar='$avatar', ip='$ip', donated='$donated', forumbanned='$forumbanned',seedbox='$seedbox',shoutboxbanned='$shoutboxbanned', warned='$warned',  modcomment='$modcomment',downloadbanned='$downloadbanned', enabled='$enabled', invites='$invites' WHERE id=$userid");





so try this





<?

//

//  TorrentTrader v2.x

// This file was last updated: 6/Sept/2007

//

// http://www.torrenttrader.org

//

//

require_once("backend/functions.php");

dbconn(false);

loggedinonly();





if($CURUSER["edit_users"]!="yes")

show_error_msg("Access Denied","You do not have permission to edit users",1);



$action = $_POST["action"];



if (!$action)

show_error_msg("Error","This task is not found",1);



if ($action == 'edituser'){

$userid = $_POST["userid"];

$title = $_POST["title"];

$logintrys = $_POST["logintrys"];

if (isset($_POST["uploaded"])) {

if (preg_match("/(tb|TB)/", $_POST["uploaded"], $matches) && preg_match("/[0-9]+/", $_POST["uploaded"], $matchesnum)) {

 $nummatch = $matchesnum[0] * 1024 * 1024 * 1024 * 1024;

 $uploaded = $nummatch;

}else if (preg_match("/(gb|GB)/", $_POST["uploaded"], $matches)  && preg_match("/[0-9]+/", $_POST["uploaded"], $matchesnum)) {

 $nummatch = $matchesnum[0] * 1024 * 1024 * 1024;

 $uploaded = $nummatch;

}else if (preg_match("/(mb|MB)/", $_POST["uploaded"], $matches)  && preg_match("/[0-9]+/", $_POST["uploaded"], $matchesnum)) {

 $nummatch = $matchesnum[0] * 1024 * 1024;

 $uploaded = $nummatch;

}else if (preg_match("/(kb|KB)/", $_POST["uploaded"], $matches)  && preg_match("/[0-9]+/", $_POST["uploaded"], $matchesnum)) {

 $nummatch = $matchesnum[0] * 1024;

 $uploaded = $nummatch;

}

}



if (isset($_POST["downloaded"])) {

if (preg_match("/(tb|TB)/", $_POST["downloaded"], $matchesd) && preg_match("/[0-9]+/", $_POST["downloaded"], $matchesnumd)) {

 $nummatchd = $matchesnumd[0] * 1024 * 1024 * 1024 * 1024;

 $downloaded = $nummatchd;

}else if (preg_match("/(gb|GB)/", $_POST["downloaded"], $matchesd) && preg_match("/[0-9]+/", $_POST["downloaded"], $matchesnumd)) {

 $nummatchd = $matchesnumd[0] * 1024 * 1024 * 1024;

 $downloaded = $nummatchd;

}else if (preg_match("/(mb|MB)/", $_POST["downloaded"], $matchesd) && preg_match("/[0-9]+/", $_POST["downloaded"], $matchesnumd)) {

 $nummatchd = $matchesnumd[0] * 1024 * 1024;

 $downloaded = $nummatchd;

}else if (preg_match("/(kb|KB)/", $_POST["downloaded"], $matchesd) && preg_match("/[0-9]+/", $_POST["downloaded"], $matchesnumd)) {

 $nummatchd = $matchesnumd[0] * 1024;

 $downloaded = $nummatchd;

}

}

$signature = $_POST["signature"];

$avatar = $_POST["avatar"];

$ip = $_POST["ip"];

$class = (int) $_POST["class"];

$donated = (float) $_POST["donated"];

$password = $_POST["password"];

$warned = $_POST["warned"];

  $pcoff = $_POST["pcoff"];

$forumbanned = $_POST["forumbanned"];

  $seedbox = $_POST["seedbox"];

  $downloadbanned = $_POST["downloadbanned"];

  $shoutboxbanned = $_POST["shoutboxbanned"];

$modcomment = $_POST["modcomment"];

$addbookmark = $_POST["addbookmark"];

$bookmcomment = $_POST["bookmcomment"];

$enabled = $_POST["enabled"];

$invites = $_POST["invites"];

$class = (int)$_POST["class"];



if (!is_valid_id($userid))

show_error_msg("Editing Failed", "Invalid UserID",1);



//change user class

$res = mysql_query("SELECT class FROM users WHERE id=$userid");

$arr = mysql_fetch_row($res) or show_error_msg("Error","Mysql error",1);

$uc = $arr[0];



// skip if class is same as current

if ($uc != $class && $class > 0) {

// You cant demote admins!

/* if ((get_user_class() == "7") && ($userid == $CURUSER["id"]))

show_error_msg("Editing Failed", "You can't demote admins for security reasons.",1);



// User may not demote someone with same or higher class than himself!

elseif ($uc >= get_user_class())

show_error_msg("Editing Failed", "You may not demote someone with same or higher class than yourself",1);



// All ok, update db

else {*/

 @mysql_query("UPDATE users SET class=$class WHERE id=$userid");

 // Notify user

 $prodemoted = ($class > $uc ? "promoted" : "demoted");

 $msg = sqlesc("You have been $prodemoted to '" . get_user_class_name($class) . "' by " . $CURUSER["username"] . ".");

 $added = sqlesc(get_date_time());

 @mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, $userid, $msg, $added)");

  // }

}

//continue updates





mysql_query("UPDATE users SET title=".sqlesc($title).",logintrys='$logintrys', downloaded='$downloaded', uploaded='$uploaded', signature=".sqlesc($signature).", avatar='$avatar', ip='$ip', bookmcomment='$bookmcomment', addbookmark='$addbookmark', donated='$donated', forumbanned='$forumbanned',seedbox='$seedbox',shoutboxbanned='$shoutboxbanned', warned='$warned',  modcomment='$modcomment',downloadbanned='$downloadbanned', enabled='$enabled', invites='$invites' WHERE id=$userid");



write_log($CURUSER['username']." has edited user: $userid details");

 

if ($_POST['resetpasskey']=='yes'){

mysql_query("UPDATE users SET passkey='' WHERE id=$userid");

//write_log($CURUSER['username']." Passkey has been reset for: $userid");

}



$chgpasswd = $_POST['chgpasswd']=='yes' ? true : false;

if ($chgpasswd) {

$passreq = mysql_query("SELECT password FROM users WHERE id=$userid");

$passres = mysql_fetch_assoc($passreq);

if($password != $passres['password']){

$password = md5($password);

mysql_query("UPDATE users SET password='$password' WHERE id=$userid");

write_log($CURUSER['username']." has changed password for user: $userid");

}

}

 

 header("Location: account-details.php?id=$userid");

 die;

}



if ($action == 'addwarning'){

$userid = (int)$_POST["userid"];

$reason = mysql_real_escape_string($_POST["reason"]);

$expiry = (int)$_POST["expiry"];

$type = mysql_real_escape_string($_POST["type"]);



if (!is_valid_id($userid))

show_error_msg("Editing Failed", "Invalid UserID",1);



if (!$reason || !$expiry || !$type){

show_error_msg("Error", "Missing form data.",1);

}



$timenow = get_date_time();



$expiretime = get_date_time(gmtime() + (86400 * $expiry));



$ret = mysql_query("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ('$userid','$reason','$timenow','$expiretime','".$CURUSER['id']."','$type')");



$ret = mysql_query("UPDATE users SET warned='yes' WHERE id='$userid'");



$msg = sqlesc("You have been warned by " . $CURUSER["username"] . " - Reason: ".$reason." - Expiry: ".$expiretime."");

$added = sqlesc(get_date_time());

@mysql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES(0, $userid, $msg, $added)");



write_log($CURUSER['username']." has added a warning for user: <a href=account-details.php?id=$userid>$userid</a>");

header("Location: account-details.php?id=$userid");

die;

}





if ($action == "deleteaccount"){

if($CURUSER["level"]!="Administrator")//only allow admins to delete users

show_error_msg("Error", "Only admins can do this",1);



$userid = (int)$_POST["userid"];

$username = sqlesc($_POST["username"]);

$delreason = sqlesc($_POST["delreason"]);



if (!is_valid_id($userid))

show_error_msg("Failed", "Invalid UserID",1);



if (!$delreason){

show_error_msg("Error", "Missing form data.",1);

}



deleteaccount($userid);



write_log($CURUSER['username']." has deleted account: $username");



show_error_msg("Completed", "User has been deleted from the database",1);

die;

}



/*



if ($action == "banuser")

{

 $userid = $_POST["userid"];

 $what = $_POST["what"];

 if (!is_valid_id($userid))

genbark("Not a vaild Userid");

 $comment = $_POST['comment'];

 if (!$comment)

genbark("Error:", "Please explain why you are banning this user!");

 $r = mysql_query("SELECT username,ip FROM users WHERE id=$userid") or sqlerr();

 $a = mysql_fetch_assoc($r);

 $username = $a["username"];

 $ip = $a["ip"];

 if ($what == "subnet")

 $ip = substr($ip, 0, strrpos($ip, ".")) . ".*";

 else

if ($what == 'ip')

 $extra = " OR ip='" . substr($ip, 0, strrpos($ip, ".")) . ".*'";

else

 genbark("Heh", "Select what to ban!");

 $r = mysql_query("SELECT * FROM bans WHERE ip='$ip'$extra") or sqlerr();

 if (mysql_num_rows($r) > 0)

genbark("Error", "IP/subnet is already banned");

 else {

$dt = get_date_time();

$comment = sqlesc($comment);

mysql_query("INSERT INTO bans (userid, first, last, added, addedby, comment) VALUES($userid, '$ip', '$ip', '$dt', $CURUSER[id], $comment)") or sqlerr();

mysql_query("UPDATE users SET secret='' WHERE id=$userid") or sqlerr();

$returnto = $_POST["returnto"];

header("Location: $returnto");

die;

 }

}



if ($action == "enableaccount")

{

 $userid = $_POST["id"];

 $res = mysql_query("SELECT * FROM users WHERE id='$userid'") or sqlerr();

 if (mysql_num_rows($res) != 1)

genbark("User $userid not found!");

 $secret = sqlesc(mksecret());

 mysql_query("UPDATE users SET secret=" . $secret . " WHERE id=$userid") or sqlerr();

 header("Location: account-details.php?id=$userid");

 die;

}

if ($action == "newpassword")

{

if ($CURUSER["control_panel"] == "no")

show_error_msg("No Permission", "Only administrators can do this.", 1);



$userid = (int)$_POST["userid"];



if (!is_valid_id($userid))

show_error_msg("Error", "Invalid user id.", 1);



$query = mysql_query("SELECT * FROM `users` WHERE `id` = '{$userid}'") or die (mysql_error());

$row = mysql_fetch_array($query);



$passwordnew = mksecret(15);

$passwordmd5 = md5($passwordnew);

$body = "Your account at ".$site_config['SITENAME']." has been allocated a new password.\n\nYou can now login with your username and this password {$passwordnew}.\n\n".$site_config['SITENAME']." Admin";



ini_set("sendmail_from", "");



if (!@mail($row["email"], "Your ".$site_config['SITENAME']." New Password", $body, "From: ".$site_config['SITENAME']." <".$site_config['SITEEMAIL'].">"))

 show_error_msg("Error", "Mail failed to send.", 1);

 

write_log($CURUSER["username"] . " generated a new password for {$row["username"]}");



mysql_query("UPDATE `users` SET `password` = '{$passwordmd5}' WHERE `id` = {$userid}");



show_error_msg("Complete", "new password sent to {$row["email"]}", 1);



}

*/

?>
Paypal — 2011-10-31 21:53:29 in General Chat
moved to General Chat
if what i said works cant you please report back ;)
you on the svn version ? you may need to replace all the mysql_query with SQL_Query_exec

ill test tommorow and post my results
anyone tried this with the svn release ? dont work for me
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