<?php

/*
	[Discuz!] (C)2001-2006 Comsenz Technology Ltd.
	This is NOT a freeware, use is subject to license terms

	$RCSfile: magic_money.inc.php,v $
	$Revision: 1.4 $
	$Date: 2007/01/22 06:28:34 $
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

if(submitcheck('usesubmit')) {

	$getmoney = rand(1, intval($magic['price'] * 1.5));
	$db->query("UPDATE {$tablepre}members SET extcredits$creditstrans=extcredits$creditstrans+'$getmoney' WHERE uid='$discuz_uid'");

	usemagic($magicid, $magic['num']);
	updatemagiclog($magicid, '2', '1', '0', '', '', $discuz_uid);
	showmessage('magics_MOK_message');

}

function showmagic() {
	global $lang;
	magicshowtips($lang['MOK_info'], $lang['option']);
}

?>