%@LANGUAGE="VBSCRIPT"%> <% ' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername=CStr(Request.Form("textfield")) If MM_valUsername <> "" Then MM_fldUserAuthorization="" MM_redirectLoginSuccess="9.66.asp" MM_redirectLoginFailed="../index.asp" MM_flag="ADODB.Recordset" set MM_rsUser = Server.CreateObject(MM_flag) MM_rsUser.ActiveConnection = MM_jsj_STRING MM_rsUser.Source = "SELECT admin, password" If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE admin='" & Replace(MM_valUsername,"'","''") &"' AND password='" & Replace(Request.Form("textfield2"),"'","''") & "'" MM_rsUser.CursorType = 0 MM_rsUser.CursorLocation = 2 MM_rsUser.LockType = 3 MM_rsUser.Open If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <% Dim Recordset1 Dim Recordset1_numRows Set Recordset1 = Server.CreateObject("ADODB.Recordset") Recordset1.Source = "SELECT * FROM admin" Recordset1.CursorType = 0 Recordset1.CursorLocation = 2 Recordset1.LockType = 1 Recordset1_numRows = 0 %> <% ' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables Dim Recordset1_total Dim Recordset1_first Dim Recordset1_last ' set the record count ' set the number of rows displayed on this page If (Recordset1_numRows < 0) Then Recordset1_numRows = Recordset1_total Elseif (Recordset1_numRows = 0) Then Recordset1_numRows = 1 End If ' set the first and last displayed record Recordset1_first = 1 Recordset1_last = Recordset1_first + Recordset1_numRows - 1 ' if we have the correct record count, check the other stats If (Recordset1_total <> -1) Then If (Recordset1_first > Recordset1_total) Then Recordset1_first = Recordset1_total End If If (Recordset1_last > Recordset1_total) Then Recordset1_last = Recordset1_total End If If (Recordset1_numRows > Recordset1_total) Then Recordset1_numRows = Recordset1_total End If End If %> <% ' *** Recordset Stats: if we don't know the record count, manually count them If (Recordset1_total = -1) Then ' count the total records by iterating through the recordset Recordset1_total=0 While (Not Recordset1.EOF) Recordset1_total = Recordset1_total + 1 Recordset1.MoveNext Wend ' reset the cursor to the beginning If (Recordset1.CursorType > 0) Then Recordset1.MoveFirst Else Recordset1.Requery End If ' set the number of rows displayed on this page If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then Recordset1_numRows = Recordset1_total End If ' set the first and last displayed record Recordset1_first = 1 Recordset1_last = Recordset1_first + Recordset1_numRows - 1 If (Recordset1_first > Recordset1_total) Then Recordset1_first = Recordset1_total End If If (Recordset1_last > Recordset1_total) Then Recordset1_last = Recordset1_total End If End If %>
|
|
| 学校工作 | |
| 教学园地 | |
| 德育园地 | 班主任队伍 | 德育论文 | 优秀班级 | 优秀学生 | 班主任论坛 | 校园生活 | 校园速递 |
| 学子成才 | |
| 实训条件 | |
| 师资队伍 | |
| 毕业生推荐 | |
| 招生专栏 |
校长E-mail:principal@syjsj.com 招生电话:024-86844878 传真:86863551
地址:辽宁省沈阳市皇姑区昆山中路26号 邮编:110031 搜狐网|新浪网|TOM网|网易 辽可证:辽ICP备05006800号 Copyright © 2005 - 2006 沈阳市计算机学校™. All Rights Reserved. |
|
| 学校简介 网站地图 信息咨询 招聘信息 相关制作 收藏本站 | |