Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%
'on error resume next
dim y, newdownload, newfile, conn, goforit, sConnString, mySQL, rs, action, table, which, newuser, newlevel, newpass, newtable, newid, newOne, newTwo
goforit=request("go")
action=request("action")
table=request("table")
which=request("which")
newuser=request("user")
newlevel=request("level")
newpass1=request("pass")
newtable=request("table")
newid=request("id")
newOne=request("one")
newTwo=request("two")
newdownload=request("download")
newfile=request("file")
newlocation=request("location")
newchange=request("change")
newpass=request("newpass")
oldpass=request("oldpass")
y=request("y")
Const adOpenStatic=3
Const adLockOptimistic=3
Const adCmdText=1
if action="changepass" and newchange then
mySQL="SELECT * FROM userlogin where user='" & session("name") & "'"
'mySQL="SELECT * FROM userlogin WHERE (((userlogin.user)='" & session("name") & "'))"
'mySQL= "UPDATE userlogin "
'mySQL= mySQL & "SET password='" & newpass & "'"
'mySQL= mySQL & " WHERE user='" & session("name") & "'"
end if
if action="delete" then
mySQL="DELETE FROM " & table & " WHERE [<AutoNumber>]=" & which
end if
if action="edit" then
mySQL="SELECT * FROM " & table & " WHERE [<AutoNumber>]=" & which
end if
if action="adding" and table="download" then
mySQL = "INSERT INTO download (file,downloaded,location) "
mySQL = mySQL & "VALUES ('" & newfile & "','" & newdownload & "','" & newlocation & "')"
end if
if action="adding" and table="userlogin" then
mySQL = "INSERT INTO userlogin (user,securitylevel,password) "
mySQL = mySQL & "VALUES ('" & newuser & "','" & newlevel & "','" & newpass1 & "')"
end if
if action="adding" and table="test" then
newid = replace(newid,"'","''")
newOne = replace(newOne,"'","''")
newTwo = replace(newTwo,"'","''")
mySQL = "INSERT INTO test (ID,One,Two) "
mySQL = mySQL & "VALUES ('" & newid & "','" & newOne & "','" & newTwo & "')"
end if
response.write mySQL
response.write "<br>"
response.write request("pass")
where=request("location")
if goforit="go" then
'--comment-- Below is the ADO connection used in brinkster.com --commment---
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
"\\premfs3\sites\premium8\mlabsusa\database\mlabs.mdb;" & _
"Persist Security Info=False;"
Select Case action
case "changepass"
set conn=server.createobject("adodb.connection")
set rst=server.createobject("adodb.recordset")
conn.open sConnString
'conn.execute(mySQL)
rst.Open mySQL, conn, adOpenStatic, adLockOptimistic, adCmdText
if oldpass=rst("Password") then
rst("Password")=newpass
rst.update
msg="<font color='red'><b>Password successfully changed</b></font>"
else
msg="<font color='red'><b>Could not change password. Old password does not match.</b></font>"
end if
case "edit"
set conn=server.createobject("adodb.connection")
set rst=server.createobject("adodb.recordset")
conn.open sConnString
rst.Open mySQL, conn, adOpenStatic, adLockOptimistic, adCmdText
if y="true" then
Select Case table
case "download"
rst("File")=newfile
rst("downloaded")=newdownload
rst("Location")=newlocation
rst.update
case "test"
rst("ID")=newid
rst("One")=newone
rst("Two")=newtwo
rst.update
case "userlogin"
rst("user")=newuser
rst("securitylevel")=newlevel
rst("password")=newpass
rst.update
end select
editmsg="<font color='red'><b>Secessfully Updated</b></font>"
'rst.close
'rst.Open mySQL, conn, adOpenStatic, adLockOptimistic, adCmdText
end if
case else
set conn=server.createobject("adodb.connection")
conn.open(sConnString)
conn.execute(mySQL)
Conn.Close
set conn=nothing
end select
end if