Expand|Select|Wrap|Line Numbers
- <html>
- <head>
- <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
- <meta name="ProgId" content="FrontPage.Editor.Document">
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
- <title>New Page 1</title>
- </head>
- <body bgcolor="#33CCFF">
- <%
- Set objDC = Server.CreateObject("ADODB.Connection")
- objDC.Open Application("fred_connectionstring")
- Set objRS = objDC.Execute("Select Distinct site FROM Results")
- %>
- <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
- <tr>
- <td width="33%"><img border="0" src="images/untitled.jpg"></td>
- <td width="47%">
- <FORM METHOD="POST" NAME="Form1" ACTION="index.asp">
- <p align="left">
- <SELECT NAME="site" SIZE="1" ONCHANGE=Form1.submit()>
- <option selected><% = Request.Form("site") %></option>
- <%
- ' Continue until we get to the end of the recordset.
- Do Until objRS.EOF
- ' For each record we create a option tag and set it's value to the countr
- %>
- <OPTION><%= objRS("site") %></OPTION>
- <%
- ' Get next record
- objRS.MoveNext
- Loop
- %>
- </SELECT> <b><font face="Arial" size="2" color="#008080">Choose a site</font></b></p>
- </FORM>
- <%
- ' Close Data Access Objects and free DB variables
- objRS.Close
- Set objRS = Nothing
- objDC.Close
- Set objDC = Nothing
- %>
- <!-- End first Drop Down -->
- <!--Second drop down -->
- <%
- 'Some code to hide the second drop down until we make a selection from the first
- IF Request.Form("site") = "" Then
- Else
- 'If site has a value then we get a list of cities for the second drop down
- Set objDC = Server.CreateObject("ADODB.Connection")
- objDC.Open Application("fred_connectionstring")
- Set objRS = objDC.Execute("Select epn FROM Results WHERE site = '" & Request.Form("site") & "'" )
- %>
- <FORM METHOD="POST" NAME="Form2" ACTION="index.asp">
- <p align="left">
- <font face="Arial"><font color="#008080"><b>
- <SELECT NAME="epn" SIZE="1" ONCHANGE=Form2.submit()>
- <option selected><% = Request.Form("epn") %></option>
- <%
- ' Continue until we get to the end of the recordset.
- Do Until objRS.EOF
- ' For each record we create a option tag and set it's value to the epn
- %>
- <OPTION><%= objRS("epn") %></OPTION>
- <%
- ' Get next record
- objRS.MoveNext
- Loop
- %>
- <%
- 'Set a hidden value in the second form for the site
- 'so we can pass it along with the epn to the next query
- %>
- </SELECT></b></font><b><font size="2" color="#008080"> Choose a epn</font></b><font color="#008080"><b><input type="hidden" name="site" value="<% = Request.Form("site") %>"></b></font></font></p>
- </FORM>
- <%
- ' Close Data Access Objects and free DB variables
- objRS.Close
- Set objRS = Nothing
- objDC.Close
- Set objDC = Nothing
- End IF
- %>
- <!-- Display the records -->
- </td>
- <td width="20%"><img border="0" src="images/sponsor_exelon.gif"></td>
- </tr>
- </table>
- <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
- <tr>
- <td width="24%"><font color="#33CCFF"><a href="default.asp">
- <font color="#33CCFF">Edit Database (Need Log In )</font></a></font></td>
- <td width="56%">
- <%
- 'Make sure we have submitted a epn and don't show results until we do
- IF Request.Form("epn") = "" Then
- Else
- Set objDC = Server.CreateObject("ADODB.Connection")
- objDC.Open Application("fred_connectionstring")
- Set objRS = objDC.Execute("Select * FROM Results WHERE site = '" & Request.Form("site") & "' AND epn = '" & Request.Form("epn") & "'")
- '[color=red]Assuming I need an ORDER BY ABOVE HERE[/color]
- 'Loop through the database and assign the appropriate values to variables
- 'that we will use later
- Do Until objRS.EOF
- site = objRS("site")
- epn = objRS("epn")
- unit = objRS("unit")
- num_tubes = objRS("num_tubes")
- component = objRS("component")
- tube_size = objRS("tube_size")
- tube_material = objRS("tube_material")
- tube_length = objRS("tube_length")
- straight_ubend = objRS("straight_ubend")
- asme = objRS("asme")
- wear = objRS("wear")
- thin = objRS("thin")
- pit = objRS("pit")
- ref = objRS("ref")
- freq= objRS("freq")
- probe = objRS("probe")
- fill = objRS("fill")
- objRS.MoveNext
- Loop
- objRS.Close
- Set objRS = Nothing
- objDC.Close
- Set objDC = Nothing
- %>
- </div>
- <p align="left"><br>
- </p>
- <p align="left"><b><font face="Arial" size="2" color="#008080">Information you requested: </font>
- <font face="Arial" size="3" color="#30303"> <% Response.Write epn & " at " & site %> </font></b>
- <br>
- <font face="Arial" size="4" color="#008080">
- <%
- 'Set up the display of the record
- Response.Write "Site: " & site & "<br>"
- Response.Write "EPN: " & epn & "<br>"
- Response.Write component & "<br>"
- Response.Write "# of Tubes: " & num_tubes & "<br>"
- Response.Write "Size: " & tube_size & "<br>"
- Response.Write "Material: " & tube_material & "<br>"
- Response.Write "Length: " & tube_length & "<br>"
- Response.Write "U-Bend or Straight: " & straight_ubend & "<br>"
- Response.Write "ASME: " & asme & "<br>"
- Response.Write "WEAR: " & wear & "<br>"
- Response.Write "THIN: " & thin & "<br>"
- Response.Write "ID Pitting: " & pit & "<br>"
- Response.Write "Referance: " & ref & "<br>"
- Response.Write "Freq's: " & freq & "<br>"
- Response.Write "Probe: " & probe & "<br>"
- Response.Write "Fill: " & fill & "<br>"
- End IF
- %>
- </font>
- </p>
- <p align="left">
- <a href="file:\\Exelon1\exelon1\CORESTAR\<%Response.Write site & "\Unit_" & unit & "\" & epn %>" title="">Database On Computer.</A>
- <a href="./standards/<%Response.Write asme & ".pdf" %>" title="Adobe">ASME Standard drawing.</A>
- </table>
- <p align="center"><img border="0" src="./images/<%Response.Write site & "_" & epn & ".jpg" %>"></p>
- </body>
- </html>