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
Last 5 users who updated a users profile
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-09-25 17:34:03
?
Unknown User
2010-09-26 06:34:58
Thank you very much.

Working just fine.
Unknown User
2010-09-26 13:03:46
yes! you're the best djhowarth.

i go to tested
Unknown User
2010-09-26 14:47:52
works a treat on v2,06 fully modded  ;)  top work as always dj keeping the torrenttrader code alive  ;)
Unknown User
2010-09-26 15:49:13
no working for me, my sql do not updated with modification
Unknown User
2010-09-26 15:50:19
are you sure?

do not try editing yourself do it on someone else because i have set it not to show yourself
Unknown User
2010-09-26 18:38:48
yes i sure, i editing one members of my tracker but in my sql do not appear, my table is space
Unknown User
2010-09-26 18:46:27
i winner, lol, i change

 if ($CURUSER["id"] != $userid){

$updated = sqlesc(get_date_time());

$updatedby = $CURUSER["id"];

mysql_query("INSERT INTO `profileupdates` (`userid`, `updatedby`, `updated`) VALUES ($userid, $updatedby, $updated)");

}


i replace this code in my account-detail.php and it work

;)
Unknown User
2010-09-26 19:26:17
ooo sorry i should of told u to remove the old lmao
Unknown User
2010-09-27 05:31:25
not working fine,   ;)   i work for just see the account detail of member not if i modifie this one, what is my bug grrrrrr!

and if i replace this code in admin-modtask not change my sql database, why?
Unknown User
2010-09-27 07:26:56
i after go somewhere il be back in a few hours post your admin-modtasks.php
Unknown User
2010-09-27 10:55:45
my admin-modtask.php
Unknown User
2010-09-27 11:28:47
<?

//

//  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"];

$downloaded = $_POST["downloaded"];

$uploaded = $_POST["uploaded"];

$signature = $_POST["signature"];

$avatar = $_POST["avatar"];

$ip = $_POST["ip"];

$class = $_POST["class"];

$donated = $_POST["donated"];

$password = $_POST["password"];

$warned = $_POST["warned"];

$forumbanned = $_POST["forumbanned"];

$mpbanned = $_POST["mpbanned"];

$mpstaffbanned = $_POST["mpstaffbanned"];

$downloadbanned = $_POST["downloadbanned"];

$shoutbanned = $_POST["shoutbanned"];

$modcomment = $_POST["modcomment"];

$enabled = $_POST["enabled"];

$invites = $_POST["invites"];

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



if (!is_valid_id($userid))

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



$seedbonus = $_POST["seedbonus"];



$sbon = mysql_query("SELECT seedbonus FROM users WHERE id=$userid") or sqlerr();

if ($sbon) {

$sbonus = mysql_fetch_assoc($sbon);

if ($sbonus['seedbonus'] != $seedbonus) {

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

}

}



//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() == "12") && ($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='$title', downloaded='$downloaded', uploaded='$uploaded', signature='$signature', avatar='$avatar', ip='$ip', donated='$donated', forumbanned='$forumbanned', mpbanned='$mpbanned',  mpstaffbanned='$mpstaffbanned', shoutbanned='$shoutbanned', warned='$warned',  modcomment='$modcomment', enabled='$enabled', invites='$invites' WHERE id=$userid");





//Added Code//

 if ($CURUSER["id"] != $userid){

$updated = sqlesc(get_date_time());

$updatedby = $CURUSER["id"];

mysql_query("INSERT INTO `profileupdates` (`userid`, `updatedby`, `updated`) VALUES ($userid, $updatedby, $updated)");

}



write_log($CURUSER['username']." has editied 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 (get_user_class() >= UC_ADMINISTRATOR){//only allow admins to delete users



$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;

}

*/

?>


Make Sure you added SQL in first post
Unknown User
2010-09-27 15:18:55
yes yes i sure i added all code but in my admin modtask i delete this one after test
Unknown User
2010-09-27 16:38:18
so does it work or not
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