|
#1
|
||||
|
||||
Remove karma system rights for one user
This mod enables you to disable access to mybonus.php for one single user.
In database, run: Code:
ALTER TABLE `users` ADD `karmapos` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'yes' AFTER `downloadpos` ; Code:
parked(); Code:
if ($CURUSER["karmapos"] == "no") stderr("Sorry!","The karma system has been disabled for this account. Probably beacuse you misbehaved."); Code:
print("<tr><td class=rowhead>Download possible??</td><td colspan=2 align=left><input type=radio name=downloadpos value=yes" .($user["downloadpos"]=="yes" ? " checked" : "") . ">Yes <input type=radio name=downloadpos value=no" .($user["downloadpos"]=="no" ? " checked" : "") . ">No</td></tr>\n"); Code:
print("<tr><td class=rowhead>Karma system enabled?</td><td colspan=2 align=left><input type=radio name=karmapos value=yes" .($user["karmapos"]=="yes" ? " checked" : "") . ">Yes <input type=radio name=karmapos value=no" .($user["karmapos"]=="no" ? " checked" : "") . ">No</td></tr>\n"); Code:
$curkarmapos = $arr["karmapos"]; Code:
if ($karmapos != $curkarmapos) { if ($karmapos == 'yes') { $modcomment = gmdate("Y-m-d") . " - Karma system enabled by " . $CURUSER['username'] . ".\n" . $modcomment; $msg = sqlesc("Your karma system access have been given back by " . $CURUSER['username'] . ". You can use the system again."); $added = sqlesc(get_date_time()); sql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, $userid, $msg, $added)") or sqlerr(__FILE__, __LINE__); } else { $modcomment = gmdate("Y-m-d") . " - Karma system disabled by " . $CURUSER['username'] . ".\n" . $modcomment; $msg = sqlesc("Your karma system access have been removed by " . $CURUSER['username'] . ", propably because you misbehaved."); $added = sqlesc(get_date_time()); sql_query("INSERT INTO messages (sender, receiver, msg, added) VALUES (0, $userid, $msg, $added)") or sqlerr(__FILE__, __LINE__); } } Code:
$updateset[] = "karmapos = " . sqlesc($karmapos); |
The Following User Says Thank You to elvira For This Useful Post: | ||
Edgein (8th December 2009)
|
#2
|
||||
|
||||
Nice mod m8
|
Tags |
karma , remove , rights , system , user |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Commenting Rights Enable/Disable | blargh | Mods & Themes | 0 | 2nd June 2010 01:29 |
Karma Bonus Point System | yoligim | Free Torrent Source | 5 | 4th January 2010 16:02 |
karma bonus points problem | tunad | TBDev | 2 | 4th August 2009 11:11 |
How can i remove the TTL System | DooM | TBDev | 2 | 25th May 2009 14:56 |
how change the normal user to power or admin user in ts TS Special Edition v.5.1 | theway | Template Shares | 2 | 27th September 2008 14:44 |