Changeset 114

Show
Ignore:
Timestamp:
04/13/08 15:39:26 (2 years ago)
Author:
weppos
Message:

* Merged r113 (#6) from trunk

Location:
branches/release-2.1/myasg
Files:
2 removed
8 modified
252 copied

Legend:

Unmodified
Added
Removed
  • branches/release-2.1/myasg/asg-lib/file.asp

    r112 r114  
    9999 
    100100' 
     101' Checks and returns whether strSourcePath file exists. 
     102' 
     103' @param  string  strSourcePath 
     104' @return bool 
     105' 
     106function asgFileExists(strSourcePath) 
     107  Dim objFso, blnResponse 
     108 
     109  Set objFso = Server.CreateObject("Scripting.FileSystemObject") 
     110  blnResponse = objFso.fileExists(strSourcePath) 
     111  Set objFso = Nothing 
     112   
     113  asgFileExists = blnResponse 
     114end function 
     115 
     116 
     117' 
    101118' Moves a file from strSourcePath to strTargetPath. 
    102119' 
  • branches/release-2.1/myasg/asg-lib/layout.asp

    r99 r114  
    4444 
    4545 
     46' Dependencies: 
     47' - /asg-lib/file.asp. 
     48 
     49 
    4650' 
    4751' Returns the elaboration time message since elaboration started. 
     
    6064 
    6165 
     66' 
     67' Returns the web path to the flag image 
     68' corresponding to given strCountryCode. 
     69' This is basically an alias for asgCountryFlagIcon(). 
     70' 
     71' @param  string  strPath 
     72' @param  string  strCountryCode 
     73' @return string 
     74' 
     75public function asgCountryFlagIcon(strPath, strCountryCode) 
     76  asgCountryFlagIcon = asgFlagIcon(strPath, strCountryCode) 
     77end function 
     78 
     79 
     80' 
     81' Returns the web path to the flag image 
     82' corresponding to given strLanguage. 
     83' This function internally uses asgCountryFlagIcon(). 
     84' 
     85' TODO: remove as soon as ASG will store country codes 
     86' instead of hard stored language names. 
     87' 
     88' @param  string  strPath 
     89' @param  string  strCountryCode 
     90' @return string 
     91' 
     92public function asgLanguageFlagIcon(strPath, strLanguage) 
     93  Dim cc, ln 
     94   
     95  ln = lcase(strLanguage) 
     96  if instr(ln, "italiano") then 
     97    cc = "it" 
     98  elseif instr(ln, "inglese") then 
     99    cc = "gb" 
     100  elseif instr(ln, "francese") then 
     101    cc = "fr" 
     102  elseif instr(ln, "tedesco") then 
     103    cc = "de" 
     104  elseif instr(ln, "spagnolo") then 
     105    cc = "es" 
     106  elseif instr(ln, "catalano") then 
     107    cc = "catalonia" 
     108  elseif instr(ln, "portoghese") then 
     109    cc = "pt" 
     110  elseif instr(ln, "slovacco") then 
     111    cc = "sk" 
     112  elseif instr(ln, "bulgaro") then 
     113    cc = "bg" 
     114  elseif instr(ln, "croato") then 
     115    cc = "hr" 
     116  elseif instr(ln, "ceco") then 
     117    cc = "cs" 
     118  elseif instr(ln, "macedone") then 
     119    cc = "mk" 
     120  elseif instr(ln, "albanese") then 
     121    cc = "sq" 
     122  elseif instr(ln, "polacco") then 
     123    cc = "pl" 
     124  elseif instr(ln, "serbo") then 
     125    cc = "sr" 
     126  elseif instr(ln, "svedese") then 
     127    cc = "sv" 
     128  elseif instr(ln, "russo") then 
     129    cc = "ru" 
     130  elseif instr(ln, "ungherese") then 
     131    cc = "hu" 
     132  elseif instr(ln, "estone") then 
     133    cc = "et" 
     134  elseif instr(ln, "lituano") then 
     135    cc = "lt" 
     136  elseif instr(ln, "norvegese") then 
     137    cc = "no" 
     138  elseif instr(ln, "finlandese") then 
     139    cc = "fi" 
     140  elseif instr(ln, "danese") then 
     141    cc = "dk" 
     142  elseif instr(ln, "olandese") then 
     143    cc = "nl" 
     144  elseif instr(ln, "greco") then 
     145    cc = "gr" 
     146  elseif instr(ln, "lettone") then 
     147    cc = "lv" 
     148  elseif instr(ln, "sloveno") then 
     149    cc = "sl" 
     150  elseif instr(ln, "rumeno") then 
     151    cc = "ro" 
     152  elseif instr(ln, "turco") then 
     153    cc = "tk" 
     154  elseif instr(ln, "giapponese") then 
     155    cc = "jp" 
     156  elseif instr(ln, "cinese") then 
     157    cc = "cn" 
     158  elseif instr(ln, "canada") then 
     159    cc = "ca" 
     160  elseif instr(ln, "messico") then 
     161    cc = "mx" 
     162  else 
     163    cc = "xx" 
     164  end if 
     165   
     166  asgLanguageFlagIcon = asgFlagIcon(strPath, cc) 
     167end function 
     168 
     169 
     170' 
     171' Returns the web path to requested flag icon, if exists.  
     172' The flag icon web path is composed by strPath 
     173' and the strCountryCode ISO country code. 
     174' Returns the path to a generic flag icon 
     175' if requested flag doesn't exist. 
     176' 
     177' TODO: this function will probably be removed or changed 
     178' in a future (an more reliable) ASG version. 
     179' 
     180' @param  string  strPath 
     181' @param  string  strCountryCode 
     182' @return string 
     183' 
     184public function asgFlagIcon(strPath, strCountryCode) 
     185  Dim p, f 
     186   
     187  f = lcase(strCountryCode) 
     188  if f = "xx" then 
     189    p = strPath & "xx.gif" 
     190  elseif asgFileExists(Server.MapPath(strPath & f & ".gif")) then 
     191    p = strPath & f & ".gif" 
     192  else 
     193    p = strPath & "xx.gif" 
     194  end if 
     195   
     196  asgFlagIcon = p 
     197end function  
     198 
     199 
    62200%> 
  • branches/release-2.1/myasg/browser_lang.asp

    r99 r114  
    1 <%@LANGUAGE="VBSCRIPT"%> 
     1<%@ LANGUAGE="VBSCRIPT" %> 
    22<% Option Explicit %> 
    33<!--#include file="config.asp" --> 
    4 <!--#include file="includes/functions_images.asp" --> 
     4<!--#include file="asg-lib/file.asp" --> 
    55<% 
    66 
     
    130130objAsgRs.Close 
    131131 
    132 'Calcola unitingola 
     132'Calcola unit singola 
    133133If intAsgMax = 0 OR "[]" & intAsgMax = "[]" Then intAsgMax = 1 
    134134intAsgParte = intAsgLarColMax/intAsgMax 
     
    154154<head> 
    155155<title><%= strAsgSiteName %> | powered by ASP Stats Generator <%= strAsgVersion %></title> 
    156 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
     156<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    157157<meta name="copyright" content="Copyright (C) 2003-2008 Carletti Simone, All Rights Reserved" /> 
    158158<meta name="generator" content="ASP Stats Generator <%= strAsgVersion %>" /> <!-- leave this for stats --> 
     
    223223                objAsgRs.Open strAsgSQL, objAsgConn 
    224224                         
    225                         'Il Rs uoto 
     225                        'Il Rs  vuoto 
    226226                        If objAsgRs.EOF Then 
    227227                                 
     
    251251                %>                 
    252252                  <tr class="smalltext" bgcolor="<%= strAsgSknTableContBgColour %>"> 
    253                         <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="center" height="15"><img src="images/flags/<%= ShowIconLanguage(objAsgRs("Languages")) %>" alt="<%= objAsgRs("Languages") %>" align="absmiddle" /></td> 
     253                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="center" height="15"><img src="<%= asgLanguageFlagIcon("asg-includes/images/icons/flags/", objAsgRs("Languages")) %>" alt="<%= objAsgRs("Languages") %>" align="absmiddle" /></td> 
    254254                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="left"><%= HighlightSearchKey(objAsgRs("Languages"), "Languages") %></td> 
    255255                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="right"><%= objAsgRs("SumHits") & "<br />" & objAsgRs("SumVisits") %></td> 
  • branches/release-2.1/myasg/country.asp

    r99 r114  
    1 <%@LANGUAGE="VBSCRIPT"%> 
     1<%@ LANGUAGE="VBSCRIPT" %> 
    22<% Option Explicit %> 
    33<!--#include file="config.asp" --> 
     4<!--#include file="asg-lib/file.asp" --> 
    45<% 
    56 
     
    129130objAsgRs.Close 
    130131 
    131 'Calcola unitingola 
     132'Calcola unit singola 
    132133If intAsgMax = 0 OR "[]" & intAsgMax = "[]" Then intAsgMax = 1 
    133134intAsgParte = intAsgLarColMax/intAsgMax 
     
    153154<head> 
    154155<title><%= strAsgSiteName %> | powered by ASP Stats Generator <%= strAsgVersion %></title> 
    155 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
     156<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    156157<meta name="copyright" content="Copyright (C) 2003-2008 Carletti Simone, All Rights Reserved" /> 
    157158<meta name="generator" content="ASP Stats Generator <%= strAsgVersion %>" /> <!-- leave this for stats --> 
     
    221222                objAsgRs.Open strAsgSQL, objAsgConn 
    222223                         
    223                         'Il Rs uoto 
     224                        'Il Rs  vuoto 
    224225                        If objAsgRs.EOF Then 
    225226                                 
     
    249250                %>                 
    250251                  <tr class="smalltext" bgcolor="<%= strAsgSknTableContBgColour %>"> 
    251                         <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="center"><img src="images/flags/<%= LCase(objAsgRs("SCountry")) %>.png" alt="<%= objAsgRs("Country") %>" /></td> 
     252                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="center"><img src="<%= asgFlagIcon("asg-includes/images/icons/flags/", objAsgRs("SCountry")) %>" alt="<%= objAsgRs("Country") %>" /></td> 
    252253                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="left"><%= HighlightSearchKey(objAsgRs("Country"), "Country") %></td> 
    253254                        <td background="<%= strAsgSknPathImage & strAsgSknTableContBgImage %>" align="right"><%= objAsgRs("SumHits") & "<br />" & objAsgRs("SumVisits") %></td> 
  • branches/release-2.1/myasg/default.asp

    r99 r114  
    1 <%@LANGUAGE="VBSCRIPT"%> 
     1<%@ LANGUAGE="VBSCRIPT" %> 
    22<% Option Explicit %> 
    33<!--#include file="config.asp" --> 
    44<!--#include file="asg-lib/vbscript.asp" --> 
    5 <!--#include file="includes/functions_images.asp" --> 
    65<% 
    76 
  • branches/release-2.1/myasg/includes/functions_layout.asp

    r87 r114  
    105105end function 
    106106 
     107'----------------------------------------------------------------------------------------- 
     108' Icona Filtro indirizzo 
     109'----------------------------------------------------------------------------------------- 
     110' Funzione:      
     111' Data:         06.04.2004 
     112' Commenti:      
     113'----------------------------------------------------------------------------------------- 
     114function ShowIconFilterIp(ByVal ipaddress) 
     115                                         
     116        'Filter IP 
     117        '// Link PopUp 
     118        Response.Write(vbCrLf & "<a href=""JavaScript:openWin('popup_filter_ip.asp?IP=" & ipaddress & "','Filter','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=550,height=200')"" title=""" & strAsgTxtFilterIPaddr & """>") 
     119                                                                 
     120        '// L'IP �scluso 
     121        If InStr(1, strAsgFilterIP, ipaddress, 1) > 0 Then 
     122                                                                                 
     123                '// Icona esclusione 
     124                Response.Write(vbCrLf & "<img src=""" & strAsgSknPathImage & "locked_icon.gif"" alt=""" &  strAsgTxtFilterIPaddr & """ border=""0"" align=""absmiddle"" />") 
     125                                                                         
     126        '// L'IP �scluso 
     127        Else 
     128                                                                         
     129                '// Icona esclusione 
     130                Response.Write(vbCrLf & "<img src=""" & strAsgSknPathImage & "unlocked_icon.gif"" alt=""" &  strAsgTxtFilterIPaddr & """ border=""0"" align=""absmiddle"" />") 
     131                                                                 
     132        End If 
     133                                                                 
     134        '// Chiudi Link PopUp 
     135        Response.Write("</a>") 
     136         
     137end function 
     138 
    107139 
    108140%> 
  • branches/release-2.1/myasg/ip_address.asp

    r99 r114  
    1 <%@LANGUAGE="VBSCRIPT"%> 
     1<%@ LANGUAGE="VBSCRIPT" %> 
    22<% Option Explicit %> 
    33<!--#include file="config.asp" --> 
    4 <!--#include file="includes/functions_images.asp" --> 
    54<% 
    65 
     
    101100<head> 
    102101<title><%= strAsgSiteName %> | powered by ASP Stats Generator <%= strAsgVersion %></title> 
    103 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
     102<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    104103<meta name="copyright" content="Copyright (C) 2003-2008 Carletti Simone, All Rights Reserved" /> 
    105104<meta name="generator" content="ASP Stats Generator <%= strAsgVersion %>" /> <!-- leave this for stats --> 
     
    166165                objAsgRs.Open strAsgSQL, objAsgConn 
    167166                         
    168                         'Il Rs uoto 
     167                        'Il Rs  vuoto 
    169168                        If objAsgRs.EOF Then 
    170169                                 
  • branches/release-2.1/myasg/visitors.asp

    r99 r114  
    1 <%@LANGUAGE="VBSCRIPT"%> 
     1<%@ LANGUAGE="VBSCRIPT" %> 
    22<% Option Explicit %> 
    33<!--#include file="config.asp" --> 
    44<!--#include file="includes/functions_count.asp" --> 
    5 <!--#include file="includes/functions_images.asp" --> 
     5<!--#include file="asg-lib/file.asp" --> 
    66<% 
    77