home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Documentation / testinstallation / courses.cfm < prev    next >
Encoding:
Text File  |  1999-04-12  |  7.2 KB  |  229 lines

  1. <CFIF Server.OS.Name IS NOT "UNIX">
  2.     <!-- Lookup department name -->
  3.     <CFQUERY Name="Department" DataSource="cfsnippets">
  4.         SELECT Dept_Name FROM Departments
  5.             WHERE Dept_ID = '#Form.Department#' 
  6.     </CFQUERY>
  7.  
  8.     <!-- Get courses offered by department -->
  9.     <CFQUERY Name="Courses" DataSource="cfsnippets">
  10.         SELECT * FROM CourseList
  11.             WHERE Dept_ID = '#Form.Department#' 
  12.     </CFQUERY>
  13. <CFELSE>
  14.     <!-- Lookup department name -->
  15.     <CFQUERY Name="Department" DataSource="cfsnippets">
  16.         SELECT Dept_Name FROM Departments
  17.             WHERE Dept_ID = '#Form.Department#' 
  18.     </CFQUERY>
  19.  
  20.     <!-- Get courses offered by department -->
  21.     <CFQUERY Name="Courses" DataSource="cfsnippets">
  22.         SELECT * FROM CourseList
  23.             WHERE Dept_ID = '#Form.Department#' 
  24.     </CFQUERY>
  25. </CFIF>
  26.  
  27. <HTML>
  28. <HEAD><TITLE>ColdFusion University Course Search</TITLE>
  29. </HEAD>
  30. <script language="Javascript">
  31.  
  32. var DocRemote = 0;
  33.  
  34. function makeRemote(){
  35.  
  36.     if(DocRemote){
  37.         if(DocRemote.closed){
  38.             DocRemote = 0;
  39.             makeRemote();
  40.         }else{
  41.             DocRemote.focus();
  42.         }
  43.     }else{
  44.         DocRemote = window.open('../search.cfm', 
  45.                         'Search', 
  46.                         'scrollbars,resizable,width=510,height=300');
  47.         }
  48. }
  49.  
  50. </script>
  51.  
  52. <script language="JavaScript1.1">
  53.  
  54.     blank = new Image();
  55.     blank.src = '../images/mouseovers/blank.gif';
  56.     
  57.     imgBack = new Image();
  58.     imgBack.src = '../images/mouseovers/back.gif';
  59.  
  60.     imgSearch = new Image();
  61.     imgSearch.src = '../images/mouseovers/search.gif';
  62.  
  63.     imgTop = new Image();
  64.     imgTop.src = '../images/mouseovers/toplevel.gif';
  65.  
  66.     imgUp = new Image();
  67.     imgUp.src = '../images/mouseovers/uplevel.gif';
  68.  
  69.     imgNext = new Image();
  70.     imgNext.src = '../images/mouseovers/next.gif';
  71.  
  72. </script>
  73. </head>
  74.  
  75. <body background="../images/bgblue.gif" bgcolor="#99CC99" text="#333333" vlink="#669966">
  76. <basefont size=2 face="Arial, Helvetica">
  77. <center>
  78. <table width="600" border="0" cellspacing="0" cellpadding="2" bgcolor="#000066">
  79. <tr><td><font face="arial, geneva, helvetica, sans serif" size=0 color=white><a name="top"></a>
  80.  
  81. <table border="0" cellspacing="0" cellpadding="0" bgcolor="white" width=600>
  82.  
  83. <tr>  <!--- 7 cols. Col 7 = color only --->
  84. <td width=50 nowrap bgcolor="000066"></td>
  85. <td width=25 nowrap bgcolor="000066"></td>
  86. <td width=25 nowrap bgcolor="000066"></td>
  87. <td width=425 nowrap bgcolor="000066"></td>
  88. <td width=50 nowrap bgcolor="000066"></td>
  89. <td width=13 nowrap bgcolor="000066"></td>
  90. <td width=2 nowrap rowspan=99 bgcolor=336633> </td>
  91. </tr>
  92.  
  93. <tr>
  94. <td colspan=1> </td>
  95. <td colspan=5 height=25 align=right valign="top">
  96.    <!--- Navbar --->
  97.        <table border="0" cellspacing="0" cellpadding="0">
  98.     <tr>
  99.         <td valign=top>
  100.             <img src="../images/mouseovers/blank.gif" name="DescText" width=157 height=33 border=0><br>
  101.         </td>
  102.         <td valign=top>
  103.             <a href="./test.htm" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgBack.src"><img src="../images/navwidgets/back.gif" width=80 height=33 border=0></a><br>
  104.         </td>
  105.         <td>
  106.             <a href="javascript: makeRemote();" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgSearch.src"><img src="../images/navwidgets/search.gif" width=39 height=33 border=0></a><br>
  107.         </td>
  108.         <td>
  109.             <a href="./test.htm" OnMouseOut="DescText.src=blank.src" OnMouseOver="DescText.src=imgUp.src"><img src="../images/navwidgets/up.gif" width=41 height=33 border=0></a><br>
  110.         </td>
  111.         <td>
  112.            <img src="../images/navwidgets/next.gif" width=40 height=33 border=0><br>
  113.         </td>
  114.     </tr>
  115.     </table>
  116.  
  117. </td>
  118. </tr>
  119.  
  120. <tr>
  121. <td height=75 bgcolor=ffFFff colspan=5> </td>
  122. <td rowspan=99 bgcolor=339933> </td> <!--- Col 6 = color only  (Col 7 is color only too) --->
  123. </tr>
  124.  
  125. <tr>
  126.     <td bgcolor=ffFFff> </td>
  127.     <td bgcolor=ffFFff> </td>
  128.     <td align="right" bgcolor=ffFFff colspan=2><img src="../images/welcomecover/allaire.gif" width="177" height="25" hspace="25" border="0" alt="allaire">
  129. <br>
  130. <br>
  131.  
  132. </td>
  133. <td bgcolor=ffFFff> </td>  
  134. </tr>  <!-- End previous row --->
  135. <tr>
  136.     <td colspan=1 bgcolor=ffFFff> </td>
  137.     <td colspan=3 bgcolor=ffFFff>
  138.     <font face="Arial Black, Helvetica" size="+2">Verify Installation and Configuration</font>
  139. </td>
  140.         <td bgcolor=ffFFff> </td>
  141. </tr>
  142.  
  143. <tr><td height=8 bgcolor=ffFFff colspan=5> </td></tr>
  144.  
  145. <tr>
  146.     <td colspan=2 bgcolor=ffFFff> </td>
  147.     <td colspan=2 bgcolor=ffFFff> 
  148.       <font face="Arial Black, Helvetica" size="+1">Test Query Results</font>
  149.    </td>
  150.     <td bgcolor=ffFFff> </td>
  151. </tr>      
  152. <!--- Put some space between heading and body --->
  153. <tr><td height=8 bgcolor=ffFFff colspan=5> </td></tr>
  154.  
  155. <tr>
  156.     <td colspan=3 bgcolor=ffFFff> </td>
  157.     <td bgcolor=ffFFff> 
  158.   <font face="Arial, Helvetica">
  159. <!-- Banner for department name -->
  160. <CFIF Server.OS.Name IS NOT "UNIX">
  161.   <CFOUTPUT Query="Department">
  162.     <H3>Courses Offered by the #Dept_Name# Department</H3>
  163.   </CFOUTPUT>
  164. </font>
  165.  
  166.   <!-- Table displaying courses offered -->
  167.   <CFTABLE Query="Courses" HTMLTABLE BORDER COLHEADERS MAXROWS=200 >
  168.     <CFCOL Header="<B>Number</B>" Width=10 Text="#CorNumber#">
  169.     <CFCOL Header="<B>Course Name</B>" Width=25 Text="#CorName#">
  170.     <CFCOL Header="<B>Level</B>" Width=15 Align=Right Text="#CorLevel#">
  171.   </CFTABLE>
  172.  
  173. <CFELSE>
  174. <font face="Arial, Helvetica">
  175.   <CFOUTPUT Query="Department">
  176.     <H3>Courses Offered by the #Dept_Name# Department</H3>
  177.   </CFOUTPUT>
  178. </font>
  179.   <!-- Table displaying courses offered -->
  180.   <CFTABLE Query="Courses" HTMLTABLE BORDER COLHEADERS MAXROWS=200>
  181.     <CFCOL Header="<B>Number</B>" Width=10 Text="#Trim(CorNumber)#">
  182.     <CFCOL Header="<B>Course Name</B>" Width=25 Text="#Trim(CorName)#">
  183.     <CFCOL Header="<B>Level</B>" Width=15 Align=Right Text="#Trim(CorLevel)#">
  184.   </CFTABLE>
  185. </CFIF>
  186. <BR>
  187. <font face="Arial, Helvetica">
  188. <P>
  189. ColdFusion has been correctly installed and configured to work 
  190. with your Web server.
  191.  
  192. <P>
  193. Now that everything has been set up properly, you probably want
  194. to learn about all of the things you can do with ColdFusion. The 
  195. <a href="../examplehome.htm">Example Applications</a>
  196. page has pointers to several resources to help you get started.
  197. </font>
  198. </TD>
  199.  <td bgcolor=ffFFff> </td>
  200. </TR>
  201.  
  202. <tr><td height=100 colspan=5 bgcolor=ffFFff> </td></tr>
  203. <tr>
  204.     <td colspan=4 align=right bgcolor=ffFFff>
  205.       <a href="./test.htm"><img src="../images/navwidgets/lowerback.gif" WIDTH=50 HEIGHT=31 border=0 alt="Back"></a><a href="./test.htm"><img src="../images/navwidgets/lowertop.gif" alt="Up Level" WIDTH=41 HEIGHT=31 border=0></a><img src="../images/navwidgets/lowernext.gif" alt="Next" WIDTH=50 HEIGHT=31 border=0><br>
  206.     </td>
  207.     <td bgcolor=ffFFff> </td>
  208. </tr>
  209. <tr><td height=120 colspan=5 bgcolor=ffFFff> </td></tr>
  210. <tr>
  211.     <td colspan=5 height=29 valign=top>
  212.     <font size="-2" face="Arial, Helvetica">
  213.         <p>
  214.         <a href="http://www.allaire.com"><img src="../images/navwidgets/allaireblue.gif" width=230 border=0 hspace=0 vspace=0 height=29 align="left" alt="allaire"></a>
  215.               <a href="mailto:allairedoc@allaire.com">AllaireDoc@allaire.com</a><br>
  216.               Copyright © 1998, Allaire Corporation.   All rights reserved.<br>
  217.     </font>
  218.     </td>
  219. </tr>
  220.  
  221. </table>
  222.     </td>
  223. </tr>
  224. </table>
  225.  
  226.  
  227. </BODY>
  228. </HTML>
  229.