Try this:
<?php
/**********************************************\
| SMFSHOP (Shop MOD for Simple Machines Forum) |
| (c) 2005 DanSoft Australia |
| http://www.dansoftaustralia.net/ |
\**********************************************/
//File: Change_Font.php
//This item allows users to change their name font using a drop down menu.
//NOTE: This item requires that the DisplayNameCSS addon item be installed!
//Authors Website: www.graphicaddicts.net
//VERSION: 1.0
//DATE: April 21st 2006
class item_Change_Font extends itemTemplate {
function getItemDetails() {
$this->name = "Change Name Font!";
$this->desc = "Change the font of your display name to: Arial, Comic Sans, Courier, Papyrus, Times, Verdana.";
$this->price = 75;
$this->require_input = true;
$this->can_use_item = true;
}
function getUseInput() {
return 'Select a Font: <select name="font_" size="1" id="color">
<option value="">Select One</option>
<option value="font-family: Arial" style="font-family: Arial;color:#FFFFFF;background-color:#000000">Arial</option>
<option value="font-family: Comic Sans MS" style="font-family: Comic Sans MS">Comic Sans MS</option>
<option value="font-family: Courier New" style="font-family: Courier New">Courier New</option>
<option value="font-family: Papyrus" style="font-family: Papyrus">Papyrus</option>
<option value="font-family: Times New Roman" style="font-family: Times New Roman">Times New Roman</option>
<option value="font-family: Verdana" style="font-family: Verdana">Verdana</option>
</select>';
}
function onUse() {
global $db_prefix, $ID_MEMBER;
$result = db_query("UPDATE {$db_prefix}members
SET shop_nameStyle =
concat(shop_nameStyle,'{$_POST['font_']};')
WHERE ID_MEMBER = {$ID_MEMBER}",
__FILE__, __LINE__);
return "Successfully updated your display name font!";
}
}
?>