[ Index ] |
|
Code source de phpMyVisites 2.3 |
1 <?php 2 /* 3 * phpMyVisites : website statistics and audience measurements 4 * Copyright (C) 2002 - 2006 5 * http://www.phpmyvisites.net/ 6 * phpMyVisites is free software (license GNU/GPL) 7 * Authors : phpMyVisites team 8 */ 9 10 // $Id: config.inc.php 236 2007-11-04 15:04:08Z matthieu_ $ 11 12 /** 13 * Maybe you want to edit these values (but be careful!) 14 */ 15 define('TIME_BEFORE_NEW_DAY_ARCHIVE', 10);//3600 * 3); // time before the current day is again archived when stats visited 16 define('INTERNAL_STATS', false); // define if phpmyvisites application statistics are saved 17 define('INTERNAL_CLICKHEAT', false); // define if phpmv app clicks are logged 18 define('SMARTY_DEBUG', false); // define if smarty is in debug mode (means CACHE activated, template build on each page, etc.) 19 define('DEFAULT_SITE', 1); // id of the site that is displayed after login (or -1 for summary) 20 define('CURRENT_DAY_SIMPLE_ARCHIVE', false); // define if current day archive is simplified or not 21 define('CURRENT_PERIOD_SIMPLE_ARCHIVE', false); // define if temp period archive is simplified or not 22 define('DEFAULT_DAY_TODAY', false); // is the default day today or yesterday? 23 define('ALL_POPULATION', false); // include all population or not 24 define('WEB_CRONTAB', true); // defines if the automatic crontab is activated or not (launched by the first visitor of each day). Must be desactivated if you setted a real crontab with the RSS feed (see FAQ) 25 define('SECURE_SERVER_HTTPS', false); // if true, the URLs constructed will be prefixed by https instead of http 26 define('COMPRESS_DB_DATA', true); // try to compress data before Database recording ? (can slow the process) 27 define('CATEGORY_DELIMITER', '/'); // category delimiter. Use '/' to make your categories automatically 28 define('TIME_TO_WAIT_FOR_PARALLEL_ARCHIVE', 40 * 60); // seconds to wait before try a new archive when a parallel archiving process is detected (also used in crontab task) 29 define('NB_IPS_RANGE_AVAILABLE', 10); // number of input for ip range exclude in the administration area 30 define('NB_URLS_ALIAS_AVAILABLE', 5); // number of input for urls alias in the administration area 31 define('NB_ELEMENTS_TO_DISPLAY', 10); // number of elements to display in tables (search engines, keywords, etc.) 32 define('DEFAULT_PAGE_NAME', 'index'); // default page name, when is like toto.com/ or toto.com/group1/group2/ 33 define('PARAM_URL_PARTNER', 'pmv_pid'); // param name for identifying partner 34 define('PARAM_URL_NEWSLETTER', 'pmv_nid'); // param name for identifying newsletter 35 define('PREFIX_FILES', 'FILE:'); // prefix for files in the Javascript code Ex : pagename = 'FILE:group1/group2/group3/documentation.pdf' 36 define('PREFIX_ALL_TAG', 'FILE:'); // Liste of prefix for files,rss and pocast in the Javascript code Ex : pagename = 'FILE:group1/group2/group3/documentation.pdf' 37 define('MAX_DISTINCT_ELEMENTS', 300); // max elements (ex. number of keywords saved, number of distinct ISP) 38 define('MAX_DISTINCT_DETAILS_ELEMENTS', 300); // max distinct elements for details table (ex. number of keywords for a specific search engine) 39 define('MAX_DISTINCT_INTEREST_ELEMENTS', 150); // max elements used in Interest analysis 40 define('PMV_REWRITE_MODE', 'PEAR_REQUEST'); // [PEAR_REQUEST, URLREWRITE], PEAR_REQUEST : Use PEAR plugin with fsockopen (can be used if url is on the same server or if fsockopen is authorised with others servers), URLREWRITE (default) : rewrite url to the file 41 42 define('NEWSLETTER_FORCE_CREATE', false); // If phpmv recieve a call of a newsletter and if not exists : create the newsletter true ! error message : false 43 define('NEWSLETTER_CREATE_NAME', 'Newsletter : '); // Begining of the name when you force newsletter creation 44 define('NEWSLETTER_ID_MAX_AUTO', 100); // Max newsletter id create automatically (-1 no limit) 45 46 /** 47 * You shouldn't edit the values after this comment 48 */ 49 define('CACHE_SMARTY', 60*60*48); // define smarty cache lifetime 50 define('DEFAULT_TIME_PAGE', 20); // 20 sec per page if there isn't any page following (time standard!) 51 define('TIME_SLOW_QUERY', 0.05); // slow queries are loggued into database 52 define('PERCENT_MAX', 1000); // percent maximum born 53 define('THEME_DEFAULT', 'default'); // default theme directory 54 define('THEME_ADMIN', 'default'); // admin theme directory 55 define('STORE_PAG_ARRAY_IN_FILE', false); // store big page arrays in files. Increase performance for stat report, but uses disk space 56 define('NB_DAYS_FOR_RSS_ITEMS', 3); // days to compute to syndicate in the RSS sites (to multiply by number of sites ! be careful !) 57 define('ADMINISTRATOR_MAIL', 'phpmyvisites@gmail.com'); // mail that appears in the mail sent from phpmyvisites 58 define('CACHE_RSS_LIFETIME', 3600); // lifetime of the rss syndication file cache 59 define('CACHE_MAIL_LIFETIME', 3600); // lifetime of the mail file cache 60 define('PHP_VERSION_NEEDED', '4.3'); // version of php needed for phpmyvisites to work correctly 61 define('MEMORY_LIMIT', 16); // good value for memory limit 62 define('DEFAULT_MODULE', 'view_visits'); // name of the default module loaded 63 define('COOKIE_PMVLOG_NAME', 'pmv_ck_'); // cookie name for log 64 define('COOKIE_NAME_VIEW', 'pmv_ck_view_conf'); // cookie name for stats view 65 define('COOKIE_NAME_SESSION', 'pmv_ck_session'); // cookie name for session 66 define('COOKIE_NAME_NO_STAT', 'pmv_ck_no_stat'); // cookie name for session 67 define('MAX_LENGTH_ONE_VALUE_IN_COOKIE', 300); // length in byte 68 define('TIME_ONE_VISIT', 30*60); // time max for one visit (the time is normed) in seconds 69 define('MAX_LENGTH_JAVASCRIPT_A_VARS_ARRAY', 200); // max length for a variable value in the "var a_vars" javascript array in javascript code 70 define('COOKIE_EXPIRE', 86400*365*10); // time after which the cookie will expire 71 define('SECURE_TIME_BEFORE_NEW_ARCHIVE', 20); // time added to each archive's valid time for current day archives. It is a security to try to use the same archives for the graphs on the page 72 73 // For PHPMV_STAT_*, INTERNAL_STATS must be set to true 74 define('PMV_STAT_ID_SITE', 1); // Id of site where phpmv site must be saved (-1) : So create a site in phpmyvistes and set here, the id of this site 75 define('PMV_STAT_SAVE_USER', true); // true to have login name in variable of page viewed 76 77 // Other 78 if(!defined('DEBUG')) define('DEBUG', false); 79 define('DEFAULT_ACTION', false); 80 81 error_reporting( E_ALL ); 82 83 if(DEBUG) 84 { 85 define('PRINT_TIME', false); 86 define('PRINT_QUERY_COUNT', true); 87 define('SAVE_DB_LOG', true); 88 define('PRINT_QUERY', true); 89 } 90 else 91 { 92 define('PRINT_QUERY', false); 93 define('PRINT_TIME', false); 94 define('PRINT_QUERY_COUNT', false); 95 define('SAVE_DB_LOG', false); 96 } 97 98 // relative directories 99 define('DIR_IMG_THEMES', './themes/'.THEME_DEFAULT.'/images/'); 100 define('DIR_IMG_BROWSERS', './images/browsers'); 101 define('DIR_IMG_OS', './images/os'); 102 define('DIR_IMG_PLUGINS', './images/plugins'); 103 define('DIR_IMG_LOGOS', './images/logos'); 104 define('DIR_IMG_COUNTRIES_FLAGS', './images/countries_flags'); 105 define('DIR_IMG_SCREENS', './images/screens'); 106 define('DIR_IMG_SEARCH_ENGINES', './images/search_engines'); 107 108 // absolute directories 109 define('LANGS_PATH', INCLUDE_PATH . '/langs'); 110 define('DIR_IMG_MAPS', INCLUDE_PATH . '/images/maps'); 111 define('DIR_CACHE_RSS', INCLUDE_PATH . '/datas/cache_lite/'); 112 define('DIR_CACHE_MAIL', INCLUDE_PATH . '/datas/cache_lite/'); 113 define('FONTS_PATH', INCLUDE_PATH . '/libs/artichow/font/'); 114 115 // xhtml 116 define('HREF_DOC_OPEN', "<strong><a href='http://www.phpmyvisites.us/documentation/'>"); 117 define('HREF_DOC_CLOSE', "</a></strong>"); 118 define('HREF_FORUMS', "<strong><a href=\"http://www.phpmyvisites.us/forums/\" alt=\"{'head_titre'|translate}\" title=\"{'head_titre'|translate}\">http://www.phpmyvisites.us/forums/</a></strong>"); 119 define('URL_SITE_EXAMPLE', 'http://www.site.com'); 120 define('IP_EXAMPLE', 'A.B.C.D or A.B.C.x...'); 121 define('GET_LIST_EXAMPLE', '<i>id;data;page</i>'); 122 123 // archiving 124 define('REF_TYPE_SEARCH_ENGINE', 1); 125 define('REF_TYPE_SITE', 2); 126 define('REF_TYPE_PARTNER', 3); 127 define('REF_TYPE_NEWSLETTER', 4); 128 define('REF_TYPE_DIRECT_ENTRY', 5); 129 130 define('DB_ARCHIVES_PERIOD_DAY', 1); 131 define('DB_ARCHIVES_PERIOD_WEEK', 2); 132 define('DB_ARCHIVES_PERIOD_MONTH', 3); 133 define('DB_ARCHIVES_PERIOD_YEAR', 4); 134 define('DB_ARCHIVES_PERIOD_MISC_PERIOD', 5); 135 136 define('DB_ARCHIVES_DONE', 1); 137 define('DB_ARCHIVES_TEMP', 2); 138 define('DB_ARCHIVES_FAIL', 3); 139 140 define('ARRAY_INDEX_COUNT', 1); 141 define('ARRAY_INDEX_PAGE_NAME', 2); 142 define('ARRAY_INDEX_IDPAGE', 3); 143 define('ARRAY_INDEX_IDCATEGORY', 4); 144 define('ARRAY_INDEX_LEVEL', 5); 145 define('ARRAY_INDEX_IDPARENT', 6); 146 define('ARRAY_INDEX_TIME_TOTAL' , 7); 147 define('ARRAY_INDEX_ENTRYPAGE', 8); 148 define('ARRAY_INDEX_EXITPAGE', 9); 149 define('ARRAY_INDEX_VARS', 10); 150 define('ARRAY_INDEX_TYPE', 11); 151 define('ARRAY_INDEX_PAGES_VISIT_ONEPAGE', 12); 152 define('ARRAY_INDEX_PAGES_COUNT', 13); 153 154 define('ARRAY_INDEX_RETURNING_COUNT', 14); 155 define('ARRAY_INDEX_NEW_COUNT', 15); 156 157 define('ARRAY_INDEX_VAR_COUNT', 1); 158 define('ARRAY_INDEX_VAR_VALUE', 2); 159 160 define('ARRAY_TYPE_PAGE', 1); 161 define('ARRAY_TYPE_FILE', 2); 162 163 define('STAT_PAGE_PER_VISIT', 0); 164 define('STAT_PAGE_PER_VISIT_SIGNIFICANT', 1); 165 define('STAT_ONE_PAGE_RATE', 2); 166 define('STAT_TIME_PER_VISIT', 3); 167 168 define('DATE_NORMAL', 0); 169 define('DATE_GRAPH', 1); 170 define('DATE_GRAPH_LONG_AXIS', 2); 171 172 173 // Require 174 require_once INCLUDE_PATH."/version.php"; 175 require_once INCLUDE_PATH."/core/datas/browserFamilies.php"; 176 require_once INCLUDE_PATH."/core/datas/browsers.php"; 177 require_once INCLUDE_PATH."/core/datas/countryList.php"; 178 require_once INCLUDE_PATH."/core/datas/ispCountryList.php"; 179 require_once INCLUDE_PATH."/core/datas/osLists.php"; 180 require_once INCLUDE_PATH."/core/datas/pagesGap.php"; 181 require_once INCLUDE_PATH."/core/datas/searchEngines.php"; 182 require_once INCLUDE_PATH."/core/datas/timeGap.php"; 183 require_once INCLUDE_PATH."/core/datas/fontList.php"; 184 185 /** 186 * Simple function to replicate PHP 5 behaviour 187 */ 188 function getMicrotime() 189 { 190 list($usec, $sec) = explode(" ", microtime()); 191 return ((float)$usec + (float)$sec); 192 } 193 194 $GLOBALS['time_start'] = getMicrotime(); 195 $GLOBALS['query_count'] = 0; // number of queries of the page 196 $GLOBALS['a_content'] = array(); // cookie content 197 $GLOBALS['header_message_tpl'] = ''; 198 $GLOBALS['header_error_message_tpl'] = ''; 199 200 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |