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

📄 edit_note.asp

📁 党委网站 党委网站党委网站党委网站党委网站党委网站
💻 ASP
字号:
<%
if session("username")="" or session("usertype")="" then
response.Write"<script>"
response.Write"parent.location.href='default.asp';"
response.Write"</script>"
end if
%>
<!--#include file="conn.asp"-->
<%
if request("action")="edit" then
set rs=server.CreateObject("adodb.recordset")
sql="select * from net_note where id="&request("id")&""
rs.open sql,conn,3,2
rs("title")=request("title")
rs("type")=request("type")
rs("address")=request("source")
rs("datetime")=request("datetime")
rs("content")=request("content")
rs("up")=request("up")
rs("times")=100
rs.update
rs.close
response.Write("<script>")
response.Write("alert('修改成功!');")
response.Write("window.location.href='edit_note.asp?id="&request("id")&"';")
response.Write("</script>")
response.End()
end if
%>
<%
set rs=server.CreateObject("adodb.recordset")
sql="select * from net_note where id="&request("id")&""
rs.open sql,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加信息</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
  <TR> 
    <TD style="HEIGHT: 16px"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="77%"><SPAN class=heading>添加公告提示</SPAN> </td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD height=12 colSpan=2><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td><table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
                          <tr> 
                            <td bgcolor="#CCCCCC" height="1"></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></TD>
  </TR>
  <TR> 
    <TD height="140" colSpan=2 vAlign=top> <div align="center"> 
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td bgcolor="#DBDBDB"> <table width="100%" border="0" cellspacing="1" cellpadding="0">
                <form method="post" name="post" action="edit_note.asp?action=edit">
                  <tr> 
                    <td width="15%" height="25" bgcolor="#FFFFFF"> <div align="right">信息标题:</div></td>
                    <td width="1%" rowspan="7" background="images/gline.gif" bgcolor="#FFFFFF"><img src="images/gline.gif" width="8" height="27"></td>
                    <td width="84%" bgcolor="#FFFFFF"> <input name="title" type="text"  class=input_main id="title" style="width:320px;" value="<%=rs("title")%>">
                    <input name="id" type="hidden" id="id" value="<%=rs("id")%>"></td>
                  </tr>
                  <tr>
                    <td height="25" align="right" bgcolor="#FFFFFF">信息显示:</td>
                    <td bgcolor="#FFFFFF"><input type="radio" name="up" value="1" <%if rs("up")=1 then%>checked<%end if%>>
                      重要
                        <input name="up" type="radio" value="0" <%if rs("up")=0 then%>checked<%end if%>>
                    一般</td>
                  </tr>
                  <tr> 
                    <td height="25" bgcolor="#FFFFFF"> <div align="right">信息类别:</div></td>
                    <td bgcolor="#FFFFFF"> <select name="type" id="type" style="clip:rect(1 84 19 1);magin:-2;width:100;backgroud:#fffff9">
                      <option value="1" <%if rs("type")=1 then%>selected<%end if%>>最新公告</option>
                      <option value="0" <%if rs("type")=0 then%>selected<%end if%>>滚动提示</option>                        
                    </select> </td>
                  </tr>
                  <tr> 
                    <td height="25" bgcolor="#FFFFFF"> <div align="right">发布时间:</div></td>
                    <td bgcolor="#FFFFFF"><input name="datetime" type="text" id="datetime" class=input_main value="<%=rs("datetime")%>" readonly> 
                      <a href="#SelectDate" onClick="javascript:window.open('schtime.asp?form=post&field=datetime','','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=190,height=160,top=60,left=150');"> 
                      <img border="0" src="images/date_picker.gif" width="50" height="17" name="times"></a> 
                      ( <font color="#FF0000">点击调用日历 </font>)</td>
                  </tr>
                  <tr> 
                    <td height="25" bgcolor="#FFFFFF"> <div align="right">信息来源:</div></td>
                    <td bgcolor="#FFFFFF"><input name="source" type="text" id="source" class=input_main value="<%=rs("address")%>" size="45">
                    </td>
                  </tr>
                  <tr> 
                    <td height="151" valign="top" bgcolor="#FFFFFF"> <div align="right">介绍内容:</div></td>
                    <td align="left" valign="top" bgcolor="#FFFFFF" colSpan=2> 
                       <textarea name="content" style="width:480; height:165" id="content" class="sub"><%=rs("content")%></textarea> 
                   </td>
                  </tr>
                  <tr> 
                    <td bgcolor="#FFFFFF">&nbsp;</td>
                    <td height="25" bgcolor="#FFFFFF"> <div align="center"> 
                        <input type="submit" name="Submit" value="修 改" class=sub onClick="return subclick();">
                            
                        <input type="reset" name="reset" value="重 置" class=sub>
                      </div></td>
                  </tr>
                </form>
              </table></td>
          </tr>
        </table>
      </div></TD>
  </TR>
</TABLE>
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
 function subclick()
 {
  if (post.title.value =="")
  {
    alert("标题不能为空!");
    post.title.focus();
    return (false);
  }    
	
       if (post.source.value =="")
   {
    alert("请填写信息来源!");
    post.source.focus();
    return (false);
	}
   }
//-->
</SCRIPT>
<%rs.close%>

⌨️ 快捷键说明

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