⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edittemplate.asp

📁 很好的一个论坛原代码
💻 ASP
字号:
<%
if not session("sfadmin") then response.redirect("welcome.asp")
%>
<!--#INCLUDE FILE="../inc/db_inc.asp"-->
<!--#INCLUDE FILE="../inc/char_inc.asp"-->
<HTML>
<HEAD>
<TITLE>Untitled Document</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" href="image/style.css" type="text/css">
</HEAD>

<BODY bgcolor="#FFFFFF" text="#000000" leftmargin="10" topmargin="10">
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open StrConn
%>
<!--#INCLUDE FILE="checkadmin.asp"-->
<%

title = request("title")
text = request("text")

if (text <> "") then
	Conn.execute("UPDATE sf_style SET " & title & "='" & ChkSql(text) & "'")
%>
<TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
  <TR> 
    <TD bgcolor="#D1E3BF" align="center">保存模板<%= title %>完毕</TD>
  </TR>
</TABLE>
<%
else
	strsql = "SELECT TOP 1 " & title & " FROM sf_style where styleid=" & request("styleid")
	Set rs = Conn.execute(strsql)
	if not rs.eof then
		text = rs(title)
		text = server.htmlencode(text)
	else
		text = ""
	end if
%>
<FORM name="form1" method="post" action="">
  <TABLE width="100%" border="0" cellspacing="1" cellpadding="4" align="center">
    <TR> 
      <TD bgcolor="#D1E3BF"><B>编辑模板 - <%= title %></B></TD>
    </TR>
    <TR> 
      <TD bgcolor="#E4EEDB" align="center"> 
        <TEXTAREA name="text" cols="70" rows="20"><%= text %></TEXTAREA>
      </TD>
    </TR>
    <TR>
      <TD bgcolor="#E4EEDB" align="center"> 
        <INPUT type="hidden" name="title" value="<%= title %>">
        <INPUT type="submit" name="Submit" value="确 定">
      </TD>
    </TR>
  </TABLE>
</FORM>
<%
end if
Conn.close
Set Conn = nothing
Set rs = nothing
%>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -