<%template _header%>
<script type="text/javascript" src="{forumpath}javascript/template_modcp.js"></script>
<script type="text/javascript" src="{forumpath}javascript/ajax.js"></script>
<script type="text/javascript" src="{forumpath}javascript/template_quickreply.js"></script>
<%if page_err==0%>
<%if {ispost} && {editusersubmit||banusersubmit||editannouncement||deleteannoucement} %>
<%template _msgbox%>
<%else%>
<div id="foruminfo">
	<div id="nav">
		<a href="{config.forumurl}" class="home">{config.forumtitle}</a> &raquo; <strong>管理面板</strong>
	</div>
	<div id="headsearch">
		<div id="search">
			<%template _quicksearch%>
		</div>
	</div>
</div>
<div class="container">
	<div class="side managerside">
		<div>
		 <%if {admingroupinfo.allowpostannounce}==1%>
			<h2>公告管理</h2>
				<ul>
					<li>
						<a href="modcp.aspx?operation=addannouncements&forumid={forumid}">添加公告</a>
					</li>
					<li>
						<a href="modcp.aspx?operation=list&forumid={forumid}">管理公告</a>
					</li>
				</ul>
		<%/if%>
		
			<h2>用户管理</h2>
				<ul>
					 <%if {admingroupinfo.allowedituser}==1%>
					<li>
						<a href="modcp.aspx?operation=edituser&forumid={forumid}">编辑用户</a>  
					</li>
					<%/if%>
					<%if {admingroupinfo.allowbanuser}==1%>
					<li>
						<a href="modcp.aspx?operation=banusersearch&forumid={forumid}">禁止用户</a>
					</li>					
					<%/if%>
					<li>
						<a href="modcp.aspx?operation=forumaccesslist&forumid={forumid}">用户权限</a> 				
					</li>
					<%if {admingroupinfo.allowbanip}==1%>
					<li>
						<a href="modcp.aspx?operation=showbannedlist&forumid={forumid}">禁止 IP</a>   
					</li>
					<%/if%>
				</ul>
			<h2>版块管理</h2>
			<ul>
				<li>
					<a href="modcp.aspx?operation=editforum&forumid={forumid}">版块编辑</a>  
				</li>
			</ul>
			<h2>主题管理</h2>
			<ul>
			    <%if {admingroupinfo.allowmodpost}==1%>
				<li>
					<a href="modcp.aspx?operation=audittopic&forumid={forumid}">审核主题</a> 
				</li>
				<li>
					<a href="modcp.aspx?operation=auditpost&forumid={forumid}">审核回复</a>
				</li>
				<%/if%>
				<li>
					<a href="modcp.aspx?operation=attention&forumid={forumid}">主题关注</a>  
				</li>
			</ul>
			<h2>其他</h2>
				<ul>
					<li><a href="modcp.aspx?operation=logs&forumid={forumid}">管理日志</a></li>
					<li><a href="modcp.aspx?operation=userout&forumid={forumid}">返回论坛</a></li>
				</ul>
		</div>
	</div>
	<div class="content">
		<!--管理员登录-->
<%if {operation}=="login"%>
<div class="mainbox">
			<h3>管理登录</h3>
			<form action="" method="post">
			<input type="hidden" value="{operation}" name="operation"/>
			<table cellspacing="0" cellpadding="0" summary="会员统计">
				<tbody>
				<tr>
					<th>用户名</th><td><input type="text" name="cpname"/></td>
				</tr>
				<tr>
					<th>密码</th><td><input type="password" name="cppwd"/></td>
				</tr>
				<tr>
					<th/><td><input type="submit" id="Submit1" value="提交" name="Submit"/></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<div class="hintinfo">当您首次进入管理面板或者长时间没有管理动作时，您需要输入密码才能进入。如果密码输入错误超过 3 次，管理面板将会锁定。30 分钟或者更长时间后，管理面板才能解除锁定。
		</div>
	<%/if%>	

	<!--添加公告-->
	<%if {operation}=="addannouncements" && {admingroupinfo.allowpostannounce}==1%>
		<div class="mainbox">
			<h3>添加公告</h3>
			<form action="modcp.aspx?operation=add" method="post">
				<input type="hidden" value="{operation}" name="operation"/>
				<input type="hidden" value="0" name="displayorder"/>
				<table cellspacing="0" cellpadding="0">
					<tbody>
					<tr>
						<th width="20%">标题</th><td><input type="text" size="80" id="subject" name="subject" value="" /></td>
					</tr>
					<tr>
						<th>起始时间</th><td><input type="text" style="cursor:default" onClick="showcalendar(event, 'starttime', 'cal_startdate1', 'cal_enddate1', '{nowdatetime}');" name="starttime" value='{starttime}' id="starttime"/>
							<input type="hidden" name="cal_startdate1" id="cal_startdate1" size="10"  value="1900-01-01" />
							<input type="hidden" name="cal_enddate1" id="cal_enddate1" size="10"  value="2099-01-01" />
						</td>
					</tr>
					<tr>
						<th>结束时间</th><td><input type="text" style="cursor:default" onClick="showcalendar(event, 'endtime', 'cal_startdate2', 'cal_enddate2', 'nowdatetime');" name="endtime" value='{endtime}' id="endtime"/>
						<input type="hidden" name="cal_startdate2" id="cal_startdate2" size="10"  value="1900-01-01" />
						<input type="hidden" name="cal_enddate2" id="cal_enddate2" size="10"  value="2099-01-01" />
						</td>
					</tr>
					<tr>
						<th>内容</th><td><textarea cols="80" rows="10" id="message" name="message" ></textarea></td>
					</tr>
					<tr>
						<th/><td><input type="submit" id="addannouncement_Submit" value="提交" name="Submit"/></td>
					</tr>
					</tbody>
				</table>
			</form>
		</div>		
		</div>
		<script type="text/javascript" src="javascript/template_calendar.js"></script>
		<%/if%>	
		
	<!--编辑公告-->
	<%if {operation}=="editannouncements"%>
		<div class="mainbox">
			<h3>编辑公告</h3>
			<form action="modcp.aspx?operation=updateannouncements" method="post">
				<input type="hidden" value={id} name="id"/>
				<input type="hidden" value={displayorder} name="displayorder"/>
				<table cellspacing="0" cellpadding="0">
					<tbody>
					<tr>
						<th width="20%">标题</th><td><input type="text" size="80" id="subject" name="subject" value={subject} /></td>
					</tr>
					<tr>
					<th>起始时间</th>
					<td>
						<input type="text" style="cursor:default" onClick="showcalendar(event, 'starttime', 'cal_startdate1', 'cal_enddate1', '{nowdatetime}');" name="starttime" value="{starttime}" id="starttime"/>
						<input type="hidden" name="cal_startdate1" id="cal_startdate1" size="10"  value="1900-01-01" />
						<input type="hidden" name="cal_enddate1" id="cal_enddate1" size="10"  value="2099-01-01" />
					</td>
					</tr>
					<tr>
						<th>结束时间</th>
						<td>
						<input type="text" style="cursor:default" onClick="showcalendar(event, 'endtime', 'cal_startdate2', 'cal_enddate2', 'nowdatetime');" name="endtime" value="{endtime}" id="endtime"/>
						<input type="hidden" name="cal_startdate2" id="cal_startdate2" size="10"  value="1900-01-01" />
						<input type="hidden" name="cal_enddate2" id="cal_enddate2" size="10"  value="2099-01-01" />
						</td>
					</tr>
					<tr>
						<th>内容</th><td><textarea cols="80" rows="10" id="message" name="message" >{message}</textarea></td>
					</tr>
					<tr>
						<th/><td><input type="submit" id="editannoucementsubmit" name="editannoucementsubmit" value="提交"/></td>
					</tr>
					</tbody>
				</table>
			</form>
		</div>
		<script type="text/javascript" src="javascript/template_calendar.js"></script>
		<%/if%>
	<!--公告列表-->
	<%if {operation}=="list"%>
		<form action="modcp.aspx?operation=manage&op=delannouncements" method="post">
		<div class="mainbox">
			<h3>公告列表</h3>
			<input type="hidden" value={operation} name="operation"/>
			<input type="hidden" value={op} name="op"/>
			<table cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th width="8%"><input type="checkbox" onclick="checkall(this.form)" name="chkall" id="chkall" class="checkbox"/>删除</th>
						<th width="5%">顺序</th>
						<th width="15%">作者</th>
						<th>标题</th>
						<th width="15%">起始时间</th>
						<th width="15%">结束时间</th>
						<th width="5%">操作</th>
					</tr>
				</thead>
				<%if {counts}<=0%>
				<tbody>
					<tr>
						<td colspan="7">暂无公告</td>
					</tr>
				</tbody>
				<%else%>
				<%loop announcement announcementlist%>
				<tbody>
					<tr>
						<td><%if {username}=="admin"||{username}=={announcement[poster]}%>
						<input type="checkbox" name='aidlist' id='aidlist' value="{announcement[id]}" class="checkbox"/>
						<%else%>
						<input type="checkbox" name='aidlist' id='aidlist' disabled="disabled" value="{announcement[id]}" class="checkbox"/>	
						<%/if%></td>	
						<td>
						<%if {username}=="admin"||{username}=={announcement[poster]}%>
						<input type="text" size="3" id="displayorder" name="displayorder" value={announcement[displayorder]} /><%else%><input type="text" size="3" readonly="readonly" disabled id="displayorder" name="displayorder" value={announcement[displayorder]} /><%/if%>
						<input type="hidden" name="hid" id="hid" size="10"  value="{announcement[id]}" />
						</td>						
						<td>{announcement[poster]}</td>
						<td>{announcement[title]}</td>
						<td>{announcement[starttime]} </td>
						<td>{announcement[endtime]}</td>
						<td>
						<%if {username}=="admin"||({username}=={announcement[poster]})%>
						<a href="modcp.aspx?operation=editannouncements&id={announcement[id]}">编辑
						<%/if%></td>
					</tr>
				</tbody>
				<%/loop%>
				<%/if%>
			</table>			
		</div>
		<div class="pages_btns">
				<div class="pages">{pagenumbers}</div>
				<span class="postbtn"><input type="submit" name="operationsubmit" id="operationsubmit"  name="Submit" value="提交"/></span>
		</div>
		<%if tip=="add"%><div class="hintinfo">公告添加完毕，请继续操作</div><%/if%><%if tip=="delsuccessful"%><div class="hintinfo">选定公告删除完毕，请继续操</div><%/if%>
		</form>
		<%/if%>
	<!--编辑用户-->
	<%if {operation}=="edituser"%>
 		<div class="mainbox">
			<h3>编辑用户 - 搜索</h3>
			<form method="post" action="modcp.aspx?operation=edituser&op=edit">
			<input type="hidden" value="{operation}" name="operation"/>
			<input type="hidden" value="{op}" name="op"/>
			<table cellpadding="0" cellspacing="0">
				<tbody>
				<tr>
					<th width="20%">用户名</th><td><input name="username" value="" size="20" type="text"></td>
				</tr>
				<tr>
					<th width="20%">UID</th><td><input name="uid" value="" size="20" type="text"> [可选]</td>
				</tr>
				<tr>
					<th></th><td><input type="submit" id="editusersubmit" value="提交" name="editusersubmit"/></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<%if {op}!="edit"%>
		<div class="hintinfo">
			请首先输入用户名或者 UID 搜索用户，然后进行下一步。搜索 UID 比搜索用户名速度更快且准确
		</div>
		<%else%>
			<%if {op}=="edit" &&{uid}>0%>
			<div class="mainbox">
			<h3>编辑用户 - {username}</h3>
			<form method="post" action="modcp.aspx?operation=updateuser">
			<input type="hidden" value={operation} name="operation"/>
			<input type="hidden" value="updateuser" name="op"/>
			<input type="hidden" name="username" value={uname}>
			<input type="hidden" name="uid" value={uid}>
			<table cellspacing="0" cellpadding="0">
				<tr>
					<th width="20%">用户名</th><td>{uname}</td>
				</tr>
				<tr>
					<th width="20%">UID</th><td>{uid}</td>
				</tr>
				<tr>
					<th width="20%">来自</th><td><input type="text" name="locationnew" value="{location}" size="40"></td>
				</tr>
				<tr>
					<th width="20%">自我介绍</th><td><textarea name="bionew" rows="4" cols="80">{bio}</textarea></td>
				</tr>
				<tr>
					<th width="20%">个人签名</th><td><textarea name="signaturenew" rows="4" cols="80">{signature}</textarea></td>
				</tr>
				<tr>
					<th></th><td><button type="submit" class="submit" name="editsubmit" id="editsubmit" value="true">提交</button></td>
				</tr>
			</table>
			</form>
		</div>
		<%else%>
			<div class="hintinfo">
			该用户不存在，请重新输入 
			</div>
		<%/if%>
		<%/if%>
		<%/if%>
	<!--禁止用户-->
	<%if {operation}=="banusersearch"%>
		<div class="mainbox">
			<h3>禁止用户 - 搜索</h3>
			<form method="post" action="modcp.aspx?operation=banusersearch&op=ban">
			<input type="hidden" value="{operation}" name="operation"/>
			<input type="hidden" value="{op}" name="op"/>
			<table cellpadding="0" cellspacing="0">
				<tbody>
				<tr>
					<th width="20%">用户名</th><td><input name="username" value="" size="20" type="text"></td>
				</tr>
				<tr>
					<th width="20%">UID</th><td><input name="uid" value="" size="20" type="text"> [可选]</td>
				</tr>
				<tr>
					<th></th><td><input type="submit" id="Submit1" value="提交" name="Submit"/></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<%if {op}!="ban"%>
		<div class="hintinfo">
			请首先输入用户名或者 UID 搜索用户，然后进行下一步。搜索 UID 比搜索用户名速度更快且准确
		</div>
		<%else%>
		<%if {uid}>0%>
		<div class="mainbox">
			<h3>禁止用户 - {uname}</h3>
			<form method="post" action="modcp.aspx?operation=banuser">
			<input type="hidden" value={operation} name="operation"/>
			<input type="hidden" value={uname} name="username" >
			<input type="hidden" value={uid} name="uid"/>
			<table cellpadding="0" cellspacing="0">
				<tbody><tr>
					<th width="20%">用户名</th><td>{uname}</td>
				</tr>
				<tr>
					<th width="20%">UID</th><td>{uid}</td>
				</tr>
				<tr>
					<th width="20%">当前状态</th>
					<td><%if {curstatus}=="禁止发言"||{curstatus}=="禁止访问"%>{grouptitle} (有效期至 {groupexpiry})<%else%>正常状态<%/if%></td>
				</tr>
				<tr>
					<th width="20%">变更为</th><td><%if {grouptitle}=="禁止发言"%> <input name="bannew" value="4" type="radio" checked/> 禁止发言<%else%><input name="bannew" value="4" type="radio"/>禁止发言<%/if%><%if {grouptitle}=="禁止访问"%><input name="bannew" value="5" type="radio" checked/>禁止访问<%else%><input name="bannew" value="5" type="radio"/>禁止访问<%/if%></td>
				</tr>
				<tr>
				<th width="20%">期限</th>
				<td>
					<select name="banexpirynew">
						<option value="0">永 久</option>
						<option value="1">1天</option>
						<option value="3">3天</option>
						<option value="5">5天</option>
						<option value="7">7天</option>
						<option value="14">14天</option>
						<option value="30">1个月</option>
						<option value="90">3个月</option>
						<option value="180">半年</option>
						<option value="365">1年</option>
					</select>期限设置仅对禁止发言和禁止访问的操作有效
				</td>
				</tr>
				<tr>
					<th width="20%">理由</th><td><textarea name="reason" rows="4" cols="80">{reason}</textarea></td>
				</tr>
				<tr>
					<th></th><td><input type="submit" class="submit" name="banusersubmit" id="banusersubmit" value="提交"></input></td>
				</tr>

			</tbody></table>
			</form>
		</div>
		<%else%>
			<div class="hintinfo">
			该用户不存在，请重新输入 
			</div>
			<%/if%>
		<%/if%>
	<%/if%>
	<!--用户权限-->
	<%if {operation}=="forumaccesslist"%>
		<div class="mainbox">
			<h1>特殊用户</h1>
			<table summary="" cellpadding="0" cellspacing="0">
				<thead>
				<tr align="center">
					<td width="15%">会员</td>
					<td width="15%">版块</td>
					<th width="8%">浏览主题</th>
					<th width="8%">发表主题</th>
					<th width="8%">回复主题</th>
					<th width="8%">上传附件</th>
					<th width="8%">下载附件</th>
					<td width="15%">版主</td>
				</tr>
				</thead>
				<%if foruminfolist.Count>0%>
				<%loop (ForumInfo) filist foruminfolist%>
				<%loop (string) t filist.Permuserlist.Split('|')%>
				<tr align="center">
				 <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({t.Split(',')[1]})%>
				<td><a href="{forumurl}{aspxrewriteurl}" target="_blank">{t.Split(',')[0]}</a></td>
				<%set (string){aspxforumrewriteurl} = this.ShowForumAspxRewrite({filist.fid},0,{filist.rewritename})%>
				<td><a href="{forumurl}{aspxforumrewriteurl}" target="_blank">{filist.name}</a></td>
				<%set (int){power} = Convert.ToInt32({t.Split(',')[2]})%>
				<%set (string){viewpowerimg} = GetPowerImg({power},{Forums.ForumSpecialUserPower.ViewByUser})%>
				<td><img src="{forumurl}templates/{templatepath}/images/{viewpowerimg}" /></td>
				<%set (string){postpowerimg} = GetPowerImg({power},{Forums.ForumSpecialUserPower.PostByUser})%>
				<td><img src="{forumurl}templates/{templatepath}/images/{postpowerimg}" /></td>
				<%set (string){replypowerimg} = GetPowerImg({power},{Forums.ForumSpecialUserPower.ReplyByUser})%>
				<td><img src="{forumurl}templates/{templatepath}/images/{replypowerimg}" /></td>
				<%set (string){downloadpowerimg} = GetPowerImg({power},{Forums.ForumSpecialUserPower.DownloadAttachByUser})%>
				<td><img src="{forumurl}templates/{templatepath}/images/{downloadpowerimg}" /></td>
				<%set (string){postattachpowerimg} = GetPowerImg({power},{Forums.ForumSpecialUserPower.PostAttachByUser})%>
				<td><img src="{forumurl}templates/{templatepath}/images/{postattachpowerimg}" /></td>
				<td>
					<a href="{forumurl}{aspxrewriteurl}">{filist.moderators}</a>
				</td>
				</tr>
				<%/loop%>
				<%/loop%>
				<%else%>
				<tr align="center"><td colspan="9" align="left">
				当前没有特殊权限用户</td></tr>
				<%/if%>
				<tbody>
				<tr>
					<td colspan="9" align="right">
						<form method="post" action="modcp.aspx?operation=forumaccesslist">
						<input name="formhash" value="5ff4e742" type="hidden">
						用户名: <input name="suser" value="" onclick="this.value='';" type="text">
						<select name="forumid">
						<option value="0">全部</option>
						{forumliststr}
						</select>
						&nbsp;&nbsp;
						<input type="submit" id="Submit1" value="搜索" name="Submit"/>
						</form>
					</td>
				</tr>
			</tbody>
			</table>
		</div>
		<script type="text/javascript">
		function chkallaccess(obj) {
			$('new_post').checked
				= $('new_post').disabled
				= $('new_reply').checked
				= $('new_reply').disabled
				= $('new_postattach').checked
				= $('new_postattach').disabled
				= $('new_getattach').checked
				= $('new_getattach').disabled
				= obj.checked;
		}

		function disallaccess(obj) {
			$('new_view').checked
				= $('new_post').checked
				= $('new_post').checked
				= $('new_reply').checked
				= $('new_postattach').checked
				= $('new_getattach').checked
				= false;
			$('customaccess').disabled
				= $('new_view').disabled
				= $('new_view').disabled
				= $('new_post').disabled
				= $('new_post').disabled
				= $('new_reply').disabled
				= $('new_postattach').disabled
				= $('new_getattach').disabled
				= obj.checked;
		}

		</script>
		<form method="post" action="modcp.aspx?operation=forumaccessupdate">
		<input type="hidden" value="{operation}" name="operation"/>
		<div class="mainbox">
			<h1>编辑用户权限</h1>
			<table summary="" cellpadding="0" cellspacing="0">
			<tbody>
				<tr>
					<td>版块选择</td>
					<td>
						<select name="forumid">
						<option VALUE="0">全部</option>
							{forumliststr}
						</select>
					</td>
				</tr>
				<tr>
					<td width="18%">用户名</td>
					<td><input size="30" value="" id="new_user" name="new_user" type="text"> &nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td>权限变更</td>
					<td>
						<input value="0" name="deleteaccess" id="deleteaccess" onclick="disallaccess(this)" type="checkbox"> 恢复默认 &nbsp;&nbsp;
						<span id="customaccess" style="border: 0px solid rgb(221, 221, 221); padding: 0px;">
						<input value="1" name="new_view" id="new_view" onclick="chkallaccess(this)" type="checkbox"> 禁止查看主题 
						<input value="2" name="new_post" id="new_post" type="checkbox"> 禁止发表主题 &nbsp;&nbsp;
						<input value="4" name="new_reply" id="new_reply" type="checkbox"> 禁止发表回复 &nbsp;&nbsp;
						<input value="8" name="new_postattach" id="new_postattach" type="checkbox"> 禁止上传附件 &nbsp;&nbsp;
						<input value="16" name="new_getattach" id="new_getattach" type="checkbox"> 禁止下载附件
					</td>
				</tr>
				<tr>
					<td></td><td><input type="submit" id="Submit1" value="提交" name="Submit"/></td>
				</tr>
				<tr>
					<td><%if {tip}=="access_successful"%>用户权限更新成功, 请继续操作<%/if%></td><td></td>
				</tr>
			</tbody>
			</table>
		</div>
		<div class="hintinfo">
			通常情况下，用户在版块的权限是根据他的用户组决定的，此处您可以限制某个用户在某版块的权限。<br>注意: 看帖是基本权限，一旦禁止, 其他权限会同时进行禁止。<br>图例说明: <img src="{forumurl}templates/{templatepath}/images/access_normal.gif"> &nbsp; 默认权限&nbsp;&nbsp;&nbsp;&nbsp;<img src="{forumurl}templates/{templatepath}/images/access_allow.gif"> &nbsp;强制允许
		</div>
		</form>
		<%/if%>
	<!--禁止IP-->	
	<%if {operation}=="showbannedlist"%>
		<form method="post" action="modcp.aspx?operation=ipban">
		<div class="mainbox">
			<h3>禁止 IP </h3>
			<input type="hidden" value="{operation}" name="operation"/>
			<table cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<th width="8%"><input class="checkbox" id="chkall" name="chkall" onclick="checkall(this.form)" type="checkbox">删除</th>
						<th>IP 地址</th>
						<th width="20%">地理位置</th>
						<th width="10%">操作者</th>
						<th width="15%">起始时间</th>
						<th width="15%">结束时间</th>
					</tr>
				</thead>
				<%if {counts}>0%>
				<tbody>
				<%loop (IpInfo) showbannedip showbannediplist%>
					<tr>
						<td><%if {showbannedip.username}!=username%><input class="checkbox" id="chkbanip" name="chkbanip" disabled="disabled" value={showbannedip.id} type="checkbox"><%else%><input class="checkbox" id="chkbanip" name="chkbanip" value={showbannedip.id} type="checkbox"><%/if%></td>
						<td>{showbannedip.ip1}.{showbannedip.ip2}.{showbannedip.ip3}.{showbannedip.ip4}</th>
						<td>{showbannedip.location}</td>
						<td>{showbannedip.username}</td>
						<td>{showbannedip.dateline}</td>
						<td><input type="text" name="expiration" id="expiration" size="8" value={showbannedip.expiration}></input><input type="hidden" name ="hiddenexpiration" id ="hiddenexpiration" value={showbannedip.expiration}><input type="hidden" name ="hiddenid" id ="hiddenid" value={showbannedip.id}></td>
					</tr>
				<%/loop%>
				</tbody>
				<%/if%>
			</table>
		</div>		
		<div class="pages_btns">
			<div class="pages">{pagenumbers}</div>
		</div>
		<div class="mainbox">
			<h3>新增要禁止IP </h3>
			<table cellpadding="0" cellspacing="0">
				<tbody>
				<tr>
					<td>
						ip地址:<input name="ip1new" value="" size="1" maxlength="10" type="text"> .
						<input name="ip2new" value="" size="1" maxlength="10" type="text"> .
						<input name="ip3new" value="" size="1" maxlength="10" type="text"> .
						<input name="ip4new" value="" size="1" maxlength="10" type="text">
						　期限: <input name="validitynew" value="30" size="3" type="text"> 天
						<input type="submit" id="Submit1" value="提交" name="Submit"/>
					</td>
				</tr>
				</tbody>
			</table>
		</div>	
		</form>
	<%/if%>
	<%if {operation}=="auditpost" && {admingroupinfo.allowmodpost}==1%>
