<%'guidedisplay=1%>
<!--#include file="admin_start.asp" -->

<%

if request("label_type")<>"" then
label_type=request("label_type")
else
label_type=0
end if
%>
<body topmargin="30" marginwidth="10" marginheight="10">
<form name=edit_template target=admin_edit_template method=post><input type=hidden name=c value=''><input type=hidden name=c_sql value=''><input type=hidden name=formname value=''><input type=hidden name=inputname value=''></form>
<form name=edit_sql target=admin_edit_sql method=post><input type=hidden name=c value=''><input type=hidden name=formname value=''><input type=hidden name=inputname value=''></form>
<form name=template_label action="admin_template_label_edit_handle.asp?action=add" method=post>
<table cellpadding="3" cellspacing="4" width="90%" height="30" align=center style='border:1px solid #ebebeb' >
	<tr>
		<td width="2%" align=right><img alt='点击弹开编辑框' onclick="opencat(basic_open)" style='CURSOR: hand' src="Images/index_search.gif" width="8" height="16"></td>
		<td  width="98%" align=left>
		<font color="#ebebeb"> | </font>
		<img alt='点击弹开提示信息框' onclick="opencat(help_ads_open)" style='CURSOR: hand' src="Images/icon_info.gif" width="13" height="13" hspace="0" align="absmiddle">			
		<font color="#ebebeb"> | </font>
		添加标签
	    </td>
	</tr>		
	<tr id="help_ads_open" style="display:  ">
		<td colspan="10" align=left>
		<table cellpadding="4" cellspacing="2" width="99%" height="30" align=center style='border:1px dashed #B7B7B7' >
			<tr>
				<td colspan="8" width='100%' style="line-height:150% ">
				·您可以更改用户的类型<br>
				·通过更改登陆ip锁定可以解除用户错误的操作造成的无法登陆！<br>
				·通过重置取回密码问题和答案可以帮助用户在忘记密码和密码提示问题的情况下恢复用户权限！<br>
			</td>
			</tr>
		</table>
		</td>
	</tr>
	
	<tr id="basic_open" >
		<td colspan="10" align=left style='padding-bottom:5px'>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width="15%" align=right>标签类型:</td>
				<td  width="85%" align=left>
				<select name=label_type onchange='cc();'>
				<option value='0' <%if label_type=0 then response.write "selected"%>>静态标签</option>
				<option value='1' <%if label_type=1 then response.write "selected"%>>动态标签</option>
				</select>				
				<script language="javascript" defer>
				function cc(){
				window.location="admin_template_label_add.asp?label_type="+document.template_label.label_type.value;
				}
				</script>
				   

				</td>
			</tr>
			<tr>
				<td  width="15%" align=right>所属模版方案:</td>
				<td  width="85%" align=left>
				  <select name=label_project >
				  <option value=0 <%if request("id")="0" then response.write "selected"%>>公用</option>
				  <%
				  rs.open "select sort_id,sort_name from jins_template_sort where sort_up=0 ",conn,1,1
				  do while not rs.eof
				  response.write "<option value="&rs("sort_id")&"  "
				  if request("id")=""&rs("sort_id") then 
				 	 response.write "selected"
					 'label_p=rs("sort_name")
				  end if
				  response.write ">"&rs("sort_name")&"</option>"
				  rs.movenext
				  loop
				  rs.close
				  if request("id")<>"0" then session("FB_EM_1_SQL_template_label_projece")=request("id") else session("FB_EM_1_SQL_template_label_projece")=""
				  %>
				  </select>
				</td>
			</tr>
			<tr>
				<td  width="15%" align=right>标签标识:</td>
				<td  width="85%" align=left>
				  <input name=label_name value='' size=25 >
				  <select name=label_link >
				  <option value=0>一般标签</option>
				  <option value=1>快捷标签</option>
				  </select>


				</td>
			</tr>
			<tr>
				<td  width="15%" align=right>加入时间:</td>
				<td  width="85%" align=left>
				<input name=label_addtime value='<%response.write now()%>' size=25 >
				</td>
			</tr>
			
			<tr>
				<td  width="15%" align=right>标签缓存周期:</td>
				<td  width="85%" align=left>
				<input name=label_cache_timeout value='0' size=7 > 秒( 0 表示不缓存)
				</td>
			</tr>
			
			<tr>
				<td  width="15%" align=right valign=top >标签描述:</td>
				<td  width="85%" align=left>
                <textarea id="label_description" name="label_description" cols="70" rows="3"></textarea>
			    </td>
			</tr>
		</table><br>
		<%
		'////////////////////////////////////////////////////////////////////////////////////////////////////////
		if label_type=1 then
		%>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width="15%" align=right valign=top>sql语句:</td>
				<td  width="85%" align=left>
                <textarea id="label_sql" name="label_sql" cols="70" rows="5"></textarea>
				<a title='点击进行详细编辑！' href="javascript:openedit_sql('template_label','label_sql');" >
				<img border=0 src="Images/old.gif" width="21" height="20" align="top">
				</a>
				</td>
			</tr>
			<tr>
				<td  width="15%" align=right  >列数:</td>
				<td  width="85%" align=left>
                <input id="label_argument_1" name="label_argument_1" value='' size=83 >
			    </td>
			</tr>
			<tr>
				<td  width="15%" align=right  >行分割符:</td>
				<td  width="85%" align=left>
				<select  name="label_argument_2_c" onchange='ccc();'>
				<option value='' selected>无</option>
				<option value='br' selected>换行[< br >]</option>
				<option value='td' >列[< td >]</option>
				<option value='tr' >行[< tr >]</option>
				<option value='table' >表格[< table >]</option>
				<option value='div' >层[< div >]</option>
				<option value='p' >回车换行[< p >]</option>
				</select>				
				<input id="label_argument_2" name="label_argument_2" value='' size=60>
				<script language="javascript" defer>
				function ccc(){
				document.template_label.label_argument_2.value=document.template_label.label_argument_2_c.value;
				}
				</script>

			    </td>
			</tr>
			<tr>
				<td  width="15%" align=right >每页显示:</td>
				<td  width="85%" align=left>
				 <input id="label_argument_3" name="label_argument_3" value='' size=76 > 条纪录
			    </td>
			</tr>
			<tr>
				<td  width="15%" align=right valign=top>排序字段:</td>
				<td  width="85%" align=left>
                <textarea wrap="off" id="label_argument_4" name="label_argument_4" cols="70" rows="5"></textarea>
				<a title='点击进行详细编辑！' href="javascript:openedit_template('template_label','label_argument_4','public,link,sql?order=y','','<%=int(timer)%>','自定义标签排序字段编辑 > 新增标签 > '+template_label.label_name.value);" >
				<img border=0 src="Images/old.gif" width="21" height="20" align="top">
				</a>
				</td>
			</tr>
			<tr>
				<td  width="15%" align=right valign=top>插入栏:</td>
				<td  width="85%" align=left>
                <textarea wrap="off" id="label_argument_5" name="label_argument_5" cols="70" rows="5"></textarea>
				<a title='点击进行详细编辑！' href="javascript:openedit_template('template_label','label_argument_5','object,private?project='+template_label.label_project.value+',public,link','','<%=int(timer)%>','自定义标签插入栏编辑 > 新增标签 > '+template_label.label_name.value);" >
				<img border=0 src="Images/old.gif" width="21" height="20" align="top">
				</a>
				</td>
			</tr>
			<tr>
				<td  width="15%" align=right valign=top>循环体:</td>
				<td  width="85%" align=left>
                <textarea wrap="off" id="label_argument_0" name="label_argument_0" cols="70" rows="20">支持公共标签，自定义标签，栏目标签，字段标签</textarea>
				<a title='点击进行详细编辑！' href="javascript:openedit_template('template_label','label_argument_0','object,private?project='+template_label.label_project.value+',public,link,sql','','<%=int(timer)%>','自定义标签循环体源码编辑 > 新增标签 > '+template_label.label_name.value);" >
				<img border=0 src="Images/old.gif" width="21" height="20" align="top">
				</a>
				</td>
			</tr>
		</table>
		<br>
		<%end if%>
		<table cellpadding="4" cellspacing="2" bgcolor='#f7f7f7' width="99%" height="30" align=center style='border:1px dashed #808080;padding:20px' >
			<tr>
				<td  width="15%" align=right valign=top>标签内容:</td>
				<td  width="85%" align=left>
                <textarea wrap="off" id="label_content" name="label_content" cols="70" rows="20">
