package WebGUI::Operation::Statistics; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2005 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using # this software. #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- use strict; use WebGUI::AdminConsole; use WebGUI::Cache; use WebGUI::Grouping; use WebGUI::International; use WebGUI::Privilege; use WebGUI::Session; use WebGUI::SQL; #------------------------------------------------------------------- sub _submenu { my $workarea = shift; my $title = shift; $title = WebGUI::International::get($title) if ($title); my $ac = WebGUI::AdminConsole->new("statistics"); if ($session{setting}{trackPageStatistics}) { $ac->addSubmenuItem( WebGUI::URL::page('op=viewStatistics'), WebGUI::International::get(144)); } return $ac->render($workarea, $title); } #------------------------------------------------------------------- sub www_viewStatistics { return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3)); my ($output, $data); my $url = "http://www.plainblack.com/downloads/latest-version.txt"; my $cache = WebGUI::Cache->new($url,"URL"); my $version = $cache->get; if (not defined $version) { $version = $cache->setByHTTP($url,43200); } chomp $version; $output .= '
| '.WebGUI::International::get(145).': | '.$WebGUI::VERSION.'-'.$WebGUI::STATUS.' |
| '.WebGUI::International::get(349).': | '.$version.' |
| '.WebGUI::International::get(147).': | '.$data.' |
| '.WebGUI::International::get(794).': | '.$data.' |
| '.WebGUI::International::get(792).': | '.$data.' |
| '.WebGUI::International::get(146).': | '.$data.' |
| '.WebGUI::International::get(149).': | '.$data.' |
| '.WebGUI::International::get(89).': | '.$data.' |