<%@ Page PathInChannel="play/{#ID#}.htm" Object="Music" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<ilghar:Get ID="Music" Object="Music" InnerID="Request.QueryString['ID']" />
<ilghar:Get ID="Player" Mark="System" Object="Player" Guid="Music[PlayerID]" />
<title><%=Music[Name]%> - <%=ChannelName%> - <%=SiteName%></title>
<ilghar:Comment><link rel="stylesheet" type="text/css" href="S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" type="text/css" href="<%=CssPath%>common.css" />
<script type="text/javascript" src="/common/ajax.js"></script>
<script type="text/javascript" src="/common/equalcols.js"></script>
<script type="text/javascript" src="/common/utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>common.js"></script>
<script type="text/javascript">
function Up(obj)
{
	_ajax.Post("/ws.aspx?Object=Music&Operation=IncrementUp&ID=<%=Music[InnerID]%>", null, null);
	obj.disabled = true;
}

function Down(obj)
{
	_ajax.Post("/ws.aspx?Object=Music&Operation=IncrementDown&ID=<%=Music[InnerID]%>", null, null);
	obj.disabled = true;
}

function ReportError(obj)
{
	_ajax.Post("/ws.aspx?Object=Music&Operation=IncrementError&ID=<%=Music[InnerID]%>", null, null);
	obj.disabled = true;
}

var _lyricID = 0;
function ReportLyricError(obj)
{
	if (_lyricID == 0)
		return;
		
	_ajax.Post("/ws.aspx?Object=Lyric&Operation=IncrementError&ID=" + _lyricID, null, null);
	obj.disabled = true;
}
</script>
</head>
<body>
<!-- TemplateBeginEditable name="广告位5" -->
<div class="Block2">
	<ilghar:Ad InnerID="13" />
</div>
<!-- TemplateEndEditable -->

<div class="Wrap">
    <div class="Block6">
        <div class="Block27">
            <div class="Left" id="Left">
                <h4><%=Music[Name]%></h4>
				<ilghar:List Object="Lyric" Page="1" PageSize="1" Condition="IsDeleted=false and IsChecked=true and MusicID=Music[ID]" Sort="UpdateTime DESC">
					<ilghar:Record>
						<div>
							<%=Convert.ToString(Content).Replace("\r\n", "<br />")%>
						</div>
						<script type="text/javascript">
						_lyricID = "<%=InnerID%>";
						</script>
					</ilghar:Record>
				</ilghar:List>
            </div>
            <div class="Right" id="Right">
				<!-- TemplateBeginEditable name="广告位6" -->
				<ilghar:Ad InnerID="13" />
				<!-- TemplateEndEditable -->
				
				<!-- TemplateBeginEditable name="播放器" -->
				<%=Player[Code]%>
				<script type="text/javascript">WritePlayer("<%=Music[URL]%>")</script>
				<!-- TemplateEndEditable -->
				
				<p><button onclick="Up(this)">顶 <%=Music[Up]%></button> <button onclick="Down(this)">踩 <%=Music[Down]%></button> <button onclick="ReportError(this)">歌曲有错</button> <button id="LyricErrorButton" disabled="disabled" onclick="ReportLyricError(this)">歌词有错</button> <button onclick="AddLyric(<%=Request.QueryString["ID"]%>, '<%=BuildUrl("add_lyric.dwt")%>')">添加歌词</button></p>
				<div>
					节目地址：<input type="text" id="PageUrl" size="50" onclick="CopyToClipboard(document.getElementById('PageUrl').value);alert('网址已复制，粘贴给好友请按Crtl+V。')" />
					<script type="text/javascript">document.getElementById("PageUrl").value = window.location.href;</script>
				</div>
            </div>
        </div>
    </div>
    <div class="Block15" id="Ad">
		<!-- TemplateBeginEditable name="广告位7" -->
		<h5>广告</h5>
		<div>
			<ilghar:Ad InnerID="17" />
		</div>
		<!-- TemplateEndEditable -->
    </div>
</div>
<!-- TemplateBeginEditable name="广告位8" -->
<div class="Block2">
	<ilghar:Ad InnerID="13" />
</div>
<!-- TemplateEndEditable -->

<script type="text/javascript">
_ajax.Post("/ws.aspx?Object=Music&Operation=IncrementHitCount&ID=<%=Request.QueryString['ID']%>", null, null);

if (_lyricID > 0)
{
	var button = document.getElementById("LyricErrorButton");
	button.disabled = false;
}

MakeColsEqual('Left', 'Right', 'Ad');
</script>
</body>
</html>
