<%@ LANGUAGE="VBSCRIPT" %> <% response.expires = 0 response.expiresabsolute = Now() - 1 response.addHeader "pragma","no-cache" response.addHeader "cache-control","private" Response.CacheControl = "no-cache" %> <% '*********************************************************************** ' System : ASPBanner Unlimited ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2003 by CJWSoft. All rights reserved '*********************************************************************** %> <% CHECKFOR = "Admin" %> <% ' This setting from check_user_inc.asp purposely overridden ' To make record cycling features work ok on this page THISPAGE = Request.ServerVariables("script_name") Keyword = CStr(Replace(Request("Keyword"),"'","''")) RowCount = 0 MYSQL = Request("MYSQL") SORTBY = Request("SORTBY") If SORTBY = "" Then SORTBY = "Username" End If If MYSQL = "" And Keyword = "" Then MYSQL="SELECT Banner_Users.* FROM Banner_Users ORDER BY " & SORTBY ElseIf Keyword <> "" Then MYSQL="SELECT Banner_Users.* FROM Banner_Users WHERE ((First_Name LIKE '%" & Keyword & "%') Or (Last_Name LIKE '%" & Keyword & "%') Or (Company_Name LIKE '%" & Keyword & "%') Or (Username LIKE '%" & Keyword & "%')) ORDER BY " & SORTBY End IF WhichPage = Request("WhichPage") If WhichPage = "" then WhichPage = 1 end if MyPageSize = Request("MyPageSize") If MyPageSize = "" then ' Change this value to increase the default amount of users shown on one page MyPageSize = 25 end if %> <% =App_Name %> > <% Set ConnBannerSystem = Server.CreateObject("ADODB.Connection") Set CmdListUsers = Server.CreateObject("ADODB.Recordset") ConnBannerSystem.Open BannerConnectionString CmdListUsers.Open MYSQL, ConnBannerSystem , 1, 1 %>
15<% Else %>13<% End If %>" value="<% =Keyword %>">
<% If Keyword <> "" Then %>

<% End If %> <% If Not CmdListUsers.EOF Then CmdListUsers.movefirst CmdListUsers.pagesize = MyPageSize MaxPages = CInt(CmdListUsers.pagecount) MaxRecords = CInt(CmdListUsers.pagesize) CmdListUsers.absolutepage = WhichPage HowManyRecords = 0 HowManyFields = CmdListUsers.fields.count -1 TotalRecords = CmdListUsers.recordcount Span = (MyPageSize * WhichPage) %>

(<% = TotalRecords %> Total User<% If TotalRecords > 1 Then %>s<% End If%> Found)   <% If CInt(MaxPages) <> 1 Then %> (Showing <% = ((Span - MyPageSize) + 1) %> - <% If CInt(MaxPages) = CInt(WhichPage) Then %><% =TotalRecords %><% Else %><% =Span %><% End If %>)   (Page <% =WhichPage %> of <% =MaxPages%>)

<% End If %>

<% If Application("CDONTS_Installed") = true or Application("SASMTPMAIL_Installed") = true or Application("JMAIL_Installed") = true or Application("AspEmail_Installed") = true Then %> <% End If %> <% If Application("CDONTS_Installed") = true or Application("SASMTPMAIL_Installed") = true or Application("JMAIL_Installed") = true or Application("AspEmail_Installed") = true Then %> <% End If %> <% Else %>
Add New User First Name  Last Name  Company  Username  Admin     
  Sort AscendingSort Descending Sort AscendingSort Descending Sort AscendingSort Descending Sort AscendingSort Descending Sort AscendingSort Descending    
