📄 add_info.asp
字号:
<!--#include file="../../conn/conn.asp"-->
<%
if request("submit")<>"" then
if request("content")<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "select * from P_info where subject='"&trim(request("subject"))&"'",conn,1,3
if rs.eof then
rs.addnew
rs("infoleiid")=request("infoleiid")
rs("mysteer")=left(request("infoleiid"),2)
rs("subject")=trim(request("subject"))
rs("fromto")=trim(request("fromto"))
rs("content")=request("content")
rs("infotime")=now()
rs.update
rs.close
response.write "<script>alert('添加成功!');</script>"
else
response.write "<script>alert('主题已存在!');history.go(-1);</script>"
end if
else
response.write "<script>alert('请输入资讯内容!');history.go(-1);</script>"
end if
end if
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css" type="text/css">
<script language=javascript src=ubb/edit.js></script>
<script language=javascript>
function error(msg)
{
window.alert("<%=webname%>提醒您!\n\n " + msg);
return false;
}
function checkform()
{
document.theform.content.value=frames.message.document.body.innerHTML;
if(document.theform.infolei.value==""){
theform.infolei.focus();
return error("请选择资讯类别!");
}
if(document.theform.subject.value==""){
theform.subject.focus();
return error("请输入主题!");
}
if(document.theform.fromto.value==""){
theform.fromto.focus();
return error("请输入来源!");
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="22" bgcolor="ff7300"><b><font color="#FFFFFF">>>发布资讯</font></b></td>
</tr>
</table>
<form name="theform" method="post" action="" onsubmit="return checkform();">
<table width="95%" border="0" cellspacing="1" cellpadding="0" align="center">
<tr>
<td height="22" bgcolor="#C8E3FF">
<div align="right"><b>资讯类别:</b></div>
</td>
<td bgcolor="#eeeeee">
<input type="text" name="infolei" readonly>
<input type="button" name="get2" value="选择" onClick=window.open('info_lei.asp','','width=600,height=350,scrollbars=yes');>
<input type="hidden" name="infoleiid">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="22" bgcolor="#C8E3FF">
<div align="right"><b>主题:</b></div>
</td>
<td bgcolor="#eeeeee">
<input type="text" name="subject" size="50">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td height="22" bgcolor="#C8E3FF">
<div align="right"><b>来源:</b></div>
</td>
<td bgcolor="#eeeeee">
<input type="text" name="fromto" size="50" value="本网">
<font color="#FF0000">* </font></td>
</tr>
<tr>
<td height="22" bgcolor="#C8E3FF">
<div align="right"><b>内容:</b></div>
</td>
<td bgcolor="#eeeeee">
<!--#include file="ubb/eokedit1.asp" -->
<script language="javascript">
document.write ('<iframe src="M_textbox.asp" id="message" width="550" height="250"></iframe>')
frames.message.document.designMode = "On";
</script>
<input type="hidden" name="content" value="">
</td>
</tr>
<tr>
<td height="22">
<div align="right"></div>
</td>
<td>
<input type="submit" name="Submit" value="提交">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -