SMF Shop
SMFShop => Items => Topic started by: chadk on September 27, 2006, 03:53:06 am
-
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.com/ |
\**********************************************/
//File: Armageddon.php
// RESETS the bank and all user's money to ZERO
//VERSION: 1.0 (Build 1)
//DATE: Sep 26th, 2006
// $Id: Armageddon.php chadk $
class item_armageddon extends itemTemplate {
function getItemDetails() {
$this->authorName = "Chad";
$this->authorWeb = "http://www.aviary.info/";
$this->authorEmail = "generalchad@gmail.com";
$this->name = "ARMAGEDDON!";
$this->desc = "This will reduce EVERYONES credits on hand AND in the bank to ZERO!!! EVERYONE!!!";
$this->price = 100000;
$this->require_input = false;
$this->can_use_item = true;
}
function onUse() {
global $db_prefix, $ID_MEMBER, $item_info;
$result = db_query("UPDATE {$db_prefix}members
SET moneyBank = 0, money = 0", __FILE__, __LINE__);
return "Its the end of the world as they know it, and you feel fine.";
}
}
?>
-
WOW! That is a harsh Item!
-
My users have already done it! lol It costs I think 100000 credits and I only give 5 credits for a post and 1 for a reply...
-
LOL...I upped the price to 500,000 simply because I have a few members that have been around since the beginning and 100,000 is nothing to them
-
This sounds like a nice item... Good work chadk :D
-
Well it's not perfect. It doesn't PM the site admin the name of the person who did it, which I'd like it to do.
-
To install this item, do you put "Armageddon.php" in your shop/items folder and copy the code into it?
I'm new to this and I'm unsure.
-
Copy the code...open a file in a good text editor...or failing that Notepad...paste the code into the text editor making sure that there is no whitespace after "?>"
Save the file as Armageddon.php and then upload it to your server in the Sources/shop/items directory...you might also like to find an image for it and to add that to the Sources/shop/item_images so that it can make the listing for this item more attractive.
Go to ACP>Shop Administration>Add/Edit/Delete Items>
Select this item from the drop down list fill in the fields as per your requirements and associate the item with the image you found for it.
-
this is just perfect O0