<!--审核回复-->	
		<div class="mainbox">
			<h3>审核回复范围选择</h3>
			<form action="" method="get">
				<input name="operation" type="hidden" value="{operation}" />
				<table cellspacing="0" cellpadding="0">
					<tbody>
					<tr>
						<td width="40%">版块选择: </td>
						<td width="60%">
							<select name="forumid">
							<option value="0">全部</option>
							{forumliststr}
							</select>
							<select name="tablelist">
							<option value=""></option>
							<%loop table posttablelist%>							
							<option value="{table[id]}" <%if {tableid.ToString()}=={table[id]}%>selected="selected"<%/if%>>分表{table[id]}</option>
							<%/loop%>
							</select>
						</td>
					</tr>
					<tr>
						<td>帖子范围: </td>
						<td>
						<select name="filter">
							<option value="1" <%if {filter}==1%>selected="selected"<%/if%>>未审核的回复</option>
							<option value="-3" <%if {filter}==-3%>selected="selected"<%/if%>>已忽略的回复</option>
					     </select>				    
					  </td>
					</tr>
					<tr>
						<td/><td><input type="submit" value="提交"/></td>
					</tr>
					</tbody>
				</table>
			</form>
		</div>
		<%if {counts}!=0%>
		<form action="" method="post" name="auditpost_form" id="auditpost_form">
		<input name="tableid" type="hidden" value="{tableid}" />
        <%loop (PostInfo) post postlist%>
		<input name="operation" type="hidden" value="{operation}" />	
		<input name="pidlist" type="hidden" value="{post.pid}" />
		<input name="tidlist" type="hidden" value="{post.tid}" />
		<input name="fidlist" type="hidden" value="{post.fid}" />
		<div class="box">
			<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({post.tid},0)%>
			<%set (string){aspxuserrewriteurl} = this.UserInfoAspxRewrite({post.posterid})%>
			<span class="headactions"><a href="{aspxuserrewriteurl}" title="{post.forumname}">{post.poster}</a>  发表于 <a href="{aspxrewriteurl}" title="{post.forumname}">{post.postdatetime}</a></span>
			<h4>{forumnav}»<b>{post.title}</b></h4>
			<table cellspacing="0" cellpadding="4">
			<tbody>
				<tr>
				<td>
					<div style="overflow-y: auto; overflow-x: hidden; height: 120px; width: 100%;">{post.message} </div>
				</td>
				</tr>
			</tbody>
			</table>
			<div style="border: 0pt none; padding-left:0;" class="footoperation">
				<b>理由: </b><input type="text" size="80" value="" name="pm_{post.pid}" id="pm_{post.pid}"/>     
				<b>操作: </b><input type="radio" id="mod_{post.pid}" value="validate" name="mod_{post.pid}" class="radio"/>通过
							<input type="radio" class="radio" value="ignore" id="mod_{post.pid}" name="mod_{post.pid}" checked="" />忽略
							<input type="radio" id="mod_{post.pid}" value="delete" name="mod_{post.pid}" class="radio"/>删除
							<input value="单条操作" id="modbutton_{post.pid}" name="modbutton_{post.pid}" class="submit" type="button" onclick="auditpost({post.pid},this.form.id,{post.tid},{tableid})">
			</div>
		</div>
	    <%/loop%>
		
		<div class="pages_btns">
			<div class="pages">{pagenumbers}</div>
			<span class="postbtn"><input type="submit" value="批量审核" /></span>
		</div>
		</form>		
		<%else%>
		<div class="box"><h4>对不起，没有找到需要审核的回复。</h4></div>
		<%/if%>
