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

📄 admin_addaffiche.asp

📁 冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统冠龙科技企业自助建站系统
💻 ASP
字号:
<%@ LANGUAGE="VBScript" %>
<!--#include file="../inc/conn.asp"-->
<!--#include file="admin.asp"-->
<!--#include file="Inc/articlechar.inc"-->
<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗?"))
     return true;
   else
     return false;
}
</script>
<%
if Request.QueryString("no")="yes" then
 id= Trim(Request("id"))
 Set Rs = Server.CreateObject("ADODB.Recordset")
 Rs.Open "DELETE FROM Affiche Where id="&id,Conn,2,3,1
 Set Rs= Nothing
 Response.Redirect "Admin_AddAffiche.asp"
end if

if Request.QueryString("mark")="ynkj" then
If request.form("title")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入标题,请返回检查!!"");history.go(-1);</script>")
response.end
end if
If request.form("content")="" Then
Response.Write("<script language=""JavaScript"">alert(""错误:您没输入公吿内容,请返回检查!!"");history.go(-1);</script>")
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select top 1 * from Affiche"
rs.open sql,conn,1,3

rs.addnew
if request.form("html")="on" then
rs("content")=request.form("content")
else
rs("content")=htmlencode2(request.form("content"))
end if
rs("title")=request.form("title")
rs("time")=date()
rs.update
rs.close
response.redirect "Admin_AddAffiche.asp"
end if

Set rs = Server.CreateObject("ADODB.Recordset")
sql="select  * from Affiche"
rs.open sql,conn,1,1
%>

<!-- #include file="Inc/Head.asp" -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"><table width="560" border="0" cellpadding="0" cellspacing="1" class="border">
        <tr> 
          <td class="topbg" height="25"> <div align="center">发布网站公告 
              </div></td>
        </tr>
        <tr> 
          <form method="POST" action="Admin_AddAffiche.asp?mark=ynkj">
            <input type=hidden readonly name="Name"   value="管理员">
            <td>
<div align="center"> 
                <table width="100%" border="0" cellspacing="1" cellpadding="0">
                  <tr> 
                    <td width="22%" height="25" align="center" class=tdbgl> 
                      中文公告标题:</td>
                    <td width="78%" class="tdbg">
<input name="title" type="text" size="54" maxlength="100">                    </td>
                  </tr>
                  <tr> 
                    <td height="22" align="center" class=tdbgl> 
                      中文公告内容:</td>
                    <td class="tdbg">
<textarea rows="8" name="Content" cols="45"></textarea>                    </td>
                  </tr>
                  <tr> 
                    <td height="25" class=tdbgl>&nbsp;</td>
                    <td height="25" class=tdbg>是否支持html
                      <input type="checkbox" name="html" value="on">
                      <input type="submit" value="提交公告" name="B1">
                      <input type="reset" value="全部重写" name="B2"></td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="1" cellpadding="0">
                  <tr class=tdbg> 
                    <td width="63%" height="25" class=Title> <div align="center">中英文公告标题</div>
                      <div align="center"></div></td>
                    <td width="18%" class="Title"> <div align="center">加入时间</div></td>
                    <td width="9%" class="Title"> <div align="center">操作</div></td>
                    <td width="10%" class="Title"> <div align="center">操作</div></td>
                  </tr>
                  <% do while not Rs.eof %>
                  <tr class=tdbg> 
                    <td height="22" class=tdbg> <div align="center"><%=rs("Title")%><br>
                        <%=rs("enTitle")%></div>
                      <div align="center"></div></td>
                    <td> <div align="center"><%= FormatDateTime(rs("time"),2) %><br>
                    </div></td>
                    <td> <div align="center"><a href="Admin_editAffiche.asp?id=<%=Rs("id")%>">修改</a></div></td>
                    <td> <div align="center"><a href="Admin_AddAffiche.asp?id=<%=Rs("id")%>&amp;no=yes" onClick="return ConfirmDel();">删除</a></div></td>
                  </tr>
                  <%Rs.MoveNext 
loop 
%>
                </table>
              </div></td>
          </form>
        </tr>
      </table>
      <br> <br> </td>
  </tr>
</table>
<%
Set Rs = Nothing 
Set Conn = Nothing 
rs.close
Conn.close
%>
<!-- #include file="Inc/Foot.asp" -->

⌨️ 快捷键说明

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