/** * count visitor info * @return boolean */ public function Count() { //$this->FileLog("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI] \n", 'fff.txt'); // if is visited count $rs = $this->db->Select('SELECT statistic_id FROM %table% WHERE statistic_ip = ' . _ipi() . ' AND statistic_last_visit > ' . (time() - VISIT_LONG), array('statistic')); if (is_array($rs) && count($rs) > 0) { $this->db->Select('UPDATE %table% SET statistic_visit = statistic_visit + 1' . ', statistic_last_visit = ' . time() . ' WHERE statistic_id = ' . $rs[0]['statistic_id'], array('statistic')); } else { // $data = array('statistic_time' => time(), 'statistic_last_visit' => time(), 'statistic_os' => TVisitor::DetectOSI(), 'statistic_browser' => TVisitor::DetectBrowserI(), 'statistic_verstion' => (int) TVisitor::BrowserVersion(), 'statistic_ip' => _ipi(), 'statistic_referer' => Referer(), 'statistic_keyword' => TVisitor::GetKeyword()); $this->Create($data); } return TRUE; }
echo TVisitor::GetBrowerIcon('fa-1x'); ?> <span> <?php echo TVisitor::DetectBrowser(); ?> </span> </li> <li> <?php _lp("Your browser version"); ?> : <span> <?php echo TVisitor::BrowserVersion(); ?> </span> </li> <li> <?php _lp("Your OS"); ?> : <?php echo TVisitor::GetOSIcon('fa-1x'); ?> <span> <?php echo TVisitor::DetectOS(); ?>