root/trunk/myasg/config.asp @ 166

Revision 166, 6.4 kB (checked in by weppos, 2 years ago)

* merged ASG 2.1.5 changes into trunk

  • Property svn:keywords set to Id
Line 
1<%
2
3'
4' = ASP Stats Generator - Powerful and reliable ASP website counter
5'
6' Copyright (c) 2003-2008 Simone Carletti <weppos@weppos.net>
7'
8' Permission is hereby granted, free of charge, to any person obtaining a copy
9' of this software and associated documentation files (the "Software"), to deal
10' in the Software without restriction, including without limitation the rights
11' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12' copies of the Software, and to permit persons to whom the Software is
13' furnished to do so, subject to the following conditions:
14'
15' The above copyright notice and this permission notice shall be included in
16' all copies or substantial portions of the Software.
17'
18' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24' THE SOFTWARE.
25'
26'
27' @category        ASP Stats Generator
28' @package         ASP Stats Generator
29' @author          Simone Carletti <weppos@weppos.net>
30' @copyright       2003-2008 Simone Carletti
31' @license         http://www.opensource.org/licenses/mit-license.php
32' @version         SVN: $Id$
33'
34
35
36' Include HTTP functions
37%><!--#include file="asg-lib/http.asp" --><%
38
39' Include Datetime functions
40%><!--#include file="asg-lib/datetime.asp" --><%
41
42' Include Binary functions
43' TODO: consider to include the file only when necessary
44%><!--#include file="asg-lib/binary.asp" --><%
45
46' Include Update functions
47%><!--#include file="asg-includes/update.asp" --><%
48
49' Include Layout functions
50%><!--#include file="asg-includes/layout.asp" --><%
51
52' Include Collections
53%><!--#include file="asg-includes/collections.asp" --><%
54
55' This file is required to keep compatibility with releases < 2.2
56' TODO: remove as soon as skin support is completely dropped
57%><!--#include file="asg-config/oldskin.asp" --><%
58
59
60' *** Update checker variables ***
61
62Dim strAsgLatestVersion
63Dim dtmAsgLatestUpdate
64Dim intAsgLatestUpdate
65Dim urlAsgLatestUpdate
66
67intAsgLatestUpdate = 0 ' by default disable any alert
68
69
70
71'-------------------------------------------------------------------------------'
72'                                                                                                                                                               '
73'       Questo file �tato creato per consentire l'aumento delle prestazioni in  '
74'       elaborazione ed allo stesso tempo ovviare al problema dell'uso dei percorsi     '
75'       relativi a path superiori su Win2003 Server.                                                            '
76'                                                                                                                                                               '
77'       Qui saranno/sono inclusi tutti i file che necessiteranno di essere eseguiti     '
78'       dall'applicazione generale ma non al file di conteggio mentre il file           '
79'       config_common.asp �tato dedicato all'uso principale dal file di conteggio.'
80'       In questo modo il file di conteggio non sar�bbligato a caricare in              '
81'       memoria inutili variabili di elaborazione utili solo al processo di report      '
82'       rallenterebbero l'applicazione.                                                                                         '
83'                                                                                                                                                               '
84'-------------------------------------------------------------------------------'
85
86
87
88'-------------------------------------------------------------------------------'
89' Includi le informazioni generiche di configurazione
90'-------------------------------------------------------------------------------'
91%><!--#include file="config_common.asp" --><%
92
93'-------------------------------------------------------------------------------'
94' Includi le informazioni di gestione dei report statistici
95'-------------------------------------------------------------------------------'
96%><!--#include file="includes/functions_stats.asp" --><%
97
98'-------------------------------------------------------------------------------'
99' Includi le informazioni sullo sviluppo del layout tramite funzioni
100'-------------------------------------------------------------------------------'
101%><!--#include file="includes/functions_layout.asp" --><%
102
103       
104        '---------------------------------------------------
105        '       Dimension variables : sorting records
106        '---------------------------------------------------
107        Dim strAsgSortBy
108        Dim strAsgSortByFld
109        Dim strAsgSortOrder
110       
111        '---------------------------------------------------
112        '       Dimension variables : report data search engine
113        '---------------------------------------------------
114        Dim strAsgSQLsearchstring                       'Holds the search string to query database
115        Dim asgSearchfor                                        'Holds the keywords to search for
116        Dim asgSearchIn                                         'Holds the name of the table to search in
117
118
119'-------------------------------------------------------------------------------'
120' Change to include your custom language file
121'-------------------------------------------------------------------------------'
122
123' Italiano
124%><!--include file="languages/italiano.asp" --><%
125
126' English (default)
127%><!--#include file="languages/english.asp" --><%
128
129
130'---------------------------------------------------
131'       Apri connessione al Database
132'---------------------------------------------------
133If blnConnectionIsOpen = False Then
134        'Se si usano variabili application apri la connessione
135        'dato che non �tata aperta per gestire le risorse
136        'del file di conteggio.
137        objAsgConn.Open strAsgConn
138'---------------------------------------------------
139End If
140'---------------------------------------------------
141
142
143'-----------------------------------------------------------------------------------------
144' Check version for update!
145'-----------------------------------------------------------------------------------------
146' Controllo differenza data ed esecuzione solo se amministratore
147if Clng(asgDatestamp(Now()) - blnAsgCheckUpdate) > 7 and Session("AsgLogin") = "Logged" then
148
149  Dim aryAsgLatestVersion
150  aryAsgLatestVersion = asgVersionCheck(ASG_VERSION)
151 
152  if Ubound(aryAsgLatestVersion) > 0 then
153    strAsgLatestVersion = aryAsgLatestVersion(0)
154    dtmAsgLatestUpdate  = aryAsgLatestVersion(1)
155    urlAsgLatestUpdate  = aryAsgLatestVersion(2)
156   
157    ' compare versions and display alert in case of greather release
158    if strAsgLatestVersion > ASG_VERSION then
159      intAsgLatestUpdate = 1
160    end if
161     
162  end if
163
164  ' update database
165  strAsgSQL = "UPDATE "&strAsgTablePrefix&"Config SET Opt_Check_Update = " & asgDatestamp(Now())
166  objAsgConn.Execute(strAsgSQL)
167
168  ' update application config if enabled
169  if blnApplicationConfig then
170    Application("blnAsgCheckUpdate") = asgDatestamp(Now())
171  end if
172       
173end if
174
175%>
Note: See TracBrowser for help on using the browser.