<?php

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

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

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

if(submitcheck('usesubmit')) {

	if(empty($pid)) {
		showmessage('magics_info_nonexistence');
	}

	$post = getpostinfo($pid, 'pid', array('fid', 'useip'));
	checkmagicperm($magicperm['forum'], $post['fid']);

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

}

function showmagic() {
	global $pid, $lang;
	magicshowtype($lang['option'], 'top');
	magicshowsetting($lang['target_pid'], 'pid', $pid, 'text');
	magicshowtype('', 'bottom');
}

?>