<%template _header%>
<div id="foruminfo">
	<div class="userinfo">
		<h2><a href="{config.forumurl}">{config.forumtitle}</a> <span> {forumnav}</span><strong>{operationtitle}</strong></h2>
	</div>
</div>
<%if {request[operation]}==""%>
<%if page_err==0%>
<div class="ntforumbox">
<form id="moderate" name="moderate" method="post" action="topicadmin.aspx?action=moderate&operation={operation}">
		<input type="hidden" name="topicid" value="{topiclist}" /> <input type="hidden" name="forumid" value="{forumid}" />
<%if {config.aspxrewrite}==1%>
		<input type="hidden" name="referer" value="showforum-{forumid}{config.extname}" />
<%else %>	
		<input type="hidden" name="referer" value="showforum.aspx?forumid={forumid}">
<%/if%>	
			<div class="titlebar">
				<h3>{operationtitle}</h3>
			</div>
	<div class="forumform">
	<table cellpadding="0" cellspacing="0" border="0">
		<tbody>
			<tr class="list">
						<th class="formlabel">用户名:</th>
						<td class="formbody">&nbsp;{username}&nbsp;<a href="logout.aspx?userkey={userkey}">退出登录</a></td>
			</tr>
		</tbody>
			<%if {operation}=="highlight"%>
		<tbody>
			<tr class="list">
						<th class="formlabel">字体样式:</th>
						<td class="formbody"><input type="checkbox" name="highlight_style_b" value="B" /> <strong>粗体</strong> <input type="checkbox" name="highlight_style_i" value="I" /> <em>斜体</em><input type="checkbox" name="highlight_style_u" value="U" /> <u>下划线</u>
						</td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
						<th class="formlabel">字体颜色:</th>
						<td class="formbody"><!--colorpicker层显示开始-->						
						<script language="javascript" src="templates/{templatepath}/colorpicker.js"></script>
						<input type="text" value="" name="highlight_color" ID="highlight_color"  size="7" class="colorblue" onfocus="this.className='colorfocus';" onblur="this.className='colorblue';" />
						<select name="highlight_colorselect" ID="highlight_colorselect" onChange="selectoptioncolor(this)" style="margin-bottom:2px;">
						    <option value="">默认</option>  
							<option style="background:#FF0000" value="#FF0000"></option>  
							<option style="background:#FFA500" value="#FFA500"></option> 
							<option style="background:#FFFF00" value="#FFFF00"></option> 
							<option style="background:#008000" value="#008000"></option> 
							<option style="background:#00FFFF" value="#00FFFF"></option> 
							<option style="background:#0000FF" value="#0000FF"></option> 
							<option style="background:#800080" value="#800080"></option> 
							<option style="background:#808080" value="#808080"></option>
						</select>
						<img class="img" title="选择颜色" src="templates/{templatepath}/images/colorpicker.gif" id=s_bgcolor onclick="IsShowColorPanel(this);" style="cursor:hand; border:0px;" />
						</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="displayorder"%>
		<tbody>
		<tr class="list">
				<th class="formlabel">级别:</th>
				<td class="formbody">
				<%if {displayorder}>0%>
				<input type="radio" value="0" name="level" />解除置顶
				<%/if%>
				<input name="level" type="radio" value="1"
			    <%if {displayorder}<=1%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /> <input type="radio" value="2" name="level"
			    <%if {displayorder}==2%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" />
				<input type="radio" value="3" name="level"
			    <%if {displayorder}==3%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" />
				</td>
		</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="digest"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">级别:</th>
				<td class="formbody"><%if {digest}>0%>
				<input type="radio" value="0" name="level" />解除精华
				<%/if%>
				<input name="level" type="radio" value="1"
				<%if {digest}<=1%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /> <input type="radio" value="2" name="level"
				<%if {digest}==2%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" />
				<input type="radio" value="3" name="level"
				<%if {digest}==3%>
				 checked="checked"
				<%/if%>
				 /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" /><img src="templates/{templatepath}/images/star_level1.gif" width="16" height="16" />
				</td>
		</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="move"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">目标版块:</th>
				<td class="formbody">
					<select name="moveto" class="colorblue">
						{forumlist}
					</select>
				</td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
				<th class="formlabel">移动方式:</th>
				<td class="formbody">
					<input type="radio" checked="checked" value="normal" name="type" />
				移动主题&nbsp;&nbsp;<input type="radio" value="redirect" name="type" /> 移动主题并在原来的论坛中保留转向
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="close"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">操作：</th>
				<td class="formbody">
					<input type="radio" checked="checked" value="0" name="close" />
				打开主题&nbsp;&nbsp; <input type="radio" value="1" name="close" /> 关闭主题
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="copy"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">目标论坛/分类:</div>
				<td class="formbody">
					<select name="copyto">
						{forumlist}
					</select>
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="split"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">新主题的标题:</th>
				<td class="formbody">
					<input type="text" id="" name="subject" size="45" value="" />
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="merge"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">主题tid:</th>
				<td class="formbody">
					<INPUT size="10" name="othertid" ID="othertid" />&nbsp;
					<%if {config.aspxrewrite}==1%>
					<SPAN class="smalltxt">即将与这个主题合并的主题id,如showtopic-22.aspx，tid 为 22</SPAN>
					<%else%>
					<SPAN class="smalltxt">即将与这个主题合并的主题id,如showtopic.aspx?topicid=22，tid 为 22</SPAN>
					<%/if%>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="type"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">目标分类></th>
				<td class="formbody">
				<select name="typeid" ID="typeid">{topictypeselectoptions}</select>
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="rate"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">作者:</th>
				<td class="formbody">{poster}<INPUT type="hidden" size="10" name="postid" ID="postid" value="{postidlist}" /></td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
				<th class="formlabel">标题:</th>
				<td class="formbody">{title}</td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
				<th class="formlabel">评分:</th>
				<td class="formbody">
						<%loop score scorelist%>
						<div style="padding-left:3px;margin-top:3px;">
						<select name="select" onchange="this.form.score{score[ScoreCode]}.value=this.value">
						  <option value="0" selected="selected">{score[ScoreName]}</option>
						  <option value="0">----</option>
						  {score[options]}
						</select>
						<input size="3" value="0" name="score" id="score{score[ScoreCode]}" />
						<input type="hidden" value="{score[ScoreCode]}" name="extcredits" /> (今日还能评分 {score[MaxInDay]} )
						</div>
						<%/loop%>
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="cancelrate"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">作者:</th>
				<td class="formbody">{poster}<INPUT type="hidden" size="10" name="postid" ID="Hidden1" value="{postidlist}" /></td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
				<th class="formlabel">标题:</th>
				<td class="formbody">{title}</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="identify"%>
		{identifyjsarray}
		<script type="text/javascript">
			function changeindentify(imgid)
			{
				if (imgid != "0" && imgid != "-1")
				{
					$("identify_preview").src = "images/identify/" + topicidentify[imgid];
					$("identify_preview").style.display = "";
				}
				else
				{
					$("identify_preview").style.display = "none";
				}
			}
		</script>
		<tbody>
			<tr class="list">
				<th class="formlabel">鉴定:</th>
				<td class="formbody">
						<select name="selectidentify" id="selectidentify" onchange="changeindentify(this.value)">
							<option value="0" selected="selected">请选择</option>
							<option value="-1">* 取消鉴定 *</option>
						<%loop (TopicIdentify) identify identifylist%>						  
							<option value="{identify.identifyid}">{identify.name}</option>						  
						<%/loop%>
						</select>		
				</td>
			</tr>
		</tbody>
		<tbody>
			<tr class="list">
				<th class="formlabel">图例预览:</th>
				<td class="formbody">
					<img id="identify_preview" style="display: none;" />
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="delposts"%><input type="hidden" size="10" name="postid" ID="postid" value="{postidlist}" /><%/if%>
		<%if {operation}!="identify"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">操作原因:</th>
				<td class="formbody">
				<select id="selectreason" name="selectreason" size="6" style="width: 8em;height:8em; " onchange="this.form.reason.value=this.value" class="colorblue">
                  <option value="">自定义</option>
                  <option value="">--------</option>
                  <option value="广告/SPAM">广告</option>
                  <option value="恶意灌水">恶意灌水</option>
                  <option value="违规内容">违规内容</option>
                  <option value="文不对题">文不对题</option>
                  <option value="重复发帖">重复发帖</option>
                  <option value="发错版块">发错版块</option>
                  <option value="屡教不改">屡教不改</option>
                  <option value="已经过期">已经过期</option>
                  <option value="">--------</option>
                  <option value="我很赞同">我很赞同</option>
                  <option value="精品文章">精品文章</option>
                  <option value="原创内容">原创内容</option>
				  <option value="鼓励分享">鼓励分享</option>
                </select>
				<textarea name="reason" style="height: 8em; width:20em; margin-bottom:-2px;" class="colorblue" onkeydown="if(this.value.length>200){ alert('操作原因不能多于200个字符');return false; }"></textarea>
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {operation}=="split"%>
		<tbody>
			<tr class="list">
				<th class="formlabel">选择内容:</th>
				<td class="formbody">
					<%loop post postlist%><input name="postid" type="checkbox" value="{post[pid]}" /><strong>{post[poster]}</strong><br />
						{post[message]}<br />
					<%/loop%>
				</td>
			</tr>
		</tbody>
		<%/if%>
		<%if {donext}==1%>
		<tbody>
			<tr class="list">
				<th class="formlabel">后续:</th>
				<td class="formbody">
				<input name="next" type="radio" checked="checked" value="" />无
				<%if {operation}!="highlight"%>
				<input type="radio" value="highlight" name="next" />高亮显示
				<%/if%>
				<%if {operation}!="displayorder"%>
				<input type="radio" value="displayorder" name="next" />置顶/解除置顶
				<%/if%>
				<%if {operation}!="digest"%>
				<input type="radio" value="digest" name="next" />加入/解除精华
				<%/if%>
				</td>
			</tr>
		</tbody>
				<%/if%>
		<tbody>
			<tr class="list">
				<td colspan="2" class="formarea">
							<input type="submit" value="提  交" name="modsubmit" class="sbutton" />
				</td>
			</tr>
		</tbody>
	<%if {operation}=="cancelrate"%>
 
		<%if {ratelogcount}>0%>
		<tbody>
			<tr class="list">
			<td colspan="6">
				<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<thead>
					<tr>
						<td colspan="6" align="left">评分日志</td>
					</tr>
				</thead>
				<tr>
					<td><input name="chkall" type="checkbox"  onclick="checkall(this.form, 'ratelogid')" />删除</td>
					<td>用户名</td>
					<td>时间</td>
					<td>评分单位</td>
					<td>评分分值</td>
					<td>理由</td>
				</tr>
				<%loop rateloginfo ratelog%>
				<tr>
					<td><input name="ratelogid" type="checkbox"  value="{rateloginfo[id]}" /></td>
					<td>{rateloginfo[username]}</td>
					<td>{rateloginfo[postdatetime]}</td>
					<td>{rateloginfo[extcreditname]}</td>
					<td>{rateloginfo[score]}</td>
					<td>{rateloginfo[reason]}</td>
				</tr>
				<%/loop%>
				</table>
			</td>
			</tr>
			</tbody>
		<%/if%>
 
	<%/if%>
	</table>
</div>
</form>
</div>
	<%if {operation}=="highlight"%>
		<div  id="ColorPicker" title="ColorPicker" style="display:none;cursor:crosshair;border: black 1px solid;position: absolute; z-index: 10;background-color: aliceblue; width:250px;background: #FFFFFF;padding: 4px; margin-left:150px;" onmouseover="ShowColorPanel();">
						<table border="0" cellPadding="0" cellSpacing="10" onmouseover="ShowColorPanel();">
						<tr>
						<td>
						<table border="0" cellPadding="0" cellSpacing="0" id="ColorTable" style="cursor:crosshair;"  onmouseover="ShowColorPanel();">
						<script type="text/javascript">
						function wc(r, g, b, n){
							r = ((r * 16 + r) * 3 * (15 - n) + 0x80 * n) / 15;
							g = ((g * 16 + g) * 3 * (15 - n) + 0x80 * n) / 15;
							b = ((b * 16 + b) * 3 * (15 - n) + 0x80 * n) / 15;

							document.write('<td BGCOLOR=#' + ToHex(r) + ToHex(g) + ToHex(b) + ' title="#' + ToHex(r) + ToHex(g) + ToHex(b) + '" height=8 width=8 onmouseover="ColorTableMouseOver(this)" onmousedown="ColorTableMouseDown(this)"  onmouseout="ColorTableMouseOut(this)" ></TD>');
						}

						var cnum = new Array(1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0);

						for(i = 0; i < 16; i ++){
							document.write('<TR>');
							for(j = 0; j < 30; j ++){
								n1 = j % 5;
								n2 = Math.floor(j / 5) * 3;
								n3 = n2 + 3;

								wc((cnum[n3] * n1 + cnum[n2] * (5 - n1)),
								(cnum[n3 + 1] * n1 + cnum[n2 + 1] * (5 - n1)),
								(cnum[n3 + 2] * n1 + cnum[n2 + 2] * (5 - n1)), i);
							}

							document.writeln('</TR>');
						}
						</script>
						</table></td>
						<td>
						<table border="0" cellPadding="0" cellSpacing="0" id="GrayTable" style="CURSOR: hand;cursor:crosshair;"  onmouseover="ShowColorPanel();">
						<script type="text/javascript">
						for(i = 255; i >= 0; i -= 8.5)
						document.write('<tr BGCOLOR=#' + ToHex(i) + ToHex(i) + ToHex(i) + '><td TITLE=' + Math.floor(i * 16 / 17) + ' height=4 width=20 onmouseover="GrayTableMouseOver(this)" onmousedown="GrayTableMouseDown(this)"  onmouseout="GrayTableMouseOut(this)" ></td></tr>');
						</script>
						</table></td></tr></table>
						<table border="0" cellPadding="0" cellSpacing="10" onmouseover="ShowColorPanel();">
						<tr>
						<td rowSpan="2">选中色彩
						<table border="1" cellPadding="0" cellSpacing="0" height="30" id="ShowColor" width="40" bgcolor="">
						<tr>
						<td></td></tr></table></td>
						<td rowSpan=2>基色: <span id="RGB"></span><br />亮度: <span id="GRAY">120</span><br />代码: <input id="SelColor" size="7" value="" border="0" name="SelColor" /></TD>
						<td><input type="button" onclick="javascript:ColorPickerOK();" value="确定" ID="ok" class="lightbutton" /></td></tr>
						<tr>
						<td><input type="button" onclick="javascript:document.getElementById('highlight_color').value='';document.getElementById('s_bgcolor').style.background='#FFFFFF';HideColorPanel();" value="取消" ID="Button2" NAME="Button2" class="lightbutton"  /></td></tr></table>
</div>
						<!--colorpicker层显示结束-->
	<%/if%>

<%else%>
<%template _errmsgbox%>
<%/if%>
<%else%>
		<%if page_err==0%>
		<%template _msgbox%>
		<%else%>
		<%template _errmsgbox%>
		<%/if%>
<%/if%>

</div>
<%template _copyright%>
<%template _footer%>
