diff --git a/Access.php b/Access.php index 627c3ff..7e353a9 100644 --- a/Access.php +++ b/Access.php @@ -11,31 +11,33 @@ class Access_Extend private static $_instance = null; public $action; public $title; - public $logs = array(); + public $logs = array(); public $overview = array(); public function __construct() { - $this->db = Typecho_Db::get(); - $this->prefix = $this->db->getPrefix(); - $this->table = $this->prefix . 'access'; - $this->config = Typecho_Widget::widget('Widget_Options')->plugin('Access'); - $this->request = Typecho_Request::getInstance(); + $this->db = Typecho_Db::get(); + $this->prefix = $this->db->getPrefix(); + $this->table = $this->prefix . 'access'; + $this->config = Typecho_Widget::widget('Widget_Options')->plugin('Access'); + $this->request = Typecho_Request::getInstance(); $this->pageSize = $this->config->pageSize; - $this->isDrop = $this->config->isDrop; - if ($this->pageSize == null || $this->isDrop == null) { + $this->isDrop = $this->config->isDrop; + if ($this->pageSize == null || $this->isDrop == null) + { throw new Typecho_Plugin_Exception('请先设置插件!'); } - switch ($this->request->get('action')) { + switch ($this->request->get('action')) + { case 'logs': default: $this->action = 'logs'; - $this->title = '访问日志'; + $this->title = '访问日志'; $this->parseLogs(); break; case 'overview': $this->action = 'overview'; - $this->title = '访问概览'; + $this->title = '访问概览'; $this->parseOverview(); break; } @@ -90,7 +92,8 @@ class Access_Extend public static function getInstance() { - if (!(self::$_instance instanceof self)) { + if (!(self::$_instance instanceof self)) + { self::$_instance = new self(); } return self::$_instance; @@ -99,87 +102,152 @@ class Access_Extend public function parseUA($ua) { $os = null; - if ($this->isSpider($ua)) { + if ($this->isSpider($ua)) + { $os = '爬虫'; - } elseif (preg_match('/Windows NT 6.0/i', $ua)) { + } + elseif (preg_match('/Windows NT 6.0/i', $ua)) + { $os = "Windows Vista"; - } elseif (preg_match('/Windows NT 6.1/i', $ua)) { + } + elseif (preg_match('/Windows NT 6.1/i', $ua)) + { $os = "Windows 7"; - } elseif (preg_match('/Windows NT 6.2/i', $ua)) { + } + elseif (preg_match('/Windows NT 6.2/i', $ua)) + { $os = "Windows 8"; - } elseif (preg_match('/Windows NT 6.3/i', $ua)) { + } + elseif (preg_match('/Windows NT 6.3/i', $ua)) + { $os = "Windows 8.1"; - } elseif (preg_match('/Windows NT 10.0/i', $ua)) { + } + elseif (preg_match('/Windows NT 10.0/i', $ua)) + { $os = "Windows 10"; - } elseif (preg_match('/Windows NT 5.1/i', $ua)) { + } + elseif (preg_match('/Windows NT 5.1/i', $ua)) + { $os = "Windows XP"; - } elseif (preg_match('/Windows NT 5.2/i', $ua) && preg_match('/Win64/i', $ua)) { + } + elseif (preg_match('/Windows NT 5.2/i', $ua) && preg_match('/Win64/i', $ua)) + { $os = "Windows XP 64 bit"; - } elseif (preg_match('/Android ([0-9.]+)/i', $ua, $matches)) { + } + elseif (preg_match('/Android ([0-9.]+)/i', $ua, $matches)) + { $os = "Android " . $matches[1]; - } elseif (preg_match('/iPhone OS ([_0-9]+)/i', $ua, $matches)) { + } + elseif (preg_match('/iPhone OS ([_0-9]+)/i', $ua, $matches)) + { $os = 'iPhone ' . $matches[1]; - } elseif (preg_match('/Ubuntu/i', $ua, $matches)) { + } + elseif (preg_match('/Ubuntu/i', $ua, $matches)) + { $os = 'Ubuntu '; - } elseif (preg_match('/Mac OS X ([0-9_]+)/i', $ua, $matches)) { + } + elseif (preg_match('/Mac OS X ([0-9_]+)/i', $ua, $matches)) + { $os = 'Mac OS ' . $matches[1]; - } elseif (preg_match('/Linux/i', $ua, $matches)) { + } + elseif (preg_match('/Linux/i', $ua, $matches)) + { $os = 'Linux'; - } else { + } + else + { $os = '未知'; } - if ($this->isSpider($ua)) { + if ($this->isSpider($ua)) + { $browser = '爬虫'; - } elseif (preg_match('#(Camino|Chimera)[ /]([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#(Camino|Chimera)[ /]([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Camino ' . $matches[2]; - } elseif (preg_match('#SE 2([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#SE 2([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = '搜狗浏览器 2' . $matches[1]; - } elseif (preg_match('#360([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#360([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = '360浏览器 ' . $matches[1]; - } elseif (preg_match('#Maxthon( |\/)([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#Maxthon( |\/)([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Maxthon ' . $matches[2]; - } elseif (preg_match('#Chrome/([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#Chrome/([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Chrome ' . $matches[1]; - } elseif (preg_match('#XiaoMi/MiuiBrowser/([0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#XiaoMi/MiuiBrowser/([0-9.]+)#i', $ua, $matches)) + { $browser = '小米浏览器 ' . $matches[1]; - } elseif (preg_match('#Safari/([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#Safari/([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Safari ' . $matches[1]; - } elseif (preg_match('#opera mini#i', $ua)) { + } + elseif (preg_match('#opera mini#i', $ua)) + { preg_match('#Opera/([a-zA-Z0-9.]+)#i', $ua, $matches); $browser = 'Opera Mini ' . $matches[1]; - } elseif (preg_match('#Opera.([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#Opera.([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Opera ' . $matches[1]; - } elseif (preg_match('#TencentTraveler ([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#TencentTraveler ([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = '腾讯TT浏览器 ' . $matches[1]; - } elseif (preg_match('#UCWEB([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#UCWEB([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'UCWEB ' . $matches[1]; - } elseif (preg_match('#MSIE ([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#MSIE ([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Internet Explorer ' . $matches[1]; - } elseif (preg_match('#Trident#', $ua, $matches)) { + } + elseif (preg_match('#Trident#', $ua, $matches)) + { $browser = 'Internet Explorer 11'; - } elseif (preg_match('#Edge/12.0#i', $ua, $matches)) { + } + elseif (preg_match('#Edge/12.0#i', $ua, $matches)) + { //win10中spartan浏览器 $browser = 'Spartan'; - } elseif (preg_match('#(Firefox|Phoenix|Firebird|BonEcho|GranParadiso|Minefield|Iceweasel)/([a-zA-Z0-9.]+)#i', $ua, $matches)) { + } + elseif (preg_match('#(Firefox|Phoenix|Firebird|BonEcho|GranParadiso|Minefield|Iceweasel)/([a-zA-Z0-9.]+)#i', $ua, $matches)) + { $browser = 'Firefox ' . $matches[2]; - } else { + } + else + { $browser = '未知'; } - return $os . " | " . $browser; + return $os . " / " . $browser; } public function isSpider($ua) { $ua = strtolower($ua); - if (!empty($ua)) { - foreach ($this->spiderArray as $val) { + if (!empty($ua)) + { + foreach ($this->spiderArray as $val) + { $str = strtolower($val); - if (strpos($ua, $str) !== false) { + if (strpos($ua, $str) !== false) + { return true; } } - } else { + } + else + { return false; } } @@ -187,11 +255,13 @@ class Access_Extend protected function getWhere($type) { $where_str = ''; - foreach ($this->spiderArray as $value) { + foreach ($this->spiderArray as $value) + { $where_str .= "ua {1} LIKE " . "'%{$value}%' {2} "; } $where_str = rtrim($where_str, '{2} '); - switch ($type) { + switch ($type) + { case 1: $where = str_replace('{1}', 'NOT', $where_str); $where = str_replace('{2}', 'and', $where); @@ -211,36 +281,36 @@ class Access_Extend protected function parseLogs() { - $type = $this->request->get('type', 1); - $p = $this->request->get('page', 1); + $type = $this->request->get('type', 1); + $p = $this->request->get('page', 1); $offset = (max(intval($p), 1) - 1) * $this->pageSize; - $where = $this->getWhere($type); + $where = $this->getWhere($type); $this->logs['list'] = $this->db->fetchAll("SELECT * FROM {$this->table} {$where} ORDER BY id DESC LIMIT {$this->pageSize} OFFSET {$offset}"); $this->logs['rows'] = count($this->db->fetchAll("SELECT * FROM {$this->table} {$where}")); include_once dirname(__FILE__) . '/lib/Page.php'; - $pager = new Page($this->pageSize, $this->logs['rows'], $p, 10); + $pager = new Page($this->pageSize, $this->logs['rows'], $p, 10); $this->logs['page'] = $pager->show(); } protected function parseOverview() { - //$where = $this->getWhere(1); $where = 'WHERE 1=1'; - $this->overview['ip']['today']['total'] = 0; - $this->overview['uv']['today']['total'] = 0; - $this->overview['pv']['today']['total'] = 0; + $this->overview['ip']['today']['total'] = 0; + $this->overview['uv']['today']['total'] = 0; + $this->overview['pv']['today']['total'] = 0; $this->overview['ip']['yesterday']['total'] = 0; $this->overview['uv']['yesterday']['total'] = 0; $this->overview['pv']['yesterday']['total'] = 0; - for ($i = 0; $i < 24; $i++) { - $today = date("Y-m-d"); - $start = strtotime(date("{$today} {$i}:00:00")); - $end = strtotime(date("{$today} {$i}:59:59")); + for ($i = 0; $i < 24; $i++) + { + $today = date("Y-m-d"); + $start = strtotime(date("{$today} {$i}:00:00")); + $end = strtotime(date("{$today} {$i}:59:59")); $this->overview['ip']['today']['hours'][] = count($this->db->fetchAll("SELECT DISTINCT ip FROM {$this->table} {$where} AND date BETWEEN {$start} AND {$end}")); $this->overview['ip']['today']['total'] += $this->overview['ip']['today']['hours'][$i]; $this->overview['uv']['today']['hours'][] = count($this->db->fetchAll("SELECT DISTINCT ip,ua FROM {$this->table} {$where} AND date BETWEEN {$start} AND {$end}")); @@ -249,10 +319,11 @@ class Access_Extend $this->overview['pv']['today']['total'] += $this->overview['pv']['today']['hours'][$i]; } - for ($i = 0; $i < 24; $i++) { - $yesterday = date("Y-m-d", time() - 24 * 60 * 60); - $start = strtotime(date("{$yesterday} {$i}:00:00")); - $end = strtotime(date("{$yesterday} {$i}:59:59")); + for ($i = 0; $i < 24; $i++) + { + $yesterday = date("Y-m-d", time() - 24 * 60 * 60); + $start = strtotime(date("{$yesterday} {$i}:00:00")); + $end = strtotime(date("{$yesterday} {$i}:59:59")); $this->overview['ip']['yesterday']['hours'][] = count($this->db->fetchAll("SELECT DISTINCT ip FROM {$this->table} {$where} AND date BETWEEN {$start} AND {$end}")); $this->overview['ip']['yesterday']['total'] += $this->overview['ip']['yesterday']['hours'][$i]; $this->overview['uv']['yesterday']['hours'][] = count($this->db->fetchAll("SELECT DISTINCT ip,ua FROM {$this->table} {$where} AND date BETWEEN {$start} AND {$end}")); @@ -261,15 +332,15 @@ class Access_Extend $this->overview['pv']['yesterday']['total'] += $this->overview['pv']['yesterday']['hours'][$i]; } - $this->overview['ip']['all']['total'] = count($this->db->fetchAll("SELECT DISTINCT ip FROM {$this->table} {$where}")); - $this->overview['uv']['all']['total'] = count($this->db->fetchAll("SELECT DISTINCT ip,ua FROM {$this->table} {$where}")); - $this->overview['pv']['all']['total'] = count($this->db->fetchAll("SELECT ip FROM {$this->table} {$where}")); + $this->overview['ip']['all']['total'] = count($this->db->fetchAll("SELECT DISTINCT ip FROM {$this->table} {$where}")); + $this->overview['uv']['all']['total'] = count($this->db->fetchAll("SELECT DISTINCT ip,ua FROM {$this->table} {$where}")); + $this->overview['pv']['all']['total'] = count($this->db->fetchAll("SELECT ip FROM {$this->table} {$where}")); - $this->overview['chart']['title']['text'] = date("Y-m-d 统计"); + $this->overview['chart']['title']['text'] = date("Y-m-d 统计"); $this->overview['chart']['xAxis']['categories'] = $this->buildObject(array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23), true); - $this->overview['chart']['series']['pv'] = $this->buildObject($this->overview['pv']['today']['hours'], false); - $this->overview['chart']['series']['uv'] = $this->buildObject($this->overview['uv']['today']['hours'], false); - $this->overview['chart']['series']['ip'] = $this->buildObject($this->overview['ip']['today']['hours'], false); + $this->overview['chart']['series']['pv'] = $this->buildObject($this->overview['pv']['today']['hours'], false); + $this->overview['chart']['series']['uv'] = $this->buildObject($this->overview['uv']['today']['hours'], false); + $this->overview['chart']['series']['ip'] = $this->buildObject($this->overview['ip']['today']['hours'], false); } @@ -277,179 +348,14 @@ class Access_Extend { $obj = json_encode($array); $obj = str_replace("\"", "'", $obj); - if ($quote) { + if ($quote) + { return $obj; - } else { + } + else + { return str_replace("'", '', $obj); } } - public function getAddress($ip) - { - if (!filter_var($ip, FILTER_VALIDATE_IP)) { - return 'Invalid IP address'; - } - - $ipdatafile = dirname(__FILE__) . '/lib/qqwry.dat'; - if (!$fd = @fopen($ipdatafile, 'rb')) { - return 'Invalid IP data file'; - } - - $ip = explode('.', $ip); - $ipNum = $ip[0] * 16777216 + $ip[1] * 65536 + $ip[2] * 256 + $ip[3]; - - if (!($DataBegin = fread($fd, 4)) || !($DataEnd = fread($fd, 4))) { - return; - } - - @$ipbegin = implode('', unpack('L', $DataBegin)); - if ($ipbegin < 0) { - $ipbegin += pow(2, 32); - } - - @$ipend = implode('', unpack('L', $DataEnd)); - if ($ipend < 0) { - $ipend += pow(2, 32); - } - - $ipAllNum = ($ipend - $ipbegin) / 7 + 1; - - $BeginNum = $ip2num = $ip1num = 0; - $ipAddr1 = $ipAddr2 = ''; - $EndNum = $ipAllNum; - - while ($ip1num > $ipNum || $ip2num < $ipNum) { - $Middle = intval(($EndNum + $BeginNum) / 2); - - fseek($fd, $ipbegin + 7 * $Middle); - $ipData1 = fread($fd, 4); - if (strlen($ipData1) < 4) { - fclose($fd); - return 'System Error'; - } - $ip1num = implode('', unpack('L', $ipData1)); - if ($ip1num < 0) { - $ip1num += pow(2, 32); - } - - if ($ip1num > $ipNum) { - $EndNum = $Middle; - continue; - } - - $DataSeek = fread($fd, 3); - if (strlen($DataSeek) < 3) { - fclose($fd); - return 'System Error'; - } - $DataSeek = implode('', unpack('L', $DataSeek . chr(0))); - fseek($fd, $DataSeek); - $ipData2 = fread($fd, 4); - if (strlen($ipData2) < 4) { - fclose($fd); - return 'System Error'; - } - $ip2num = implode('', unpack('L', $ipData2)); - if ($ip2num < 0) { - $ip2num += pow(2, 32); - } - - if ($ip2num < $ipNum) { - if ($Middle == $BeginNum) { - fclose($fd); - return 'Unknown'; - } - $BeginNum = $Middle; - } - } - - $ipFlag = fread($fd, 1); - if ($ipFlag == chr(1)) { - $ipSeek = fread($fd, 3); - if (strlen($ipSeek) < 3) { - fclose($fd); - return 'System Error'; - } - $ipSeek = implode('', unpack('L', $ipSeek . chr(0))); - fseek($fd, $ipSeek); - $ipFlag = fread($fd, 1); - } - - if ($ipFlag == chr(2)) { - $AddrSeek = fread($fd, 3); - if (strlen($AddrSeek) < 3) { - fclose($fd); - return 'System Error'; - } - $ipFlag = fread($fd, 1); - if ($ipFlag == chr(2)) { - $AddrSeek2 = fread($fd, 3); - if (strlen($AddrSeek2) < 3) { - fclose($fd); - return 'System Error'; - } - $AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0))); - fseek($fd, $AddrSeek2); - } else { - fseek($fd, -1, SEEK_CUR); - } - - while (($char = fread($fd, 1)) != chr(0)) { - $ipAddr2 .= $char; - } - - $AddrSeek = implode('', unpack('L', $AddrSeek . chr(0))); - fseek($fd, $AddrSeek); - - while (($char = fread($fd, 1)) != chr(0)) { - $ipAddr1 .= $char; - } - - } else { - fseek($fd, -1, SEEK_CUR); - while (($char = fread($fd, 1)) != chr(0)) { - $ipAddr1 .= $char; - } - - $ipFlag = fread($fd, 1); - if ($ipFlag == chr(2)) { - $AddrSeek2 = fread($fd, 3); - if (strlen($AddrSeek2) < 3) { - fclose($fd); - return 'System Error'; - } - $AddrSeek2 = implode('', unpack('L', $AddrSeek2 . chr(0))); - fseek($fd, $AddrSeek2); - } else { - fseek($fd, -1, SEEK_CUR); - } - while (($char = fread($fd, 1)) != chr(0)) { - $ipAddr2 .= $char; - } - - } - fclose($fd); - - if (preg_match('/http/i', $ipAddr2)) { - $ipAddr2 = ''; - } - $ipaddr = "$ipAddr1 $ipAddr2"; - $ipaddr = preg_replace('/^\s*/is', '', $ipaddr); - $ipaddr = preg_replace('/\s*$/is', '', $ipaddr); - if (preg_match('/http/i', $ipaddr) || $ipaddr == '') { - $ipaddr = 'Unknown'; - } - - $charset = mb_detect_encoding($ipaddr, array('UTF-8', 'GBK', 'GB2312')); - $charset = strtolower($charset); - if ('cp936' == $charset) { - $charset = 'GBK'; - } - if ("utf-8" != $charset) { - $ipaddr = iconv($charset, "UTF-8//IGNORE", $ipaddr); - } - return $ipaddr; - - } - } diff --git a/Action.php b/Action.php new file mode 100644 index 0000000..a1d770a --- /dev/null +++ b/Action.php @@ -0,0 +1,37 @@ +response = Typecho_Response::getInstance(); + $this->request = Typecho_Request::getInstance(); + } + + public function execute() + { + } + + public function action() + { + } + + public function ipip() + { + $ip = $this->request->get('ip'); + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, 'http://www.ipip.net/ip.html'); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('ip' => $ip))); + curl_setopt($ch, CURLOPT_REFERER, 'http://www.ipip.net/ip.html'); + $result = curl_exec($ch); + curl_close($ch); + echo $result; + } + +} diff --git a/Plugin.php b/Plugin.php index df23a84..51016ce 100644 --- a/Plugin.php +++ b/Plugin.php @@ -4,7 +4,7 @@ * * @package Access * @author Kokororin - * @version 1.0 + * @version 1.1 * @link https://kotori.love */ class Access_Plugin implements Typecho_Plugin_Interface @@ -14,6 +14,7 @@ class Access_Plugin implements Typecho_Plugin_Interface { $msg = Access_Plugin::install(); Helper::addPanel(1, self::$panel, 'Access控制台', 'Access插件控制台', 'subscriber'); + Helper::addRoute("access_ipip", "/access/i/ipip", "Access_Action", 'ipip'); Typecho_Plugin::factory('Widget_Archive')->header = array('Access_Plugin', 'start'); return _t($msg); } @@ -22,12 +23,14 @@ class Access_Plugin implements Typecho_Plugin_Interface { $config = Typecho_Widget::widget('Widget_Options')->plugin('Access'); $isDrop = $config->isDrop; - if ($isDrop == 0) { - $db = Typecho_Db::get(); + if ($isDrop == 0) + { + $db = Typecho_Db::get(); $prefix = $db->getPrefix(); $db->query("DROP TABLE `" . $prefix . "access`", Typecho_Db::WRITE); } Helper::removePanel(1, self::$panel); + Helper::removeRoute("access_ipip"); } public static function config(Typecho_Widget_Helper_Form $form) @@ -45,18 +48,20 @@ class Access_Plugin implements Typecho_Plugin_Interface } public static function personalConfig(Typecho_Widget_Helper_Form $form) - {} + { + } public static function install() { - if (substr(trim(dirname(__FILE__), '/'), -6) != 'Access') { + if (substr(trim(dirname(__FILE__), '/'), -6) != 'Access') + { throw new Typecho_Plugin_Exception('插件目录名必须为Access'); } $installDb = Typecho_Db::get(); - $type = explode('_', $installDb->getAdapterName()); - $type = array_pop($type); - $prefix = $installDb->getPrefix(); - $scripts = "CREATE TABLE `typecho_access` ( + $type = explode('_', $installDb->getAdapterName()); + $type = array_pop($type); + $prefix = $installDb->getPrefix(); + $scripts = "CREATE TABLE `typecho_access` ( `id` int(10) unsigned NOT NULL auto_increment, `ua` varchar(255) default NULL, `url` varchar(64) default NULL, @@ -68,44 +73,77 @@ class Access_Plugin implements Typecho_Plugin_Interface $scripts = str_replace('%charset%', 'utf8', $scripts); $scripts = explode(';', $scripts); try { - foreach ($scripts as $script) { + foreach ($scripts as $script) + { $script = trim($script); - if ($script) { + if ($script) + { $installDb->query($script, Typecho_Db::WRITE); } } return '成功创建数据表,插件启用成功'; - } catch (Typecho_Db_Exception $e) { + } + catch (Typecho_Db_Exception $e) + { $code = $e->getCode(); - if (('Mysql' == $type && $code == (1050 || '42S01'))) { + if (('Mysql' == $type && $code == (1050 || '42S01'))) + { $script = 'SELECT * from `' . $prefix . 'access`'; $installDb->query($script, Typecho_Db::READ); return '数据表已存在,插件启用成功'; - } else { + } + else + { throw new Typecho_Plugin_Exception('数据表建立失败,插件启用失败。错误号:' . $code); } } } + public static function hasLogin() + { + $cookieUid = Typecho_Cookie::get('__typecho_uid'); + if (null !== $cookieUid) + { + $db = Typecho_Db::get(); + $user = $db->fetchRow($db->select()->from('table.users') + ->where('uid = ?', intval($cookieUid)) + ->limit(1)); + + $cookieAuthCode = Typecho_Cookie::get('__typecho_authCode'); + if ($user && Typecho_Common::hashValidate($user['authCode'], $cookieAuthCode)) + { + return true; + } + Typecho_Cookie::delete('__typecho_uid'); + Typecho_Cookie::delete('__typecho_authCode'); + } + return false; + } + public static function start() { + if (self::hasLogin()) + { + return; + } $config = Typecho_Widget::widget('Widget_Options')->plugin('Access'); - $request = new Typecho_Request; - $ip = $request->getIp(); - $url = $_SERVER['REQUEST_URI']; - if ($ip == null) { + $request = Typecho_Request::getInstance(); + $ip = $request->getIp(); + $url = $_SERVER['REQUEST_URI']; + if ($ip == null) + { $ip = 'UnKnow'; } - $options = Typecho_Widget::widget('Widget_Options'); + $options = Typecho_Widget::widget('Widget_Options'); $timeStamp = $options->gmtTime; - $offset = $options->timezone - $options->serverTimezone; - $gtime = $timeStamp + $offset; - $db = Typecho_Db::get(); - $rows = array( - 'ua' => $_SERVER['HTTP_USER_AGENT'], - 'url' => $url, - 'ip' => $ip, + $offset = $options->timezone - $options->serverTimezone; + $gtime = $timeStamp + $offset; + $db = Typecho_Db::get(); + $rows = array( + 'ua' => $request->getAgent(), + 'url' => $url, + 'ip' => $ip, 'date' => $gtime, ); $db->query($db->insert('table.access')->rows($rows)); diff --git a/README.md b/README.md index bb3022f..da6dafb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ -### Typecho Access 插件 +## Typecho Access 插件 -提供简易的访客记录查看。 \ No newline at end of file +提供简易的访客记录查看。 + +### 功能简介/更新说明 + +* 查看IP/UV/PV +* ip归属地使用ipip.net +* 管理员登录时不记录日志 \ No newline at end of file diff --git a/lib/Page.php b/lib/Page.php index 732b025..42efd58 100644 --- a/lib/Page.php +++ b/lib/Page.php @@ -7,7 +7,6 @@ class Page private $sub_pages; //每次显示的页数 private $pageNums; //总页数 private $page_array = array(); //用来构造分页的数组 - private $subPage_link; //每个分页的链接 /** * * __construct是SubPages的构造函数,用来在创建类的时候自动运行. @@ -15,7 +14,6 @@ class Page * @nums 总条目数 * @current_num 当前被选中的页 * @sub_pages 每次显示的页数 - * @subPage_link 每个分页的链接 * @subPage_type 显示分页的类型 * * 当@subPage_type=1的时候为普通分页模式 @@ -26,18 +24,18 @@ class Page public function __construct($each_disNums, $nums, $current_page, $sub_pages) { $this->each_disNums = intval($each_disNums); - $this->nums = intval($nums); - if (!$current_page) { + $this->nums = intval($nums); + if (!$current_page) + { $this->current_page = 1; - } else { + } + else + { $this->current_page = intval($current_page); } - $this->sub_pages = intval($sub_pages); - $this->pageNums = ceil($nums / $each_disNums); - $uri = $_SERVER['REQUEST_URI']; - $uri = str_replace('&page=' . $this->current_page, '', $uri); - $uri = str_replace('?page=' . $this->current_page, '', $uri); - $this->subPage_link = trim(Typecho_Widget::widget('Widget_Options')->siteUrl, '/') . $uri . "&page="; + $this->sub_pages = intval($sub_pages); + $this->pageNums = ceil($nums / $each_disNums); + } /* @@ -51,14 +49,14 @@ class Page unset($sub_pages); unset($pageNums); unset($page_array); - unset($subPage_link); } /* 用来给建立分页的数组初始化的函数。 */ public function initArray() { - for ($i = 0; $i < $this->sub_pages; $i++) { + for ($i = 0; $i < $this->sub_pages; $i++) + { $this->page_array[$i] = $i; } return $this->page_array; @@ -69,23 +67,35 @@ class Page */ public function construct_num_Page() { - if ($this->pageNums < $this->sub_pages) { + if ($this->pageNums < $this->sub_pages) + { $current_array = array(); - for ($i = 0; $i < $this->pageNums; $i++) { + for ($i = 0; $i < $this->pageNums; $i++) + { $current_array[$i] = $i + 1; } - } else { + } + else + { $current_array = $this->initArray(); - if ($this->current_page <= 3) { - for ($i = 0; $i < count($current_array); $i++) { + if ($this->current_page <= 3) + { + for ($i = 0; $i < count($current_array); $i++) + { $current_array[$i] = $i + 1; } - } elseif ($this->current_page <= $this->pageNums && $this->current_page > $this->pageNums - $this->sub_pages + 1) { - for ($i = 0; $i < count($current_array); $i++) { + } + elseif ($this->current_page <= $this->pageNums && $this->current_page > $this->pageNums - $this->sub_pages + 1) + { + for ($i = 0; $i < count($current_array); $i++) + { $current_array[$i] = ($this->pageNums) - ($this->sub_pages) + 1 + $i; } - } else { - for ($i = 0; $i < count($current_array); $i++) { + } + else + { + for ($i = 0; $i < count($current_array); $i++) + { $current_array[$i] = $this->current_page - 2 + $i; } } @@ -99,31 +109,49 @@ class Page public function show() { $str = ""; - if ($this->current_page > 1) { - $firstPageUrl = $this->subPage_link . "1"; - $prevPageUrl = $this->subPage_link . ($this->current_page - 1); + if ($this->current_page > 1) + { + $firstPageUrl = $this->buildUrl(1); + $prevPageUrl = $this->buildUrl($this->current_page - 1); $str .= '
  • «
  • '; - } else { + } + else + { $str .= ''; } $a = $this->construct_num_Page(); - for ($i = 0; $i < count($a); $i++) { + + for ($i = 0; $i < count($a); $i++) + { $s = $a[$i]; - if ($s == $this->current_page) { + if ($s == $this->current_page) + { + $url = Typecho_Request::getInstance()->getRequestUrl(); $str .= '
  • ' . $s . '
  • '; - } else { - $url = $this->subPage_link . $s; + } + else + { + $url = $this->buildUrl($s); $str .= '
  • ' . $s . '
  • '; } } - if ($this->current_page < $this->pageNums) { - $lastPageUrl = $this->subPage_link . $this->pageNums; - $nextPageUrl = $this->subPage_link . ($this->current_page + 1); + if ($this->current_page < $this->pageNums) + { + $lastPageUrl = $this->buildUrl($this->pageNums); + $nextPageUrl = $this->buildUrl($this->current_page + 1); $str .= '
  • »
  • '; - } else { + } + else + { $str .= ''; } return $str; } + private function buildUrl($page) + { + $url = Typecho_Common::url('extending.php?' . http_build_query(array('panel' => Access_Plugin::$panel, 'action' => 'logs', 'page' => $page)), Typecho_Widget::widget('Widget_Options')->adminUrl); + return $url; + } + } diff --git a/lib/highcharts/examples/3d-column-interactive/index.htm b/lib/highcharts/examples/3d-column-interactive/index.htm deleted file mode 100644 index 3a7581e..0000000 --- a/lib/highcharts/examples/3d-column-interactive/index.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    -
    - - - -
    Alpha Angle
    Beta Angle
    -
    - - diff --git a/lib/highcharts/examples/3d-column-null-values/index.htm b/lib/highcharts/examples/3d-column-null-values/index.htm deleted file mode 100644 index 0985190..0000000 --- a/lib/highcharts/examples/3d-column-null-values/index.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/3d-column-stacking-grouping/index.htm b/lib/highcharts/examples/3d-column-stacking-grouping/index.htm deleted file mode 100644 index e13e8af..0000000 --- a/lib/highcharts/examples/3d-column-stacking-grouping/index.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/3d-pie-donut/index.htm b/lib/highcharts/examples/3d-pie-donut/index.htm deleted file mode 100644 index 978308e..0000000 --- a/lib/highcharts/examples/3d-pie-donut/index.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/3d-pie/index.htm b/lib/highcharts/examples/3d-pie/index.htm deleted file mode 100644 index 4f0f824..0000000 --- a/lib/highcharts/examples/3d-pie/index.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/3d-scatter-draggable/index.htm b/lib/highcharts/examples/3d-scatter-draggable/index.htm deleted file mode 100644 index aa391ee..0000000 --- a/lib/highcharts/examples/3d-scatter-draggable/index.htm +++ /dev/null @@ -1,134 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/area-basic/index.htm b/lib/highcharts/examples/area-basic/index.htm deleted file mode 100644 index 81118a6..0000000 --- a/lib/highcharts/examples/area-basic/index.htm +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/area-inverted/index.htm b/lib/highcharts/examples/area-inverted/index.htm deleted file mode 100644 index c901bf4..0000000 --- a/lib/highcharts/examples/area-inverted/index.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/area-missing/index.htm b/lib/highcharts/examples/area-missing/index.htm deleted file mode 100644 index 239e060..0000000 --- a/lib/highcharts/examples/area-missing/index.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/area-negative/index.htm b/lib/highcharts/examples/area-negative/index.htm deleted file mode 100644 index 287c3f7..0000000 --- a/lib/highcharts/examples/area-negative/index.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/area-stacked-percent/index.htm b/lib/highcharts/examples/area-stacked-percent/index.htm deleted file mode 100644 index 23a14ba..0000000 --- a/lib/highcharts/examples/area-stacked-percent/index.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/area-stacked/index.htm b/lib/highcharts/examples/area-stacked/index.htm deleted file mode 100644 index db8c9fe..0000000 --- a/lib/highcharts/examples/area-stacked/index.htm +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/arearange-line/index.htm b/lib/highcharts/examples/arearange-line/index.htm deleted file mode 100644 index cd5e2ef..0000000 --- a/lib/highcharts/examples/arearange-line/index.htm +++ /dev/null @@ -1,138 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/arearange/index.htm b/lib/highcharts/examples/arearange/index.htm deleted file mode 100644 index 29d43d4..0000000 --- a/lib/highcharts/examples/arearange/index.htm +++ /dev/null @@ -1,65 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/areaspline/index.htm b/lib/highcharts/examples/areaspline/index.htm deleted file mode 100644 index d31f505..0000000 --- a/lib/highcharts/examples/areaspline/index.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/bar-basic/index.htm b/lib/highcharts/examples/bar-basic/index.htm deleted file mode 100644 index 0a78b32..0000000 --- a/lib/highcharts/examples/bar-basic/index.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/bar-negative-stack/index.htm b/lib/highcharts/examples/bar-negative-stack/index.htm deleted file mode 100644 index 3cac154..0000000 --- a/lib/highcharts/examples/bar-negative-stack/index.htm +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/bar-stacked/index.htm b/lib/highcharts/examples/bar-stacked/index.htm deleted file mode 100644 index 44de831..0000000 --- a/lib/highcharts/examples/bar-stacked/index.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/box-plot/index.htm b/lib/highcharts/examples/box-plot/index.htm deleted file mode 100644 index 6763221..0000000 --- a/lib/highcharts/examples/box-plot/index.htm +++ /dev/null @@ -1,95 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/bubble-3d/index.htm b/lib/highcharts/examples/bubble-3d/index.htm deleted file mode 100644 index 955c785..0000000 --- a/lib/highcharts/examples/bubble-3d/index.htm +++ /dev/null @@ -1,98 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/bubble/index.htm b/lib/highcharts/examples/bubble/index.htm deleted file mode 100644 index 3c8f274..0000000 --- a/lib/highcharts/examples/bubble/index.htm +++ /dev/null @@ -1,139 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/column-basic/index.htm b/lib/highcharts/examples/column-basic/index.htm deleted file mode 100644 index 17a2f33..0000000 --- a/lib/highcharts/examples/column-basic/index.htm +++ /dev/null @@ -1,88 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-drilldown/index.htm b/lib/highcharts/examples/column-drilldown/index.htm deleted file mode 100644 index 71835ef..0000000 --- a/lib/highcharts/examples/column-drilldown/index.htm +++ /dev/null @@ -1,275 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/column-negative/index.htm b/lib/highcharts/examples/column-negative/index.htm deleted file mode 100644 index ca97358..0000000 --- a/lib/highcharts/examples/column-negative/index.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-parsed/index.htm b/lib/highcharts/examples/column-parsed/index.htm deleted file mode 100644 index 27ee654..0000000 --- a/lib/highcharts/examples/column-parsed/index.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    JaneJohn
    Apples34
    Pears20
    Plums511
    Bananas11
    Oranges24
    - - diff --git a/lib/highcharts/examples/column-placement/index.htm b/lib/highcharts/examples/column-placement/index.htm deleted file mode 100644 index dd5cdf2..0000000 --- a/lib/highcharts/examples/column-placement/index.htm +++ /dev/null @@ -1,97 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-rotated-labels/index.htm b/lib/highcharts/examples/column-rotated-labels/index.htm deleted file mode 100644 index 5e9c967..0000000 --- a/lib/highcharts/examples/column-rotated-labels/index.htm +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-stacked-and-grouped/index.htm b/lib/highcharts/examples/column-stacked-and-grouped/index.htm deleted file mode 100644 index 7b90b70..0000000 --- a/lib/highcharts/examples/column-stacked-and-grouped/index.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-stacked-percent/index.htm b/lib/highcharts/examples/column-stacked-percent/index.htm deleted file mode 100644 index 5a664ef..0000000 --- a/lib/highcharts/examples/column-stacked-percent/index.htm +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/column-stacked/index.htm b/lib/highcharts/examples/column-stacked/index.htm deleted file mode 100644 index c61ebc5..0000000 --- a/lib/highcharts/examples/column-stacked/index.htm +++ /dev/null @@ -1,84 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/columnrange/index.htm b/lib/highcharts/examples/columnrange/index.htm deleted file mode 100644 index 160f137..0000000 --- a/lib/highcharts/examples/columnrange/index.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/combo-dual-axes/index.htm b/lib/highcharts/examples/combo-dual-axes/index.htm deleted file mode 100644 index e2415d6..0000000 --- a/lib/highcharts/examples/combo-dual-axes/index.htm +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/combo-meteogram/index.htm b/lib/highcharts/examples/combo-meteogram/index.htm deleted file mode 100644 index 68a9c31..0000000 --- a/lib/highcharts/examples/combo-meteogram/index.htm +++ /dev/null @@ -1,791 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    -
    - Loading data from external source -
    -
    - - - diff --git a/lib/highcharts/examples/combo-multi-axes/index.htm b/lib/highcharts/examples/combo-multi-axes/index.htm deleted file mode 100644 index d91413d..0000000 --- a/lib/highcharts/examples/combo-multi-axes/index.htm +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/combo-regression/index.htm b/lib/highcharts/examples/combo-regression/index.htm deleted file mode 100644 index e7a86f4..0000000 --- a/lib/highcharts/examples/combo-regression/index.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/combo-timeline/index.htm b/lib/highcharts/examples/combo-timeline/index.htm deleted file mode 100644 index 5dc1d4c..0000000 --- a/lib/highcharts/examples/combo-timeline/index.htm +++ /dev/null @@ -1,422 +0,0 @@ - - - - - Highcharts Example - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/combo/index.htm b/lib/highcharts/examples/combo/index.htm deleted file mode 100644 index 1c7c485..0000000 --- a/lib/highcharts/examples/combo/index.htm +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/dynamic-click-to-add/index.htm b/lib/highcharts/examples/dynamic-click-to-add/index.htm deleted file mode 100644 index b272841..0000000 --- a/lib/highcharts/examples/dynamic-click-to-add/index.htm +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/dynamic-master-detail/index.htm b/lib/highcharts/examples/dynamic-master-detail/index.htm deleted file mode 100644 index ea82b1e..0000000 --- a/lib/highcharts/examples/dynamic-master-detail/index.htm +++ /dev/null @@ -1,260 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/dynamic-update/index.htm b/lib/highcharts/examples/dynamic-update/index.htm deleted file mode 100644 index 9fc0786..0000000 --- a/lib/highcharts/examples/dynamic-update/index.htm +++ /dev/null @@ -1,97 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/error-bar/index.htm b/lib/highcharts/examples/error-bar/index.htm deleted file mode 100644 index d51b62f..0000000 --- a/lib/highcharts/examples/error-bar/index.htm +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/funnel/index.htm b/lib/highcharts/examples/funnel/index.htm deleted file mode 100644 index b7baaa9..0000000 --- a/lib/highcharts/examples/funnel/index.htm +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/gauge-clock/index.htm b/lib/highcharts/examples/gauge-clock/index.htm deleted file mode 100644 index fe81d25..0000000 --- a/lib/highcharts/examples/gauge-clock/index.htm +++ /dev/null @@ -1,198 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/gauge-dual/index.htm b/lib/highcharts/examples/gauge-dual/index.htm deleted file mode 100644 index 731a538..0000000 --- a/lib/highcharts/examples/gauge-dual/index.htm +++ /dev/null @@ -1,125 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/gauge-solid/index.htm b/lib/highcharts/examples/gauge-solid/index.htm deleted file mode 100644 index 286364f..0000000 --- a/lib/highcharts/examples/gauge-solid/index.htm +++ /dev/null @@ -1,175 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    -
    -
    -
    - - - - diff --git a/lib/highcharts/examples/gauge-speedometer/index.htm b/lib/highcharts/examples/gauge-speedometer/index.htm deleted file mode 100644 index e53b30f..0000000 --- a/lib/highcharts/examples/gauge-speedometer/index.htm +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/gauge-vu-meter/index.htm b/lib/highcharts/examples/gauge-vu-meter/index.htm deleted file mode 100644 index 8fb9dc0..0000000 --- a/lib/highcharts/examples/gauge-vu-meter/index.htm +++ /dev/null @@ -1,157 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/heatmap-canvas/index.htm b/lib/highcharts/examples/heatmap-canvas/index.htm deleted file mode 100644 index fc7aaf2..0000000 --- a/lib/highcharts/examples/heatmap-canvas/index.htm +++ /dev/null @@ -1,8950 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - - -
    - - - - - diff --git a/lib/highcharts/examples/heatmap/index.htm b/lib/highcharts/examples/heatmap/index.htm deleted file mode 100644 index 75fcbce..0000000 --- a/lib/highcharts/examples/heatmap/index.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/line-ajax/index.htm b/lib/highcharts/examples/line-ajax/index.htm deleted file mode 100644 index 95e40bc..0000000 --- a/lib/highcharts/examples/line-ajax/index.htm +++ /dev/null @@ -1,135 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/line-basic/index.htm b/lib/highcharts/examples/line-basic/index.htm deleted file mode 100644 index 86931d8..0000000 --- a/lib/highcharts/examples/line-basic/index.htm +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/line-labels/index.htm b/lib/highcharts/examples/line-labels/index.htm deleted file mode 100644 index 55ad0cb..0000000 --- a/lib/highcharts/examples/line-labels/index.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/line-log-axis/index.htm b/lib/highcharts/examples/line-log-axis/index.htm deleted file mode 100644 index e5b4fe8..0000000 --- a/lib/highcharts/examples/line-log-axis/index.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/line-time-series/index.htm b/lib/highcharts/examples/line-time-series/index.htm deleted file mode 100644 index 01307c7..0000000 --- a/lib/highcharts/examples/line-time-series/index.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-basic/index.htm b/lib/highcharts/examples/pie-basic/index.htm deleted file mode 100644 index 2b9a429..0000000 --- a/lib/highcharts/examples/pie-basic/index.htm +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-donut/index.htm b/lib/highcharts/examples/pie-donut/index.htm deleted file mode 100644 index c6cf3c0..0000000 --- a/lib/highcharts/examples/pie-donut/index.htm +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-drilldown/index.htm b/lib/highcharts/examples/pie-drilldown/index.htm deleted file mode 100644 index 60886b6..0000000 --- a/lib/highcharts/examples/pie-drilldown/index.htm +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - - - - diff --git a/lib/highcharts/examples/pie-gradient/index.htm b/lib/highcharts/examples/pie-gradient/index.htm deleted file mode 100644 index 3f13bdc..0000000 --- a/lib/highcharts/examples/pie-gradient/index.htm +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-legend/index.htm b/lib/highcharts/examples/pie-legend/index.htm deleted file mode 100644 index 0f8a22e..0000000 --- a/lib/highcharts/examples/pie-legend/index.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-monochrome/index.htm b/lib/highcharts/examples/pie-monochrome/index.htm deleted file mode 100644 index c1e8316..0000000 --- a/lib/highcharts/examples/pie-monochrome/index.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pie-semi-circle/index.htm b/lib/highcharts/examples/pie-semi-circle/index.htm deleted file mode 100644 index 1856af4..0000000 --- a/lib/highcharts/examples/pie-semi-circle/index.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/polar-spider/index.htm b/lib/highcharts/examples/polar-spider/index.htm deleted file mode 100644 index ac3f3ac..0000000 --- a/lib/highcharts/examples/polar-spider/index.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/polar-wind-rose/index.htm b/lib/highcharts/examples/polar-wind-rose/index.htm deleted file mode 100644 index 799b02f..0000000 --- a/lib/highcharts/examples/polar-wind-rose/index.htm +++ /dev/null @@ -1,299 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Table of Frequencies (percent)
    Direction< 0.5 m/s0.5-2 m/s2-4 m/s4-6 m/s6-8 m/s8-10 m/s> 10 m/sTotal
    N1.811.780.160.000.000.000.003.75
    NNE0.621.090.000.000.000.000.001.71
    NE0.820.820.070.000.000.000.001.71
    ENE0.591.220.070.000.000.000.001.88
    E0.622.200.490.000.000.000.003.32
    ESE1.222.011.550.300.130.000.005.20
    SE1.613.062.372.141.740.390.1311.45
    SSE2.043.421.970.860.530.490.009.31
    S2.664.740.430.000.000.000.007.83
    SSW2.964.140.260.000.000.000.007.37
    SW2.534.011.220.490.130.000.008.39
    WSW1.972.661.970.790.300.000.007.70
    W1.641.710.921.450.260.100.006.09
    WNW1.322.400.991.610.330.000.006.64
    NW1.584.281.280.760.660.690.039.28
    NNW1.515.001.320.130.230.130.078.39
    Total25.5344.5415.078.524.311.810.23 
    -
    - - - - diff --git a/lib/highcharts/examples/polar/index.htm b/lib/highcharts/examples/polar/index.htm deleted file mode 100644 index 7ec5af9..0000000 --- a/lib/highcharts/examples/polar/index.htm +++ /dev/null @@ -1,81 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/polygon/index.htm b/lib/highcharts/examples/polygon/index.htm deleted file mode 100644 index 661878c..0000000 --- a/lib/highcharts/examples/polygon/index.htm +++ /dev/null @@ -1,125 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/pyramid/index.htm b/lib/highcharts/examples/pyramid/index.htm deleted file mode 100644 index 0a41753..0000000 --- a/lib/highcharts/examples/pyramid/index.htm +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/renderer/index.htm b/lib/highcharts/examples/renderer/index.htm deleted file mode 100644 index 2bb50bb..0000000 --- a/lib/highcharts/examples/renderer/index.htm +++ /dev/null @@ -1,268 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/scatter/index.htm b/lib/highcharts/examples/scatter/index.htm deleted file mode 100644 index 33690b5..0000000 --- a/lib/highcharts/examples/scatter/index.htm +++ /dev/null @@ -1,195 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/sparkline/index.htm b/lib/highcharts/examples/sparkline/index.htm deleted file mode 100644 index 21c4f81..0000000 --- a/lib/highcharts/examples/sparkline/index.htm +++ /dev/null @@ -1,675 +0,0 @@ - - - - - Highcharts Example - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    StateIncomeIncome per quarterCostsCosts per quarterResultResult per quarter
    Alabama254 - 296 - -42 -
    Alaska246 - 181 - 65 -
    Arizona101 - 191 - -90 -
    Arkansas303 - 76 - 227 -
    California200 - 217 - -17 -
    Colorado118 - 273 - -155 -
    Connecticut201 - 148 - 53 -
    Delaware161 - 298 - -137 -
    District of Columbia106 - 185 - -79 -
    Florida249 - 244 - 5 -
    Georgia183 - 212 - -29 -
    Hawaii232 - 172 - 60 -
    Idaho166 - 152 - 14 -
    Illinois336 - 151 - 185 -
    Indiana216 - 216 - 0 -
    Iowa135 - 159 - -24 -
    Kansas184 - 215 - -31 -
    Kentucky289 - 219 - 70 -
    Louisiana257 - 201 - 56 -
    Maine194 - 133 - 61 -
    Maryland204 - 157 - 47 -
    Massachusetts172 - 115 - 57 -
    Michigan177 - 185 - -8 -
    Minnesota99 - 137 - -38 -
    Mississippi205 - 179 - 26 -
    Missouri135 - 202 - -67 -
    Montana195 - 237 - -42 -
    Nebraska286 - 232 - 54 -
    Nevada221 - 214 - 7 -
    New Hampshire136 - 306 - -170 -
    New Jersey194 - 147 - 47 -
    New Mexico207 - 261 - -54 -
    New York316 - 193 - 123 -
    North Carolina175 - 188 - -13 -
    North Dakota181 - 288 - -107 -
    Ohio189 - 163 - 26 -
    Oklahoma188 - 172 - 16 -
    Oregon165 - 257 - -92 -
    Pennsylvania268 - 129 - 139 -
    Rhode Island164 - 182 - -18 -
    South Carolina91 - 193 - -102 -
    South Dakota184 - 221 - -37 -
    Tennessee233 - 131 - 102 -
    Texas211 - 225 - -14 -
    Utah362 - 225 - 137 -
    Vermont119 - 152 - -33 -
    Virginia127 - 71 - 56 -
    Washington165 - 245 - -80 -
    West Virginia248 - 171 - 77 -
    Wisconsin183 - 224 - -41 -
    Wyoming231 - 251 - -20 -
    - - diff --git a/lib/highcharts/examples/spline-inverted/index.htm b/lib/highcharts/examples/spline-inverted/index.htm deleted file mode 100644 index ee55048..0000000 --- a/lib/highcharts/examples/spline-inverted/index.htm +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/spline-irregular-time/index.htm b/lib/highcharts/examples/spline-irregular-time/index.htm deleted file mode 100644 index 715ce57..0000000 --- a/lib/highcharts/examples/spline-irregular-time/index.htm +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/spline-plot-bands/index.htm b/lib/highcharts/examples/spline-plot-bands/index.htm deleted file mode 100644 index 8ea7914..0000000 --- a/lib/highcharts/examples/spline-plot-bands/index.htm +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/spline-symbols/index.htm b/lib/highcharts/examples/spline-symbols/index.htm deleted file mode 100644 index 1f5fb96..0000000 --- a/lib/highcharts/examples/spline-symbols/index.htm +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - - diff --git a/lib/highcharts/examples/synchronized-charts/index.htm b/lib/highcharts/examples/synchronized-charts/index.htm deleted file mode 100644 index 716195b..0000000 --- a/lib/highcharts/examples/synchronized-charts/index.htm +++ /dev/null @@ -1,156 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/treemap-coloraxis/index.htm b/lib/highcharts/examples/treemap-coloraxis/index.htm deleted file mode 100644 index ed12a55..0000000 --- a/lib/highcharts/examples/treemap-coloraxis/index.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/treemap-large-dataset/index.htm b/lib/highcharts/examples/treemap-large-dataset/index.htm deleted file mode 100644 index a4dbcc1..0000000 --- a/lib/highcharts/examples/treemap-large-dataset/index.htm +++ /dev/null @@ -1,980 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/treemap-with-levels/index.htm b/lib/highcharts/examples/treemap-with-levels/index.htm deleted file mode 100644 index 69031a5..0000000 --- a/lib/highcharts/examples/treemap-with-levels/index.htm +++ /dev/null @@ -1,102 +0,0 @@ - - - - - Highcharts Example - - - - - - - - -
    - - diff --git a/lib/highcharts/examples/waterfall/index.htm b/lib/highcharts/examples/waterfall/index.htm deleted file mode 100644 index f408308..0000000 --- a/lib/highcharts/examples/waterfall/index.htm +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Highcharts Example - - - - - - - - - - -
    - - - diff --git a/lib/highcharts/index.htm b/lib/highcharts/index.htm deleted file mode 100644 index 5a0d5c5..0000000 --- a/lib/highcharts/index.htm +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Highcharts Examples - - -

    Highcharts Examples

    -

    Line charts

    - -

    Area charts

    - -

    Column and bar charts

    - -

    Pie charts

    - -

    Scatter and bubble charts

    - -

    Combinations

    - -

    Dynamic charts

    - -

    3D charts

    - -

    Gauges

    - -

    Heat and tree maps

    - -

    More chart types

    - - - diff --git a/lib/qqwry.dat b/lib/qqwry.dat deleted file mode 100644 index d2bc9ea..0000000 Binary files a/lib/qqwry.dat and /dev/null differ diff --git a/page/console.php b/page/console.php index b8557cb..ae38176 100644 --- a/page/console.php +++ b/page/console.php @@ -1,5 +1,5 @@ "> parseUA($log['ua']); ?> - + @@ -183,11 +183,6 @@ include 'table-js.php'; ?>