Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - asp topsite script
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

asp topsite script

 Post Reply Post Reply
Author
salmants View Drop Down
Newbie
Newbie


Joined: 18 February 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote salmants Quote  Post ReplyReply Direct Link To This Post Topic: asp topsite script
    Posted: 18 February 2004 at 3:28am

i have downloaded topsite mentor from script-asp.tk.The seeting of the files inctopsite.asp is requiered which is as follows.

I have done customization but still the topsite mentor is not working.There is a problem in this file plz see

<%

'''TODO for you! Configuration:
''''1. Database connection
Function IncTopsite_GetDatabaseConn()
 Dim oRet
 Dim strDSN
 strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("topsite2.mdb")
 Set oRet = Server.CreateObject ("ADODB.Connection")
 oRet.Open strDSN 
 Set IncTopsite_GetDatabaseConn = oRet
 IncTopsite_PerhapsCleanUp oRet
End Function


'''TODO for you! Configuration:
''''2. Config variables
''''''''''''    Edit These where pointed ...   HoSt.TrUe.Ws
Const g_strPath = "http://www.nicepakistan.net/topsite" ' write top site directory
Const g_strButtonImagePath = "http://www.nicepakistan.net/Topsite/topsite.gif" ' your voting button
Const g_AdminUID = "admin" ' admin user name
Const g_AdminPassword = "admin" ' admin password
Const g_ClickThruPage = True

Const g_MailServer = "mail.nicepakistan.net" 'your mail server
Const g_OutgoingMailFrom = "greeting@nicepakistan.net" ' your email

Const g_strSiteBgColor1 = "white" ' background color
Const g_strSiteBgColor2 = "white" ' background color 2
Const g_strBodyColor = "white" ' body color

''''''''''''   Ended.   Don't write under this... your site will work ccorrectly. If not send mail at host@true.ws or www.host.true.ws


'This variable could be set to
' DAY for hits/day ranking or
' TOTAL for total hits ranking

Const g_strRankOption = "TOTAL"

'If set to true then clicking will take the user to another page and if he/she clicks
' there a hit will be counted. This is to defeat cheating

Const g_fUseGateway = False

 

 

'''TODO for you! Configuration:
''''3. Some ads if you'd like

Function FAQ_GetAd(nNumber)
 Select Case nNumber
  Case 1
   FAQ_GetAd = ""
  Case 2
   FAQ_GetAd = ""
  Case 3
   FAQ_GetAd = ""
 End Select 
End Function

Function IncTopsite_PerhapsCleanUp( oConn )

 If g_strRankOption = "TOTAL" Then
  IncTopsite_PerhapsCleanUp = False
  Exit Function
 End If

 Dim sNow, sStart, fShouldCleanup
 sNow = Now()
 sStart = Application("ts_start")
 If sStart = "" Then
  Dim oRSWhenStart
  Set oRSWhenStart = oConn.Execute("select startdate from "& IncTopsite_GetTablePrefix() & "sysvar " )
  If oRSWhenStart.EOF Then
   oRSWhenStart.Close
   Set oRSWhenStart = Server.CreateObject("ADODB.Recordset")
      Set oRSWhenStart.ActiveConnection = oConn
   oRSWhenStart.Open "select * from " & IncTopsite_GetTablePrefix() & "sysvar where id = -1", ,1,3
   oRSWhenStart.AddNew()
   oRSWhenStart("startdate") = Now()
   oRSWhenStart.Update
   oRSWhenStart.Close
   Set oRSWhenStart = Nothing
   sStart = Application("ts_start")
   Exit Function
  Else
   sStart = oRSWhenStart("startdate")
   oRSWhenStart.Close
   Set oRSWhenStart = Nothing
  End If
 End If
 fShouldCleanup = False
 
 If ShouldCleanUp( g_strRankOption, sStart, sNow ) = True Then
  oConn.Execute("update  " & IncTopsite_GetTablePrefix() & "site set incount=0,outcount=0")
  Set oRSWhenStart = Server.CreateObject("ADODB.Recordset")
     Set oRSWhenStart.ActiveConnection = oConn
  oRSWhenStart.Open "select * from " & IncTopsite_GetTablePrefix() & "sysvar", ,1,3
  oRSWhenStart("startdate") = Now()
  oRSWhenStart.Update
  oRSWhenStart.Close
  Set oRSWhenStart = Nothing
 End If
