home *** CD-ROM | disk | FTP | other *** search
/ 207.233.110.77 / 207.233.110.77.tar / 207.233.110.77 / vbasic / Scores-Grade.asp < prev    next >
Text File  |  2001-10-09  |  4KB  |  86 lines

  1. <%@ LANGUAGE="VBSCRIPT" %>
  2. <% Option Explicit %>
  3. <!-- METADATA 
  4.    TYPE="TypeLib" 
  5.    FILE="C:\Program Files\Common Files\System\ADO\msado21.tlb" 
  6. -->
  7. <!--#include file="DatabaseConnect.asp"-->
  8. <!--#include file="Crypt-DeCrypt.asp"-->
  9. <% If Session("ValidatedStudent") <> True Then
  10.     Response.Redirect "error.asp?error=denied"
  11. End If %>
  12. <HTML>
  13. <head>
  14. </head>
  15. <body>
  16. <%
  17.     Dim objRS            'Recordset Object
  18.     Dim sSQL            'SQL string
  19.     Dim i
  20.     Dim strUser        'Email of User
  21.     Dim strPath    
  22.     Dim strTmp
  23.  
  24.     strUser = Request.QueryString("email")
  25.     strPath = Request.QueryString("path")
  26.     sSQL = "SELECT * FROM Students WHERE email = '" & strUser & "';"
  27.     Set objRS = Server.CreateObject("ADODB.Recordset")
  28.     objRS.Open sSQL, objConn, adOpenDynamic, adLockOptimistic, adCmdText
  29.     'Make sure the student's account exists
  30.     If Not (objRS.EOF And objRS.BOF) Then 
  31.         %>
  32.           <BR><CENTER>
  33.           <TABLE BORDER="5" BORDERCOLOR="blue" CELLSPACING="0" CELLPADDING="2">
  34.             <TR BGCOLOR="#87cefa">
  35.                 <TD COLSPAN="12" ALIGN="Center"><FONT COLOR="#FFFFFF" SIZE="5"><B>Project Scores</B></FONT></TD>
  36.             </TR>
  37.             <TR BGCOLOR="#ffe4c4">
  38.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>1</B></FONT></TD>
  39.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>2</B></FONT></TD>
  40.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>3</B></FONT></TD>
  41.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>4</B></FONT></TD>
  42.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>5</B></FONT></TD>
  43.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>6</B></FONT></TD>
  44.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>7</B></FONT></TD>
  45.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>8</B></FONT></TD>
  46.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>9</B></FONT></TD>
  47.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>10</B></FONT></TD>
  48.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>11</B></FONT></TD>
  49.                 <TD ALIGN="center" WIDTH="50"><FONT COLOR="RED"><B>12</B></FONT></TD>
  50.             </TR>
  51.             <TR>
  52.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score1")%></B></FONT></TD>
  53.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score2")%></B></FONT></TD>
  54.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score3")%></B></FONT></TD>
  55.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score4")%></B></FONT></TD>
  56.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score5")%></B></FONT></TD>
  57.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score6")%></B></FONT></TD>
  58.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score7")%></B></FONT></TD>
  59.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score8")%></B></FONT></TD>
  60.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score9")%></B></FONT></TD>
  61.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score10")%></B></FONT></TD>
  62.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score11")%></B></FONT></TD>
  63.                 <TD ALIGN="center"><FONT COLOR="BLUE"><B><%=objRS("score12")%></B></FONT></TD>
  64.             </TR>
  65.             <TR BGCOLOR="#87cefa">
  66.                 <TD COLSPAN="12" ALIGN="Left">
  67.                       <INPUT TYPE="Button" ALIGN="left" VALUE="Back to File List" onClick="document.location='user.asp?action=list&email=<%=strUser & "&path=" & strPath%>';">
  68.                       <INPUT TYPE="Button" ALIGN="left" VALUE="Logout" onClick="document.location='default.asp';"> 
  69.                 </TD>
  70.             </TR>
  71.           </TABLE></CENTER>
  72.           <BR>
  73.           <HR>
  74.           <P>If you have questions or comments please contact your Instructor: 
  75.           <A HREF="mailto:<%=objRS("teacheremail")%>"><%=objRS("teacher")%></A></P>
  76.         <%
  77.     Else
  78.         Response.Write ("<H1>Account Not Found!</H1>")
  79.        End If
  80.     objRS.Close
  81.     Set objRS = Nothing
  82.     objConn.Close
  83.     Set objConn = Nothing
  84.    %>
  85. </body>
  86. </html>