<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--{include file=elements/header.css.html}-->
<!--{include file=elements/header.js.html type=common}-->
<!--{include file=elements/header.js.html type=popbox}-->
</head>
<body>
<div id="outside">
	<!--{include file=frame/top.html}-->
	<div id="mainareaContent">
		<!--{include file=frame/left.html}-->
		<div id="rightContent">
			<div id="topContent">
				<div class="sitmap">
					<span class="r"><!--{include file="elements/uuadvad.html"}--></span>模块管理&nbsp;&gt;&nbsp;音乐模块&nbsp;&gt;&nbsp;内容管理
				</div>
			</div>
			<div class="tabcontent">
				<a href="index.php?r=Music.musiclist" class="nolink">内管管理</a>
				<a href="index.php?r=SiteSet.musicset" class="link">属性设置</a>
				<a href="index.php?r=Music.musicListLayout" class="link">列表页布局</a>
					<a href="index.php?r=Music.musicPageLayout" class="link">内容页布局</a>
				<a href="index.php?r=Music.categorylist" class="link">风格</a>
				<a href="index.php?r=Music.languagelist" class="link">语种</a>
				<a href="index.php?r=Music.singerarealist" class="link">地区</a>
				<a href="index.php?r=Music.singerlist" class="link">歌手</a>
				<a href="index.php?r=Music.albumlist" class="link">专辑</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent3">
					<table class="tbl_leftnav" width="100%"><tr>
						<td class="td_channel"><div class="leftnav">
							<span class="ontitle">音乐资源库</span>
							<span class="sectitle">频道分类</span>
							<!--{foreach from=$channel item=item}-->
								<a href="index.php?r=Music.channelmusiclist&channel_id=<!--{$item.id}-->">[<!--{$item.id}-->]<!--{$item.channel_text}--></a>
							<!--{/foreach}-->
						</div></td>
						<td>
							<form name="searchForm" action="index.php" method="get" onSubmit="setDisabled('button', window.document);">
							<input type="hidden" name="r" value="Music.musiclist"/>
								<input type="hidden" id="publish_status" name="publish_status" value="<!--{$publish_status}-->"/>
								<input type="hidden" id="category_id" name="category_id" value="<!--{$category_id}-->"/>
								<input type="hidden" id="language_id" name="language_id" value="<!--{$language_id}-->"/>
								<input type="hidden" id="orderby" name="orderby" value="<!--{$orderby}-->"/>
								<div class="searchbar">
									歌曲名称&nbsp;
									<input type="text" class="text" name="title" value="<!--{$title}-->"/>
									&nbsp;歌手&nbsp;<input type="text" class="text" name="singer_name" value="<!--{$singer_name}-->"/>
									&nbsp;<button type="submit" class="but2font">查询</button>
								</div>
							</form>
							<div class="operation">
								<button type="button" class="but2font" onClick="window.location.href='index.php?r=Music.add&returnParams=<!--{$returnParams}-->'">新增</button>
								<button type="button" class="but2font" onClick="publish('<!--{$returnParams}-->')">发布</button>
								<button type="button" class="but2font" onClick="batchOperate('index.php?r=Music.deletechannelmusic&returnParams=<!--{$returnParams}-->', 'recordId', 'music_ids', '确定下线？')">下线</button>
								<button type="button" class="but2font" onClick="batchOperate('index.php?r=Music.delete&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
							</div>
							<table class="tbl_list" cellpadding="0" cellspacing="0" width="100%" border="0">
								<tr class="thead">
									<td width="5%"><input type="checkbox" class="checkall"/></td>
									<td width="5%">ID</td>
									<td width="15%">音乐名称</td>
									<td width="12%">发布频道</td>
									<td width="10%"><select onChange="$('#publish_status').val(this.value);document.forms['searchForm'].submit();">
										<option value="">状态</option>
										<option value="1" <!--{if $publish_status eq 1}-->selected<!--{/if}-->>已发布</option>
										<option value="2" <!--{if $publish_status eq 2}-->selected<!--{/if}-->>未发布</option>
									</select></td>
									<td width="8%">歌手</td>
									<td width="8%"><select onChange="$('#category_id').val(this.value);document.forms['searchForm'].submit();">
										<option value="">曲风</option>
										<!--{foreach from=$category item=item}-->
										<option value="<!--{$item.id}-->" <!--{if $category_id eq $item.id}-->selected<!--{/if}-->><!--{$item.category_name}--></option>
										<!--{/foreach}-->
									</select></td>
									<td width="7%"><select onChange="$('#language_id').val(this.value);document.forms['searchForm'].submit();">
										<option value="">语种</option>
										<!--{foreach from=$language item=item}-->
										<option value="<!--{$item.id}-->" <!--{if $language_id eq $item.id}-->selected<!--{/if}-->><!--{$item.language}--></option>
										<!--{/foreach}-->
									</select></td>
									<td width="11%">
										<!--{if $orderby eq down_count0}-->
										<a class="link" onClick="$('#orderby').val('down_count1');document.forms['searchForm'].submit();">下载↑</a>
										<!--{elseif $orderby eq down_count1}--><a class="link" onClick="$('#orderby').val('down_count0');document.forms['searchForm'].submit();">下载↓</a><!--{else}--><a class="link" onClick="$('#orderby').val('down_count0');document.forms['searchForm'].submit();">下载</a><!--{/if}-->/<!--{if $orderby eq click_count0}--><a class="link" onClick="$('#orderby').val('click_count1');document.forms['searchForm'].submit();">人气↑</a>	<!--{elseif $orderby eq click_count1}--><a class="link" onClick="$('#orderby').val('click_count0');document.forms['searchForm'].submit();">人气↓</a>	<!--{else}--><a class="link" onClick="$('#orderby').val('click_count0');document.forms['searchForm'].submit();">人气</a><!--{/if}-->
									</td>
									<td width="11%">
										<!--{if $orderby eq create_date0}-->
										<a class="link" onClick="$('#orderby').val('create_date1');document.forms['searchForm'].submit();">创建时间↑</a>
										<!--{elseif $orderby eq create_date1}-->
										<a class="link" onClick="$('#orderby').val('create_date0');document.forms['searchForm'].submit();">创建时间↓</a>
										<!--{else}-->
										<a class="link" onClick="$('#orderby').val('create_date0');document.forms['searchForm'].submit();">创建时间</a><!--{/if}-->
									</td>
									<td width="10%">操作</td>
								</tr>
								<!--{foreach from=$datalist item=item name=list}-->
								<tr onMouseOver="chgTrColor(this)" onMouseOut="chgTrColor(this)">
									<td><input type="checkbox" class="checkid" name="recordId" value="<!--{$item.id}-->"/></td>
									<td><!--{$item.id}--></td>
									<td><!--{if $item.top_flag eq 1}-->[顶]<!--{/if}--><a href="index.php?r=Music.edit&id=<!--{$item.id}-->&returnParams=<!--{$returnParams}-->"><!--{$item.title}--></a></td>
									<td><!--{$item.channel_text}--></td>
									<td><!--{if $item.publish_status eq 1}-->已发布<!--{elseif $item.publish_status eq 2}-->未发布<!--{/if}--></td>
									<td><!--{$item.singer_name}--></td>
									<td><!--{$item.category_name}--></td>
									<td><!--{$item.language}--></td>
									<td><!--{$item.down_count}-->/<!--{$item.click_count}--></td>
									<td><!--{$item.create_date|date_format:"%Y-%m-%d"}--></td>
									<td><a href="index.php?r=Music.edit&id=<!--{$item.id}-->&returnParams=<!--{$returnParams}-->">修改</a>
										<a href="index.php?r=Music.musicfilelist&music_id=<!--{$item.id}-->&backFlag=1&returnParams=<!--{$returnParams}-->">歌曲管理</a></td>
								</tr>
								<!--{foreachelse}-->
								<tr><td colspan="11">没有对应数据</td></tr>
								<!--{/foreach}-->
							</table>
							<div class="operation">
								<button type="button" class="but2font" onClick="window.location.href='index.php?r=Music.add&returnParams=<!--{$returnParams}-->'">新增</button>
								<button type="button" class="but2font" onClick="publish('<!--{$returnParams}-->')">发布</button>
								<button type="button" class="but2font" onClick="batchOperate('index.php?r=Music.deletechannelmusic&returnParams=<!--{$returnParams}-->', 'recordId', 'music_ids', '确定下线？')">下线</button>
								<button type="button" class="but2font" onClick="batchOperate('index.php?r=Music.delete&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
							</div>
							<div class="page"><!--{$pager}--></div>
						</td>
					</tr></table>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function publish(returnParams){
	var item = $("[name=recordId]");
	var id = "";
	if (item.size() > 0) {
		item.each(function(){
			if ($(this).attr("checked") == true) {
				id += $(this).val();
				id += ",";
			}
		});
	}
	id = id.substr(0, id.lastIndexOf(","));
	if (id == "") {
		alert("请选择记录");
		return false;
	} else {
		$.popbox({title:"歌曲发布", content:popstr_search});
		$.ajax({
			type: "get",
			url: "index.php?r=Music.publish&id="+id+"&returnParams="+returnParams,
			cache: false,
			success: function(data){
				$.popbox.setcontent({title:"歌曲发布", content:data});
			}
		});
	}
}
</script>
</html>