<%/if%>
<!--审核主题-->
<%if {operation}=="audittopic" && {admingroupinfo.allowmodpost}==1%>
		<div class="mainbox">
			<h3>审核主题范围选择</h3>
			<form action="" method="get">
			<input name="operation" type="hidden" value="{operation}" />
			<table cellspacing="0" cellpadding="0">
				<tbody>
				<tr>
					<td width="40%">版块选择: </td>
					<td width="60%">
			       	<select name="forumid">
						<option value="0">全部</option>
						{forumliststr}
					</select>
					</td>
				</tr>
				<tr>
					<td>帖子范围: </td>
				    <td>
					<select name="filter">
						<option value="-2" <%if {filter}==-2%>selected="selected"<%/if%>>未审核的主题</option>
						<option value="-3" <%if {filter}==-3%>selected="selected"<%/if%>>已忽略的主题</option>					    
					</select>				    
					</td>
				 </tr>
				<tr>
					<td/><td><input type="submit" value="提交"/></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<%if {counts}!=0%>
		<form action="#" method="post" name="audittopic_form" id="audittopic_form">
		<input name="operation" type="hidden" value="{operation}" />
		<div class="mainbox threadlist">
			<h1>
				<a href="{forumid}">{forumname}</a>
			</h1>
			<table cellspacing="0" cellpadding="0" id="110" summary="110">
				<thead class="category">
					<tr>
						<td>标题</td>
						<td class="author">作者</td>
						<td class="nums">回复/查看</td>
						<td class="lastpost">最后发表</td>
					</tr>
				</thead>					
				<%loop (TopicInfo) topic topiclist%>
				<tbody>
				<tr>
				   <td class="common">
						<input name="topicidlist" type="hidden" value="{topic.tid}" />
						<input name="fidlist" type="hidden" value="{topic.fid}" />
						<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
						<a href="javascript:void(0);" onclick="getpostinfo({topic.tid})" title="{topic.forumname}">{topic.title}</a>
					</td>
					<td class="author">
						<cite>
							<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.posterid})%>
							<a href="{aspxrewriteurl}">{topic.poster}</a>
						</cite>
						<em> {topic.postdatetime}</em>
					</td>
					<td class="nums"><strong>{topic.replies}</strong> / <em>{topic.views}</em></td>
					<td class="lastpost">							
						<em>
						<a href="showtopic.aspx?topicid={topic.tid}&page=end#lastpost">{topic.lastpost}</a></em>
						<cite>by
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.lastposterid})%>
							<a target="_blank" href="{aspxrewriteurl}">{topic.lastposter}</a>
						</cite>
					</td>
				</tr>
				</tbody>
				<tbody id="msgtbody_{topic.tid}" style="display:none">
					<tr><td colspan=5><div id="msg_{topic.tid}"></div></td></tr>
				</tbody>
				<tbody>
					<tr>
					  <td colspan="5" style="padding:0;">
						<div class="footoperation" style="border: 0pt none; padding-left:4px;">
							<b>理由: </b><input type="text" name="pm_{topic.tid}" size="80" id="pm_{topic.tid}"/>     
							<b>操作: </b><input type="radio" class="radio" value="validate" id="mod_{topic.tid}" name="mod_{topic.tid}"/>通过
							<input type="radio" class="radio" value="ignore" id="mod_{topic.tid}" name="mod_{topic.tid}" checked=""/>忽略
							<input type="radio" class="radio" name="mod_{topic.tid}" value="delete" id="mod_{topic.tid}"/>删除
							<input value="单条操作" id="modbutton_{topic.tid}" name="modbutton_{topic.tid}" class="submit" type="button" onclick="javascript:audittopic({topic.tid},getradiovalue('mod_{topic.tid}'),this.form.id,$('pm_{topic.tid}').value)">
						</div>
					  </td>
					</tr>
				</tbody>
				<%/loop%>					
			</table>
		</div>
		<div class="pages_btns">
			<div class="pages">{pagenumbers}</div>
			<span class="postbtn"><input type="submit" value="批量审核" /></span>
		</div>		
		</form>
		<%else%>
		<div class="box"><h4>对不起，没有找到需要审核的主题。</h4></div>
		<%/if%>		
