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

📄 edit.asp

📁 北京商务网
💻 ASP
字号:
<%@ codepage ="936" %>
<!--#include file="../../conn/dbconn2.asp" -->

<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK rel="stylesheet" type="text/css" href="../style.css">
<script LANGUAGE="JavaScript">
function check()
{
 if (document.form1.title.value=="")
  {
   alert("请输入新闻标题!")
   document.form1.title.focus()
   document.form1.title.select()
   return
  }
 if (document.form1.content.value=="")
  {
   alert("请输入新闻内容!")
   document.form1.content.focus()
   document.form1.content.select()		
   return
  }
   document.form1.submit()
}
</script>
<SCRIPT language=javascript>
  var upfile_obj;
  function OnUpFile()
  {
   upfile_obj.src=upfile_obj.lowsrc;
   upfile_obj.src=document.forms["form1"].upfile.value;
  }
</SCRIPT>
</HEAD>
<BODY>
<%
if not isEmpty(request("newsid")) then
newsid=request("newsid")
else
newsid=1
end if
Dim sql
Dim rs
Sql="select * from hyxx where newsid="+cstr(newsid)+"" 
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
%>
<form name="form1" method="POST" action="saveedit.asp" enctype="multipart/form-data" >
<input type="hidden" name="newsid" value="<%=newsid%>">
<INPUT name="upfile" onchange=return(OnUpFile()) type=hidden>
<input type="hidden" name="filepath" value="../../hyxx/pic/">
<CENTER>
<TABLE border="0" cellspacing="0" width="600" cellpadding="0">
<TR>
<TD width="100%" align="center"><font color="#ff6600" class="f12"><b>修 改 信 息</b></font></TD><BR>
</TR>
<TR align="center">
<TD width="100%">
<TABLE border="0" cellspacing="0" width="100%" cellpadding="0">
<TR> 
<TD width="18%" align="right" height="30">信息标题:</TD>
<TD width="82%" height="30">
<input type="text" name="title" size="70" class="smallinput" maxlength="100" value="<%=rs("title")%>"></TD>
</TR>
<TR> 
<TD width="18%" align="right" height="30">新闻分类:</td>
    <TD width="82%" height="30">
    <select name="typeid">
    <%
      set rstype=server.createobject("adodb.recordset")
      sqltype="select * from hyxxType"
      rstype.open sqltype,conn,1,1
      do while not rstype.eof
      if rs("typeid")=rstype("typeid") then
         sel="selected"
      else
         sel=""
      end if
      response.write "<option " & sel & " value='"+CStr(rstype("typeID"))+"' name=typeid>"+rstype("type")+"新闻</option>"+chr(13)+chr(10)
      rstype.movenext
      loop
      rstype.close
    %> 
    </select>
    </TD>
  </TR>
  <TR>
<TR>
<TD width="15%" align="right" height="5">推荐信息:</td>
<TD width="85%" valign="middle" height="5">
<INPUT <%if rs("tjnews")=1 then response.write "checked" end if%> name=tjnews type=radio value="1">推荐&nbsp;&nbsp;
<INPUT <%if rs("tjnews")=0 then response.write "checked" end if%> name=tjnews type=radio value="0">不推荐
</TD>
</TR>
<TR> 
<TD width="18%" valign="top" align="right">信息内容:</TD>
<TD width="82%"><textarea rows="10" name="content" cols="70" class="smallarea"><%=replace(rs("content"),"<br>",chr(13))%></textarea>
</TD>
</TR>
<TR> 
<TD width="15%" align="right" height="30">来源:</TD>
<TD width="85%"><INPUT NAME="nfrom" TYPE="TEXT" SIZE=30 maxlength=100 class="smallinput" value="<%=rs("nfrom")%>"></TD>
</TR>
<TR> 
<TD width="15%" align="right">信息是否含有图片</TD>
<TD width="85%">
<INPUT <%if rs("Selectpic")=1 then response.write "checked" end if%> name=catchpic type=radio value="1">包含&nbsp;&nbsp;
<INPUT <%if rs("Selectpic")=0 then response.write "checked" end if%> name=catchpic type=radio value="0">不包含
</TD>
</TR>
<TR> 
<TD width="15%" align="right" height="30">上传图片:</TD>
<TD><iframe name="ad" frameborder=0 width=100% height=30 scrolling=no src=upload.asp></iframe></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
<p><input type="submit" value=" 修 改 " class="smallinput">&nbsp; <input type="button" value=" 返 回 " onclick=history.go(-1); class="smallinput"></p>
</form>
</body>
</html>
<% 
rs.close 
set rs=nothing 
conn.close 
set conn=nothing 
%>

⌨️ 快捷键说明

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