editarticle.asp

来自「短信平台 短信平台 短信平台」· ASP 代码 · 共 131 行

ASP
131
字号
<%
  if session("admin")="" then
  response.redirect "admin.asp"
  else
	if session("flag")>2 then
		response.write "<br><p align=center>您没有操作的权限</p>"
		response.end
	end if
  end if
%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp"-->
<!--#include file="code.asp"-->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>修 改 文 章</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
<br><br>
<form method="POST" action="adminsave.asp?id=<%=request("id")%>&action=edit">
  <div align="center"><center><table cellspacing="0" width="80%" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
    <tr>
      <td width="100%" bgcolor="#999999" height="20"><font color="#FFFFFF"><center><p><b>修 改 文 章</b></font></td>
    </tr>
    <tr align="center">
      <td width="100%"><table border="0" cellspacing="1" width="100%">
            <tr> 
              <td width="15%" align="right" valign="top" height="20"><b>文章类型:</b></td>
              <td width="85%"> <select class="smallSel" name="classid" size="1">
                  <%
	dim rs,sql,sel
	dim classid,Nclassid
	classid=request("classid")
	Nclassid=request("Nclassid")
 	set rs=server.createobject("adodb.recordset")
  	sql="select * from Aclass"
 	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "Not record."
	else
	do while not rs.eof
        if classid=cstr(rs("classid")) then
               sel="selected"
        else
               sel=""
        end if	
	response.write "<option " & sel & " value='"+CStr(rs("classID"))+"' name=classid>"+rs("class")+"</option>"+chr(13)+chr(10)
	rs.movenext
    	loop
	end if
	rs.close
%>
                </select> &nbsp;&nbsp;选择分类: 
                <select name="Nclassid" size="1">
                  <%
  	sql="select * from ANclass"
 	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		response.write "Not record."
	else
        do while not rs.eof
        if Nclassid=cstr(rs("Nclassid")) then
               sel="selected"
        else
               sel=""
        end if	
        response.write "<option " & sel & " value='" +  Cstr(rs("Nclassid")) + "'>" + rs("Nclass") + "</option>"
        rs.MoveNext
        Loop
	end if
        rs.close
%>
                </select>
                ** </td>
            </tr>
            <%
	sql="select * from articles where articleid="&request("id")
	rs.open sql,conn,1,1
%>
            <tr> 
              <td width="15%" align="right" height="30"><b>文章标题:</b></td>
              <td width="85%" height="30"><input type="text" name="txttitle" size="70"
          class="smallinput" maxlength="100" value="<%=rs("title")%>"></td>
            </tr>
            <tr> 
              <td width="15%" align="right" valign="top"><b>文章内容:</b> <p>&nbsp;</p>
                <p><b><font color="#FF0000">请注意:标题是发送给用户的实际信息。为方便管理建议将标题的内容复制到内容里面,保持一致!</font></b></p></td>
              <td width="85%"><textarea rows="15" name="txtcontent" cols="60" class="smallarea">
<%
	content=replace(rs("content"),"<BR>",chr(13))
	content=replace(content,"&nbsp;"," ")
	response.write content
%>
	</textarea></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>相关文章:</b></td>
              <td width="85%" height="30"><input type="text" name="key" size="70"
          class="smallinput" maxlength="100" value=<%=rs("Nkey")%>></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>作者:</b></td>
              <td width="85%" height="30"><input type="text" name="writer" size="70"
          class="smallinput" maxlength="100" value=<%=rs("writer")%>></td>
            </tr>
            <tr> 
              <td width="15%" align="right" height="30"><b>来源:</b></td>
              <td width="85%" height="30"><input type="text" name="writefrom" size="70"
          class="smallinput" maxlength="100" value=<%=rs("writefrom")%>></td>
            </tr>
          </table>
      </td>
    </tr>
  </table>
  </center></div><div align="center"><center><p><input type="submit" value=" 添 加 "
  name="cmdok" class="buttonface">&nbsp; <input type="reset" value=" 清 除 "
  name="cmdcancel" class="buttonface"></p>
  </center></div>
</form>
</body>
</html>
<%
	set rs=nothing
	conn.close
	set conn=nothing
%>

⌨️ 快捷键说明

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