<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../html/yidacms_htmlurl.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>
	<script charset="utf-8" src="<%=webpath%>bianji/kindeditor.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/lang/zh_CN.js"></script>
	<script charset="utf-8" src="<%=webpath%>bianji/plugins/code/prettify.js"></script>

	<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content1"]', {

				uploadJson : '<%=webpath%>uploadclass/upfile_flash.asp',
				fileManagerJson : '<%=webpath%>uploadclass/file_manager_json.asp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
</head>

<body>
<%

		'版权：世纪伟成(http://yidacms.com)
		'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
		'如果您删除了这里的版权信息,将追究法律责任.
		set rs = server.createobject("adodb.recordset")
		sql="select * from book_management"
		rs.open sql,dbok,1,1
		html1 = rs("asp_html")
		set rs=nothing
		
		yidacms_id = cint(request("id"))
		if request("t")="coedit" Then
			if len(trim(request.Form("shuaiweb_cotitle")))<1 then
				response.write ("<script language=javascript> alert('模块名称必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if
		  
			if len(trim(request.Form("shuaiweb_cocontent")))<1 then
				response.write ("<script language=javascript> alert('信息内容不能为空，且不少于1个字符！');history.back(-1);</script>")
				response.end
			end if 
		  
		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_co WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,3
			rs("shuaiweb_cotitle")=trim(request.form("shuaiweb_cotitle"))
			rs("shuaiweb_codescription")=trim(request.form("shuaiweb_codescription"))
			rs("shuaiweb_cocontent")=trim(request.form("shuaiweb_cocontent"))
			rs("shuaiweb_cosort")=trim(request.form("shuaiweb_cosort"))
			rs("wait_cowu")=trim(request.form("wait_cowu"))
			rs("shuaiweb_vipkeywords")=trim(request.form("shuaiweb_vipkeywords"))
			rs("shuaiweb_vipdescription")=trim(request.form("shuaiweb_vipdescription"))
			rs("yida_language")="ch"
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功修改！');location.replace('admin_co.asp');</script>"
		End If
		
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_co WHERE id= "&yidacms_id&""
		rs.open sql,dbok,1,1
%>
		<table width="98%" height="100%" border="0"cellpadding="10" cellspacing="0" bordercolor="#666666" style="border-collapse:collapse"align="center">
		   <form id="form1" name="form1" method="post" action="admin_coedit.asp?t=coedit&id=<%=rs("id")%>">
			<tr>
			  <td width="570"><input type=button onclick="window.location.href('admin_co.asp')"value="返 回" class="inanniu">
                          </td>
                        </tr>
			<tr>
			  <td width="570">模块名称<br /><input name="shuaiweb_cotitle" type="text" id="shuaiweb_cotitle" value="<%=rs("shuaiweb_cotitle")%>" class="win"/> <font color=red>(必填)</font>
                          </td>
                        </tr>
                        <tr>
                        <td>
			  排序 <br />
			  <input name="shuaiweb_cosort" type="text" id="shuaiweb_cosort" value="<%=rs("shuaiweb_cosort")%>" size="5" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" class="win2"/></td>
			</tr>
                        <tr>
                          <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">状态<br /> 
<select name="wait_cowu" id="wait_cowu" class="winla">
<option value="1" <%if rs("wait_cowu")="1" then response.write "selected" end if %>>显示</option>
<option value="2" <%if rs("wait_cowu")="2" then response.write "selected" end if %>>隐藏(可调用)</option>
</select>		  
</td>
			</tr>
			<tr>
			  <td>信息描述<br /><textarea name="shuaiweb_codescription" cols="50" rows="5" id="shuaiweb_codescription" class="wtextarea"><%=rs("shuaiweb_codescription")%></textarea></td>
			</tr>
			<tr>
			  <td width="90%">信息内容<br /><textarea id="content1" name="shuaiweb_cocontent" style="width:100%;height:500px;"><%=rs("shuaiweb_cocontent")%></textarea><font color=red>(必填)</font>
		</td>
			</tr>
			<tr>
			  <td><input type="submit" name="Submit" value="保存" class="inanniu"/>
			  <input type="reset" name="Submit2" value="重置" class="inanniu"/> <input type=button onclick="window.location.href('admin_co.asp')"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>
