<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../html/yidacms_htmlurl.asp" -->
<!--#include file="../js/admin_vipkp.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!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>
<META NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>自定义标签！</title>

</head>

<body>
<%
		'版权：世纪伟成(http://yidacms.com)
		'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
		'如果您删除了这里的版权信息,将追究法律责任.
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_tag where id = "&request("id")&""  
		rs.open sql,dbok,1,1
		yidacms_tagt = rs("shuaiweb_tagt")
		rs.close
		set rs=nothing 

        	if request("t")="tag" Then
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_tag where shuaiweb_tagt='"&request.Form("shuaiweb_tagt")&"'"  
		rs.open sql,dbok,1,1

		yidacms_tagt1 =  request.Form("shuaiweb_tagt")

			if len(trim(request.Form("shuaiweb_tagt")))<1 then
				response.write ("<script language=javascript> alert('标签必填且不能少于1个字符!');history.back(-1);</script>")
				response.end
			end if
		  
			if len(trim(request.Form("shuaiweb_tagtitle")))<1 then
				response.write ("<script language=javascript> alert('标签标题不能为空，且不少于1个字符!');history.back(-1);</script>")
				response.end
			end if 
		if yidacms_tagt = yidacms_tagt1 then

				else
		if not rs.bof and not rs.eof then
			Response.Write("<script language=""JavaScript"">alert(""标签已存在!"");history.go(-1);</script>")
			response.end
		end if
		end if

		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_tag where id = "&request("id")&""  
		rs.open sql,dbok,1,3
			rs("shuaiweb_tagt")=trim(request.form("shuaiweb_tagt"))
			rs("shuaiweb_tagtitle")=trim(request.form("shuaiweb_tagtitle"))
			rs("shuaiweb_taghtml")=trim(request.form("shuaiweb_taghtml"))
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('修改成功！');location.replace('admin_tag.asp');</script>"
		End If

		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_tag where id = "&request("id")&""  
		rs.open sql,dbok,1,1
%>

		<table width="98%" height="100%" border="0"cellpadding="10" cellspacing="0" bordercolor="#666666" bgcolor="ffffff" style="border-collapse:collapse" align="center">
		   <form id="form1" name="form1" method="post" action="admin_tagedit.asp?t=tag&id=<%=rs("id")%>">
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">{Yidacms_t:<input name="shuaiweb_tagt" type="text" value="<%=rs("shuaiweb_tagt")%>"/>} <font color=red>(必填)</font> 英文或数字
                        </tr>
			<tr>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">标签名称<br /><input name="shuaiweb_tagtitle" type="text" value="<%=rs("shuaiweb_tagtitle")%>" class="win"/> <font color=red>(必填)</font></td>
			</tr>
			<tr>
			  <td width="90%" onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">信息内容<br /><textarea name="shuaiweb_taghtml" style="width:90%;height:290px;"><%=rs("shuaiweb_taghtml")%></textarea></td>
			</tr>
			<tr>

			  <td><input type="submit" name="Submit" value="提交" class="inanniu"/>
			  <input type="reset" name="Submit2" value="重置" class="inanniu" /></td>
			</tr>
			</form>

			<tr>
				<td>
<script>
 function showText(){
  if(document.getElementById("q").value==2){
   document.getElementById("text").innerHTML="<div style='padding:5px 5px 5px 5px; font-size:12px;'><input type='button' value='隐藏' onclick='hiddenText();' /><br /><br />网站标题 {sys:title} | 网站地址 {sys:weburl} | 公司标题 {sys:gongsibiaoti} | 公司地址 {sys:gongsidizhi}<br />联系电话 {sys:dianhua} | 移动电话 {sys:yidongdianhua} | 传真 {sys:chuanzhen} | QQ {sys:qq} | 联系人 {sys:lianxiren}<br />备案号 {sys:beian} | 邮箱 {sys:youxiang} | 邮编 {sys:youbian} </div>";
  } 
 }
 function hiddenText(){
  document.getElementById("text").innerHTML="";
 }
</script>
<select name="q" id="q" onchange="showText();">
 <option value="1">===查看可用标签===</option>
    <option value="2">基本标签</option>
</select>
<span id="text"></span>
				</td>
			</tr>

		</table>
</body>
</html>
