📄 admin_msgedit.asp
字号:
<!-- #include file="setup.asp" -->
<!-- #include file="CheckAdmin.asp" -->
<!--#include file="../WoLib/Function.asp"-->
<%
if RequestCookies("Userpass")="" or RequestCookies("Userpass")<>session("pass") then Response.Write ("<script>top.location.href='login.asp';</script>")
if UserRoleID <> 1 then Alert("您没有权限进入后台")
Msg_ID = Request("Msg_ID")
if Msg_ID = "" then
Call MsgBox2("参数不足!",0,"javascript:history.back();")
Response.end
end if
Set Rs = Server.CreateObject("Adodb.recordset")
action = Request("action")
if action = "editArticle" then
Sql = "Select * from Wo_Message where Msg_ID="&Msg_ID
Rs.open Sql,conn,1,2
Rs("Msg_Title") = Request("Msg_Title")
Rs("Msg_Content") = Request("Msg_Content")
Rs("Msg_Source") = Request("Msg_Source")
Rs("Msg_orderby") = Request("Msg_orderby")
Rs("Msg_IsOver") = Request("Msg_IsOver")
Rs("Msg_ModifyTime")= Now()
Rs.Update
Rs.Close
Set Rs = Nothing
if err.Number = 0 then
Call woDig.MsgBox2("编辑成功!",1,"Admin_MsgManage.asp")
Response.end
else
Call woDig.MsgBox2("文章修改失败,原因:"&Err.Description,0,"javascript:history.back();")
Response.end
end if
end if
Sql = "Select * from Wo_Message where Msg_ID="&Msg_ID
Rs.open Sql,conn
if Rs.eof then
Call woDig.MsgBox2("找不到该记录或该记录已经被删除!",1,"Admin_MsgAdd.asp")
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信 息 修 改</title>
<link href="Img/Admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
// 信息表单提交客户端检测
function doSubmit(){
if (document.form.Msg_title.value==""){
alert("请输入标题!");
document.form.Msg_title.focus();
return false;
}
if (document.form.Msg_Content.value==""){
alert("请选择信息类型!");
document.form.Msg_Content.focus();
return false;
}
if (confirm("你确认真检查了您所要发布的文章了吗?")){
return true;
}
return false;
}
</script>
</head>
<body leftmargin="0" topmargin="8">
<form action="Admin_MsgEdit.asp" method="POST" name="form" id="form" onsubmit="return doSubmit()">
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<tr valign="middle" bgcolor="#EAEAEA">
<td height="25" colspan="4" align="center">编辑消息</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="33" colspan="4" align="left" valign="middle"> 消息标题:
<textarea name="Msg_title" cols="80"><%=Rs("Msg_Title")%></textarea>
<font color="#FF0000">
</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="4" align="left" valign="middle">
消息内容:
<textarea name="Msg_Content" cols="80" rows="12"><%=Rs("Msg_Content")%></textarea>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="33" colspan="4" valign="middle"> 消息来源:
<input type="text" name="Msg_source" size="30" class="smallinput" maxlength="100" id="来源" value="<%=Rs("Msg_Source")%>">
排序:
<input type="text" name="Msg_orderby" size="7" value="<%=Rs("Msg_OrderBy")%>">
是否过期:
<input type="radio" name="Msg_IsOver" value="1" <%if Rs("Msg_IsOver")=true then Response.Write(" Checked")%>>是
<input type="radio" name="Msg_IsOver" value="0" <%if Rs("Msg_IsOver")=false then Response.Write(" Checked")%>>否</td>
</tr>
<tr bgcolor="#EAEAEA">
<td height="23" colspan="4" align="center">
<input name="cmdok" type="submit" class="buttonface" value=" 修 改 ">
<input type="reset" value=" 清 除 " name="cmdcancel" class="buttonface">
<input type="hidden" name="action" value="editArticle">
<input type="hidden" name="Msg_ID" value="<%=Msg_ID%>">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -