Hello there I've been running your smf shop script over at
http://dinogod.comfor a while now, I have a shop full of "pokemon" which are test items which then are on display in signatures but I figured as a user how would someone get rid of the pokemon so I decided to try and make an item that would "kill" them all without admin help
Now I claim no knowledge of php at all but I tried to merge two snippets together to get what I wanted before I go ahead and test it I wanted to know
if someone could just check that I wouldn't be deleting my database by using this item or if there are any obvious security problems with this item or if it would work at all lol
thanks
#
<?php
#
/**********************************************\
#
| SMFSHOP (Shop MOD for Simple Machines Forum) |
#
| (c) 2007 DanSoft Australia |
#
| http://www.dansoftaustralia.net/ |
#
\**********************************************/
#
#
//File: DisplayMessage.php
#
// Item - Display a message when used
#
#
// VERSION: Not included in SMFShop yet
#
#
class item_DisplayMessage extends itemTemplate {
#
function getItemDetails() {
#
$this->authorName = "Daniel15";
#
$this->authorWeb = "http://www.dansoftaustralia.net/";
#
$this->authorEmail = "dansoft@dansoftaustralia.net";
#
#
$this->name = "Poison";
#
$this->desc = "Destories all items and pokemon";
#
$this->price = 20;
#
#
$this->require_input = false;
#
$this->can_use_item = true;
#
}
#
#
#
function onUse() {
$result = db_query("DELETE FROM {$db_prefix}shop_inventory
WHERE ownerid = {$ID_MEMBER}",
__FILE__, __LINE__);
return "Inventory destroyed";
}
#
#
}
#
#
?>