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
[Mod]
Controls ·  Search New posts · Mark unread

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

Unknown User
2011-11-19 09:32:43
I adapted the security mod of my old tracker for  TT v.2.7

It is based on a security list where the names of all staff members must be written. If someone manage to promote himself higher than Uploader

his name is not found in the security list and he it receives demote, disable and the owner (ID=1) receives a warning message.

In backend/functions.php, after this line:

$GLOBALS['tstart'] = array_sum(explode(" ", microtime()));
Include this code:
//===== Security Staff =====//

function security_staff ()

{

global $CURUSER;

$class_m  = 5; //number class of MODERATOR

$max = array("name1","name2","name3");

//== Case sensitive. (example: array("adminname1","adminname2","adminname3","so far") ==//

if ($CURUSER["class"] >= $class_m)

if (!in_array($CURUSER["username"], $max, true)) { // true for strict comparison

$msg = "Attention! a user has managed to promote by himself in staff and was not found in the security list:



Username: ".$CURUSER["username"].";

User ID: ".$CURUSER["id"].";

IP: ".getip();

mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" . get_date_time() . "', " .sqlesc($msg) . ")");

mysql_query("UPDATE users set enabled='no' WHERE id=$CURUSER[id]");

mysql_query("UPDATE users set class='1' WHERE id=$CURUSER[id]");

show_error_msg("Your username not found in security list and your account will be disabled. Have a nice day!");

}

}

//=== End Security Staff ===//



After that, into each page you want to protect, after this line:

dbconn();



Copy this code:

 //===== Security Staff =====//

security_staff();

if ($CURUSER["class"] > 9) { // highest class number

stdhead();

 show_error_msg("FUCK OFF DUDE", "Stop cheating or you will be banned");

 stdfoot(); exit; }

//=== End Security Staff ===//


...
2011-11-19 18:29:26
big thanks BigMax1,   :)

Je peux avoir des exemples ou vous avez mis votre code!?

\******************************/

I have example or you put your code!?

Quote:
//===== Security Staff =====//security_staff();

if ($CURUSER["class"] > 9) {    // highest class number

stdhead();

show_error_msg("FUCK OFF DUDE", "Stop cheating or you will be banned");

stdfoot(); exit; }

//=== End Security Staff ===//

Unknown User
2011-11-20 03:41:18
It is enough that in every page you want to protect to be put only this code:

security_staff();
2011-11-20 16:08:39
"BigMax1, post: 76788":
It is enough that in every page you want to protect to be put only this code:

security_staff();

ok  thanks!  :)
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728