<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="admin_ordinary_pagehelper, localhost_deploy" %>

<!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 runat='server'>
<title>内容编辑页</title>
<link href='/admin/common/client.css' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="/common/client.js" charset="utf-8"></script>
<script type="text/javascript" src="/common/popwindow.js" charset="utf-8"></script>
<script type="text/javascript" src="pagehelper.js" charset="utf-8"></script>
<style type="text/css">
.click {
color:#FFFFFF;
border-bottom:#519AE3 solid 1px;
background-color:#0000ff;
}

ul li {
float:left;
margin-right:5px;

}

ul{
list-style:none;
margin:0px;
padding:0px;
}

ul li a{
	
	
	height:19px;
	padding-top:5px;
	line-height:19px;
	width:80px;
	display:block;
	text-decoration:none;
	font-size:13px;
	text-align:center;
	letter-spacing:2px;
}

.unclick {
color:#0068B7;
border-bottom:#C6DCF1 solid 1px;
background-color:#fff;
}
</style>
<script type="text/javascript">

</script>
</head>
<body >
<%if(Para("do")==""){%>
	<div id="divclass" style="display:none;">
		<select id="selclass" multiple ="true" size="15"  style="width:250px;">
<option value="0">根栏目</option>
<%=ShowClassList(0,"")%>
</select><br />按住Ctrl,然后点击，可以多选。
	</div>
	<div style="width:700px;margin:0px auto;">
	<table border="1">
		<tr>
			<td>函数集合：
			<select onchange="BuildParameter()" id="selfunc">
				<option value="">请选择函数...</option>
				
				<optgroup label="分类通用函数">
				 <option value="ShowClassList">分类下栏目列表(ShowClassList)</option>
				 <option value="ShowClassInfo">显示单条分类信息(ShowClassInfo)</option>
				 <option value="ShowClassPage">分类翻页模板(ShowClassPage)</option>
				 
				</optgroup>
				<optgroup label="内容通用函数">
				 <option value="ShowContentList">分类下内容列表页(ShowContentList)</option> 
				 <option value="ShowContentGoodList">显示推荐列表(ShowContentGoodList)</option>
				 <option value="ShowContentInfo">显示单条内容信息(ShowContentInfo)</option>
				 <option value="ShowContentPage">内容翻页模板(ShowContentPage)</option>
				 
				 
				</optgroup>
				<optgroup label="内容页专用函数">
				 <option value="ShowContentContent">显示文章内容(ShowContentContent)</option>	
				 <option value="ShowContentImage">获得内容图片(ShowContentImage)</option>
				 <option value="ShowContentTags">显示内容标签(ShowContentTags)</option>
				 <option value="ShowContentRelationProduct">显示相关产品(ShowContentRelationProduct)</option>
				 <option value="ShowContentRelationInfo">显示相关信息(ShowContentRelationInfo)</option>
				 
				 
				</optgroup>
				<optgroup label="其他通用函数">
				<option value="ShowBreadBar">面包屑导航栏(ShowBreadBar)</option>
				<option value="ShowVideo">显示视频(ShowVideo)</option>
				</optgroup>
			</select>
			<!--
			<input type="button" value="选择" class="button" onclick="BuildParameter()" />
			-->
			</td>
		</tr>
		<tr>
			<td valign="top">
			<table>
			<tr>
		<td >
		演示图片：
		</td>
		<td>
		<img src="\admin\images\SPACE.GIF" id="imgshow" style="border:solid 1px #cccccc;" />
		</td>
		</tr>
		</table>
			</td>
		</tr>
		<tr id="trgroup" style="display:none;">
			<td>
			函数列表：
			<select onchange="BuildParameter2()" id="sellst">
			
			</select>
			</td>
		</tr>
		<tr style="display:none;">
		<td>
		<ul>
				<li id="licnt"><a id="ahrcnt" class="click" href='#' onclick='SelectItem(1)' onfocus='this.blur()'>手工生成</a></li>	
				<li id="licls"><a id="ahrcls" class="unclick" href='#' onclick='SelectItem(0)'	onfocus='this.blur()'>自动生成</a></li>
			</ul>
		</td>
		</tr>
		
		<tr>
		<td>
			
			<div id="divman">
			
			</div>
			<div id="divauto" style="display:none;">
			<iframe name="freauto" style="display:none;"></iframe>
			<form name="frmauto" id="frmauto" action="pagehelper.aspx" method="post" target="freauto">
			<input type="hidden" value="auto" name="do" />
			<input type="hidden" value="" name="functionname" id="functionname" />
			<table>
				<tr>
				<td nowrap="nowrap">目标分类：</td>
				<td >
					<select id="cid" name="cid" style="width:250px;">
					<option value="0">根栏目</option>
					<%=ShowClassList(0,"")%>
					</select>
				</td>
				</tr>
				<tr>
				<td nowrap="nowrap">原始代码：</td>
				<td>
					<textarea cols="70" rows="15" class="inputbox" id="txtsource" name="txtsource"></textarea>
				</td>
				</tr>
				<tr>
				<td nowrap="nowrap">模板代码：</td>
				<td>
					<textarea cols="70" rows="5" class="inputbox" id="txttemp" name="txttemp"></textarea>
				</td>
				</tr>
				<tr>
				<td nowrap="nowrap" class="tright">记录ID：</td>
				<td>
					<textarea cols="70" rows="3" class="inputbox" id="txtidlst" readonly="readonly" style="background-color:#efefef;"></textarea>
				</td>
				</tr>
			</table>
			</form>
			
			</div>
		</td>
		</tr>
		
		<tr>
		<td>
		<table >
		<tr>
		<td></td>
		<td>
			<input type="button" value="生成" class="button"  onclick="StartBuild()" />
			<input type="button" value="拷贝" class="button"  onclick="CopyText()" />
		</td>
		</tr>
		<tr>
		<td >
		生成代码：
		</td>
		<td>
		<textarea cols="70" rows="10" class="inputbox" id="txthtml"></textarea>
		</td>
		</tr>
		</table>
		</td></tr>
	</table>
	</div>
<%}else if(Para("do")=="auto"){%>	
<script>
	<%
		AddResult ar=AddData();
	%>
	$P('txtidlst').value="<%=ar.IdList%>";
	parent.BuildHTML("<%=ar.Count%>","<%=ar.IdList%>");
</script>
<%}%>
</body>
</html>   

