<!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=date}-->
<!--{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=User.userlist" class="link">会员列表</a>
				<a href="index.php?r=SiteSet.userset" class="link">属性设置</a>
				<a href="index.php?r=User.honourlist" class="link">会员头衔</a>
				<a href="index.php?r=SiteSet.experienceset" class="link">会员经验</a>
				<a href="index.php?r=User.forumroleimg" class="link">管理员身份勋章</a>
				<a href="index.php?r=User.albumlist" class="nolink">会员相册</a>
				<a href="index.php?r=User.listphotoframe" class="link">会员相框</a>
				<a href="index.php?r=User.msglist" class="link">会员消息</a>
				<a href="index.php?r=SiteSet.msgboxset" class="link">信箱设置</a>
			</div>
			<div id="secrightContent">
				<div class="tableContent2">
					<form name="searchForm" action="index.php" method="get" onSubmit="setDisabled('button', window.document);">
						<input type="hidden" name="r" value="User.albumlist"/>
						<input type="hidden" id="status" name="status" value="<!--{$status}-->"/>
						<div class="searchbar">
							上传用户&nbsp;<input type="text" class="text" name="login_name" value="<!--{$login_name}-->"/>
							&nbsp;上传时间&nbsp;<input type="text" class="date" id="beginDate" name="begin_date" value="<!--{$begin_date}-->"/>-<input type="text" class="date" id="endDate" name="end_date" value="<!--{$end_date}-->"/>
							&nbsp;<button type="submit" class="but2font">查询</button>
						</div>
					</form>
					<div class="operation">
						<button type="button" class="but4font" onClick="batchOperate('index.php?r=User.updatealbumstatus&status=1&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定审核通过？')">审核通过</button>
						<button type="button" class="but2font" onClick="batchOperate('index.php?r=User.deletealbumimg&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
					</div>
					<table class="tbl_list" width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr class="thead">
							<td width="5%"><input type="checkbox" class="checkall"/></td>
							<td width="10%">图片名称</td>
							<td width="20%">缩略图</td>
							<td width="15%">图片描述</td>
							<td width="10%">格式/大小(K)</td>
							<td width="10%"><select onChange="$('#status').val(this.value);document.forms['searchForm'].submit();">
								<option value="">状态</option>
								<option value="1" <!--{if $status eq 1}-->selected<!--{/if}-->>已审核</option>
								<option value="2" <!--{if $status eq 2}-->selected<!--{/if}-->>待审核</option>
							</select></td>
							<td width="10%">上传用户</td>
							<td width="10%">上传时间</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.title}--></td>
							<td><a href="..<!--{$item.real_img_url}-->" target="_blank"><img height="100px" width="100px" src="..<!--{$item.preview_img_url}-->"/></a></td>
							<td><!--{$item.description|cutstrCN:"0":"20"}--></td>
							<td><!--{$item.file_type}-->/<!--{$item.file_size}--></td>
							<td><!--{if $item.status eq 1}-->已审核<!--{elseif $item.status eq 2}-->待审核<!--{/if}--></td>
							<td><!--{$item.login_name}--></td>
							<td><!--{$item.create_date|date_format:"%Y-%m-%d"}--></td>
							<td><a href="javascript:editAlbum('<!--{$item.id}-->', '<!--{$returnParams}-->')">修改</a>
								<a href="index.php?r=User.albumgrouplist&user_id=<!--{$item.user_id}-->&returnParams=<!--{$returnParams}-->">查看相册</a></td>
						</tr>
						<!--{foreachelse}-->
						<tr><td colspan="9">没有对应数据</td></tr>
						<!--{/foreach}-->
					</table>
					<div class="operation">
						<button type="button" class="but4font" onClick="batchOperate('index.php?r=User.updatealbumstatus&status=1&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定审核通过？')">审核通过</button>
						<button type="button" class="but2font" onClick="batchOperate('index.php?r=User.deletealbumimg&returnParams=<!--{$returnParams}-->', 'recordId', 'ids', '确定删除？')">删除</button>
					</div>
					<div class="page"><!--{$pager}--></div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<script>
function customRange(input){
	return {
		minDate : (input.id == "endDate" ? $("#beginDate").datepicker("getDate") : null),
		maxDate : (input.id == "beginDate" ? $("#endDate").datepicker("getDate") : null)
	}
}
$("#beginDate, #endDate").datepicker({
    beforeShow : customRange, buttonImageOnly : false
});

function editAlbum(id, returnParams){
	$.popbox({title:"修改图片", content:popstr_search});
	$.ajax({
		type: "get",
		url: "index.php?r=User.editalbum&id="+id,
		cache: false,
		dataType: "json",
		success: function(data){
			str = "<form action=\"index.php?r=User.editalbum\" method=\"post\">";
			str += "<input type=\"hidden\" name=\"returnParams\" value=\""+returnParams+"\"/>";
			str += "<input type=\"hidden\" name=\"data[UserAlbumGroupImg][id]\" value=\""+id+"\"/>";
			str += "<table class=\"tbl_edit\" width=\"100%\"><tr>";
			str += "<td class=\"td_name\">图片名称</td>";
			str += "<td class=\"td_content\"><input class=\"text\" name=\"data[UserAlbumGroupImg][title]\" value=\"";
			if (data.title != null) str += data.title;
			str += "\"/></td>";
			str += "</tr><tr>";
			str += "<td class=\"td_name\">图片描述</td>";
			str += "<td class=\"td_content\"><textarea class=\"textarea\" name=\"data[UserAlbumGroupImg][description]\">";
			if (data.description != null) str += data.description;
			str += "</textarea></td>";
			str += "</tr><tr>";
			str += "<td class=\"noborder\"></td>";
			str += "<td class=\"noborder\"><button type=\"submit\">提交</button></td>";
			str += "</tr></table></form>";
			$.popbox.setcontent({title:"修改图片", content:str});
		}
	});
}
</script>
</html>