<%/if%>
	<%if {operation}=="editforum"%>
		<div class="mainbox">
			<h3>论坛版块选择</h3>
			<form method="get" action="">
			<input name="operation" type="hidden" value="{operation}" />
			<table cellpadding="0" cellspacing="0">
				<tbody>
				<tr>
				<th width="20%">版块</th>
				<td>
					<select name="forumid">
						<option value="0">全部</option>
						{forumliststr}
					</select>
				</td>
				<td><input type="submit" id="Submit1" value="提交"/></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<%if {forumid}!=0%>
		<div class="mainbox">
			<h3>版块编辑 - {foruminfo.name}</h3>
			<form method="post" action="?operation=updateforum">
			<input name="forumid" type="hidden" value="{foruminfo.fid}" />
			<table cellpadding="0" cellspacing="0">
				<tbody>
				<tr>
				<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({foruminfo.fid},0)%>
					<th width="20%">版块</th><td> {foruminfo.name} [<a href="{aspxrewriteurl}" target="_blank">查看</a>]</td>
				</tr>
				<tr>
				</tr>
				<tr>
					<th width="20%">
					版块描述<br>
					<br>Html 代码 <b>支持</b><br>不支持自定义 Discuz! 代码<br><br>
					<a href="###" onclick="javascript:$('descpreview').innerHTML=$('descnew').value">预览</a>
					</th>
					<td><div id="descpreview"></div><textarea id="descnew" name="descnew" rows="8" cols="80">{foruminfo.description}
					</textarea>
					</td>
				</tr>
				<tr>
					<th width="20%">本版规则<br><br>Html 代码 <b>支持</b><br>不支持自定义 Discuz! 代码<br><br><a href="###" onclick="javascript:$('rulespreview').innerHTML=$('rulesnew').value">预览</a></th><td><div id="rulespreview"></div>
					<%if {alloweditrules}%>
					<textarea id="rulesnew" name="rulesnew" rows="8" cols="80">
					<%else%>
                    <textarea id="rulesnew" name="rulesnew" rows="8" cols="80" disabled readonly>
					<%/if%>
					{foruminfo.rules}</textarea></td>
				</tr>
				<tr>
					<th></th><td><input type="submit" id="Submit1" value="提交" /></td>
				</tr>
				</tbody>
			</table>
			</form>
		</div>
		<%/if%>
		<%/if%>

	<%if {operation}=="logs"%>
		<div class="mainbox">
			<h3>管理日志搜索</h3>
			<form method="get" action="">
			<input name="operation" type="hidden" value="{operation}" />
				<table cellpadding="0" cellspacing="0">
					<tbody>
					<tr>
					<td>
						关键字: <input name="keyword" value="" size="60" type="text">
						&nbsp;&nbsp;&nbsp;&nbsp;每页显示条数
						<input name="lpp" value="20" size="4" type="text">&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="submit" id="searchsubmit" value="true">提交</button></td>
					</tr>
					</tbody>
				</table>
			</form>
		</div>

		<div class="mainbox">
			<h1>管理日志列表</h1>
			<table summary="" cellpadding="0" cellspacing="0">
				<thead>
					<tr>
						<th width="15%">时间</th>
						<th width="15%">用户名</th>
						<th width="10%">管理组</th>
						<td width="10%">IP</td>
						<th width="10%">操作</th>
						<td width="15%">版块</td>
						<td width="5%">其他</td>
					</tr>
				</thead>
				<tbody>
				<%loop logs moderatorLogs%>
					<tr>
						<td>{logs[postdatetime]}</td>
						<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({logs[moderatoruid]})%>
						<td><a href="{aspxrewriteurl}" target="_blank"><b>{logs[moderatorname]}</b></a></td>
						<td>{logs[grouptitle]}</td>
						<td>{logs[ip]}</td>
						<td>{logs[actions]}</td>
						<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({logs[fid]},0)%>
						<td><a href="{aspxrewriteurl}" target="_blank">{logs[fname]}</a></td>
						<td><a href="###" <%if {logs[reason]}!=""%>onmouseover="showMenu(this.id)"<%/if%> id="{logs[_id]}">详情</a></td>
					</tr>
					<div id="{logs[_id]}_menu" class="popupmenu_popup" style="display: none;">
					<ul>
						{logs[reason]}
					</ul>
				</div>
					<%/loop%>
				</tbody>
			</table>
		</div>
		<div class="pages_btns">
			<div class="pages">
		     {pagenumbers}
			</div>
		</div>	
		<%/if%>
<!--主题关注-->
		<%if {operation}=="attention"%>
			<div class="mainbox">
			<h3>论坛版块选择</h3>
				<form action="" method="get">
				<input name="operation" type="hidden" value="{operation}" />
				<table cellspacing="0" cellpadding="0">
					<tbody>
					<tr>
						<td width="60%">关键字: <input name="keyword" value="" size="45" type="text"></td>
						<td width="40%">版块选择: 
						<select name="forumid">
							<option value="0">全部</option>
							{forumliststr}</select>
						</td>
					</tr>
					<tr>
						<td/><td><input type="submit" value="提交"/></td>
					</tr>
					</tbody>
				</table>
				</form>
			</div>
            <%if {counts}>0%>
			<form action="" method="post">
			<div class="mainbox">
				<h1>主题关注列表</h1>
				<input name="forumid" type="hidden" value="{forumid}" />
				<input name="operation" type="hidden" value="{operation}" />
				<table summary="" cellpadding="0" cellspacing="0">
					<thead>
						<tr>
							<th><input type="checkbox" name="chkall" onclick="checkall(this.form, 'topicid')"/>标题</th>
							<th width="10%">作者</th>
							<th width="20%">发布时间</th>
							<td width="20%">最后发表</td>
						</tr>
					</thead>
					<tbody>
					<%loop (TopicInfo) topic topiclist%>
						<tr>
							<td>
							<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({topic.tid},0)%>
							<input type="checkbox" id="topicid" name="topicid" value="{topic.tid}"/><a href="{aspxrewriteurl}" target="_blank">{topic.title}</a></td>
							<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({topic.posterid})%>
							<td><a href="{aspxrewriteurl}" target="_blank">{topic.poster}</a></td>
							<td>{topic.postdatetime}</td>
							<td>{topic.lastpost}</td>
						</tr>
						<%/loop%>
					</tbody>
				</table>
			</div>
			<div class="pages_btns">
				<div class="pages">
				 {pagenumbers}
				</div>
				<span class="postbtn"><select name="disattentiontype" id="disattentiontype">
				  <option value="0" selected="selected">所选主题</option>
				  <option value="7">一星期前</option>
				  <option value="30">一月前</option>
				  <option value="365">一年前</option>
				</select><input type="submit" value="取消关注"></span>
			</div>
			</form>	
			<%else%>
			<div class="box"><h4>对不起，没有找到需要关注的主题。</h4></div>
			<%/if%>
			<%/if%>		
	</div>
</div>
</div>
</div>
<%/if%>
<%else%>
<%template _errmsgbox%>
<%/if%>
<%template _copyright%>
<%template _footer%>