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

📄 chapters.asp

📁 simulink建模及动态仿真这本书上的例题的代码
💻 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")
		'Change ordering...
		Dim sID, nFldAuto
		sID = Request.QueryString("faq_fldAuto")
		sID = CInt( sID)
		oRS.Open "select * from chapter where faq_fldAuto = " & sID, oConn, 1, 3
		While Not oRS.EOF
			nFldAuto = oRS("fldAuto")
			oRS("orderingfield") = Request.Form("order" & nFldAuto)
			oRS.Update
			oRS.MoveNext
		Wend
		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

Dim oRSChapters
Set oRSChapters = oConn.Execute("select * from chapter where faq_fldAuto=" & Request.QueryString("faq_fldAuto") & " order by orderingfield" )

Dim oRSFAQ, sFAQName
Set oRSFAQ = oConn.Execute ("select * from faq where fldAuto = " & Request.QueryString("faq_fldAuto") )
sFAQName = oRSFAQ("name")
oRSFAQ.Close    

    
%>


<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%">
                            <%=FAQ_GetAd(1)%>
                            </td>
                          </tr>
                        </table>
                        <hr color="#000066" noShade SIZE="1">
                             
                        <p><font size="+1"><%=sFAQName%></font></p>
                             
                             
                        <table border="0" width="100%">
                          <tr>
                            <td width="70%">
<%
Dim sURL
sURL = "chapters.asp?faq_fldAuto=" & Request.QueryString("faq_fldAuto") & "&save=yes"
%>                             
                        <form method="POST" action="<%=sURL%>" name="FrontPage_Form1">
                        <table border="0" width="100%">
                          <tr>
                            <td width="22%" bgcolor="#ECECD9"><b>Chapter name</b></td>
                            <td width="16%" bgcolor="#ECECD9"><b>Ordernumber</b></td>
                            <td width="34%" bgcolor="#ECECD9"><b>Actions</b></td>
                          </tr>
<%
Dim nVal 
nVal = 1
While Not oRSChapters.EOF
Dim sName
sName = "order" & oRSChapters("fldAuto").Value
%>                        
                          <tr>
                            <td width="22%"><%=oRSChapters("name")%></td>
                            <td width="16%">
                            <input type="text" name="<%=sName%>" size="7" value="<%=nVal%>"></td>
                            <td width="34%"><a href="chapter.asp?action=edit&faq_fldAuto=<%=Request.QueryString("faq_fldAuto")%>&fldAuto=<%=oRSChapters("fldAuto")%>">Modify</a> -<a href="chapter.asp?save=yes&action=del&faq_fldAuto=<%=Request.QueryString("faq_fldAuto")%>&fldAuto=<%=oRSChapters("fldAuto")%>"> Delete</a>
                              - <a href="questions.asp?chapter_fldAuto=<%=oRSChapters("fldAuto")%>"> Questions</a></td>
                          </tr>
<%
nVal = nVal + 1
oRSChapters.MoveNext
Wend
%>                        
                        </table>
                             
                        <p align="left">&nbsp;
                          <p align="left"><input type="submit" value="Change chapter ordering" name="B1">&nbsp;&nbsp;&nbsp;&nbsp;
                          <a href="chapter.asp?action=new&faq_fldAuto=<%=Request.QueryString("faq_fldAuto")%>">Add new chapter</a></p>
                        </form>
                             
<p><a href="default.asp">Back to home&nbsp;</a>
                             
                        <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>
                             
                        <table border="0" width="100%">
                          <tr>
                            <td width="50%">
                             <%=FAQ_GetAd(3)%>
                            </td>
                            <td width="50%">
                            <%=FAQ_GetAd(2)%>
                            </td>
                          </tr>
                        </table>
                          </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 + -