<?php
/*
		[FuShow.cn] (C) 2013-2014 HXWY Inc.
		FuShow Friend V3.0				Id: magic_thunder.php
		Email <service@fushow.cn>		http://fushow.cn/
*/

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

//雷鸣之声
if(submitcheck("usesubmit")) {

	magic_use($mid, array(), true);

	//发全站feed
	$uid = $_SGLOBAL['supe_uid'];
	realname_set($_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
	realname_get();

	$_SGLOBAL['supe_uid'] = 0;
	include_once(S_ROOT.'./source/function_cp.php');
	$avatar = ckavatar($uid) ? avatar($uid, 'middle',true) : UC_API.'/images/noavatar_middle.gif';
	feed_add(
		'thunder',
		cplang('magicuse_thunder_announce_title'),
		array(
			'uid' => $uid,
			'username' => "<a href=\"fushow.php?uid=$uid\">{$_SN[$uid]}</a>"),
		cplang('magicuse_thunder_announce_body'),
		array(
			'uid' => $uid,
			'magic_thunder' =>1),
		'',
		array($avatar),
		array("fushow.php?uid=$uid")
	);
	showmessage('magicuse_success', $_POST['refer'], 0);
}

?>