<%@ CodePage=1252 Language="VBScript"%> <% response.charset = "1252" %> <% if request("form1")="form1" then classe=request("classe") username=trim(request("username")) password=request("password") if username="sscc" and (password="1309275" or password="461563") then response.Redirect("uploadform.asp") end if if classe="" then response.redirect("enterinfo.asp?close=yes&classe=vide") passcode=1 if username="" then response.Redirect("enterinfo.asp?close=yes") end if Path = Server.MapPath("UploadedFiles\"&classe) Table="[sheet1$]" 'SQL_Query = "SELECT * FROM "&TABLE'&" WHERE ""PRODUCT NAME""='Light Edition'" Driver ="{Microsoft Excel Driver (*.xls)}" DataSource = "DBQ=" & Path & ";" DataSource = DataSource & "DefaultDir=" & Path & ";" DataSource = DataSource & "Driver=" & Driver & ";" DataSource = DataSource & "FIL=excel 5.0;ReadOnly=1;" Set MyConn =Server.CreateObject("ADODB.Connection") MyConn.Open DataSource tt="" Set RS = MyConn.Execute("SELECT * FROM "&TABLE& " where code<>null") do while (not rs.eof) if Cstr(Rs("code"))=Cstr(username) then exit do end if rs.movenext loop if rs.eof then response.Redirect("enterinfo.asp?exist=no&close=yes") end if RS.Close Set RS = nothing Set RS = MyConn.Execute("SELECT * FROM "&TABLE&" WHERE code='"&username&"'") 'for i=5 to 7 'passcode=passcode * asc(mid(username,i,1)) 'next i=len(username) passcode=passcode * asc(mid(username,i,1)) i=len(username)-1 passcode=passcode * asc(mid(username,i,1)) i=len(username)-2 passcode=passcode * asc(mid(username,i,1)) if cstr(password)<>cstr(passcode) then response.Redirect("enterinfo.asp?exist=fo&close=yes") end if dim test1 test1="ok" end if %> <% 'Dimension variables Dim fsoObject 'File System Object Dim tsObject 'Text Stream Object Dim filObject 'File Object Dim lngVisitorNumber 'Holds the visitor number Dim intWriteDigitLoopCount 'Loop counter to display the graphical hit count Set fsoObject = Server.CreateObject("Scripting.FileSystemObject") Set filObject = fsoObject.GetFile(Server.MapPath("ecoan.txt")) Set tsObject = filObject.OpenAsTextStream lngVisitorNumber = Cstr(tsObject.ReadAll) 'lngVisitorNumber = lngVisitorNumber + 1 'Set tsObject = fsoObject.CreateTextFile(Server.MapPath("hit_count.txt")) 'tsObject.Write CStr(lngVisitorNumber) arrstrSplit = split(lngVisitorNumber,",") Set fsoObject = Nothing Set tsObject = Nothing Set filObject = Nothing 'Response.Write(lngVisitorNumber) %> Info Eleve >

 

 

Bienvenue au relevé des notes en ligne
Des Soeurs Des Saints Coeurs
<%=arrstrSplit(0)%>
 
<%if request("exist")="no" then response.Write("Numéro de l'élève n'existe pas dans cette classe !!!")%> <%if request("exist")="fo" then response.Write("Mot de passe incorrecte !!!")%> <%if request("classe")="vide" then response.Write("Choisissez une classe !!!")%>  
Numéro de l'élève :
Mot de passe :
Classe : <% strFolder = server.MapPath("uploadedfiles/") & "\" '# Enter the name of the database '# Stop editing here '################################################## Private Sub dbList() Dim oFolders Set oFolders = Server.CreateObject("Scripting.FileSystemObject") Response.Write ("") Set oFolders = Nothing End Sub %> <%dbList%>

Réalisé par Brains N.T.C.S