📄 adminfaqadd.asp
字号:
<%dim nowplace
nowplace="pubnews"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_request.asp" -->
<!--#include file="../comm/my_lib.asp" -->
<%
action=my_request("action",0)
if action="save" then
call save()
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>常见问答发布</title>
<link href=AdminStyle.css rel=stylesheet type=text/css>
<SCRIPT language="javascript">
<!--
function checksubmit()
{
if (document.form1.question.value == "")
{
window.alert("问题说明不能为空!");
document.form1.question.focus();
return (false);}
if (document.form1.answer.value == "")
{
window.alert("答案不能为空!");
document.form1.answer.focus();
return (false);}
document.form1.B1.disabled=true
document.form1.B1.value="正在保存数据……"
}
//--></SCRIPT>
</head>
<body>
<table border="0" width="100%" id="table1" cellpadding="4" style="border:1px solid #183789; border-collapse: collapse; padding-left:4px; padding-right:4px; padding-top:1px; padding-bottom:1px" cellspacing="1">
<form action=AdminFaqAdd.asp name=form1 onsubmit="return checksubmit();" method=post>
<tr>
<td width="100%" colspan="2" background="Image/admin_bg_1.gif" height="25">
<font color="#FFFFFF"><b>常见问题发布:</b></font></td>
</tr>
<tr>
<td width="103">问题:</td>
<td width="867"><input type="text" name="question" size="58"><input type="hidden" name="action" value=save></td>
</tr>
<tr>
<td width="103">回答:</td>
<td width="867"><textarea rows="12" name="answer" cols="49"></textarea></td>
</tr>
<tr>
<td width="103"> </td>
<td width="867"><input type="submit" value="保存数据" name="B1"></td>
</tr></form>
</table>
</body>
</html>
<%
sub save()
question=leach(my_request("question",0))
answer=leach(my_request("answer",0))
conn.execute ("insert into faq (question,answer,addtime) values ('"&question&"','"&answer&"','"&now()&"')")
call wurl("数据保存成功","AdminFaqAdd.asp")
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -