function reCustomize() { global $Config, $DB, $lang, $user; include 'core/SDL/class.character.php'; $Character = new Character(); if ($Config->get('module_charcustomize') == 0) { output_message('error', 'Nice try hacking, but not good enough.'); return FALSE; } // Check to see the user has enough points if ($user['web_points'] >= $Config->get('module_charcustomize_pts')) { if ($Character->setCustomize($_POST['id']) == TRUE) { $DB->query("UPDATE `mw_account_extend` SET \n\t\t\t\t`web_points`=(`web_points` - " . $Config->get('module_charcustomize_pts') . "), \n\t\t\t\t`points_spent`=(`points_spent` + " . $Config->get('module_charcustomize_pts') . ") \n\t\t\t WHERE `account_id` = " . $user['id'] . " LIMIT 1"); output_message('success', $lang['char_recustomize_success']); echo "<br /><br />"; } else { output_message('warning', $lang['char_recustomize_already_set']); echo "<br /><br />"; } } else { output_message('validation', $lang['not_enough_points']); } }