📄 faq.asp
字号:
<!--#include file="includelogin.asp"-->
<!--#include file="menu.inc"-->
<!--#include file="../incfaq.asp"-->
<%
Dim oConn
Set oConn = FAQ_GetDatabaseConn()
Dim oRS
If Request.QueryString("save")="yes" Then
Set oRS = Server.CreateObject("ADODB.Recordset")
Dim sID
sID = Request.QueryString("fldAuto")
If sID = "" Then
sID = 0
Else
sID = CInt( sID)
End If
oRS.Open "select * from faq where fldAuto = " & sID, oConn, 1, 3
Select Case Request.QueryString("action")
Case "new"
oRS.AddNew
oRS("name").Value = Request.Form("name")
oRS("descr").Value = Request.Form("descr")
Case "edit"
oRS("name").Value = Request.Form("name")
oRS("descr").Value = Request.Form("descr")
Case "del"
oRS.Delete
oConn.Execute "delete from chapter where faq_fldAuto=" & sID
oConn.Execute "delete from question where chapter_fldAuto not in (select fldAuto from chapter)"
End Select
oRS.Update
oRS.Close
Set oRS = Nothing
oConn.Close
Set oConn = Nothing
Response.Redirect "default.asp"
End If
%>
<html>
<head>
<%
''''''''''' (C) Stefan Holmberg 1999
''''''''''' Free to use if these sourcecode lines is not deleted
''''''''''' Contact me at webmaster@sqlexperts.com
''''''''''' http://www.sqlexperts.com
''''''''''' AdMentor homepage at http://www.create-a-webshop.com
Dim name, descr
If Request.QueryString("action") = "edit" Then
Dim oRS2
Set oRS2 = oConn.Execute( "select * from faq where fldAuto = " & Request.QueryString("fldAuto") )
name = oRS2("name").Value
descr = oRS2("descr").Value
oRS2.Close
Else
End If
%>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>PostcardMentor - Admin interface</title>
<style type="text/css">
<!--
body { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
td { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
th { font-family: Arial, Geneva, Helvetica, Verdana; font-size: smaller; color: #000000}
A:link {text-decoration: none;}
A:visited {text-decoration: none;}
A:hover {text-decoration: underline;}
-->
</style>
</head>
<body>
<table align="center" bgColor="#003399" border="0" cellPadding="3" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td vAlign="top" width="50%" height="60">
<b><a href="http://www.aspcode.net"><font color="#ECECD9" face="verdana,arial,helvetica" size="1">http://www.aspcode.net</font></a></b>
</td>
<td vAlign="top" width="468" height="60">
<b><font color="#FFFFFF" face="verdana,arial,helvetica" size="+2">Admin
interface</font></b>
<table border="0" width="100%">
<tr>
<td width="50%">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100%" vAlign="top" width="100%" colspan="2">
<table align="center" bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td height="100%" vAlign="top" width="85%">
<table bgColor="#ffffff" border="0" cellPadding="10" cellSpacing="0" height="100%" width="100%">
<tbody>
<tr>
<td align="left" height="100%" vAlign="top" width="65%">
<table border="0" width="100%">
<tr>
<td width="50%"><b><font color="#aa3333" face="verdana,arial,helvetica" size="4">FAQMentor <%=Session("fullname")%></font></b>
</td>
<td width="50%">
<b><%=FAQ_GetAd(1)%></b>
</td>
</tr>
</table>
<font color="#aa3333" face="verdana,arial,helvetica" size="+2">
<hr color="#000066" noShade SIZE="1">
</font>
<table border="0" width="100%">
<tr>
<td width="70%">
<p align="left"><br>
<%
Dim sURL
sURL = "faq.asp?save=yes&action=" & Request.QueryString("action")
If Request.QueryString("action") <> "new" Then
sURL = sURL & "&fldAuto=" & Request.QueryString("fldAuto")
End If
%>
<form method="POST" action="<%=sURL%>">
<p align="left">Name: <input type="text" name="name" size="40" value="<%=name%>"></p>
<p align="left">Description: <input type="text" name="descr" size="40" value="<%=descr%>"><br>
</p>
<p align="left"><input type="submit" value="Submit" name="B1"></p>
</form>
<p><font face="helvetica, arial" size="2">FAQMentor is
developed by <a href="mailto:webmaster@sqlexperts.com">Stefan
Holmberg</a>. Usage of it is totally free.</font>
<p>
<p>
<p>
<p>
<p>
<p>
<p>
<p><%=FAQ_GetAd(2)%></td>
</tr>
<tr>
<td width="70%">
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -