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

📄 newedit.asp

📁 基于IIS+ASP的
💻 ASP
字号:

<!--#include file="conn.asp"-->
<!--#include file="error.asp"-->
<%
'johnson code 
user=session("user")
pwd=session("pwd")
chkuser user,pwd

idd=request("idd")
'response.Write(idd)
idno=request("idno")
pid=request("pid")
if idno<>0 then
   	sql="select * from news where id="&idno
	sqlstr2="select * from menu where class=1" 'select news items
	set rs=conn.execute(sql)
	set rs2=conn.execute(sqlstr2)	    
else
   showerr "没有相应的数据!","newlist.asp?idd="&idd&"&pid="&pid		
end if   
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css">
<title>最新动态</title>
</head>

<body bgcolor="#FEFBF1" background="images/sky2.gif">

<p align="center"><a href="xxgl.asp"><font color="0099FF">添加新闻</font></a><font color="0099FF"> | </font><a href="newlist.asp?idd=<%=idd%>"><font color="#0099FF">管理新闻</font></a></p>
	<form name="form1" method="post" action="addnew.asp?idd=<%=idd%>&pd=1">
    <table width="500" border="1" align="center" bgcolor="#CCCCCC">
    <tr>	
      <td width="100"><div align="center">新闻标题</div></td>
      <td width="390"> <input name="title" type="text" value="<%=rs("title")%>" size="55"></td>
    </tr>
  </table>
  <table width="488" height="1%" border="1" align="center" bgcolor="#CCCCCC">
    <%if 1 then %>
    <tr> 
      <td height="136"> 
        <table width="488" height="88%">
          <tr> 
            <td width="181" rowspan="3"><img src="photo/<%=rs("picname")%>"  ></td>
            <td height="73" colspan="2"> 
              <div align="center">
                <input name="idno" type="hidden" id="idno" value=<%=idno%>>
                &nbsp;&nbsp; <a href="newimage.asp?img=1&idno=<%=idno%>&idd=<%=idd%>&pid=<%=pid%>">[修改图片]</a>&nbsp; 
                <a href="newimage.asp?img=2&idno=<%=idno%>&idd=<%=idd%>&pid=<%=pid%>">[删除图片]</a></div></td>
          </tr>
          <tr> 
            <td width="87" height="24"><div align="right">热点新闻</div></td>
            <td width="201"> 
              <% if rs("state")=1 then%>
              <input name="state" type="checkbox" value=1 checked> 
              <%else%>
              <input name="state" type="checkbox" value=1> 
              <%end if%>
            </td>
          </tr>
          <tr> 
            <td ><div align="right">新闻类型</div></td>
            <td> 
              <%
	  tmpi=rs("class")
	  tmpii=1
	  %>
              <select name="newsclass" id="select2">
                <% while not rs2.eof '<option value=<%=rs2("id")%> %>
                <option value=<%=rs2("rdclass")%> 
		       <% 
			   if tmpi=tmpii then
			      response.Write(" selected")
		       end if
			   %>
		  ><%=trim(rs2("title"))%> </option>
                <%
		  tmpii=tmpii+1
		 rs2.movenext
		 wend
		 %>
              </select> <input name="pid" type="hidden" value=<%=pid%>></td>
          </tr>
        </table></td>
    </tr>
    <% end if %>
    <tr> 
      <td><textarea name="nr" cols="67" rows="12"><%=rs("content")%></textarea></td>
    </tr>
    <%select case idd%>
    <% case 33%>
    <tr> 
      <td height="20"> 
        <% if rs("state")=0 then%>
        <input name="state2" type="radio" value="0" checked>
        普通&nbsp;&nbsp;&nbsp; <input type="radio" name="state2" value="1">
        高级 
        <%else%>
        <input name="state2" type="radio" value="0" >
        普通&nbsp;&nbsp;&nbsp; <input type="radio" name="state2" value="1" checked>
        高级 
        <%end if%>
        &nbsp; </td>
    </tr>
    <%end select %>
  </table>
  <br>
  &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <input type="image" name="tj"  src="images/qd.GIF" onmouseover="this.src='images/qd1.gif'"
					onmouseout="this.src='images/qd.gif'">
  &nbsp;&nbsp;&nbsp;&nbsp; <img src="images/qx.GIF" onClick="form1.reset()" onmouseover="this.src='images/qx1.gif'"
					onmouseout="this.src='images/qx.gif'">
</form>
 <%
 rs.close
 rs2.close
 set rs=nothing
 set rs2=nothing
 set conn=nothing
 %> 
</body>
</html>

⌨️ 快捷键说明

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