<?
/*
	---------------------------------------------------------------
	点歌台 v1.04 for discuz!3.x 
	---------------------------------------------------------------
	演示网站: http://www.e-traderland.net
	修改版演示网站: http://www.e-traderland.net
	作者: 雪狼 (伊乐园中文论坛)
	日期: 2004年1月11日

*/
require "./include/common.inc.php";
require "./songconfig.php";
$discuz_action = 243;
if(!$discuz_user) { showmessage('not_loggedin'); }
if($songid){
	$navigation="<a href=\"song.php\">论坛点歌台</a>&raquo;收听歌曲";
	$query=$db->query("select * from cdb_xn_song where sgid='$songid'");
	$song=@$db->fetch_array($query);

	if (($discuz_user == $song[touser]) || ($discuz_user == $song[username]) || ($song[particular] == 0) || ($adminid==1)){
		$songtype=$song[songtype];
		$songurl=$song[songurl];

                        if ($adminid==1) {
		$hearsong.="<font color=blue><b>$song[username]</font></b>为<font color=blue><b>$song[touser]</b></font>送上一首<font color=green>【$song[songname]】</font><br>并且想对<font color=blue>$song[touser]</font>说：<br><br><font color=#FF0000>$song[content]</font><br><br>想保存这首歌？&nbsp;&nbsp;<a href=\"$songurl\">按这里下载吧！</a><br><br><a href=\"editsong.php?songid=$song[sgid]\"><img src=images/song/edit.gif border=0 alt=编辑></a>&nbsp;&nbsp;<a href=\"deletesong.php?action=delete&songid=$song[sgid]\"><img src=images/song/delete.gif border=0 alt=删除></a><br><br><br>";

                        } elseif  ($discuz_user == $song[username]) {
                           
                           $hearsong.="<font color=blue><b>$song[username]</font></b>为<font color=blue><b>$song[touser]</b></font>送上一首<font color=green>【$song[songname]】</font><br>并且想对<font color=blue>$song[touser]</font>说：<br><br><font color=#FF0000>$song[content]</font><br><br>想保存这首歌？&nbsp;&nbsp;<a href=\"$songurl\">按这里下载吧！</a><br><br><a href=\"editsong.php?songid=$song[sgid]\"><img src=images/song/edit.gif border=0 alt=编辑></a><br><br>";
                        } else {
                           $hearsong.="<font color=blue><b>$song[username]</font></b>为<font color=blue><b>$song[touser]</b></font>送上一首<font color=green>【$song[songname]】</font><br>并且想对<font color=blue>$song[touser]</font>说：<br><br><font color=#FF0000>$song[content]</font><br><br>想保存这首歌？&nbsp;&nbsp;<a href=\"$songurl\">按这里下载吧！</a><br><br>";
	           }
	}  else {
		showmessage("对不起，这首歌是特定点歌，点歌人不让他人浏览","song.php");
	}
	unset($query);
	unset($song);
}else{
	showmessage('undefined_action');
}

include template('club_hearsong');
?>