End Function

Function IncTopsite_GetTablePrefix()
 'IncTopsite_GetTablePrefix = ""
 IncTopsite_GetTablePrefix = "" 
End Function


Function ShouldCleanUp( g_strRankOption, sStart, sNo )
 If g_strRankOption = "DAY" Then
  If DateDiff( "d", sStart, sNo ) > 1 Then
   ShouldCleanUp = True
   Exit Function
  End If
 End If
 ShouldCleanUp = False
End Function


Sub ListCategories( nSelected, fListAll ) 
 Dim oRSCats
 Dim sSelected
 Set oRSCats = oConn.Execute("select id, txt from  " & IncTopsite_GetTablePrefix() & "cat order by txt ")
 If fListAll = True Then
  If nSelected = "" Or CInt(nSelected)=0 Then
   sSelected = "selected "
  Else
   sSelected = ""
  End If
  Response.Write "<option " & sSelected & "value=""" & "0" & """>" &  "All" & "</option>"
 End If
 While Not oRSCats.EOF
  If CInt(nSelected) = CInt(oRSCats("id").Value) Then
   sSelected = "selected "
  Else
   sSelected = ""
  End If
  Response.Write "<option " & sSelected & "value=""" & oRSCats("id") & """>" &  oRSCats("txt") & "</option>"
  oRSCats.MoveNext
 Wend
 oRSCats.Close
 Set oRSCats = Nothing
End Sub


'Not working yet
Const g_AdminEmail = "webmaster@nicepakistan.net" 'Set this so you will get email when someone has joined the list and validation is needed
Const g_ValidationNeeded = True

%>

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 09 April 2004 at 10:56pm
might help if you posted what the error you received was and where it was... that's like 400 lines of code
Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2004 at 4:47am

nah, it was just 156

but anyways, we need the error

Back to Top
salmants View Drop Down
Newbie
Newbie


Joined: 18 February 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote salmants Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2004 at 4:56am

Dear

plz visit http://nicepakistan.net/top/joinlist.asp,when i submit data into field,it does saves into access database but does not email id to the submitter.Can any one create one such file for me that not only saves data into access database but also email the id (which is the primary key in the access database) to the email provided by the form submitterusing CDONTS

access database (topsite2.mdb)has following field s into the table named site:

id(which creates automatically as it is primary key)

url

sitename

sitedescr

catid

incount

outcount

joinedwhen

email

password

This databse has another table named cat

which includes fileds:

id

txt (like category computer,sports)

Another table in this database is

sysvar has following fields:

id

startdate

i think i have explained evry thing.

waiting for a good solution

 

 

Back to Top
Semikolon View Drop Down
Senior Member
Senior Member


Joined: 09 September 2003
Location: Norway
Status: Offline
Points: 1718
Post Options Post Options   Thanks (0) Thanks(0)   Quote Semikolon Quote  Post ReplyReply Direct Link To This Post Posted: 10 April 2004 at 5:17am
read the CDONTS tutorial in the ASP section of this site
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 14 April 2004 at 5:11am

oooh i think i found that toplist

i had an error with it emailing out

so i scrapped it and made my own

umm sorry i cant help, since i could never fix it

S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
salmants View Drop Down
Newbie
Newbie


Joined: 18 February 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote salmants Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2004 at 1:55am

Dear Scotty

can u give your topsite script to me.I will be very thankful to you.

Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2004 at 4:46am

umm i would but its not really complete and is still kinda buggy

it acctually ties into the forum though

if your good enuf with ASP you could prob fix it up

i WAS planning to start a release of it (but not using the forum)

but that will be a LONG way off yet since Win5 on jodohost kinda f***** up just a tad, so i have the fun job of uploading like 3-4 big sites

and i lost an Access database my site was running off, funny thing is i *was* planning to move it to SQL within the next couple of days

last i checked there wasnt many good toplists out there

so you could wait a while for mine

untill then check out www.hotscripts.com and www.aspin.com or search www.google.com

S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.