<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' Start timer Dim amountQuery Dim amountQueryStats Dim tmrSTART amountQuery = 0 amountQueryStats = 0 tmrSTART = Timer %> <%' Get SITE ID %> <% SITEID = 505 %> <% ' 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 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 %> <%' 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.write("

Site désactivé, veuillez communiquer avec info@webloft.ca") : 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 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 amountQueryStats = amountQueryStats + 1 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 amountQueryStats = amountQueryStats + 1 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 amountQueryStats = amountQueryStats + 1 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 amountQueryStats = amountQueryStats + 1 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 amountQueryStats = amountQueryStats + 1 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 = safeSQL(request("idpage")) ' get home page ID Set RSpage=conn.execute("Select * from Pages where siteid=" & SITEID & " ORDER BY ORDRE") if RSpage.eof then AsnoPage = true else idHomePage = RSpage("idpage") end if RSpage.close if not AsnoPage then amountQuery = amountQuery + 1 if idpage = "" then idpage = idHomePage : showFlash = true if cint(idpage) = cint(idHomePage) then isHomePage = True if request("isblog") = "true" then isBlog = true if not isNumeric(IDPAGE) and not isBlog then response.redirect("?idpage=" & idHomePage) 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 end if %> <%' Get SHOP SECTION IsShop = false if IsShop then %> <% ' ******************* Section SHOP *********************** sub getImage(idproduct,imgwidth) SQL = "SELECT * FROM ProduitsPhoto WHERE IDPRODUIT= " & idproduct & " Order by IDPHOTO " Set rsImage = Conn.Execute(SQL) ims_str = "" If rsImage.EOF then ims_str = " " else do while not rsImage.EOF if not InStr(1,Request.ServerVariables("HTTP_HOST"),"webloft",0) = 0 then newImgPath = "/" & foldername if imgwidth > 200 then theExtra = "" end if 'ims_str = "" ims_str = ims_str & theExtra & "" if imgwidth < 200 then exit do else ims_str = ims_str & "

" end if rsImage.movenext loop End if response.write(ims_str) rsImage.close end sub sub getPrice(idproduct) SQL = "SELECT * FROM ProduitsDetail WHERE IDPRODUIT= " & idproduct & " Order by SORTORDER " Set rsPrice = Conn.Execute(SQL) if USERLANGUAGE = "" then theMsgButton = "Ajouter au panier" else theMsgButton = "Add to basket" end if while not rsPrice.EOF if rsPrice("DETAIL") > 0 then response.write "
" & rsPrice("DESCRIPTION") & ":  $" & formatnumber(rsPrice("DETAIL"),2) & "  
" & vbcrlf end if rsPrice.moveNext wend rsPrice.close end sub Dim RS_CAT, RS_PRODUCT, RS_PRODUCTprice, page,intCurrentPage, intLastPage, maxPerPage maxPerPage = 12 sql= " SELECT dbo.ProduitsType.*, dbo.Produits.ACTIF FROM dbo.ProduitsType INNER JOIN dbo.Produits ON dbo.ProduitsType.IDTYPE = dbo.Produits.IDTYPE " &_ " GROUP BY dbo.ProduitsType.IDTYPE,dbo.ProduitsType.ORDRE, dbo.ProduitsType.SITEID, dbo.ProduitsType.NOM, dbo.ProduitsType.NOMen, dbo.Produits.ACTIF " &_ " HAVING (dbo.ProduitsType.SITEID = " & SITEID & ") AND (dbo.Produits.ACTIF <> 0) AND (dbo.ProduitsType.IDTYPE <> 0) ORDER BY dbo.ProduitsType.ORDRE, dbo.ProduitsType.NOM"& USERLANGUAGE Set RS_CAT = Conn.Execute(sql) amountQuery = amountQuery + 1 idtype = safeSQL(request("idtype") ) idproduit = safeSQL(request("idproduit")) if isNumeric(idtype) then shop = true if isNumeric(idproduit) then shopproduct = true if shop or shopproduct then ' RS PRODUCT RELATED TO THIS TYPE if shop then Set RS_PRODUCT = Server.CreateObject("ADODB.Recordset") RS_PRODUCT.ActiveConnection = MM_DB_conn_STRING RS_PRODUCT.Source = " SELECT dbo.Produits.*, dbo.ProduitsType.NOM AS NOM_CAT, dbo.ProduitsType.NOMen AS NOM_CATen FROM dbo.Produits INNER JOIN dbo.ProduitsType ON dbo.Produits.IDTYPE = dbo.ProduitsType.IDTYPE WHERE (dbo.Produits.SITEID = " & SITEID & ") AND (dbo.Produits.IDTYPE = " & idtype & ") and (dbo.Produits.ACTIF <> 0) ORDER BY dbo.Produits.ORDRE" RS_PRODUCT.CursorType = 3 RS_PRODUCT.CursorLocation = 2 RS_PRODUCT.LockType = 1 RS_PRODUCT.PageSize=maxPerPage RS_PRODUCT.Open() page = safeSQL(request("page")) 'if RS_PRODUCT.eof then response.write ("Aucun produit dans cette catégorie, veuillez ajouter un produit!

No product in this category, please add a product!"): response.end if page <> "" then page = cint(Request("page")) RS_PRODUCT.AbsolutePage=page else page = 1 end if intLastPage = RS_PRODUCT.PageCount end if ' RS PRODUCT DETAILS if shopproduct then SQL = "SELECT * FROM Produits WHERE(Produits.SITEID = " & SITEID & ") AND (Produits.idproduit = " & idproduit & " ) ;" Set RS_PRODUCT = Conn.Execute(SQL) amountQuery = amountQuery + 1 end if end if %> <% end if %> <%' 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",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##", getCalendar()) strObject = replace(strObject, "##SITEID##", SITEID) strObject = replace(strObject, "##BUSINESSNAME##", businessname) strObject = replace(strObject, "##YEAR##", year(date())) strObject = replace(strObject, "%%msg%%",MSG) strObject = replace(strObject, "##msgEmail##", MSG) response.write(strObject) end if rsObjects.Close end sub Sub getObjects(theObjectName) if cint(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 = '" & 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) strObject = replace(strObject, "##YEAR##", year(date())) response.write(strObject) else response.write("ERREUR: Objet " & theObjectName & " est invalide!") end if rsObjects.Close end sub Sub getObjects(theObjectName) if cint(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 = '" & 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 %> <%' 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 function getCalendar() session.lcid=1033 Dim strCalendar goDate= safeSQL(Request.QueryString("goDate")) if goDate<>"" then goDate= safeSQL(Request.QueryString("goDate")) else goDate= safeSQL(Request.Form("goDate")) if goDate<>"" then goDate= safeSQL(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 strCalendar = strCalendar & "" & vbcrlf & "
" & vbcrlf strCalendar = strCalendar & "
<< " 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 uniqueCalID = dictDte(day(cellDate)-1,2) 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 & "

" & strtitle & "

" & strtable & "
" & 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 ' if strevent > 0 then ' If strevent >1 then strplur = "s" ' strCalendar = strCalendar & "
" & strevent & " évènement" & strplur & " en " & NomMois & "" & vbcrlf ' strCalendar = strCalendar & "
" & vbcrlf ' end if strCalendar = strCalendar & vbcrlf & vbcrlf & vbcrlf RScalendar.Close ' content = replace(content, "##CALENDRIER##", strCalendar) getCalendar = strCalendar end function '*********** END CALENDAR *********** if request("calendrierAjax") = "true" then Response.CacheControl = "no-cache" Response.AddHeader "Pragma", "no-cache" Response.Expires = -1 response.Charset="ISO-8859-1" response.write getCalendar() response.end end if If Instr(1, content, "##CALENDRIER##") > 0 Then content = replace(content, "##CALENDRIER##",getCalendar()) %> <%' Check if variable ##RSS## is in page content, if yes raplace it by SITE RSS FEEDS %> <% if Instr(1, lcase(content), "##rss") > 0 then ' ************** RSS FEEDS ************** 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://www.courrierlaval.com/rss/rss.php?noCategorie=326" 'myRSSURL = "http://noctambules.tv/GH_Feed.asp?CatID=0" end if 'myRSSURL = "http://www.webloft.ca/sommeildor/divertissement.xml" 'Response.write "http://news.google.ca/nwshp?tab=wn&ned=en_ca&topic=s&output=rss" ' Response.Write myRSSURL ' Load RSS file ' server.CreateObject("MSXML2.DomDocument.3.0") set myRSSDocument = createObject("MSXML2.DomDocument.3.0") 'set myRSSDocument = createObject("MSXML2.DomDocument.2.0") '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 = "Fichier: " & myRSSURL & "
XML erreur: " & myRSSDocument.parseError.reason response.write myNews 'response.end ' Continue if OK Else 'Get elements set mychannelNodes = myRSSDocument.selectNodes("//image//*") 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 = "url" then myChannelUrl = entry.text elseif entry.tagName = "width" then myChannelUrlwidth = entry.text elseif entry.tagName = "height" then myChannelUrlheight = entry.text elseif entry.tagName = "description" then myChannelDescription = entry.text ' Save all in myBase for displaying 'myBase = myBase & "" & myChannelTitle & "" myBase = myBase & " " & myChannelTitle & vbcrlf 'myBase = myBase & "
" & myChannelDescription & vbcrlf 'myBase = myBase & "

" & myChannelTitle & "

" & vbcrlf & "
" & vbcrlf end if next ' next element ' here start the table myNews = "" 'myNews = myNews & myBase & "
" myNews = myNews & myBase 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 & "

"& vbcrlf & "" & myItempubDate & "" & vbcrlf myNews = myNews & "

" & myItemDescription & "... En lire plus


" & vbcrlf & vbcrlf end if next ' 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 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, lcase(content), "##rss~") 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), getRSS(HTMLDecode(lcase(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 content = replace(""&content, "##NEWSLETTER##", strNewsletter) 'END IF EMAILSITEID = 508 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!" ELSE ' check if client exist SQl = "Select * from Clients where SITEID =" & EMAILSITEID & " 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 = "Abonnement au newsletter: " & now() & "(" & hour(now())& "h" & minute(now())& ")" strSQL="insert into Clients(SITEID, EMAIL, NOM, NOTES, IDTYPE) " &_ " VALUES(" & EMAILSITEID & ", '" & EMAIL & "','" & EMAIL & "', '" & msg_content & "', 3);" conn.execute(strSQL) amountQuery = amountQuery + 1 MSG = "THANK YOU!" else MSG = "ALREADY SUBSCRIBE!" END IF END IF END IF content = replace(content,"%%msg%%",MSG) content = replace(content, "##msgEmail##", MSG) ' ************** END NEWSLETTER ************** %> <%' Check if variable ##GALERIE## is in page content, if yes raplace it by ALBUM PHOTO %> <% ' ############# photo gallery ############## If Instr(1, content, "##GALERIE##") > 0 then Dim galeryStr, imgwidth imgwidth = 105 maxImagePerPage = 25 idproduit = safeSQL(request("idphoto")) ' generate all product for MENU Set rs=conn.execute("Select * From produits where SITEID=" & SITEID & " AND IDTYPE = 0 order by ORDRE;") amountQuery = amountQuery + 1 galeryStr = vbcrlf & vbcrlf if not rs.eof then galeryStr = galeryStr & "
" & vbcrlf if idproduit = "" then idproduit = rs("idproduit") while not rs.eof if cint(idproduit) = rs("idproduit") then linkColor = " style=""font-weight:900""" else linkColor = "" galeryStr = galeryStr & " " & rs("nom"&USERLANGUAGE) & " |" & vbcrlf rs.MOVENEXT WEND galeryStr = galeryStr & "
" & vbcrlf ' paging system + generate thumbnail and link SQL = "SELECT * FROM ProduitsPhoto WHERE IDPRODUIT= " & idproduit & " AND isImage = 1 Order by IDPHOTO " Set rsImage = Server.CreateObject("ADODB.Recordset") rsImage.ActiveConnection = MM_DB_conn_STRING rsImage.Source = SQL rsImage.CursorType = 3 rsImage.CursorLocation = 2 rsImage.LockType = 1 rsImage.PageSize=maxImagePerPage rsImage.Open() if request("page") <> "" then page = cint(Request("page")) rsImage.AbsolutePage=page else page = 1 end if %><% '---------------------------------------------------------------------------------------- '- ASP Page Navigation Function - Version 2.0 - 01 June 2005 '- Copyright © 2005 - Livio Siri (http://www.livio.net) - All Rights Reserved. '---------------------------------------------------------------------------------------- Public Function PageNav(ByRef intCurrentPage, ByVal intLastPage, add2string) '--- intCurrentPage = current page number '--- intLastPage = number of total pages '--- Define variables Dim strQueryString Dim strScript Dim intStart Dim intEnd Dim i Dim strLang Dim strFirstp Dim strPrevp Dim strNextp Dim strLastp Dim strFirstpTitle Dim strPrevpTitle Dim strNextpTitle Dim strLastpTitle Dim strPagep Dim strOfp Dim strNorfp Dim strSel Dim strPaging Dim strResult Dim strimgDir Dim strAll Dim strimgFirstMon Dim strimgPrevMon Dim strimgNextMon Dim strimgLastMon Dim strimgFirstMoff Dim strimgPrevMoff Dim strimgNextMoff Dim strimgLastMoff '--- Config Language (optional, comment out the next line for english only language) ' If instr(UCase(Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")), "IT") > 0 then strLang = "IT" '-- AutoSelect Language If USERLANGUAGE = "en" Then '--- italian strPagep = "Page " strFirstpTitle = " First " strPrevpTitle = " Previous page " strNextpTitle = " Next Page " strLastpTitle = " Last page " strOfp = " of " strAll = " only one page!" strNorfp = "No record found!" Else '--- english strPagep = "Page " strFirstpTitle = " Première " strPrevpTitle = " Page précédent " strNextpTitle = " Page Suivante " strLastpTitle = " Dernière page " strOfp = " de " strAll = "" '" Seulement 1 page!" strNorfp = "" '"Aucun enregistrement de trouvés!" End if '--- Config images path and image file names '--- set directory path of images (ex. 'images/' or '../images/', or null if they are in the same directory of the script strimgDir = "" strimgFirstMon = "images/2first.gif" '--- OnMouseOver strimgPrevMon = "images/2prev.gif" '--- OnMouseOver strimgNextMon = "images/2next.gif" '--- OnMouseOver strimgLastMon = "images/2last.gif" '--- OnMouseOver strimgFirstMoff = "images/22first.gif" '--- OnMouseOut strimgPrevMoff = "images/22prev.gif" '--- OnMouseOut strimgNextMoff = "images/22next.gif" '--- OnMouseOut strimgLastMoff = "images/22last.gif" '--- OnMouseOut strFirstp = "" strPrevp = "" strNextp = "" strLastp = "" '--- Assumes that the paging request variable is named 'page' If Not IsEmpty(Request.Querystring("page")) Then if IsNumeric(Request.Querystring("page")) Then intCurrentPage = CLng(Request.Querystring("page")) End if End if '--- Page limit control If intCurrentPage > intLastPage Then intCurrentPage = intLastPage ElseIf intCurrentPage < 1 Then intCurrentPage = 1 End if '--- Include the result into a Table and define text style strPaging = "" & VbCrLf& " " & VbCrLf strPaging = strPaging & " " & VbCrLf & " " & VbCrLf & "" & VbCrLf & "" & VbCrLf & " " & VbCrLf & " " & VbCrLf & "" & VbCrLf & "" & VbCrLf & " " & VbCrLf & " " & VbCrLf & "
" If intLastPage = 1 Then '--- If there is only one page then tell it strPaging = strPaging & strAll Else '--- Show page navigation For i = 1 To Request.QueryString.Count if LCase(Request.QueryString.Key(i)) <> "page" Then strQueryString = strQueryString & "&" & Server.URLEncode(Request.QueryString.Key(i)) & "=" & Server.URLEncode(Request.QueryString.Item(i)) End if Next For i = 1 To Request.Form.Count if LCase(Request.Form.Key(i)) <> "page" Then strQueryString = strQueryString & "&" & Server.URLEncode(Request.Form.Key(i)) & "=" & Server.URLEncode(Request.Form.Item(i)) End if Next if Len(strQueryString) <> 0 Then strQueryString = "?" & Mid(strQueryString, 2) & "&" Else strQueryString = "?" End if strScript = Request.ServerVariables("SCRIPT_NAME") & strQueryString ' response.write(strQueryString) If intCurrentPage <> 1 Then If intCurrentPage > 2 Then strPaging = strPaging & "" & _ strFirstp & " " & VbCrLf End if strPaging = strPaging & "" & _ strPrevp & " " End if strPaging = strPaging & " " & strPagep & " " 'strPaging = strPaging & "" & VbCrLf For i = 1 to intLastPage if i = intCurrentPage Then strSel = " selected style=""color:red;""" Else strSel = " style=""color:black;""" End if strPaging = strPaging & " " & VbCrLf Next strPaging = strPaging & "  " & strOfp & intLastPage & " " If intCurrentPage <> intLastPage Then strPaging = strPaging & " " & _ strNextp & "" If intCurrentPage < intLastPage - 1 Then strPaging = strPaging & " " & _ strLastp & "" End if End if End if strPaging = strPaging & "
"& VbCrLf & VbCrLf if intLastPage > 1 then if add2string = "true" then galeryStr = galeryStr & strPaging else PageNav = Response.Write(strPaging) end if end if End Function '-- PageNav '---------------------------------------------------------------------------------------- %> <% Dim intCurrentPage2, intLastPage2 intLastPage2 = rsImage.PageCount galeryStr = galeryStr & "
" & VbCrLf Call PageNav(intCurrentPage2, intLastPage2, "true") galeryStr = galeryStr & strPaging & "
" & VbCrLf ' generate thumbnail and link amountQuery = amountQuery + 1 if not InStr(1,Request.ServerVariables("HTTP_HOST"),"pcpixel",0) = 0 then newImgPath = "/" & foldername While ((maxImagePerPage <> 0) AND (NOT rsImage.EOF)) galeryStr = galeryStr & "
" & vbcrlf maxImagePerPage=maxImagePerPage-1 rsImage.movenext wend ' galeryStr = galeryStr & "
" & vbcrlf galeryStr = galeryStr & "
" & vbcrlf rsImage.close else galeryStr = galeryStr & "Aucune photo dans votre album!

Veuillez accéder à votre compte webloft pour créer un album et transférer vos photos !" end if rs.close content = replace(content, "##GALERIE##", galeryStr) end if If Instr(1, content, "##GALERIE2##") > 0 then galeryStr2 = "" galeryStr2 = galeryStr2 & vbcrlf & vbcrlf galeryStr2 = galeryStr2 & "
" & vbcrlf galeryStr2 = galeryStr2 & " " & vbcrlf galeryStr2 = galeryStr2 & " " & vbcrlf galeryStr2 = galeryStr2 & "
" & vbcrlf & vbcrlf content = replace(content, "##GALERIE2##", galeryStr2) end if Sub getGalleryThumbnails(boxsize,imgwidth,qty,idpage) totimage = 0 if boxsize = "" or boxsize < 1 then boxsize = "100%" else boxsize = boxsize & "px" end if if imgwidth = "" then imgwidth = "25" if qty = "" then qty = "9" imgwidth = "75" SQL = "SELECT dbo.ProduitsPhoto.IDPRODUIT, dbo.ProduitsPhoto.NOM, dbo.ProduitsPhoto.TEXTE FROM dbo.Produits INNER JOIN dbo.ProduitsPhoto " &_ "ON dbo.Produits.IDPRODUIT = dbo.ProduitsPhoto.IDPRODUIT WHERE (dbo.Produits.SITEID = " & SITEID & " AND IDTYPE = 0)" Set rsGallery=Server.CreateObject("ADODB.Recordset") rsGallery.Open SQL,conn,3,3 amountQuery = amountQuery + 1 if not rsGallery.eof then ' randomly choose a record Dim rndMax rndMax = CInt(rsGallery.RecordCount) Randomize Timer Dim rndNumber rndNumber = Int(RND * rndMax ) - (qty-1) rsGallery.Move rndNumber if not InStr(1,Request.ServerVariables("HTTP_HOST"),"webloft",0) = 0 then newImgPath = "/" & foldername tempStr = tempStr & vbcrlf & vbcrlf & "
" & vbcrlf tempStr = tempStr & vbcrlf & vbcrlf & " "& vbcrlf ' http://www.seifi.org/css/creating-thumbnails-using-the-css-clip-property.html on error resume next while not rsGallery.eof and totimage < qty if not rsGallery.eof then tempStr = tempStr & "
" & vbcrlf tempStr = tempStr & "
" & vbcrlf tempStr = tempStr & "" & vbcrlf tempStr = tempStr & "
" & vbcrlf tempStr = tempStr & "
" & vbcrlf end if totimage = totimage + 1 rsGallery.movenext wend error.clear tempStr = tempStr & "
" response.write tempStr end if rsGallery.close end sub %> <%' Picasa ALBUM PHOTO %> <% if Instr(1, lcase(content), "##picasa") > 0 then ' ************** PICASA RSS READER ************** Function getPicassaPic (myRSSURL,detailAlbum) On Error resume Next if detailAlbum = 1 then isDetailPicassa = true if Instr(1, myRSSURL, "/") > 0 and not isDetailPicassa then ' this is not a goor feed, si this function is to get the good RSS FEED -> ##picassa=jeanfrancoisranger/NouveauBrunswick2002## ' we must pass trhout all entry's to check abul name "NouveauBrunswick2002" 'picUser="jeanfrancoisranger" PicassaUserAccount = left(myRSSURL,InStr(myRSSURL,"/")-1) 'picUser="NouveauBrunswick2002" PicassaFolder = mid(myRSSURL,InStr(myRSSURL,"/")+1) isDetailPicassa = true isDirectDetailPicassa = true CheckmyRSSURL="http://picasaweb.google.ca/data/feed/base/user/" & PicassaUserAccount & "/?hl=fr" set myDoc = createObject("Msxml.DOMDocument") myDoc.async = false myDoc.setProperty "ServerHTTPRequest", true myDoc.load(CheckmyRSSURL) If (myDoc.parseError.errorCode <> 0) then ' error then get full parent rss album myRSSURL="http://picasaweb.google.ca/data/feed/base/user/" & PicassaUserAccount & "/?hl=fr" Else nombreAlbum2 = myDoc.getElementsByTagName("openSearch:totalResults").item(0).text set myValue2 = myDoc.getElementsByTagName("entry") For i = 0 to nombreAlbum2 - 1 if Instr(1, lcase(myValue2.Item(i).ChildNodes(7).getAttribute("href")), lcase(PicassaFolder)) > 0 then myRSSURL = myValue2.Item(i).ChildNodes(6).getAttribute("href") exit for end if next set myValue2 = nothing end if end if if not isDetailPicassa then myRSSURL="http://picasaweb.google.ca/data/feed/base/user/" & myRSSURL & "?hl=fr" end if ' Load RSS file set myDoc = createObject("Msxml.DOMDocument") myDoc.async = false myDoc.setProperty "ServerHTTPRequest", true myDoc.load(myRSSURL) ' Check if it 's loaded If (myDoc.parseError.errorCode <> 0) then myPicasaStr = "Erreur de lecture avec PICASA : " & myDoc.parseError.reason & "

S.v.p veuillez vérifier le fichier : " & myRSSURL Else set myValue = myDoc.getElementsByTagName("entry") if not isDetailPicassa then compte = myDoc.getElementsByTagName("name").item(1).text lastUpdate = replace(myDoc.getElementsByTagName("updated").item(0).text,"T"," ") albumLink = replace(myDoc.getElementsByTagName("uri").item(1).text,"http://","") nombreAlbum = myDoc.getElementsByTagName("openSearch:totalResults").item(0).text picasaVersion = myDoc.getElementsByTagName("generator").item(0).getAttribute("version") flashPlugIn = myDoc.getElementsByTagName("link").item(2).getAttribute("href") else albumtitle = myDoc.getElementsByTagName("title").item(0).text compte = myDoc.getElementsByTagName("name").item(0).text lastUpdate = replace(myDoc.getElementsByTagName("updated").item(0).text,"T"," ") albumLink = replace(myDoc.getElementsByTagName("link").item(1).getAttribute("href"),"http://","") nombreAlbum = myDoc.getElementsByTagName("openSearch:totalResults").item(0).text picasaVersion = myDoc.getElementsByTagName("generator").item(0).getAttribute("version") flashPlugIn = myDoc.getElementsByTagName("link").item(2).getAttribute("href") theSlideShowLink = replace(myValue.Item(0).ChildNodes(8).getAttribute("href"),"photo#","photo#s") end if myPicasaStr = myPicasaStr & vbcrlf & vbcrlf & " " & vbcrlf myPicasaStr = myPicasaStr & "" & vbcrlf myPicasaStr = myPicasaStr & "" & vbcrlf myPicasaStr = myPicasaStr & "

" if not isDetailPicassa then myPicasaStr = myPicasaStr & nombreAlbum & " albums photos" else myPicasaStr = myPicasaStr & albumtitle & " (" & nombreAlbum & " photos)" end if myPicasaStr = myPicasaStr & "

" & vbcrlf if isDetailPicassa then myPicasaStr = myPicasaStr & "
" if not isDirectDetailPicassa then myPicasaStr = myPicasaStr & "[Retour aux Albums]  " myPicasaStr = myPicasaStr & "[Démarer le diaporama]" myPicasaStr = myPicasaStr & "
" & vbcrlf end if For i = 0 to nombreAlbum - 1 if not isDetailPicassa then theName = myValue.Item(i).ChildNodes(4).text theFeedLink = myValue.Item(i).ChildNodes(6).getAttribute("href") thePicasaLink = myValue.Item(i).ChildNodes(7).getAttribute("href") theImage = myValue.Item(i).ChildNodes(10).ChildNodes(4).getAttribute("url") myPicasaStr = myPicasaStr & "
" & left("" & theName,25) & "
" & vbcrlf & "
" & vbcrlf & "
" & vbcrlf & vbcrlf else theName = myValue.Item(i).ChildNodes(4).text theFeedLink = myValue.Item(i).ChildNodes(6).getAttribute("href") theImageLink = myValue.Item(i).ChildNodes(8).getAttribute("href") theImage = myValue.Item(i).ChildNodes(11).ChildNodes(4).getAttribute("url") theBigImage = myValue.Item(i).ChildNodes(11).ChildNodes(6).getAttribute("url") theSlideShowLink = replace(theImageLink,"photo#","photo#s") myPicasaStr = myPicasaStr & "
" if not Instr(1, lcase(theName), ".jpg") > 0 then myPicasaStr = myPicasaStr & left("" & theName,25) myPicasaStr = myPicasaStr & "
" & vbcrlf end if next myPicasaStr = myPicasaStr & "
" & vbcrlf myPicasaStr = myPicasaStr & " " & vbcrlf & vbcrlf End If If Err.Number <> 0 then myPicasaStr = myPicasaStr & "Erreur d'exécution No: " & Err.number & "
" & vbcrlf myPicasaStr = myPicasaStr & "Source: " & Err.source & "
" & vbcrlf myPicasaStr = myPicasaStr & "Description: " & Err.Description & "
" & vbcrlf Error.Clear End If getPicassaPic = myPicasaStr 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, "##picasa=") If iStart > 0 Then iEnd = Instr(iStart + 3, content, "##") If iEnd > 0 Then strPicRSS = Right(Left(content, iEnd + 1), iEnd - iStart + 2) strURL = Right(Left(content, iEnd-1 ), iEnd - iStart - 10 + 1) End If End if if request("idpicasa") = "" then content = replace(lcase(content), lcase(strPicRSS), getPicassaPic(HTMLDecode(lcase(strURL)),0)) else content = replace(lcase(content), lcase(strPicRSS), getPicassaPic(HTMLDecode(request("idpicasa")),1)) end if end if %> <% If Instr(1, content, "##SITEMAP##") > 0 Then Dim mySiteMap, level1, level2 mySiteMap = mySiteMap & "
" & vbcrlf 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 ' ############# 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 sub getActivePage(idpage,requestIdpage,theValue) if cint(idpage) = cint(requestIdpage) then response.write(" " & theValue & " ") end sub function cleanSpecialCar(theShit) strTempValue = ""&theShit strTempValue = replace(strTempValue ,"è","è") strTempValue = replace(strTempValue ,"é","é") strTempValue = replace(strTempValue ,"É","É") strTempValue = replace(strTempValue ,"È","È") strTempValue = replace(strTempValue ,"Ê","Ê") strTempValue = replace(strTempValue ,"ê","ê") strTempValue = replace(strTempValue ,"û","û") strTempValue = replace(strTempValue ,"à","à") strTempValue = replace(strTempValue ,"À","À") strTempValue = replace(strTempValue ,"î","î") strTempValue = replace(strTempValue ,"ç","ç") strTempValue = replace(strTempValue ,"ô","ô") strTempValue = replace(strTempValue ,"ô","ô") cleanSpecialCar = strTempValue end function %> <% ' ******************* CHANGE HTML CONTENT IF SITE AS IS OWN DOMAIN *********************** if InStr(1,Request.ServerVariables("HTTP_HOST"),"webloft",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 If Instr(1, content, "%%idpage%%") > 0 Then content = replace(content,"%%idpage%%",idpage) end if If Instr(1, content, "%%email%%") > 0 Then content = replace(content,"%%email%%",safeSQL(request("email"))) end if If Instr(1, content, "%%nom%%") > 0 Then content = replace(content,"%%nom%%",safeSQL(request("nom"))) end if If Instr(1, content, "##YEAR##") > 0 Then content = replace(content,"##YEAR##",year(date())) end if %> <% Sub getSQLInfo response.write(vbcrlf & "") end sub %> Online Sports Betting provided by Las Vegas Poker Rules also 2005 Super Bowl Gambling
Online Poker Room • BoDog Poker • FullTilt Poker • Absolute Poker • Ultimate Poker • BetUS Poker • Mansion Poker


PLAY POKER SIGNUP BONUS
POKER ROOM - HOW TO PLAY POKER - JOIN NOW - POKER NEWS - ONLINE CASINOS - SPORTSBOOK
Tournaments
Gameplay
  Texas Hold'em Poker
  Omaha
  Seven-Card Stud
  Five-Card Stud
  Texas Holdem Tour
<% call getObjectID(170) %>
How To Download Poker

How to play | Poker Help | Poker School | Glossary | Poker Privacy | Terms | FAQ Poker

 

  1. How to Download Poker
  2. How to Install & Login
  3. Registering your Poker Games Account
  4. Have you played at Prima Poker Network before?
  5. How to Play Poker
  6. How to Transfer
  7. How to Enter a Tournament

Prima Poker School Tutorial
Texas Holdem Tutorial

How to download Poker

To play in the Poker Games Poker rooms, you will need to download our free Poker software. It's easy to do and takes just a few minutes. Simply follow the three step guide below and get ready to go head to head with other Poker players from around the world.

Step 1.
Download Poker
Go to the Poker page after you have logged into Las Vegas Poker Rules and click on the 'Download Poker' button to download the Poker Games Poker software.




When the File Download box appears, choose 'Save', and then click 'OK'.

Step 2.

When the 'Save As' box appears, you will need to choose where you want to save the Poker Games Top Poker software. We recommend you save it to your Desktop as illustrated. If you save it to an alternative location, remember where it is so that you can find it again later!

Click 'Save' to begin the download. The 'Busy Downloading' page will appear and you will see a progress indicator measuring the amount of the Poker software that has been downloaded.
The Poker Games software will take approximately 10 minutes to download with a 56K modem and significantly less if you have a DSL connection.

Download Poker

How to Install & Log in

Once the download is complete, click on the 'Open' or 'Run' button to start the Installation Wizard. Now follow the Install Wizard's onscreen instructions to complete the installation.

If you want to install the software at a later date - it's no problem. The software is saved on your computer. Just double click on the Poker Games.exe application and installation will automatically begin.

Now closely follow the onscreen instructions, clicking 'Next' when prompted. Once the installation is complete, you will automatically be transferred to the Poker Games lobby.

Before you start playing in the Poker Games Poker rooms, you will need to register an account.

Registering your Poker Games Account



Once you are in the Poker Games Lobby click 'LOGIN'.



Once the 'LOGIN' box appears just enter in your Las Vegas Poker Rules username in the 'User Account' box and your Las Vegas Poker Rules password in the 'Password' box. Then click 'OK'.




Once you have entered in your username and password the 'Have you played at Prima Poker before?' box will appear. Please check the check box stating that you agree to have only one Alias. Then select either 'Yes' if you have played with a prima poker site before or 'No' if you have not played at a prima poker site before.




If you have selected 'No' then you will be forwarded to the 'Create Alias page' . An Alias is your Poker room name, the name that will be shown to other poker players. To create you new Alias just type it into the 'Create a unique Alias' box. Then enter in your City and if you were referred to Poker Games by a friend enter in their Alias in the 'Referrer Alias' box. Then finally click 'Click for Alias Verification'.




Success you have now created your very own Poker Games account. Make a note of your Alias code and save it to your computer for future reference. You are now ready to play click 'BACK' to return to the Poker Games Lobby.



Once your back in the Poker Games Lobby click on 'Login' and enter in your Las Vegas Poker Rules username in the 'User Account' and your Las Vegas Poker Rules password in the 'Password' box. Then click 'OK'.

You are now logged in and ready to play!

Don't forget - if you have any problems downloading or installing the Poker Games Poker software, our customer support team is available 24/7 at 1.800.730.0408.

Have you played at Prima Poker Network before?

If you have played on the Prima Poker network before click YES when this window appears after logging in.

Once this window appears enter in you Verification code in the "Enter you Verification Code:" box. If you have lost your Verification code then click on "Lost Your Verification Code?" button in the bottom left corner.


When you click on "Lost Your Verification Code?" it will open up another window which will take you to the "FORGOT YOUR ALIAS VERIFICATION CODE?" page. Once there select the Poker Room that you have played at and then progress to step 2. Enter in your username and password from the Poker Room you had played at before and select step 3 "View Verification Code"

You now have your verification code. You can either email the code back to your email address in your account or print it out.

Then just enter in your Verification code in the "Enter you Verification Code:"field and click on "Verify Alias" . You are now ready to play!

HOW TO PLAY



Once in the Poker Games Lobby select the table you want to play at by clicking on it. Once you click on it the table will turn orange, then select 'GO TO TABLE'.




Once you're at the table you will be able to choose your seat and start playing by clicking on 'Seat Available'




Once you have selected your seat and clicked on 'Seat Available' you will be asked to select the amount of money you want to play with. You must have the minimum buy-in to be able to play. Once you have selected the funds you want to play with click 'OK'.




You're now ready to play your first hand!

How to Transfer



Once you're logged into the Poker Games lobby click on 'BANK' to start the transfer process.




Once the Bank page opens click on the 'Transfer' button in the top left hand corner.




Once the 'Transfer' page opens, click the drop down arrow on the 'Transfer Type' line. Then select and click 'from Sportsbook to Poker'.




Once you have selected 'from Sportsbook to Poker' enter in the amount you wish transfer in the 'Amount: ($)' line. Then click 'Submit'.




Once the transfer has been completed this message will appear, to continue click 'OK'.

To start playing, click the 'BACK' button at the bottom of the screen to go back to the Poker Games Lobby.

How to Enter a Tournament

 

  1. This is your basic navigation through all the MTT (Multi Table Tournaments) available through Poker Games. Regular stands for Regular tournament. Freeroll stands for a free tournament which means the player does not need to buy in or pay to play. Satellite stands for Satellite tournament which means the grand prize is the entry into another tournament for example a seat at the world series of Poker. Special stands for a Special Tournaments The World Series of Poker seat giveaway mentioned above would also full into this category. TV stands for tournaments that award the winner with an entry into a televised land based tournament.
  2. The Status column will list the start date and time for each tournament as well as the tournaments status once it has started
  3. The Buy in tournament will list the Buy in or cost to enter each tournament
  4. This is the list of the available tournaments.

  1. This section contains the tournament information including the time till the tournament starts, the tournament name and the type of tournament
  2. <