Changeset 136 for trunk/wassup.php
- Timestamp:
- 04/22/08 11:25:27 (7 months ago)
- Files:
-
- 1 modified
-
trunk/wassup.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wassup.php
r133 r136 4 4 Plugin URI: http://www.wpwp.org 5 5 Description: Wordpress plugin to analyze your visitors traffic with real time stats, chart and a lot of chronological informations. It has sidebar Widget support to show current online visitors and other statistics. 6 Version: 1.5 6 Version: 1.5.1 7 7 Author: Michele Marcucci 8 8 Author URI: http://www.michelem.org/ … … 17 17 die('Permission Denied! You are not allowed to call this page directly.'); 18 18 } 19 $version = "1.5 ";19 $version = "1.5.1"; 20 20 define('WASSUPFOLDER', dirname(plugin_basename(__FILE__)), TRUE); 21 21 require_once(dirname(__FILE__).'/lib/wassup.class.php'); … … 399 399 400 400 function WassUp() { 401 global $wpdb, $ version, $wpurl, $wassup_options, $whash;401 global $wpdb, $wp_version, $version, $wpurl, $wassup_options, $whash; 402 402 403 403 //#debug... … … 443 443 $wassup_options->wassup_refresh = $_POST['wassup_refresh']; 444 444 $wassup_options->wassup_userlevel = $_POST['wassup_userlevel']; 445 $wassup_options->wassup_dashboard_chart = $_POST['wassup_dashboard_chart']; 445 446 $wassup_options->wassup_default_type = $_POST['wassup_default_type']; 446 447 $wassup_options->wassup_default_limit = $_POST['wassup_default_limit']; … … 1392 1393 1393 1394 //### Extract useful visit information from http header... 1394 $language = @explode("-", $language); 1395 $language = @explode(",", $language[1]); 1396 $language = @explode(";", $language[0]); 1395 // 1396 //#use country code for language, if it exists in hostname 1397 if (!empty($hostname) && preg_match("/\.[a-zA-Z]{2}$/", $hostname) > 0) { 1398 $country = strtoupper(substr($hostname,-2)); 1399 if ($country == "UK") { $country = "GB"; } //change UK to GB for consistent language codes 1400 $language = array("$country"); 1401 } else { 1402 $language = @explode("-", $language); 1403 $language = @explode(",", $language[1]); 1404 $language = @explode(";", $language[0]); 1405 } 1397 1406 1398 1407 list($searchengine,$search_phrase)=explode("|",wGetSE($referrer)); … … 1651 1660 // This is the function to print out a chart's preview in the dashboard 1652 1661 function wassupDashChart() { 1653 global $wpdb; 1662 global $wpdb, $wassup_options; 1663 if ($wassup_options->wassup_dashboard_chart == 1) { 1654 1664 $table_name = $wpdb->prefix . "wassup"; 1655 1665 $to_date = wassup_get_time(); … … 1658 1668 $Chart->to_date = $to_date; 1659 1669 1660 $itemstot = $Chart->calc_tot("count", $search, null, "DISTINCT");1661 print $itemstot;1662 1663 1670 echo '<h3>WassUp Stats <cite><a href="admin.php?page=wassup">More »</a></cite></h3>'; 1664 1671 echo $Chart->TheChart(1, "400", "125", "", $wassup_options->wassup_chart_type, "bg,s,00000000", "dashboard", "left"); 1672 } 1665 1673 } //end function wassupDashChart 1666 1674
