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

📄 adminfaqmodi.asp

📁 一个不错的个人商务网站的源码
💻 ASP
字号:
<%dim nowplace
nowplace="faq"
dim dbpath
dbpath="../"
%>
<!--#include file="chk.asp"-->
<!--#include file="../db_conn.asp" -->
<!--#include file="../comm/my_request.asp" -->
<!--#include file="../comm/my_lib.asp" -->
<%
id=my_request("id",1)
action=my_request("action",0)
if action="save" then
call save()
end if

set rs=conn.execute ("select question,answer from faq where id="&id)
question=rs(0)
answer=rs(1)
rs.close
set rs=nothing
%>
<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>
</head>
<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);} 
    }
  //--></SCRIPT>
<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=AdminFaqModi.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" value="<%=question%>"><input type="hidden" name="action" value=save><input type="hidden" name="id" value=<%=id%>></td>
	</tr>
	<tr>
		<td width="103">回答:</td>
		<td width="867"><textarea rows="12" name="answer" cols="49"><%=Outleach(answer)%></textarea></td>
	</tr>
	<tr>
		<td width="103"> </td>
		<td width="867"><input type="submit" value="提交" name="B1">&nbsp;
		<input type="reset" value="重置" name="B2"></td>
	</tr></form>
</table>

</body>

</html>
<%
sub save()
question=leach(my_request("question",0))
answer=leach(my_request("answer",0))
conn.execute ("update faq set question='"&question&"',answer='"&answer&"' where id="&id)
call wurl("数据保存成功","AdminFaqList.asp")
end sub
%>

⌨️ 快捷键说明

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