支持自定义标签，公共标签，栏目标签
				<%if label_type=1 then%>
<!--循环开始，请不要修改下面的标签！！//-->
{$loop$}
<!--//循环结束-->
				<%end if%>
				</textarea>
				<a title='点击进行详细编辑！' href="javascript:openedit_template('template_label','label_content','object,private?project='+template_label.label_project.value+',public,link','','<%=int(timer)%>','自定义标签标签内容编辑 > 新增标签 > '+template_label.label_name.value);" >
				<img border=0 src="Images/old.gif" width="21" height="20" align="top">
				</a>

				</td>
			</tr>
		</table>
		<br>
		</td>
	</tr>

	<tr>
		<td height='1' colspan="9" background='images/dot03.gif'></td>
	</tr>
	
	<tr>
	  <td height='30' colspan="8" width='100%' align=center >
	  <input type=submit value="提交设置！" >
	   <input type=reset value="重置" > 
	   <input onclick='history.back(-1)' type=button value="返回" >	  </td>
	</tr>
</table>		
<SCRIPT language=javascript>
	function opencat(cat)
	{
 	 	if(cat.style.display=="none"){
     	cat.style.display="";
  		} else {
     	cat.style.display="none"; 
  		}
	}</SCRIPT>
</form>
<!--#include file="admin_end.asp" -->