<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' Start timer Dim amountQuery Dim amountQueryStats Dim tmrSTART amountQuery = 0 amountQueryStats = 0 tmrSTART = Timer %> <%' Get SITE ID %> <% SITEID=386 %> <% ' must write something for generator DO NOT EDIT THIS COMMENT %> <%' SQL Connection %> <% MM_DB_conn_STRING = "Provider=SQLOLEDB;Server=localhost;User ID=webloft;Password=ilovemoney4ever;Database=webloft;" Set Conn = Server.CreateObject("ADODB.Connection") Conn.Open MM_DB_conn_STRING %> <%' Get functions %> <% Function SafeSQL(sInput) Dim TempString, sBadChars, iCounter TempString = sInput sBadChars=array("select", "drop", ";", "--", "insert", "delete", "xp_", "#", "%", "&", "'", "(", ")", ":", ";", "<", ">", "=", "[", "]", "?", "`", "|") For iCounter = 0 to uBound(sBadChars) TempString = replace(TempString,sBadChars(iCounter),"") Next SafeSQL = TempString End function Function LongDate(vbDate) dim timestamp timestamp = Year(vbDate) * 1e10 timestamp = timestamp + Month(vbDate) * 1e8 timestamp = timestamp + Day(vbDate) * 1e6 timestamp = timestamp + Hour(vbDate) * 1e4 timestamp = timestamp + Minute(vbDate) * 1e2 timestamp = timestamp + Second(vbDate) LongDate = timestamp End Function %> <%' Get businessname, businessemail, custom Css Style, Site Keywords, Site Description %> <% ' ************** SITE INFO ************** if request("lang") = "fr" then Response.Cookies("LANGUAGE"&SITEID) = "fr" Response.Cookies("LANGUAGE"&SITEID).Expires = Date + 365 End if if request("lang") = "en" then Response.Cookies("LANGUAGE"&SITEID) = "en" Response.Cookies("LANGUAGE"&SITEID).Expires = Date + 365 End if Set rs=conn.execute("Select * from tblSITE where siteid =" & SITEID & " ;") amountQuery = amountQuery + 1 foldername = rs("foldername") siteurl = rs("url") If rs("urlReal") <> "" then urlReal = rs("urlReal") else urlReal = siteurl end if if rs("isActive") = false then response.redirect("http://www.lasvegassportsbetting.com") : response.end businessname = rs("businessname") businessemail = rs("businessemail") businessid = rs("businessid") myCssStyle = rs("myCssStyle") mySiteKeywords = rs("mySiteKeywords") mySiteDescription = rs("mySiteDescription") mySlogan = rs("mySlogan") isWebStat = rs("isWebStat") defaultPage = rs("defaultPage") myAdSense = rs("myAdSense") myWeather = rs("myWeather") mySearch = rs("mySearch") ParentSite = rs("ParentSite") isMaster = rs("isMaster") rs.close %> <%' Check if WEBSTATS is enable, if so include the module
'isWebStat = false if isWebStat then %> <% 'response.end 'on error resume next Dim connn Set connn = Server.CreateObject("ADODB.connection") 'connn.open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("/mdb-database/zstat7.mdb") connn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("stats/zstat7.mdb") Set rs = Server.CreateObject("ADODB.Recordset") %> <% '********************************************************* '* Z-STAT v 0.6.x BETA * '* * '* file inc.asp * '* file delle funcion e delle subroutine * '* * '* by Zavanella Davide 12-04-2004 * '* * '********************************************************* '--- CERCO IL S.O. --- function os(useragent) if instr(useragent, "16") then OSID = "1" ' Windows 3.x if instr(useragent, "windows 3.1") then OSID = "1" ' Windows 3.x if instr(useragent, "95") then OSID = "2" ' Windows 95 if instr(useragent, "98") then OSID = "3" ' Windows 98 if instr(useragent, "9x") then OSID = "4" ' Windows ME if instr(useragent, "sco") then OSID = "23" ' Sco Unix if instr(useragent, "windows me") then OSID = "4" ' Windows ME if instr(useragent, "win32") then OSID = "5" ' Windows NT if instr(useragent, "win 32") then OSID = "5" ' Windows NT if instr(useragent, "nt") then OSID = "5" ' Windows NT if instr(useragent, "nt 5") then OSID = "6" ' Windows 2000 if instr(useragent, "2000") then OSID = "6" ' Windows 2000 if instr(useragent, "nt 5.1") then OSID = "7" ' Windows XP if instr(useragent, "nt 5.2") then OSID = "25" ' Windows 2003 Server if instr(useragent, "nt 6.0") then OSID = "26" ' Windows LongHorn if instr(useragent, "xp") then OSID = "7" ' Windows XP if instr(useragent, "mac") then OSID = "8" ' Mac OS if instr(useragent, "x11") then OSID = "10" ' Unix if instr(useragent, "linux") then OSID = "9" ' Linux if instr(useragent, "unix") then OSID = "10" ' Unix if instr(useragent, "osf1") then OSID = "13" ' OSF1 if instr(useragent, "amiga") then OSID = "14" ' Amiga if instr(useragent, "sun") then OSID = "15" ' SunOS if instr(useragent, "hp-ux") then OSID = "16" ' HP-UX if instr(useragent, "beos") then OSID = "17" ' BeOs if instr(useragent, "os/2") then OSID = "18" ' OS/2 if instr(useragent, "irix") then OSID = "19" ' Irix if instr(useragent, "aix") then OSID = "20" ' Aix if instr(useragent, "bsd") then OSID = "21" ' Bds if instr(useragent, "cco") then OSID = "23" ' Sco Unix if instr(useragent, "windows ce") then OSID = "22" ' Windows CE if instr(useragent, "vms") then OSID = "24" ' Vms if instr(wap, "wap") then OSID = "11" ' Cellulare o Emulatore Wap if instr(useragent, "wap") then OSID = "11" ' Cellulare o Emulatore Wap if inStr(1, wap, "wml") > 0 then OSID = "11" ' Cellulare o Emulatore Wap if instr(useragent, "dreamcast") then OSID = "27" ' DreamCast if instr(useragent, "elaine/") then OSID = "28" ' Palm OS if instr(useragent, "palm") then OSID = "28" ' Palm OS if instr(useragent, "qnx") then OSID = "29" ' QNX if OSID = "" then OSID = "12" ' Altro OS = OSID End Function '--- CERCO IL BROWSER --- Function bws(useragent) if instr(useragent, "opera") then BWID = "6" ' Opera if instr(useragent, "frontpage") then BWID = "7" ' FrontPage if instr(useragent, "teleport") then BWID = "8" ' Teleport if instr(useragent, "gecko") then BWID = "10" ' Mozilla.ORG if instr(useragent, "netscape") then BWID = "5" ' Netscape if instr(useragent, "mozilla/4.0") then BWID = "5" ' Netscape if instr(useragent, "mozilla/4.5") then BWID = "5" ' Netscape if instr(useragent, "mozilla/4.6") then BWID = "5" ' Netscape if instr(useragent, "mozilla/4.7") then BWID = "5" ' Netscape if instr(useragent, "msie 3") then BWID = "1" ' Internet Explorer 3.x if instr(useragent, "msie 4") then BWID = "2" ' Internet Explorer 4.x if instr(useragent, "msie 5") then BWID = "3" ' Internet Explorer 5.x if instr(useragent, "msie 6") then BWID = "4" ' Internet Explorer 6.x if instr(useragent, "msn") then BWID = "12" ' MSN Explorer if instr(wap, "wap") then OSID = "11" ' Cellulare o Emulatore Wap if instr(lcase(useragent), "wap") then OSID = "11" ' Cellulare o Emulatore Wap if inStr(1, wap, "wml") > 0 then OSID = "11" ' Cellulare o Emulatore Wap if instr(useragent, "aol") then BWID = "21" ' America On Line if instr(useragent, "media-player") then BWID = "22" ' Windows Media Player if instr(useragent, "nsplayer") then BWID = "22" ' Windows Media Player if instr(useragent, "links") then BWID = "13" ' Links if instr(useragent, "da 3.5") then BWID = "14" ' Download Manager if instr(useragent, "da 4") then BWID = "14" ' Download Manager if instr(useragent, "da 5") then BWID = "14" ' Download Manager if instr(useragent, "da 7") then BWID = "14" ' Download Manager if instr(useragent, "mosaic") then BWID = "15" ' Mosaic if instr(useragent, "icab") then BWID = "16" ' iCab if instr(useragent, "ibrowse") then BWID = "17" ' iBrowse if instr(useragent, "konqueror") then BWID = "18" ' Konquerror if instr(useragent, "proxy") then BWID = "19" ' Proxy if instr(useragent, "netcache") then BWID = "19" ' Proxy if instr(useragent, "gateway") then BWID = "19" ' Proxy if instr(useragent, "microsoft scheduled") then BWID = "19" ' Proxy if instr(useragent, "netpositive") then BWID = "14" ' NetPositive if instr(useragent, "amaya") then BWID = "23" ' Amaya if instr(useragent, "firebird") then BWID = "24" ' FireBird - Firefox if instr(useragent, "mozilla firebird") then BWID = "24" ' FireBird - Firefox if instr(useragent, "firefox") then BWID = "24" ' FireBird - Firefox if instr(useragent, "myie") then BWID = "29" ' MyIE2 if instr(useragent, "myie2") then BWID = "29" ' MyIE2 if instr(useragent, "avantbrowser") then BWID = "27" ' AvantBrowser if instr(useragent, "avant browser") then BWID = "27" ' AvantBrowser if instr(useragent, "safari") then BWID = "28" ' Safari if instr(useragent, "powermarks") then BWID = "30" ' Webmaster Tools if instr(useragent, "myrasoft") then BWID = "30" ' Webmaster Tools if instr(useragent, "linkwalker") then BWID = "30" ' Webmaster Tools if BWID = "" then BWID = "9" ' Altro BWS = BWID End Function '--- PROVO AD INDIVIDUARE LO SPIDER Function Spider(useragent) if instr(useragent, "libwww-perl") then SPID = "26" ' libwww-perl if instr(useragent, "libwww") then SPID = "26" ' libwww-perl if instr(useragent, "google") then SPID = "1" ' Google if instr(useragent, "altavista") then SPID = "2" ' Altavista if instr(useragent, "scooter") then SPID = "2" ' Altavista if instr(useragent, "mercator") then SPID = "2" ' Altavista if instr(useragent, "architextspider") then SPID = "3" ' Excite if instr(useragent, "architectspider") then SPID = "3" ' Excite if instr(useragent, "gulliver") then SPID = "4" ' Northem Light if instr(useragent, "infoseek") then SPID = "5" ' Infoseek if instr(useragent, "sidewinder") then SPID = "5" ' Infoseek if instr(useragent, "ultraseek") then SPID = "5" ' Infoseek if instr(useragent, "t-rex") then SPID = "6" ' Lycos if instr(useragent, "lycos") then SPID = "6" ' Lycos if instr(useragent, "marvin") then SPID = "7" ' Webseek if instr(useragent, "muscatferret") then SPID = "8" ' WebTop if instr(useragent, "zyborg") then SPID = "9" ' Wizenut if instr(useragent, "libwww-perl") then SPID = "10" ' OpenSoure based Spider if instr(useragent, "robozilla") then SPID = "11" ' Dmoz if instr(useragent, "fast") then SPID = "12" ' AllTheWeb if instr(useragent, "nirvana") then SPID = "12" ' AllTheWeb if instr(useragent, "splatsearch") then SPID = "13" ' SplatSearch if instr(useragent, "fluffy") then SPID = "14" ' Searchhippo if instr(useragent, "url control") then SPID = "15" ' MSN Search if instr(useragent, "slysearch") then SPID = "16" ' SlySearch if instr(useragent, "teradex") then SPID = "17" ' Teradex if instr(useragent, "slurp") then SPID = "18" ' Inktomi if instr(useragent, "inktomi") then SPID = "18" ' Inktomi if instr(useragent, "worldsearch") then SPID = "19" ' Worldsearch if instr(useragent, "setaccio") then SPID = "20" ' Il Trovatore if instr(useragent, "ia_archiver") then SPID = "21" ' Alexa.com if instr(useragent, "ask jeeves") then SPID = "22" ' Ask Jeeves if instr(useragent, "arianna") then SPID = "23" ' Arianna if instr(useragent, "udmsearch") then SPID = "24" ' Udmsearch if instr(useragent, "freefind") then SPID = "25" ' Free Find if instr(useragent, "netcraft") then SPID = "27" ' NetCraft if instr(useragent, "yahoo") then SPID = "28" ' Yahoo! if instr(useragent, "pycurl") then SPID = "29" ' PycUrl if instr(useragent, "grub.org") then SPID = "30" ' Grub if instr(useragent, "grub-client") then SPID = "30" ' Grub if instr(useragent, "surveybot") then SPID = "31" ' Whois if instr(useragent, "whois") then SPID = "31" ' Whois if instr(useragent, "w3c_validator") then SPID = "32" ' W3C.org Page Validator if instr(useragent, "internetseer") then SPID = "33" ' Internetseer page validator if instr(useragent, "almaden.ibm") then SPID = "34" ' Almaden IBM if instr(useragent, "indy library") then SPID = "35" ' SpamBot if instr(useragent, "amaya") then SPID = "" ' Correction for amaya if spid = "" then spid = "0" spider = SPID end function '--- Provo ad estrarre la keyword dal referer Function KeyWord_Detect(referer) refere = Server.URLEncode(referer) variabile = array("?p=","qs=","query=","key=","q=", "qry=","search/","terms=") 'PARAMETRI TRATTI DAI MOTORI DI RICERCA for i = 0 to Ubound(variabile) 'ANALIZZO IL REFERER PER OGNI STRINGA if trovakey = "1" then exit for dove = InStr(referer,variabile(i)) 'CONTROLLO SE CONTIENE UNA DELLE STRINGHE NOTE if dove > 0 then 'SE LA CONTIENE LA ANALIZZO TUTTA inizio = right(referer,len(referer) - dove + 1) 'TROVO DOVE INIZIA LA KEYWORD dove = 0 if Instr(referer,"2blang") > 0 then dove = Instr(inizio,"2blang") else dove = Instr(inizio,"&") 'TROVO DOVE FINISCE (GENERALMENTE AL PROSSIMO PARAMETRO, QUINDI CERCO LA "&" ) end if if dove > 0 then inizio = left(inizio,dove ) 'TAGLIO TUTTO QUELLO CHE C'E' DOPO LA "&" inizio = replace(inizio,"+"," ") 'FACCIO LE SOSTITUZIONI CHE DEPURANO LA STRINGA inizio = replace(inizio,"*"," ") inizio = replace(inizio,"q=","") inizio = replace(inizio,"qs=","") inizio = replace(inizio,"?p=","") inizio = replace(inizio,"key=","") inizio = replace(inizio,"qry=","") inizio = replace(inizio,"search/","") inizio = replace(inizio,"query=","") inizio = replace(inizio,"terms=","") inizio = replace(inizio,"&","") inizio = replace(inizio,"%"," ") inizio = replace(inizio," "," ") ' RAFFINO ELIMINZANDO GLI SPAZZI inizio = replace(inizio," "," ") inizio = replace(inizio," "," ") inizio = replace(inizio," "," ") inizio = lcase(trim(inizio)) ' LA SCRIVO IN MINUSCOLO E TOLGO GLI SPAZI INUTILI trovakey = "1" end if next trovakey = "0" KeyWord_Detect = inizio end Function '--- FUNCTION DI FORMATTAZIONE DELLA DATA DELLA TABELLA DEGLI ACCESSI --- Function FormattaData(data) sGiorno = day(data) If sGiorno < 10 Then sGiorno = "0" & sGiorno sMese = month(data) If sMese < 10 Then sMese = "0" & sMese data = sGiorno & "/" & sMese & "/" & year(data) FormattaData = data End Function '--- FUNCIOTN PER LA FORMATTAZIONE DELL' ORA --- Function Formattaora(ora) ora = FormatDateTime(ora,4) sOra = hour(ora) If sOra < 10 Then sOra = "0" & sOra sMinuti=minute(ora) If sMinuti < 10 Then sMinuti = "0" & sMinuti ora = sOra & ":" & sMinuti FormattaOra = ora End Function '--- FUNCION PER LA FORMATTAZIONE DEI NUMERI A DUE CIFRE Function Duecifre(numero) if numero > 0 and numero < 10 then numero = "0" & numero duecifre = numero end function '--- SUB PER SCRIVERE L' ORA NEL DATABASE Sub ScriviOra() SQL = "SELECT * FROM ORA" rs.Open sql, connn, 3, 3 OraId = hour(FormattaOra(now())) if hour(FormattaOra(now())) = 0 Then OraID = "24" rs.find "id='" & OraID & "'" rs.fields("visite") = rs.fields("visite") +1 rs.update rs.close amountQueryStats = amountQueryStats + 1 End Sub '--- SUB PER SCRIVERE LE VISITE UNICHE E LE PAGINE VISTE AL GIORNO Sub ScriviVisite() ' controllo se la sessione di accesso esiste if session("access") = "on" then ' se esiste incremento solo il contatore delle pagine viste sql = "select * from visite where giorno = '"& duecifre(day(date())) &"' and mese = '"& duecifre(month(date())) & "' and anno = '"& year(date()) &"'" rs.open sql,connn,3,3 rs.fields("totale") = rs.fields("totale") +1 rs.update rs.close amountQueryStats = amountQueryStats + 1 else 'se non esiste apro la sessione e aggiorno sia il contatore unico che quello totale session("access") = "on" sql = "select * from visite where giorno = '"& duecifre(day(date())) &"' and mese = '"& duecifre(month(date())) & "' and anno = '"& year(date()) &"'" rs.open sql,connn,3,3 amountQueryStats = amountQueryStats + 1 ' prima controllo se oggi e' gia' venuto qualcuno if rs.recordcount = 0 then ' se no aggiungo un record nuovo rs.addnew rs.fields("giorno")= duecifre(day(date())) rs.fields("mese")= duecifre(month(date())) rs.fields("anno")= year(date()) rs.fields("totale") = rs.fields("totale") +1 rs.fields("unico") = rs.fields("unico") +1 rs.update amountQueryStats = amountQueryStats + 1 else ' altrimenti aggiorno quello esistente rs.fields("totale") = rs.fields("totale") +1 rs.fields("unico") = rs.fields("unico") +1 rs.update amountQueryStats = amountQueryStats + 1 end if end if End Sub '--- SUB PER SCRIVERE LE KEY NEL DATABASE (LE SCRIVO ORGANIZZATE PER MESE E ANNO) Sub ScriviKey(referer) key = KeyWord_Detect(referer) ' PRENDO LA KEYWORD if key <> "" then ' CERCO LA KEY IN QUESTO MESE E IN QUESTO ANNO sql = "select * from keyword where nome like '%" & key & "%' and mese ='" & Duecifre(month(date())) & "' and anno ='" & year(date()) &"'" rs.Open sql, connn, 3, 3 if rs.recordcount > 0 then ' SE L' HO TROVATA AUMENTO IL CONTATORE DI 1 rs.fields("visite") = rs.fields("visite") + 1 else rs.close sql = "Select * FROM keyword" rs.Open sql, connn, 3, 3 rs.addnew ' ALTRIMENTI LA SCRIVO COME NUOVA rs.fields("anno") = year(date()) rs.fields("mese") = Duecifre(month(date())) rs.fields("nome") = key rs.fields("visite") = 1 end if rs.update rs.close amountQueryStats = amountQueryStats + 1 end if End Sub '--- QUANTI GIORNI HA QUESTO MESE ? --- Function Finemese() finemese = 31 End Function Sub Vedi(tabella,mese,anno) SQL = "SELECT nome,visite,logo FROM " & tabella & " ORDER BY VISITE DESC, NOME ASC " if tabella = "keyword" or tabella = "referer" or tabella = "pagine" then sql = "select mese,anno,nome,visite FROM " & tabella & " where mese = '" & mese & "' and anno = '" & anno &"' ORDER BY visite DESC, nome ASC " rs.Open sql, connn, 3, 3 if rs.recordcount > 0 then 'CALCOLO IL TOTALE DELLE VISITE for i = 1 to rs.recordcount totale = totale + rs.fields("visite") rs.movenext next ' IN TOTALE MI TROVO LA SOMMA DELLE VISITE rs.movefirst ' SEGNO IL VALORE MASSIMO max = rs.fields("visite") ' IMPOSTO LA LARGHEZZA DELLA CELLA DEL GRAFICO whidthmax = 350 response.write "
" & VbCrLf response.write "" & VbCrLf response.write "
" & VbCrLf response.write ""& VbCrLf response.write ""& VbCrLf if tabella <> "keyword" and tabella <> "referer" and tabella <> "pagine" then response.write "" response.write ""& VbCrLf for i = 1 to rs.recordcount if rs.fields("visite") > 0 then percentuale = (100 * rs.fields("visite")) / totale response.write ""& VbCrLf if tabella <> "keyword" and tabella <> "referer" and tabella <> "pagine" then if rs.fields("logo") <> "" then response.write ""& VbCrLf else response.write ""& VbCrLf end if end if response.write ""& VbCrLf response.write ""& VbCrLf response.write ""& VbCrLf response.write ""& VbCrLf else response.write ""& rs.fields("nome") &": "& rs.fields("visite") &" Visite" response.write ""& rs.fields("nome") &": "& rs.fields("visite") &" Visite" response.write ""& rs.fields("nome") &": "& rs.fields("visite") &" Visite"& VbCrLf response.write ""& VbCrLf end if end if rs.movenext next response.write " "& VbCrLf response.write ""& VbCrLf if tabella <> "keyword" and tabella <> "referer" and tabella <> "pagine" then response.write ""& VbCrLf response.write "
LogoNomeVisite%Grafico
" response.write ""& rs.fields("nome") &" " if rs.fields("nome") ="" then response.write "Accesso Diretto" else response.write rs.fields("nome") end if response.write ""& rs.fields("visite") &""& formatnumber(percentuale,2) &"%" parziale = int((whidthmax * rs.fields("visite"))/ max) if parziale = 0 then response.write ""& rs.fields("nome") &": "& rs.fields("visite") &" Visite
Totale: "& totale &" " else response.write "" end if response.write "Rapporto creato "& formatdatetime(now(),1) &" alle ore "& formatdatetime(now(),3) &"
"& VbCrLf response.write "" response.write "" else response.write "
Non ci sono dati da visualizzare per questa selezione


" end if amountQueryStats = amountQueryStats + 1 end sub '--- SUB DI ANALISI DELLE VISITE SINGOLE E PAGINE VISTE 'ORDINO LA TABELLA PER IP E LA FILTRO SUL MESE CORRENTE 'CERCO QUANTI SONO GLI IP DIVERSI DI OGNI GIORNO (IMMAGINO SIANO ACCESSI UNICI) 'E PRENDO COME PAGINE VISTE LA LUNGHEZZA DEL RECORDSET Sub analisigiorni(tabella,mese,anno) ' CERCO IL GIORNO DEL MESE CON LE VISITE MASSIME visitemassime = 0 for g = 1 to finemese() dataanalisi= duecifre(g) & "/" & mese & "/" & anno SQL = "SELECT data,ip FROM " & tabella & " WHERE DATA = '"& dataanalisi &"' ORDER BY ip" rs.Open sql, connn, 3, 3 if visitemassime < rs.recordcount then visitemassime = rs.recordcount rs.close amountQueryStats = amountQueryStats + 1 next response.write "
" &VbCrLf response.write "" &VbCrLf 'DISEGNO LA TABELLA IN PROPORZIONE TRA ACCESSI UNICI E PAGINE VISTE for d = 1 to finemese() dataanalisi= duecifre(d) & "/" & mese & "/" & anno SQL = "SELECT ip,data FROM " & tabella & " WHERE DATA = '"& dataanalisi & "' ORDER BY IP" rs.Open sql, connn, 3, 3 if rs.recordcount > 0 then vecchio = rs.fields("IP") conta = 1 response.write " " &VbCrLf response.write " " &VbCrLf for i = 1 to rs.recordcount if vecchio <> rs.fields("IP") then conta = conta +1 vecchio = rs.fields("IP") end if rs.movenext next whidthmax = 400 width = int (rs.recordcount * whidthmax / visitemassime) response.write "" &VbCrLf response.write "" &VbCrLf rs.close amountQueryStats = amountQueryStats + 1 else rs.close amountQueryStats = amountQueryStats + 1 end if next response.write "
" & d & " - "& Ucase(weekdayname(weekday(dataanalisi))) & "Accessi Unici : " & conta  &"Pagine Viste : " & rs.recordcount &"" response.write "" & conta & "/" & rs.recordcount & "" & FormatNumber((rs.recordcount/conta),2) &" Pagine viste per Utente
" end sub '--- SCRIVO GLI ULTIMI 25 ACCESSI Sub Ipsub() sql = "select top 25 * from generale order by id desc, ora desc " rs.open sql, connn, 3, 3 fine = 25 if rs.recordcount < fine then fine = rs.recordcount response.write "" response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf for i = 1 to fine response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf response.write "" & vbcrlf rs.movenext next response.write "
DATAORAIPSTRINGA BROWSER
" & rs.fields("data") & "" & rs.fields("ora") & ""& rs.fields("ip") &"" & rs.fields("useragent") & "
" amountQueryStats = amountQueryStats + 1 end sub sub Strano() curioso = array("digext","com+",".net","netcaptor","hotbar","3com","compaq","zdn", "Libero", "wind)", "Tiscali", "Interfree", "Virgilio", "alice", "kataweb", "jumpy" ,"Fastweb", "Telecom", "Infostrada") curiosita = array(" preinstallati ", " con estensioni COM+ "," con FrameWork .NET "," con barra di Netcaptor "," con Spyware by HOTBAR.com ", " IE by 3COM"," IE By COMPAQ "," IE by ZDNet ","forniti da Libero","forniti da Wind", "forniti da Tiscali", "forniti da InterFree", "forniti da Virgilio", "forniti da Alice", "forniti da Kataweb", "forniti da Jumpy", "forniti da FastWeb" , "forniti da Telecom Italia", "forniti da Infostrada") response.write "


" end Sub Sub VediOreMese(tabella) ' --- INIZIO CON LA QUERY CHE MI RIPORTA IN UN VETTORE TUTTE LE VISITE DELL' ANNO PER MESE dim mesi() if tabella = "generale" then Redim mesi(12) maxciclo = 12 else Redim mesi(24) maxciclo = 24 end if if tabella = "generale" then for i = 1 to maxciclo sql= "Select data from generale where data like '%/" & duecifre(i) & "/" & year(date) & "%'" rs.Open sql, connn, 3, 3 mesi(i) = rs.recordcount rs.close amountQueryStats = amountQueryStats + 1 next else sql= "Select * from ora" rs.Open sql, connn, 3, 3 for i = 1 to maxciclo mesi(i) = rs.fields("visite") rs.movenext next rs.close amountQueryStats = amountQueryStats + 1 end if ' --- CERCO IL MASSIMO max = mesi(0) for i= 1 to maxciclo if max < mesi(i) then max = mesi(i) next ' --- E IL MINIMO PER LO SMORZAMENTO DELLE STATISTICHE min = mesi(0) for i= 1 to maxciclo if min > mesi(i) then min = mesi(i) next if max > 0 then AltezzaTab = 250 response.write "" response.write "" & vbcrlf for i = 1 to maxciclo response.write "" & VbCrLf conta = conta + mesi(i) next response.write "" response.write ""& vbcrlf for i = 1 to maxciclo if mesi(i) = (max + min) then pixnumber = "2" response.write "" & vbcrlf pixnumber = "" next response.write "" response.write "" for i = 1 to maxciclo response.write "" & VbCrLf next response.write "" response.write "" response.write "" response.write "" response.write "" response.write "
" if mesi(i) > 0 then if max = mesi(i) then response.write ""&mesi(i)&"" else response.write mesi(i) end if end if response.write "
" & vbcrlf lunghezza = int(AltezzaTab * mesi(i)/max) if lunghezza > 0 then response.write ""& i & ": " & mesi(i) &" Visite
" response.write ""& i & ": " & mesi(i) &" Visite
" response.write ""& i & ": " & mesi(i) &" Visite
" else response.write ""& i & ": " & mesi(i) &" Visite
" end if response.write "
"& duecifre(i) &"
Totale : " & conta & " " response.write "Rapporto creato "& formatdatetime(now(),1) &" alle ore "& formatdatetime(now(),3) response.write "
" else response.write "Non ci sono dati da visualizzare" end if End Sub '--- FUNCTION CHE DEPURA IL REFERER function depura(referer) referer = referer + "/" depura = replace(referer,"http://","") dove = InStr(depura,"/") depura = left(depura,dove - 1) end function '--- SUB PER SCRIVERE LE KEY NEL DATABASE (LE SCRIVO ORGANIZZATE PER MESE E ANNO) Sub ScriviReferer(referer) referer = depura(referer) ' PRENDO il referer if referer <> "" then referer ="http://" & referer &"" 'if referer <> "" then ' CERCO IL REFERER IN QUESTO MESE E IN QUESTO ANNO sql = "select * from referer where nome = '" & referer & "' and mese ='" & Duecifre(month(date())) & "' and anno ='" & year(date()) &"'" 'response.write sql & "
" rs.Open sql, connn, 3, 3 if rs.recordcount > 0 then ' SE L' HO TROVATA AUMENTO IL CONTATORE DI 1 if InStr(rs.fields("nome"),request.servervariables("Http_host")) > 0 then exit sub rs.fields("visite") = rs.fields("visite") + 1 else rs.close sql = "Select * FROM referer" rs.Open sql, connn, 3, 3 rs.addnew ' ALTRIMENTI LA SCRIVO COME NUOVA rs.fields("anno") = year(date()) rs.fields("mese") = Duecifre(month(date())) rs.fields("nome") = referer rs.fields("visite") = 1 end if rs.update rs.close amountQueryStats = amountQueryStats + 1 'end if End Sub '--- SUB PER SCRIVERE LE PAGINE VISTE NEL DATABASE (LE SCRIVO ORGANIZZATE PER MESE E ANNO) Sub ScriviPagine(pagina) For t = Len (pagina) to 1 step -1 if mid(pagina,t,1) = "/" then Exit for else ch = mid(pagina,t,1) + ch end if next pagina = ch Set rs = Server.CreateObject("ADODB.Recordset") if pagina <> "" then ' CERCO LA pagina IN QUESTO MESE E IN QUESTO ANNO sql = "select * from pagine where nome = '" & pagina & "' and mese ='" & Duecifre(month(date())) & "' and anno ='" & year(date()) &"'" rs.Open sql, connn, 3, 3 if rs.recordcount > 0 then ' SE L' HO TROVATA AUMENTO IL CONTATORE DI 1 rs.fields("visite") = rs.fields("visite") + 1 else rs.close sql = "Select * FROM pagine " rs.Open sql, connn, 3, 3 rs.addnew ' ALTRIMENTI LA SCRIVO COME NUOVA rs.fields("anno") = year(date()) rs.fields("mese") = Duecifre(month(date())) rs.fields("nome") = pagina rs.fields("visite") = 1 end if rs.update rs.close amountQueryStats = amountQueryStats + 1 end if End Sub Sub ScriviPaese() ' Preparo le variabili IPvar = Request.ServerVariables("REMOTE_ADDR") IPdividez = split(IPvar,".") InProtA = IPdividez(0) InProtB = IPdividez(1) InProtC = IPdividez(2) InProtD = IPdividez(3) 'Converto l' ip in formato long IpNumberz = (InProtA * 16777216) + (InProtB * 65536) + (InProtC * 256) + InProtD 'Cerco l' ip negli range internazionali assegnati sql = "SELECT * FROM IP WHERE Sup_mask <=" & IpNumberz & " AND inf_mask >=" & IpNumberz rs.Open sql, connn If rs.EOF or rs.BOF Then Nation = "Non ancora nel Database" flagz = "unknown" ' The name of 'my' unknown flag - Yours may be "-" Else Nation = rs.fields("name") flagz = rs.fields("c2") End If rs.close amountQueryStats = amountQueryStats + 1 sql= "SELECT * FROM paesi WHERE suffisso ='." & lcase(flagz) & "'" rs.Open sql, connn, 3, 3 ' Se lo trovo lo scrivo nel database :) If rs.EOF or rs.BOF Then response.write " " else rs.fields("visite") = rs.fields("visite") + 1 rs.update end if rs.close amountQueryStats = amountQueryStats + 1 End Sub Sub ScriviColor(idcolor) SQL = "SELECT * FROM color" rs.Open sql, connn, 3, 3 rs.find "id='" & idcolor & "'" rs.fields("visite") = rs.fields("visite") +1 rs.update rs.close amountQueryStats = amountQueryStats + 1 End Sub %> <% '********************************************************* '* Z-STAT v 0.6.x PreAlpha * '* * '* file zstat.asp * '* codice per l' inserimento delle stat nel databse * '* * '* by Zavanella Davide 18-09-2003 * '* * '********************************************************* '--- SEGNO L' INDIRIZZO IP --- ip = request.servervariables("REMOTE_ADDR") '--- SEGNO IL REFERER DI PROVENIENZA --- referer = request.servervariables("HTTP_REFERER") '--- SEGNO LO USERAGENT PER VEDERE IL BWS E IL S.O. useragent = lcase(request.servervariables("HTTP_USER_AGENT")) wap = Request.ServerVariables("HTTP_ACCEPT") ' BETA VERSION PER VEDERE SE E' UN CELL '--- FINE PARTE FUNCTION E SUB Sistema = os(useragent) browver = BWS(useragent) spid = spider(useragent) '--- SCRIVO LA TABELLA GENERALE sql= "Select * from generale" rs.Open sql, connn, 3, 3 rs.addnew rs.fields("data") = formattadata(date()) rs.fields("ora") = formattaora(now()) rs.fields("ip") = ip rs.fields("referer") = referer rs.fields("pagina") = request.servervariables("SCRIPT_NAME") rs.fields("useragent") = useragent if Sistema <> 12 then rs.fields("osok") = true 'SEGNO CHE HO TROVATO CON SUCCESSO IL S.O. if browver <> 9 then rs.fields("bwok") = true 'SEGNO CHE HO TROVATO CON SUCCESSO IL BWS. rs.update rs.close if spid = "0" then sql = "select id,visite from os where id like '"& Sistema &"'" rs.Open sql, connn, 3, 3 rs.fields("visite") = rs.fields("visite") + 1 rs.update rs.close sql = "select id,visite from bw where id like '"& browver &"'" rs.Open sql, connn, 3, 3 rs.fields("visite") = rs.fields("visite") + 1 rs.update rs.close else sql = "select id,visite from spider where id like '"& spid &"'" rs.Open sql, connn, 3, 3 rs.fields("visite") = rs.fields("visite") + 1 rs.update rs.close end if Call ScriviOra() Call ScriviKey(referer) Call ScriviReferer(referer) if isnumeric(lcase(request.querystring("idpage"))) then Call ScriviPagine(request.servervariables("SCRIPT_NAME") & "?idpage=" & request.querystring("idpage")) else Call ScriviPagine(request.servervariables("SCRIPT_NAME") ) end if Call ScriviPaese() Call ScriviVisite() '--- libero risorse connn.close set rs = nothing set connn = nothing %> <% end if %> <%' Get SITE MENU & SUbMenu %> <% ' ************** MENU ************** ' jf's query sql_string = " SELECT Pages.* FROM Pages WHERE (((Pages.SITEID)=" & SITEID & ") AND ((Pages.ParentPage)=0)) AND ACTIF = 1 ORDER BY Pages.ORDRE ;" ' Marc's freaking query sql_string = "DECLARE @currentsiteid VARCHAR(5) " & _ "SET @currentsiteid = " & SITEID & " " & _ " " & _ "SELECT AllPages.IDPAGE, AllPages.SITEID, AllPages.DATE_IN, AllPages.NOM, AllPages.NOMen, AllPages.TITRE, AllPages.TITREen, AllPages.DESCRIPTION, " & _ " AllPages.DESCRIPTIONen, AllPages.ORDRE, AllPages.IsFORUM, AllPages.IsDEFAULT, AllPages.ParentPage, AllPages.countVisit, " & _ " AllPages.IsSHARED, " & _ " " & _ " (SELECT COUNT(PAGES.IDPAGE) FROM PAGES LEFT OUTER JOIN ( " & _ " SELECT IDSHAREDPAGE, IDSITE, IDPAGE, IsVISIBLE FROM PagesShared AS PagesShared_1 WHERE (IDSITE = @currentsiteid) " & _ " ) AS PagesShared ON PAGES.IDPAGE = PagesShared.IDPAGE " & _ " WHERE PARENTPAGE = AllPages.IDPAGE AND (CASE WHEN PAGES.SITEID = @currentsiteid THEN PAGES.ACTIF ELSE ISNULL(PagesShared.IsVISIBLE, 1) END = 1) ) AS ChildCount, " & _ " " & _ " CASE WHEN AllPages.SITEID = @currentsiteid " & _ " THEN AllPages.ACTIF " & _ " ELSE ISNULL(PagesShared.IsVISIBLE, 1) " & _ " END as ACTIF " & _ " " & _ "FROM (SELECT DISTINCT IDPAGE, SITEID " & _ " FROM Pages " & _ " WHERE (SITEID = @currentsiteid) AND (ParentPage = 0) " & _ " " & _ " UNION ALL " & _ " " & _ " SELECT DISTINCT SubPages.IDPAGE, SubPages.SITEID " & _ " FROM Pages AS SubPages " & _ " WHERE SITEID = (SELECT tblSITE.ParentSite FROM tblSITE WHERE SITEID = @currentsiteid) AND (SubPages.IsSHARED = 1)) AS GoodPages " & _ " INNER JOIN Pages AS AllPages ON GoodPages.IDPAGE = AllPages.IDPAGE " & _ " LEFT OUTER JOIN (SELECT IDSHAREDPAGE, IDSITE, IDPAGE, IsVISIBLE " & _ " FROM PagesShared AS PagesShared_1 " & _ " WHERE (IDSITE = @currentsiteid)) AS PagesShared ON AllPages.IDPAGE = PagesShared.IDPAGE " & _ "WHERE (AllPages.ParentPage = 0) AND (CASE WHEN AllPages.SITEID = @currentsiteid THEN AllPages.ACTIF ELSE ISNULL(PagesShared.IsVISIBLE, 1) END = 1) AND AllPages.IDPAGE <> 863 " & _ "ORDER BY AllPages.ORDRE " Set RSmenu = Server.CreateObject("ADODB.Connection") Set RSmenu=conn.execute(sql_string) amountQuery = amountQuery + 1 Function SubMenu(siteid, pageid) sql_string = "DECLARE @currentsiteid VARCHAR(5) " & _ "DECLARE @parentpageid VARCHAR(5) " & _ "SET @currentsiteid = " & siteid & " " & _ "SET @parentpageid = " & pageid & " " & _ " " & _ "SELECT AllPages.IDPAGE, AllPages.SITEID, AllPages.DATE_IN, AllPages.NOM, AllPages.NOMen, AllPages.TITRE, AllPages.TITREen, AllPages.DESCRIPTION, " & _ " AllPages.DESCRIPTIONen, AllPages.ORDRE, AllPages.IsFORUM, AllPages.IsDEFAULT, AllPages.ParentPage, AllPages.countVisit, " & _ " AllPages.IsSHARED, " & _ " " & _ " CASE WHEN AllPages.SITEID = @currentsiteid " & _ " THEN AllPages.ACTIF " & _ " ELSE ISNULL(PagesShared.IsVISIBLE, 1) " & _ " END as ACTIF " & _ " " & _ "FROM (SELECT DISTINCT IDPAGE, SITEID " & _ " FROM Pages " & _ " WHERE (SITEID = @currentsiteid) AND NOT(ParentPage = 0) " & _ " " & _ " UNION ALL " & _ " " & _ " SELECT DISTINCT SubPages.IDPAGE, SubPages.SITEID " & _ " FROM Pages AS SubPages " & _ " WHERE SITEID = (SELECT tblSITE.ParentSite FROM tblSITE WHERE SITEID = @currentsiteid) AND (IsNull(SubPages.IsSHARED, 1) = 1)) AS GoodPages " & _ " INNER JOIN Pages AS AllPages ON GoodPages.IDPAGE = AllPages.IDPAGE " & _ " LEFT OUTER JOIN (SELECT IDSHAREDPAGE, IDSITE, IDPAGE, IsVISIBLE " & _ " FROM PagesShared AS PagesShared_1 " & _ " WHERE (IDSITE = @currentsiteid)) AS PagesShared ON AllPages.IDPAGE = PagesShared.IDPAGE " & _ "WHERE Not (AllPages.ParentPage = 0) AND (ParentPage = @parentpageid) AND (CASE WHEN AllPages.SITEID = @currentsiteid THEN AllPages.ACTIF ELSE ISNULL(PagesShared.IsVISIBLE, 1) END = 1) " & _ "ORDER BY AllPages.ORDRE" 'response.write sql_string SubMenu = sql_string amountQuery = amountQuery + 1 End Function %> <%' Get SITE PAGE CONTENT, PAGE TITLE, PAGE LANGUAGE, PAGE ID %> <% IDPAGE = request("idpage") ' get home page ID Set RSpage=conn.execute("Select * from Pages where siteid=" & SITEID & " ORDER BY ORDRE") idHomePage = RSpage("idpage") RSpage.close amountQuery = amountQuery + 1 if idpage = "" then idpage = idHomePage if cint(idpage) = cint(idHomePage) then isHomePage = True shopPage = 863 'videoPage = 743 ' IF Request.Cookies("LANGUAGE"&SITEID) = "en" THEN USERLANGUAGE = "en" ELSE USERLANGUAGE = "" END IF ' because client need's only english version lets put english variable by default 'USERLANGUAGE = "en" ' ************** PAGE CONTENT ************** sql_string = "DECLARE @currentsiteid VARCHAR(5) " & _ "DECLARE @currentpageid VARCHAR(5) " & _ "SET @currentsiteid = " & SITEID & " " & _ "SET @currentpageid = " & IDPAGE & " " & _ " " & _ "SELECT AllPages.*, " & _ " " & _ " CASE WHEN AllPages.SITEID = @currentsiteid " & _ " THEN AllPages.ACTIF " & _ " ELSE ISNULL(PagesShared.IsVISIBLE, 1) " & _ " END as ACTIF " & _ " " & _ "FROM (SELECT DISTINCT IDPAGE, SITEID " & _ " FROM Pages " & _ " WHERE (SITEID = @currentsiteid) " & _ " " & _ " UNION ALL " & _ " " & _ " SELECT DISTINCT SubPages.IDPAGE, SubPages.SITEID " & _ " FROM Pages AS SubPages " & _ " WHERE SITEID = (SELECT tblSITE.ParentSite FROM tblSITE WHERE SITEID = @currentsiteid) AND (SubPages.IsSHARED = 1)) AS GoodPages " & _ " INNER JOIN Pages AS AllPages ON GoodPages.IDPAGE = AllPages.IDPAGE " & _ " LEFT OUTER JOIN (SELECT IDSHAREDPAGE, IDSITE, IDPAGE, IsVISIBLE " & _ " FROM PagesShared AS PagesShared_1 " & _ " WHERE (IDSITE = @currentsiteid)) AS PagesShared ON AllPages.IDPAGE = PagesShared.IDPAGE " & _ "WHERE (CASE WHEN AllPages.SITEID = @currentsiteid THEN AllPages.ACTIF ELSE ISNULL(PagesShared.IsVISIBLE, 1) END = 1) AND (AllPages.IDPAGE = @currentpageid) " & _ "ORDER BY AllPages.ORDRE" ' sql_string = "SELECT * from pages where SITEID = " & SITEID & " and IDPAGE = " & IDPAGE Set RScontent=conn.execute(sql_string) amountQuery = amountQuery + 1 if RScontent.eof then RScontent.close response.redirect("?idpage=" & idHomePage) end if ' if this page des not belong to the site, send him back to home page ' NOTE : we can use this function because we are sharing pages from MASTER SITE !! FUCK! 'If RScontent.eof Then ' Response.redirect(defaultPage) ' Response.End 'End If content = RScontent("DESCRIPTION"&USERLANGUAGE) title = RScontent("TITRE"&USERLANGUAGE) myPageKeywords = RScontent("myPageKeywords") myPageDescription = RScontent("myPageDescription") RScontent.close %> <%' Get SITE OBJECT and replace VARIABLE in page content %> <% ' ************** Check sites OBJECTS and replace page content if needed ************** Set rsObjects = Server.CreateObject("ADODB.Connection") rsObjects.open MM_DB_conn_STRING Set rsObjects=rsObjects.execute(" SELECT * from tblObjects order by ORDRE") amountQuery = amountQuery + 1 while not rsObjects.eof IF CStr(rsObjects("ACTIF")) = 1 then strObjDesc = rsObjects("DESCRIPTION"&USERLANGUAGE) else strObjDesc = "" content= replace(content,"##" & left(RSObjects("NOM"),15) & "-" & rsObjects("IDOBJECT") & "##",strObjDesc) rsObjects.moveNext : wend rsObjects.Close Sub getObjectId(id) Set rsObjects = Server.CreateObject("ADODB.Connection") rsObjects.open MM_DB_conn_STRING Set rsObjects=rsObjects.execute(" SELECT * from tblObjects where idobject = " & id & ";") amountQuery = amountQuery + 1 if not rsObjects.eof then strObject = rsObjects("DESCRIPTION"&USERLANGUAGE) if InStr(1,Request.ServerVariables("HTTP_HOST"),"pcpixel.com",0) = 0 then strObject = replace(strObject,"http://www.pcpixel.com/" & foldername & "/",urlReal & "/") strObject = replace(strObject,"http://pcpixel.com/" & foldername & "/",urlReal & "/") strObject = replace(strObject, "/" & foldername & "/", "/") end if strObject = replace(strObject, "##NEWSLETTER##", strNewsletter) strObject = replace(strObject, "##CALENDRIER##", strCalendar) strObject = replace(strObject, "##SITEID##", SITEID) strObject = replace(strObject, "##BUSINESSNAME##", businessname) strObject = replace(strObject, "##YEAR##", year(date())) strObject = replace(strObject, "##URL##", urlReal) strObject = replace(strObject, "[timestamp]", LongDate(Now)) response.write(strObject) end if rsObjects.Close end sub Sub getObjects(theObjectName) if ParentSite <> 0 then tempSITEID = ParentSite else tempSITEID = SITEID end if Set rsObjects = Server.CreateObject("ADODB.Connection") rsObjects.open MM_DB_conn_STRING Set rsObjects=rsObjects.execute(" SELECT * from tblSITE_config where SITEID = " & tempSITEID & " AND NAME = '" & lcase(theObjectName) & "';") amountQuery = amountQuery + 1 if not rsObjects.eof then strObject = "" & rsObjects("VALUE"&USERLANGUAGE) if InStr(1,Request.ServerVariables("HTTP_HOST"),"pcpixel",0) = 0 then strObject = replace(strObject,"http://www.pcpixel.com/" & foldername & "/",urlReal & "/") strObject = replace(strObject,"http://pcpixel.com/" & foldername & "/",urlReal & "/") strObject = replace(strObject, "/" & foldername & "/", "/") end if If Instr(1, strObject, "##CALENDRIER##") > 0 Then strObject = replace(strObject, "##CALENDRIER##",getCalendar()) strObject = replace(strObject, "##NEWSLETTER##", strNewsletter) strObject = replace(strObject, "##SITEID##", SITEID) strObject = replace(strObject, "##BUSINESSNAME##", businessname) strObject = replace(strObject, "%%msg%%",MSG) strObject = replace(strObject, "##msgEmail##", MSG) response.write(strObject) else response.write("ERREUR: Object " & theObjectName & " est invalide!") end if rsObjects.Close end sub if Instr(1, lcase(content), "##obj") > 0 then iStart = Instr(1, lcase(content), "##obj~") If iStart > 0 Then ' response.write(iStart) iEnd = Instr(iStart + 3, content, "##") If iEnd > 0 Then strFULLRSS = Right(Left(content, iEnd + 1), iEnd - iStart + 2) strURL = Right(Left(content, iEnd - 2), iEnd - iStart - 7) If Instr(1, strURL, "~") > 0 Then intCount = Mid(strURL, Instr(1, strURL, "~") + 1) strURL = Left(strURL, Instr(1, strURL, "~") - 1) Else intCount = 5 End If End If End if 'response.write("|"&intCount) 'strFULLRSS = replace(lcase(strFULLRSS),"feed","http") NOTE: some urls add the feed in it! lol 'strFULLRSS = replace(lcase(strFULLRSS),"/https/","/") ' response.Write (strFULLRSS) content = replace(lcase(content), lcase(strFULLRSS)) end if ' siteid = SafeSQL(request.querystring("xsiteid")) ' idnews = SafeSQL(request.querystring("xidnews")) ' idclient = SafeSQL(request.querystring("xidclient")) ' ' theFullStr = request.querystring ' whereIsUrl = Instr(1, lcase(theFullStr), "&xurl=") + 6 ' theUrl = mid(theFullStr,whereIsUrl) %> <%' Check if variable ##CALENDAR## is in page content, if yes raplace it by SITE CALENDAR %> <% ' ************** CALENDAR ************** ' first check if we have to check if there is the variabel in the page content If Instr(1, content, "##CALENDRIER##") > 0 Then session.lcid=1033 Dim strCalendar goDate=Request.QueryString("goDate") if goDate<>"" then goDate=Request.QueryString("goDate") else goDate=Request.Form("goDate") if goDate<>"" then goDate=Request.Form("goDate") else goDate=date() end if end if goDateMonth=month(goDate) goDateDay=day(goDate) goDateYear=year(goDate) goDateFirst=goDateMonth&"/1/"&goDateYear goDateFirstWeekday=Weekday(goDateFirst) goDateNextMonth=DateAdd("m",1,goDateFirst) goDateTotalDays=DateDiff("d",goDateFirst,goDateNextMonth) SQL = "SELECT * FROM CALENDRIER WHERE SITEID = "& siteid &" AND year(dte) = " & goDateYear &" AND month(dte)= " & goDateMonth & " AND (IsACTIVE = 1) ORDER BY Day(dte)" Set RScalendar = Server.CreateObject("ADODB.Connection") RScalendar.open MM_DB_conn_STRING Set RScalendar=RScalendar.execute(SQL) amountQuery = amountQuery + 1 Dim iDay, iWeek, sFontColor, dictDte(31,4), intCount intCount= 0 strevent = 0 ' populate array with days of month do until RScalendar.EOF or intCount = 31 if Day(RScalendar("dte")) = intCount + 1 then strevent = strevent + 1 dictDte(intCount,1) = day(RScalendar("dte") ) dictDte(intCount,2) = RScalendar("id") dictDte(intCount,3) = RScalendar("TITLE") dictDte(intCount,4) = RScalendar("text_field") 'strtest = strtest & "dictDte("&intCount&",1) = " & dictDte(intCount,1) & " and dictDte("&intCount&",2) = " & dictDte(intCount, 2) & "
" 'response.end RScalendar.Movenext End If 'dictDte(intCount, 2) = intCount + 1 'response.write(dictDte(intCount, 1)) intCount = intCount + 1 loop 'response.write(strtest) 'response.end strCalendar = vbcrlf & vbcrlf & "" & vbcrlf & "
" & vbcrlf strCalendar = strCalendar & "
<< " & vbcrlf Select case goDateMonth Case 1 NomMois = "Janvier" Case 2 NomMois = "Février" Case 3 NomMois = "Mars" Case 4 NomMois = "Avril" Case 5 NomMois = "Mai" Case 6 NomMois = "Juin" Case 7 NomMois = "Juillet" Case 8 NomMois = "Aout" Case 9 NomMois = "Septembre" Case 10 NomMois = "Octobre" Case 11 NomMois = "Novembre" Case 12 NomMois = "Décembre" end select strCalendar = strCalendar & NomMois & " " & goDateYear & " >>
" & vbcrlf strCalendar = strCalendar & "
" & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf weekdayCell=1 ' ************** empty days ************** i=1 do while i < goDateFirstWeekday strCalendar = strCalendar & " " & vbcrlf i=i+1 weekdayCell=weekdayCell+1 loop ' ************** month days ************** wday=0 cellDate=goDateFirst do while wday < goDateTotalDays strtitle = dictDte(day(cellDate)-1,3) strtitle = Replace(strtitle,"'","\'") 'strtitle = Replace(strtitle,"/","") num_carr = len(dictDte(day(cellDate)-1,4)) If num_carr > 300 then strtable = left(dictDte(day(cellDate)-1,4),300) & "

... cliquez pour le texte intégral" else strtable = dictDte(day(cellDate)-1,4) end if strtable = Replace(strtable,"param","*ex* ") strtable = Replace(strtable,"embed","*ex* ") strtable = Replace(strtable,"","") strtable = Replace(strtable,"","") strtable = Replace(strtable,"","") strtable = Replace(strtable,"","") strtable = Replace(strtable,"","") strtable = Replace(strtable,"","") strtable = Replace(strtable,"'","\'") strtable = Replace(strtable,"
" ,"") strtable = Replace(strtable,"
" ,"") strtable = Replace(strtable,"

" ,"") strtable = Replace(strtable,"

" ,"") strtable = Replace(strtable,CHR(34) ,"") strtable = Replace(strtable,CHR(13),"") strtable = Replace(strtable,CHR(10),"
") strtable = Replace(strtable,VbCrLf ,"
") if dictDte(day(cellDate)-1,1) = day(cellDate) then strCalendar = strCalendar & "
" & vbcrlf if weekdayCell=7 then strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & vbcrlf weekdayCell=1 else weekdayCell=weekdayCell+1 end if cellDate=DateAdd("d",1,cellDate) wday=wday+1 loop ' **************************** strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & "
DLMMJVS
" if weekdayCell=1 then strCalendar = strCalendar & " " & vbcrlf end if strCalendar = strCalendar & " " & day(cellDate) & vbcrlf 'strCalendar = strCalendar & " " & day(cellDate) & "" & vbcrlf else strCalendar = strCalendar & " " & vbcrlf strCalendar = strCalendar & " " & day(cellDate) &"" & vbcrlf end if if weekdayCell=1 then ' premiere journée de semiane end if strCalendar = strCalendar & "
" & vbcrlf strCalendar = strCalendar & "
" & vbcrlf if strevent > 0 then If strevent >1 then strplur = "s" 'strCalendar = strCalendar & "
" & strevent & " évènement" & strplur & " en " & NomMois & "
" & vbcrlf end if strCalendar = strCalendar & vbcrlf & vbcrlf & vbcrlf RScalendar.Close content = replace(content, "##CALENDRIER##", strCalendar) end if '*********** END CALENDAR *********** %> <%' Check if variable ##RSS## is in page content, if yes raplace it by SITE RSS FEEDS %> <% If Instr(1, content, "##RSS") > 0 Then Function getRSS (myRSSURL) ' ************** RSS FEEDS ************** ' Variables 'Dim myRSSURL, Dim myRSSDocument, myNews, mychannelNodes, entry, myChannelTitle, myChannelLink, myChannelDescription, myBase, myitemNodes, item, myitemTitle, myitemLink, myitempubDate, myitemDescription ' get RSS Address e.g : http://www.mysite.com/ASPRSSReader.asp?rssurl=http://www.rsssite.com/rssfile 'myRSSURL = strURL 'request("rssurl") if Len(myRSSURL)=0 then ' Change with your default RSS URL myRSSURL = "http://news.google.ca/news?hl=fr&ned=fr_ca&q=laval&ie=UTF-8&output=rss" myRSSURL = "http://news.google.ca/nwshp?tab=wn&ned=en_ca&topic=s&output=rss" 'myRSSURL = "http://noctambules.tv/GH_Feed.asp?CatID=0" end if 'Response.write "http://news.google.ca/nwshp?tab=wn&ned=en_ca&topic=s&output=rss" 'Response.Write myRSSURL ' Load RSS file set myRSSDocument = createObject("Msxml.DOMDocument") myRSSDocument.async = false myRSSDocument.setProperty "ServerHTTPRequest", true myRSSDocument.load(myRSSURL) ' Check if it 's loaded If (myRSSDocument.parseError.errorCode <> 0) then ' Save error in myNews for displaying myNews = "XML error: " & myRSSDocument.parseError.reason ' Continue if OK Else 'Get elements set mychannelNodes = myRSSDocument.selectNodes("//channel/*") for each entry in mychannelNodes ' Normaly one Channel if entry.tagName = "title" then myChannelTitle = entry.text elseif entry.tagName = "link" then myChannelLink = entry.text elseif entry.tagName = "description" then myChannelDescription = entry.text ' Save all in myBase for displaying myBase = myBase & "" & myChannelTitle & "" myBase = myBase & "
" & myChannelDescription myBase = myBase & "

" & myChannelTitle & "

" & "
" end if next ' next element ' here start the table set myitemNodes = myRSSDocument.selectNodes("//item/*") For each item in myitemNodes if item.tagName = "title" then myItemTitle = item.text elseif item.tagName = "link" then myItemLink = item.text elseif item.tagName = "pubDate" then myItempubDate = item.text elseif item.tagName = "description" then myItemDescription = item.text ' Save all in myNews for displaying 'myNews = myNews & myItempubDate myNews = myNews & "" & myItemTitle & "" myNews = myNews & "

" & myItemDescription & "

" ' myNews = myNews & "

" & myItemTitle & "


" end if next End If getRSS = myNews End function Function HTMLDecode(sText) Dim I sText = Replace(sText, """, Chr(34)) sText = Replace(sText, "<" , Chr(60)) sText = Replace(sText, ">" , Chr(62)) sText = Replace(sText, "&" , Chr(38)) sText = Replace(sText, " ", Chr(32)) For I = 1 to 255 sText = Replace(sText, "&#" & I & ";", Chr(I)) Next HTMLDecode = sText End Function iStart = Instr(1, content, "##RSS,") If iStart > 0 Then iEnd = Instr(iStart + 3, content, "##") If iEnd > 0 Then strFULLRSS = Right(Left(content, iEnd + 1), iEnd - iStart + 2) strURL = Right(Left(content, iEnd - 2), iEnd - iStart - 7) If Instr(1, strURL, ",") > 0 Then intCount = Mid(strURL, Instr(1, strURL, ",") + 1) strURL = Left(strURL, Instr(1, strURL, ",") - 1) Else intCount = 5 End If End If End if 'response.Write strURL content = replace(content, strFULLRSS, getRSS(HTMLDecode(strURL))) end if %> <%' Check visitor is adding is email into the newsletter (IF REQUEST("Add2News") = "TRUE" ) %> <% ' ************** BEGIN NEWSLETTER ************** ' If Instr(1, content, "##NEWSLETTER##") > 0 Then Dim strNewsletter strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & " " & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & " " & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf strNewsletter = strNewsletter & "
" & vbcrlf content = replace(content, "##NEWSLETTER##", strNewsletter) 'END IF MSG = "YOUR EMAIL" if USERLANGUAGE = "en" then MSG = "YOUR EMAIL" IF REQUEST("Add2News") = "TRUE" THEN EMAIL = safeSQL(lcase(REQUEST("EMAIL"))) ' *******************CHECK EMAIL AND ADD TO DB*********************** if trim(EMAIL) = "" or instr((EMAIL),"@")=0 or instr(EMAIL,".")=0 then MSG = "INVALID EMAIL!" if USERLANGUAGE = "en" then MSG = "INVALID EMAIL!" ELSE ' check if client exist SQl = "Select * from Clients where SITEID =" & SITEID & " AND EMAIL = '" & email & "';" Set RScheck = Server.CreateObject("ADODB.Connection") RScheck.open MM_DB_conn_STRING amountQuery = amountQuery + 1 Set RScheck=RScheck.execute(SQL) Add2db = true if NOT RScheck.EOF THEN IDCLIENT = RScheck("IDCLIENT") : Add2db = false RScheck.Close if Add2db then msg_content = "newsletter: " & now() & "(" & hour(now())& "h" & minute(now())& ")" strSQL="insert into Clients(SITEID, EMAIL, NOM, NOTES, IDTYPE) " &_ " VALUES(" & SITEID & ", '" & EMAIL & "','" & EMAIL & "', '" & msg_content & "', 3);" conn.execute(strSQL) amountQuery = amountQuery + 1 MSG = "THANK YOU!" if USERLANGUAGE = "en" then MSG = "THANK YOU!" else MSG = "ALREADY SUBSCRIBE!" if USERLANGUAGE = "en" then MSG = "ALREADY SUBSCRIBE!" END IF END IF END IF strNewsletter = replace(strNewsletter, "##msgEmail##", MSG) ' ************** END NEWSLETTER ************** %> <% If Instr(1, content, "##SITEMAP##") > 0 Then Dim mySiteMap, level1, level2 mySiteMap = mySiteMap & "
" & vbcrlf mySiteMap = mySiteMap & "
    " & vbcrlf while not RSmenu.EOF level1 = level1 + 1 mySiteMap = mySiteMap & "
  • " & level1 & " - " & RSmenu("NOM"&USERLANGUAGE) & "  "& RSmenu("TITRE"&USERLANGUAGE) &"" & vbcrlf If RSmenu("ChildCount") > 0 Then mySiteMap = mySiteMap & "
      " & vbcrlf Set RSsubmenu = Conn.Execute(SubMenu(siteid, RSmenu("idpage"))) amountQuery = amountQuery + 1 while not RSsubmenu.EOF level2 = level2 + 1 mySiteMap = mySiteMap & "
    • " & level1 & "." & level2 & " - " & RSsubmenu("NOM"&USERLANGUAGE) & "  "& RSsubmenu("TITRE"&USERLANGUAGE) &"
    • " & vbcrlf RSsubmenu.MOVENEXT : WEND : level2 = 0 mySiteMap = mySiteMap & "
    " & vbcrlf End If mySiteMap = mySiteMap & "
  • " & vbcrlf RSmenu.MOVENEXT : WEND : RSmenu.requery mySiteMap = mySiteMap & "
" & vbcrlf mySiteMap = mySiteMap & "
" & vbcrlf content = replace(content, "##SITEMAP##", mySiteMap) end if %> <% ' ##################### THIS INC. FILE IS FOR CUSTOM THEME PURPOSE ####################### ' amountQuery = amountQuery + 1 %> <% ' ##################### THIS INC. FILE IS FOR CUSTOM SITE PURPOSE ####################### ' amountQuery = amountQuery + 1 %> <% Function RandomeLine(strCategory) Set RSLine = Server.CreateObject("ADODB.Connection") Set RSLine=conn.execute("SELECT * FROM RandomLine WHERE Category = '" & strCategory & "'") rsArray = RSLine.GetRows() amountQuery = amountQuery + 1 RSLine.Close Set RSLine = Nothing Dim intRnd Randomize Timer intRnd = (Int(RND * UBound(rsArray, 2) + 1)) ' Now moving the cursor to random record number ' Showing the random statement If rsArray(2, intRnd) <> "" Then Response.Write "" & rsArray(1, intRnd) & " - " & rsArray(2, intRnd) Else Response.Write "" & rsArray(1, intRnd) & "" End If ' Closing the database End FUnction 'if InStr(1,content,"##RandomLine##",0) = 1 then ' '' cat variable : strCategory ' ' Set RSLine = Server.CreateObject("ADODB.Connection") ' Set RSLine=conn.execute("SELECT * FROM RandomLine WHERE Category = '" & strCategory & "'") ' rsArray = RSLine.GetRows() ' RSLine.Close ' Set RSLine = Nothing ' ' Dim intRnd ' Randomize Timer ' intRnd = (Int(RND * UBound(rsArray, 2) + 1)) ' ' ' Now moving the cursor to random record number ' ' ' ' Showing the random statement ' If rsArray(2, intRnd) <> "" Then ' Response.Write "" & rsArray(1, intRnd) & " - " & rsArray(2, intRnd) ' Else ' Response.Write "" & rsArray(1, intRnd) & "" ' End If ' ' ' Closing the database 'content = replace(content, "##RandomLine##", strRandomLine) ' 'End if %> <% ' ############# AdSense ############## If Instr(1, content, "##ADSENSE##") > 0 Then content = replace(content, "##ADSENSE##", myAdSense) end if ' ############# mySearch ############## If Instr(1, content, "##SEARCH##") > 0 Then content = replace(content, "##SEARCH##", mySearch) end if ' ############# myWeather ############## If Instr(1, content, "##METEO##") > 0 Then content = replace(content, "##METEO##", myWeather) end if ' ############# timeStamp for bodog's ads ############## If Instr(1, content, "[timestamp]") > 0 Then content = replace(content, "[timestamp]", LongDate(Now)) end if ' ############# redirect to URL ############## iStart = Instr(1, content, "##URL=") If iStart > 0 Then iEnd = Instr(iStart + 3, content, "##") If iEnd > 0 Then 'strFULLRSS = Right(Left(content, iEnd + 1), iEnd - iStart + 2) strURL = Right(Left(content, iEnd-1 ), iEnd - iStart - 7 + 1) ' If Instr(1, strURL, ",") > 0 Then ' intCount = Mid(strURL, Instr(1, strURL, ",") + 1) ' strURL = Left(strURL, Instr(1, strURL, ",") - 1) ' Else ' intCount = 5 ' End If End If response.redirect(strURL) End if %> <% ' ******************* CHANGE HTML CONTENT IF SITE AS IS OWN DOMAIN *********************** if InStr(1,Request.ServerVariables("HTTP_HOST"),"pcpixel.com",0) = 0 then content = replace(content,"http://www.pcpixel.com/" & foldername & "/",urlReal & "/") content = replace(content,"http://pcpixel.com/" & foldername & "/",urlReal & "/") content = replace(content, "/" & foldername & "/", "/") end if content = replace(content, "##SITEID##", SITEID) content = replace(content, "##BUSINESSNAME##", businessname) content = replace(content, "##YEAR##", year(date())) content = replace(content, "##URL##", urlReal) content = replace(content, "[timestamp]", LongDate(Now)) %> <% Sub getSQLInfo response.write("") end sub ' ************** Section SHOP ************** ' if cint(idpage) = cint(shopPage) then ' shop = true ' content = "" ' ' Dim RS_CAT, RS_PRODUCT, RS_PRODUCTprice ' Set RS_CAT = Conn.Execute("SELECT ProduitsType.* FROM ProduitsType WHERE (SITEID = " & siteid & ") and IDTYPE <> 254 ORDER BY NOM" & USERLANGUAGE) ' idtype = request("idtype") ' amountQuery = amountQuery + 1 ' ' ' if no Type , select the first one in DB ' if idtype = "" then idtype = 252 ' RS_CAT("idtype") ' ' ' Product ' SQL = "SELECT * FROM Produits WHERE(Produits.SITEID = " & siteid & ") AND (Produits.IDTYPE = " & idtype & " ) ORDER BY ORDRE" ' Set RS_PRODUCT = Conn.Execute(SQL) ' ' end if ' ************** Section VIDEO ************** ' if cint(idpage) = cint(videoPage) then ' strVideo = true ' content2 = content ' content = "" ' end if ' ************** marquee content ************** ' SQL = " SELECT top 1 * from pages where SITEID = " & SITEID & " AND IDPAGE = 626" ' Set RSmarquee = Server.CreateObject("ADODB.Connection") ' Set RSmarquee=conn.execute(SQL) ' marquee = RSmarquee("DESCRIPTION"&USERLANGUAGE) ' marqueeTitle = RSmarquee("TITRE"&USERLANGUAGE) ' RSmarquee.Close ' amountQuery = amountQuery + 1 ' ' if InStr(1,Request.ServerVariables("HTTP_HOST"),"webloft",0) = 0 then ' marquee = replace(marquee,"http://www.webloft.ca/" & foldername & "/",urlReal & "/") ' ' content = replace(content, urlReal & "/" & foldername & "/",urlReal & "/") ' marquee = replace(content, "/" & foldername & "/", "/") ' end if %> Online Sports Betting provided by Crystal Sands Sports Book also 2009 Super Bowl Gambling
Crystal Sands Sportsbook
PARTNERS  

MAIN MENU   

SPORTSBOOK LINES   

SPORTSBOOK TOOLS   

Sports Betting at the Sportsbook

TOP ONLINE SPECIAL EVENTS BETTING SITES AT CRYSTAL SANDS

UFC Betting at Bodog!
Bodog takes bets on all types of special events, from MMA to Olympic games to non sports related. Sign up today and receive 10% bonus.

Special event bets at BetUS

BetUS.com has some of the best MMA bets for the UFC and other events. Signup today and receive Up to 50% Bonus.

 

<% call getOjbectID(103) %>

 

BoDog.com
BookMaker Sportsbook
BetUS Sportsbook
Bet Jamaica Sportsbook
Mansion.com

Sports Betting at the Sportsbook