Jump to content

Login Script - ASP over ODBC


Recommended Posts

Hello.

I need to set up a login script with information for the users.

The problem is;

I have a script (user.asp) that queries a database over odbc.

http://intranett/print/user.asp?UserName=%username%

I need to include this script in the login information box, so the users may get information about how many pages they have printed and what the account balance is.

It is important that the users not can see or get the path of the script or the content of the script.

Is it possible to convert the asp script to a vbs?

--script start--

<%

If Request.QueryString("UserName") <> "" Then

set User = Request.QueryString("UserName")

Set rs = Server.CreateObject("ADODB.Recordset")

QUERY = "SELECT TotalPagesPrinted, Balance FROM UserQuotas WHERE UserName ='" + User +"'"

rs.Open QUERY, "PrintManagerPlus"

If (rs.EOF) Then

Response.Write "No information available for User: "+User+"<P> <P> <P> <P>"

Else

Response.Write "UserName: " & User & "<BR>"

Response.Write "Total Pages Printed: " & rs("TotalPagesPrinted") & "<BR>"

Response.Write "Balance: $" & rs("Balance") & "<BR>"

End If

rs.Close

End If

%>

--script stop--

I’m grateful for any answer or idea. Thanks in advance.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...