<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: Karmageddon.php
// RESETS all user's karma to ZERO
//VERSION: 1.0 (Build 1)
//DATE: Sep 26th, 2006
// $Id: Karmageddon.php chadk $
class item_Karmageddon extends itemTemplate {
function getItemDetails() {
$this->authorName = "Chad";
$this->authorWeb = "http://www.aviary.info/";
$this->authorEmail = "generalchad@gmail.com";
$this->name = "KARMAGEDDON!";
$this->desc = "This will reduce EVERYONES KARMA BACK TO ZERO!!";
$this->price = 5000;
$this->require_input = false;
$this->can_use_item = true;
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$pmfrom = array(
'id' => 1,
'name' => 'Chad',
'username' => 'Chad'
);
$pmto = array(
'to' => array(1),
'bcc' => array()
);
$result = db_query("UPDATE {$db_prefix}members
SET karmaBad = 0, karmaGood = 0", __FILE__, __LINE__);
$result = db_query("DELETE FROM smf_log_karma");
sendpm($pmto, 'KARMAGEDDON!', "{$ID_MEMBER} reset everyones karma.", 0, $pmfrom);
return "Everyone has a clean slate.";
}
}
?>