<?
/*
	---------------------------------------------------------------
	点歌台 V1.0.0 for discuz!5.0.0 RC1 
	---------------------------------------------------------------
	演示网站: http://piaoyun.miyahost.com/bbs/
	原版作者: 雪狼 (伊乐园中文论坛)
	最终修改: 飘云[PYG]
	官方论坛: WwW.ChiNaPYG.CoM
        修改日期: 2006.8.1
*/
require "./include/common.inc.php";
require "./songconfig.php";
$discuz_action = 245;
if(!$discuz_user) { showmessage('not_loggedin'); }

	if ($action=="delete"){
		$navaction .= '&raquo;&nbsp;<a href="song.php">论坛点歌台</a>&raquo;&nbsp;删除点歌';
		if ($adminid!=1){
			showmessage("对不起您不是管理员！没有权力进行此操作。", "song.php");
		}
		if ($songid){
			$query=$db->query("select * from cdb_xn_song where sgid=$songid");
			$song=@$db->fetch_array($query);
			$deletesong.="您正要将&nbsp;&nbsp;<a href=\"hearsong.php?songid=$song[sgid]\"><font color=red><b>".$song[username]."</font></b>为好友<font color=red><b>".$song[touser]."</b></font>送上的一首《".$song[songname]."》</a>&nbsp;&nbsp;删除，继续吗?";
			unset($query);
			unset($song);
		}
		if($deletesubmit)	{
			$query=$db->query("DELETE FROM cdb_xn_song WHERE sgid=$songid");
			unset($query);
			showmessage("指定的点歌成功删除，现在返回点歌台","song.php");
		}
	}else{
		showmessage('undefined_action');
	}

include template('club_submitsong');
?>