<% End If DO UNTIL CmdListUsers.EOF Or HowManyRecords >= MaxRecords If RowCount = 2 Then RowCount = 0 End If If RowCount = 0 Then Cellbgcolor = "#F3F3EB" Else Cellbgcolor = "#FFFFFF" End If RowCount = RowCount + 1 EXPIRATION_DATE = CmdListUsers("EXPIRATION_DATE") If IsEmpty(EXPIRATION_DATE) Or IsNull(EXPIRATION_DATE) Or EXPIRATION_DATE ="" Then EXPIRATION_DATE = "NEVER" Else EXPIRATION_DATE = month(EXPIRATION_DATE) & "/" & day(EXPIRATION_DATE) & "/" & year(EXPIRATION_DATE) End IF UserExpired = "No" If EXPIRATION_DATE <> "NEVER" Then If CDATE(EXPIRATION_DATE) <= DATE Then UserExpired = "Yes" End IF End IF Set ConnClassified = Server.CreateObject("ADODB.Connection") ConnClassified.Open BannerConnectionString Set CmdBannerTemp = Server.CreateObject("ADODB.Command") Set BannerCount = Server.CreateObject("ADODB.Recordset") CmdBannerTemp.CommandText = "SELECT COUNT(Banner_ID) AS Banner_Count FROM Banners WHERE (User_ID = " & CmdListUsers("User_ID") & ")" CmdBannerTemp.CommandType = 1 Set CmdBannerTemp.ActiveConnection = ConnClassified BannerCount.Open CmdBannerTemp, , 0, 1 Banner_Count = BannerCount("Banner_Count") FixedDigitCount = 3 DigitPath = "images/digits/black_on_white/" ShowDigits = "" If Banner_Count = 1 Then Showplural = "" Else Showplural = "s" End If DigitCountLength = Len(Banner_Count) If DigitCountLength < FixedDigitCount Then 'response.Write "yes" 'response.end DigitZerosToAdd= FixedDigitCount - DigitCountLength For DigitZeroCount = 1 to DigitZerosToAdd ShowDigits = ShowDigits & "" Next End If For DigitCount = 1 to DigitCountLength ShowDigits = ShowDigits & "" Next %> <% If Application("CDONTS_Installed") = true or Application("SASMTPMAIL_Installed") = true or Application("JMAIL_Installed") = true or Application("AspEmail_Installed") = true Then %> <% End If %> <% CmdListUsers.MoveNext HowManyRecords = HowManyRecords+1 Loop %>
Add New User

No Users Found

<% =ShowDigits %> ">Manage Banners  <%= CmdListUsers("First_Name") %>  <%= CmdListUsers("Last_Name") %>  <%= CmdListUsers("Company_Name") %>  <%= CmdListUsers("Username") %>  bgcolor="#D6D6D6"<% CellTextColor = "White" %><% Else %>bgcolor="<% = Cellbgcolor %>"<% CellTextColor = "Black" %><% End If %>"><% If CmdListUsers("ADMIN") = True Then %>Yes<% Else %>No<% End If %> ">Email User">Edit User <% If CmdListUsers("ADMIN") <> True Then %>">Delete User<% End If %>
<% CmdListUsers.Close Set CmdListUsers = Nothing ConnBannerSystem.Close Set ConnBannerSystem = Nothing If CInt(MaxPages) <> 1 Then %>

<% For MyCounter = 1 to MaxPages TempSpan = (MyPageSize * MyCounter) %> (<% = ((TempSpan - MyPageSize) + 1) %> - <% If CInt(MaxPages) = CInt(MyCounter) Then %><% =TotalRecords %><% Else %><% =TempSpan %><% End If %>)  <% If MyCounter Mod 10 = 0 then %>
<% End If %> <% Next %>

<% End If %> <% TempSpan2 = (MyPageSize * WhichPage + 1) %>

<% If CInt(WhichPage) <> 1 Then %> (Previous <% = MyPageSize %>)   <% End If %> <% If CInt(WhichPage) <> CInt(MaxPages) And TotalRecords <> 0 Then %> (Next <% If CInt(WhichPage) = CInt(MaxPages) - 1 Then %><% = (CInt(TotalRecords) - CInt(TempSpan2) + 1) %><% Else %><% =MyPageSize %><% End If %>) <% End If %>

<% If TotalRecords > 20 Then %>

NUMBER OF USERS DISPLAYED PER PAGE
5   10   20   30   40   50   60   70   80   90   100   150   250   500  

<% End If %>