|
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 - http://www.nicepakistan.net/topsite " ' write top site directory Const g_strButtonImagePath = " http://www.nicepakistan.net/Topsite/topsite.gif - 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 = " mailto:greeting@nicepakistan.net - 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 mailto:host@true.ws - host@true.ws or http://www.host.true.ws - 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 = " mailto:webmaster@nicepakistan.net - webmaster@nicepakistan.net " 'Set this so you will get email when someone has joined the list and validation is needed Const g_ValidationNeeded = True
%>
|