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

📄 edtopic.asp

📁 一般的,简单的的的的的的的的饿的饿恶毒 一般的,简单的的的的的的的的饿的饿恶毒 一般的,简单的的 的的 饿的饿恶毒
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
topicID=request("topicid")
topicClass=request("topicclass")
froms=request.form("froms")
id=request.form("id")
titles=request.form("titles")
bodys=request.form("bodys")
bodys=replace(bodys,chr(10),"[LYL_BR]")
bodys=replace(bodys,chr(13),"")
bodys=replace(bodys,"	","&nbsp;&nbsp;&nbsp;")
if froms="" then
if topicclass="2"then
		topicclass="reply"
	elseif topicclass="1" then
		topicclass="topic"
	else
		response.write("<Script language='javascript'>window.close();</Script>")
	end if
	if topicID="" or topicClass="" then
		response.write("<Script language='javascript'>window.close();</Script>")
	else
		sql="select * from "&topicClass&" where ID="&topicID&""
		set rs=Server.CreateObject("ADODB.Recordset")
		rs.open sql,conn,1,1
	end if
	sss=rs("body")
	sss=replace(sss,"[LYL_BR]",chr(10))
%>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FF0000;
}
body,td,th {
	color: #CC0000;
	font-size: 12px;
}
-->
</style>
<title>编辑文章(<%=rs("Title")%>)</title><table width="500" height="500" border="0" cellpadding="15" cellspacing="0">
  <tr>
    <td valign="top"><table width="100%" height="470"  border="0" cellpadding="9" cellspacing="1" bgcolor="#CCCCCC">
      <tr>
        <td valign="top" bgcolor="#F9F9F9"><table width="100%" height="450"  border="0" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
           <form name="form1" method="post" action=""><tr bgcolor="#F9F9F9">
            <input name="id" type="hidden" value="<%=topicid%>">
			<input name="froms" type="hidden" value="<%=topicClass%>"><td width="50" height="30">标题:</td>
            <td align="center"><input name="titles" type="text" id="titles" value="<%=rs("Title")%>" size="50">              </td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td valign="top">内容:</td>
            <td align="center" valign="top"><textarea name="bodys" cols="49" rows="27" id="bodys"><%=sss%></textarea></td>
          </tr>
          <tr bgcolor="#FFFFFF">
            <td height="30">&nbsp;</td>
            <td align="center"><input type="submit" name="Submit" value="提交">
               
                <input type="reset" name="Submit3" value="还原"> 
                <input type="button" name="Submit2" value="清空" onClick="qk()">
                 
                <input type="button" name="Submit22" value="关闭" onClick="window.close()"></td>
          </tr></form><!-- <!--  --> -->
        </table><Script language="javascript" type="text/javascript">
		function qk(){
		form1.titles.value="";
		form1.bodys.value="";
		}
		</Script></td>
      </tr>
    </table></td>
  </tr>
</table>
<%
else
	if titles="" then
	response.write("标题不能为空!<a href='edtopic.asp?topicID="&topicID&"&topicclass="&topicclass&"'>返回</a>")
	else
		if bodys="" then
			response.write("内容不能为空!<a href='edtopic.asp?topicID="&topicID&"&topicclass="&topicclass&"'>返回</a>")
		else
			conn.execute "update "&froms&" set title='"&titles&"',body='"&bodys&"' where id="&id
			response.write("<Script language='javascript'>opener.location.reload();window.close();</Script>")

		end if
	end if
end if%>

⌨️ 快捷键说明

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