Visitors Traffic Real Time Statistics - Version 1.3

Version Description

Bug fixing - Undefined variable found in some places

Download this release

Release Info

Developer wp-buy
Plugin Icon 128x128 Visitors Traffic Real Time Statistics
Version 1.3
Comparing to
See all releases

Version 1.3

Files changed (366) hide show
  1. Visitors-Traffic-Real-Time-Statistics.php +21 -0
  2. WPHitsCounter.php +519 -0
  3. crawlers.php +37 -0
  4. css/ar_css.css +73 -0
  5. css/en_css.css +117 -0
  6. css/en_newcss.css +115 -0
  7. database_basics_data.php +265 -0
  8. functions.php +1514 -0
  9. images/arrow_down.png +0 -0
  10. images/arrow_up.png +0 -0
  11. images/at_graph_icon.png +0 -0
  12. images/browsers/air.png +0 -0
  13. images/browsers/android.png +0 -0
  14. images/browsers/chrome.png +0 -0
  15. images/browsers/firefox.png +0 -0
  16. images/browsers/fluid.png +0 -0
  17. images/browsers/ie.png +0 -0
  18. images/browsers/ipad.png +0 -0
  19. images/browsers/maxthon.png +0 -0
  20. images/browsers/mozilla.png +0 -0
  21. images/browsers/netscape.png +0 -0
  22. images/browsers/opera.png +0 -0
  23. images/browsers/safari.png +0 -0
  24. images/browsers/unknown.png +0 -0
  25. images/browsers_nodata.png +0 -0
  26. images/contact-center-reporting-icon.png +0 -0
  27. images/flags/Bouvet Island.png +0 -0
  28. images/flags/Faroe Islands.png +0 -0
  29. images/flags/ad.png +0 -0
  30. images/flags/ae.png +0 -0
  31. images/flags/af.png +0 -0
  32. images/flags/ag.png +0 -0
  33. images/flags/ai.png +0 -0
  34. images/flags/al.png +0 -0
  35. images/flags/am.png +0 -0
  36. images/flags/an.png +0 -0
  37. images/flags/ao.png +0 -0
  38. images/flags/ar.png +0 -0
  39. images/flags/as.png +0 -0
  40. images/flags/at.png +0 -0
  41. images/flags/au.png +0 -0
  42. images/flags/aw.png +0 -0
  43. images/flags/az.png +0 -0
  44. images/flags/ba.png +0 -0
  45. images/flags/bb.png +0 -0
  46. images/flags/bd.png +0 -0
  47. images/flags/be.png +0 -0
  48. images/flags/bf.png +0 -0
  49. images/flags/bg.png +0 -0
  50. images/flags/bh.png +0 -0
  51. images/flags/bi.png +0 -0
  52. images/flags/bj.png +0 -0
  53. images/flags/bm.png +0 -0
  54. images/flags/bn.png +0 -0
  55. images/flags/bo.png +0 -0
  56. images/flags/br.png +0 -0
  57. images/flags/bs.png +0 -0
  58. images/flags/bt.png +0 -0
  59. images/flags/bw.png +0 -0
  60. images/flags/by.png +0 -0
  61. images/flags/bz.png +0 -0
  62. images/flags/ca.png +0 -0
  63. images/flags/cc.png +0 -0
  64. images/flags/cd.png +0 -0
  65. images/flags/cf.png +0 -0
  66. images/flags/cg.png +0 -0
  67. images/flags/ch.png +0 -0
  68. images/flags/ci.png +0 -0
  69. images/flags/ck.png +0 -0
  70. images/flags/cl.png +0 -0
  71. images/flags/cm.png +0 -0
  72. images/flags/cn.png +0 -0
  73. images/flags/co.png +0 -0
  74. images/flags/cr.png +0 -0
  75. images/flags/cs.png +0 -0
  76. images/flags/cu.png +0 -0
  77. images/flags/cv.png +0 -0
  78. images/flags/cx.png +0 -0
  79. images/flags/cy.png +0 -0
  80. images/flags/cz.png +0 -0
  81. images/flags/de.png +0 -0
  82. images/flags/dh.png +0 -0
  83. images/flags/dj.png +0 -0
  84. images/flags/dk.png +0 -0
  85. images/flags/dm.png +0 -0
  86. images/flags/do.png +0 -0
  87. images/flags/dz.png +0 -0
  88. images/flags/ec.png +0 -0
  89. images/flags/ee.png +0 -0
  90. images/flags/eg.png +0 -0
  91. images/flags/eh.png +0 -0
  92. images/flags/er.png +0 -0
  93. images/flags/es.png +0 -0
  94. images/flags/et.png +0 -0
  95. images/flags/fi.png +0 -0
  96. images/flags/fj.png +0 -0
  97. images/flags/fk.png +0 -0
  98. images/flags/fm.png +0 -0
  99. images/flags/fr.png +0 -0
  100. images/flags/fx.png +0 -0
  101. images/flags/ga.png +0 -0
  102. images/flags/gb.png +0 -0
  103. images/flags/gd.png +0 -0
  104. images/flags/ge.png +0 -0
  105. images/flags/gf.png +0 -0
  106. images/flags/gh.png +0 -0
  107. images/flags/gi.png +0 -0
  108. images/flags/gl.png +0 -0
  109. images/flags/gm.png +0 -0
  110. images/flags/gn.png +0 -0
  111. images/flags/gp.png +0 -0
  112. images/flags/gq.png +0 -0
  113. images/flags/gr.png +0 -0
  114. images/flags/gt.png +0 -0
  115. images/flags/gu.png +0 -0
  116. images/flags/gw.png +0 -0
  117. images/flags/gy.png +0 -0
  118. images/flags/hk.png +0 -0
  119. images/flags/hm.png +0 -0
  120. images/flags/hn.png +0 -0
  121. images/flags/hr.png +0 -0
  122. images/flags/ht.png +0 -0
  123. images/flags/hu.png +0 -0
  124. images/flags/id.png +0 -0
  125. images/flags/ie.png +0 -0
  126. images/flags/il.png +0 -0
  127. images/flags/in.png +0 -0
  128. images/flags/io.png +0 -0
  129. images/flags/iq.png +0 -0
  130. images/flags/ir.png +0 -0
  131. images/flags/is.png +0 -0
  132. images/flags/it.png +0 -0
  133. images/flags/jm.png +0 -0
  134. images/flags/jo.png +0 -0
  135. images/flags/jp.png +0 -0
  136. images/flags/ke.png +0 -0
  137. images/flags/kg.png +0 -0
  138. images/flags/kh.png +0 -0
  139. images/flags/ki.png +0 -0
  140. images/flags/km.png +0 -0
  141. images/flags/kn.png +0 -0
  142. images/flags/kp.png +0 -0
  143. images/flags/kr.png +0 -0
  144. images/flags/ks.png +0 -0
  145. images/flags/kw.png +0 -0
  146. images/flags/ky.png +0 -0
  147. images/flags/kz.png +0 -0
  148. images/flags/la.png +0 -0
  149. images/flags/lb.png +0 -0
  150. images/flags/lc.png +0 -0
  151. images/flags/li.png +0 -0
  152. images/flags/lk.png +0 -0
  153. images/flags/lr.png +0 -0
  154. images/flags/ls.png +0 -0
  155. images/flags/lt.png +0 -0
  156. images/flags/lu.png +0 -0
  157. images/flags/lv.png +0 -0
  158. images/flags/ly.png +0 -0
  159. images/flags/ma.png +0 -0
  160. images/flags/mc.png +0 -0
  161. images/flags/md.png +0 -0
  162. images/flags/me.png +0 -0
  163. images/flags/mg.png +0 -0
  164. images/flags/mh.png +0 -0
  165. images/flags/mk.png +0 -0
  166. images/flags/ml.png +0 -0
  167. images/flags/mm.png +0 -0
  168. images/flags/mn.png +0 -0
  169. images/flags/mo.png +0 -0
  170. images/flags/mp.png +0 -0
  171. images/flags/mq.png +0 -0
  172. images/flags/mr.png +0 -0
  173. images/flags/ms.png +0 -0
  174. images/flags/mt.png +0 -0
  175. images/flags/mu.png +0 -0
  176. images/flags/mv.png +0 -0
  177. images/flags/mw.png +0 -0
  178. images/flags/mx.png +0 -0
  179. images/flags/my.png +0 -0
  180. images/flags/mz.png +0 -0
  181. images/flags/na.png +0 -0
  182. images/flags/nc.png +0 -0
  183. images/flags/ne.png +0 -0
  184. images/flags/nf.png +0 -0
  185. images/flags/ng.png +0 -0
  186. images/flags/ni.png +0 -0
  187. images/flags/nl.png +0 -0
  188. images/flags/no.png +0 -0
  189. images/flags/noFlag.png +0 -0
  190. images/flags/np.png +0 -0
  191. images/flags/nr.png +0 -0
  192. images/flags/nu.png +0 -0
  193. images/flags/nz.png +0 -0
  194. images/flags/om.png +0 -0
  195. images/flags/pa.png +0 -0
  196. images/flags/pe.png +0 -0
  197. images/flags/pf.png +0 -0
  198. images/flags/pg.png +0 -0
  199. images/flags/ph.png +0 -0
  200. images/flags/pk.png +0 -0
  201. images/flags/pl.png +0 -0
  202. images/flags/pm.png +0 -0
  203. images/flags/pn.png +0 -0
  204. images/flags/pr.png +0 -0
  205. images/flags/ps.png +0 -0
  206. images/flags/pt.png +0 -0
  207. images/flags/pw.png +0 -0
  208. images/flags/py.png +0 -0
  209. images/flags/qa.png +0 -0
  210. images/flags/re.png +0 -0
  211. images/flags/ro.png +0 -0
  212. images/flags/rs.png +0 -0
  213. images/flags/ru.png +0 -0
  214. images/flags/rw.png +0 -0
  215. images/flags/sa.png +0 -0
  216. images/flags/sb.png +0 -0
  217. images/flags/sc.png +0 -0
  218. images/flags/sd.png +0 -0
  219. images/flags/se.png +0 -0
  220. images/flags/sg.png +0 -0
  221. images/flags/sh.png +0 -0
  222. images/flags/si.png +0 -0
  223. images/flags/sj.png +0 -0
  224. images/flags/sk.png +0 -0
  225. images/flags/sl.png +0 -0
  226. images/flags/sm.png +0 -0
  227. images/flags/sn.png +0 -0
  228. images/flags/so.png +0 -0
  229. images/flags/sr.png +0 -0
  230. images/flags/st.png +0 -0
  231. images/flags/su.png +0 -0
  232. images/flags/sv.png +0 -0
  233. images/flags/sy.png +0 -0
  234. images/flags/sz.png +0 -0
  235. images/flags/tc.png +0 -0
  236. images/flags/td.png +0 -0
  237. images/flags/tf.png +0 -0
  238. images/flags/tg.png +0 -0
  239. images/flags/th.png +0 -0
  240. images/flags/tj.png +0 -0
  241. images/flags/tk.png +0 -0
  242. images/flags/tl.png +0 -0
  243. images/flags/tm.png +0 -0
  244. images/flags/tn.png +0 -0
  245. images/flags/to.png +0 -0
  246. images/flags/tp.png +0 -0
  247. images/flags/tr.png +0 -0
  248. images/flags/tt.png +0 -0
  249. images/flags/tv.png +0 -0
  250. images/flags/tw.png +0 -0
  251. images/flags/tz.png +0 -0
  252. images/flags/ua.png +0 -0
  253. images/flags/ug.png +0 -0
  254. images/flags/uk.png +0 -0
  255. images/flags/um.png +0 -0
  256. images/flags/us.png +0 -0
  257. images/flags/uy.png +0 -0
  258. images/flags/uz.png +0 -0
  259. images/flags/va.png +0 -0
  260. images/flags/vc.png +0 -0
  261. images/flags/ve.png +0 -0
  262. images/flags/vg.png +0 -0
  263. images/flags/vn.png +0 -0
  264. images/flags/vs.png +0 -0
  265. images/flags/vu.png +0 -0
  266. images/flags/wf.png +0 -0
  267. images/flags/ws.png +0 -0
  268. images/flags/xx.png +0 -0
  269. images/flags/ye.png +0 -0
  270. images/flags/yu.png +0 -0
  271. images/flags/za.png +0 -0
  272. images/flags/zm.png +0 -0
  273. images/flags/zr.png +0 -0
  274. images/flags/zw.png +0 -0
  275. images/headerbg.png +0 -0
  276. images/hitslogo.png +0 -0
  277. images/latestwords_nodata.png +0 -0
  278. images/myheaderbg.png +0 -0
  279. images/recent_nodata.png +0 -0
  280. images/se_nodata.png +0 -0
  281. images/search_engines/aol.png +0 -0
  282. images/search_engines/ask.png +0 -0
  283. images/search_engines/baiduspider.png +0 -0
  284. images/search_engines/bing.png +0 -0
  285. images/search_engines/dotmic.gif +0 -0
  286. images/search_engines/duckduckgo.png +0 -0
  287. images/search_engines/google.png +0 -0
  288. images/search_engines/webcrawler.gif +0 -0
  289. images/search_engines/yahoo.png +0 -0
  290. images/search_engines/yandex.png +0 -0
  291. images/topref_nodata.png +0 -0
  292. images/upgrade.png +0 -0
  293. images/upgrade1.jpg +0 -0
  294. images/upgrade2.jpg +0 -0
  295. images/upgrade3.jpg +0 -0
  296. images/upgrade4.jpg +0 -0
  297. images/upgradenow-button.png +0 -0
  298. images/vtrts.png +0 -0
  299. images/vtrts_ads.gif +0 -0
  300. images/vtrtspro.png +0 -0
  301. images/widget.png +0 -0
  302. init.php +49 -0
  303. js/js.js +183 -0
  304. lang/ar_lang.php +48 -0
  305. lang/en_lang.php +48 -0
  306. lang/js/ar_lang.js +5 -0
  307. lang/js/en_lang.js +5 -0
  308. lib/Chart_js/.gitignore +7 -0
  309. lib/Chart_js/CONTRIBUTING.md +20 -0
  310. lib/Chart_js/Chart.js +3379 -0
  311. lib/Chart_js/Chart.min.js +11 -0
  312. lib/Chart_js/LICENSE.md +7 -0
  313. lib/Chart_js/README.md +20 -0
  314. lib/Chart_js/bower.json +11 -0
  315. lib/Chart_js/docs/00-Getting-Started.md +200 -0
  316. lib/Chart_js/docs/01-Line-Chart.md +160 -0
  317. lib/Chart_js/docs/02-Bar-Chart.md +143 -0
  318. lib/Chart_js/docs/03-Radar-Chart.md +177 -0
  319. lib/Chart_js/docs/04-Polar-Area-Chart.md +172 -0
  320. lib/Chart_js/docs/05-Pie-Doughnut-Chart.md +158 -0
  321. lib/Chart_js/docs/06-Advanced.md +152 -0
  322. lib/Chart_js/docs/07-Notes.md +42 -0
  323. lib/Chart_js/gulpfile.js +131 -0
  324. lib/Chart_js/package.json +24 -0
  325. lib/Chart_js/samples/bar.html +48 -0
  326. lib/Chart_js/samples/doughnut.html +67 -0
  327. lib/Chart_js/samples/line.html +54 -0
  328. lib/Chart_js/samples/pie.html +58 -0
  329. lib/Chart_js/samples/polar-area.html +60 -0
  330. lib/Chart_js/samples/radar.html +53 -0
  331. lib/Chart_js/src/Chart.Bar.js +294 -0
  332. lib/Chart_js/src/Chart.Core.js +1943 -0
  333. lib/Chart_js/src/Chart.Doughnut.js +184 -0
  334. lib/Chart_js/src/Chart.Line.js +366 -0
  335. lib/Chart_js/src/Chart.PolarArea.js +248 -0
  336. lib/Chart_js/src/Chart.Radar.js +343 -0
  337. lib/bootstrap/css/bootstrap-theme.css +457 -0
  338. lib/bootstrap/css/bootstrap-theme.css.map +1 -0
  339. lib/bootstrap/css/bootstrap-theme.min.css +5 -0
  340. lib/bootstrap/css/bootstrap.css +6358 -0
  341. lib/bootstrap/css/bootstrap.css.map +1 -0
  342. lib/bootstrap/css/bootstrap.min.css +5 -0
  343. lib/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
  344. lib/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
  345. lib/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
  346. lib/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
  347. lib/bootstrap/js/bootstrap.js +2276 -0
  348. lib/bootstrap/js/bootstrap.min.js +7 -0
  349. lib/bootstrap/js/npm.js +13 -0
  350. license.txt +674 -0
  351. overview.php +378 -0
  352. readme.txt +149 -0
  353. screenshot-1.png +0 -0
  354. screenshot-10.png +0 -0
  355. screenshot-11.png +0 -0
  356. screenshot-12.png +0 -0
  357. screenshot-2.png +0 -0
  358. screenshot-3.png +0 -0
  359. screenshot-4.png +0 -0
  360. screenshot-5.png +0 -0
  361. screenshot-6.png +0 -0
  362. screenshot-7.png +0 -0
  363. screenshot-8.png +0 -0
  364. screenshot-9.png +0 -0
  365. settings.php +13 -0
  366. uninstall.php +29 -0
Visitors-Traffic-Real-Time-Statistics.php ADDED
@@ -0,0 +1,21 @@
1
+ <?php
2
+ /*
3
+ Plugin Name: Visitors Traffic Real Time Statistics
4
+ Description: Hits counter that shows analytical numbers of your WordPress site visitors and hits. <a href="admin.php?page=ahc_hits_counter_menu">Dashboard</a> | <a href="http://www.wp-buy.com/product/visitors-traffic-real-time-statistics-pro">Upgrade to pro.</a>
5
+ Author: wp-buy
6
+ Author URI: https://www.wp-buy.com/
7
+ Version: 1.3
8
+
9
+ */
10
+
11
+ define('AHC_PLUGIN_MAIN_FILE', __FILE__);
12
+ define('AHC_PLUGIN_ROOT_DIR', dirname(__FILE__));
13
+
14
+ require_once("functions.php");
15
+ require_once("init.php");
16
+
17
+ $path = plugin_basename( __FILE__ );
18
+ add_action("after_plugin_row_{$path}", 'ahc_after_plugin_row', 10, 3);
19
+
20
+ //--------------------------------------------
21
+ ?>
WPHitsCounter.php ADDED
@@ -0,0 +1,519 @@
1
+ <?php
2
+
3
+ //use GeoIp2\Database\Reader;
4
+
5
+ class WPHitsCounter{
6
+
7
+ var $pageId;
8
+ var $pageTitle;
9
+ var $postType;
10
+ var $ipAddress;
11
+ var $ipIsUnknown;
12
+ var $userAgent;
13
+ var $referer;
14
+ var $refererSite;
15
+ var $browser;
16
+ var $searchEngine;
17
+ var $keyWords;
18
+ var $requestUri;
19
+
20
+
21
+ /**
22
+ * Constructor
23
+ *
24
+ * @param integer $page_id
25
+ * @param string $page_title Optional
26
+ * @param string $post_type Optional
27
+ */
28
+ public function __construct($page_id, $page_title = NULL, $post_type = NULL){
29
+ global $_SERVER;
30
+ $this->ipAddress = ahc_get_client_ip_address();
31
+ if($this->ipAddress == 'UNKNOWN'){
32
+ $this->ipIsUnknown = true;
33
+ $this->ipAddress = 'UNKNOWN'.uniqid();
34
+ } else{
35
+ $this->ipIsUnknown = false;
36
+ }
37
+
38
+ $this->userAgent = $_SERVER['HTTP_USER_AGENT'];
39
+ $this->pageId = (isset($_GET['page_id'])) ? $_GET['page_id'] : $page_id;
40
+ $this->pageTitle = $page_title;
41
+ $this->postType = $post_type;
42
+ $this->requestUri = trim($_SERVER['REQUEST_URI'], '/');
43
+ if(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])){
44
+ $hostName = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST);
45
+ if($hostName != $_SERVER['SERVER_NAME']){
46
+ $this->referer = $_SERVER['HTTP_REFERER'];
47
+ $this->refererSite = $hostName;
48
+ }
49
+ }
50
+ $this->searchEngine = NULL;
51
+ $this->keyWords = NULL;
52
+ }
53
+ //--------------------------------------------
54
+ /**
55
+ * Trace visitor hit
56
+ *
57
+ * @return void
58
+ */
59
+ public function traceVisitorHit(){
60
+ $this->cleanUnwantedRecords();
61
+ $this->cleanHitsTable();
62
+ if(!$this->isHitRecorded()){
63
+ $visitorRecorded = $this->isVisitorRecorded();
64
+ $this->getBrowser();
65
+ usleep(10000);
66
+ if(!empty($this->refererSite)){
67
+ $this->getSearchEngine();
68
+ }
69
+
70
+ if(!$this->isTodayPreparedInDb()){
71
+ $this->PrepareForTodayInDb();
72
+ }
73
+
74
+ if(!$visitorRecorded){
75
+ $this->updateVisitsTime(1, 1);
76
+ $this->updateVisitors(1, 1);
77
+ } else{
78
+ $this->updateVisitsTime(0, 1);
79
+ $this->updateVisitors(0, 1);
80
+ }
81
+
82
+ if(!empty($this->pageId) && !empty($this->pageTitle) && $this->postType == 'post'){
83
+ $this->updateTitleTraffic($this->pageId, $this->pageTitle);
84
+ }
85
+
86
+ if(!empty($this->keyWords) && !empty($this->searchEngine)){
87
+ $this->updateKeywords($this->ipAddress, $this->keyWords, $this->referer, $this->searchEngine, $this->browser);
88
+ }
89
+
90
+ if(!empty($this->refererSite)){
91
+ $this->updateReferingSites($this->refererSite);
92
+ }
93
+
94
+ if(!empty($this->searchEngine)){
95
+ $this->updateSearchingVisits($this->searchEngine);
96
+ }
97
+
98
+ $this->updateBrowsers($this->browser);
99
+
100
+ if(!$visitorRecorded){
101
+ $this->updateRecentVisitors($this->ipAddress, $this->referer, $this->searchEngine, $this->browser);
102
+ }
103
+
104
+ $this->recordThisHits();
105
+ }
106
+ }
107
+ //--------------------------------------------
108
+ /**
109
+ * Is visit is already recorded
110
+ *
111
+ * @return boolean
112
+ */
113
+ protected function isHitRecorded(){
114
+ global $wpdb;
115
+ $sql = "SELECT COUNT(`hit_id`) AS ct FROM `ahc_hits` WHERE DATE(`hit_date`) = DATE(NOW()) AND `hit_ip_address` = %s AND `hit_page_id` = %s";
116
+ $result = $wpdb->get_results($wpdb->prepare($sql, $this->ipAddress, $this->pageId) , OBJECT);
117
+ if($result !== false){
118
+ return ((int) $result[0]->ct > 0);
119
+ }
120
+ }
121
+ //--------------------------------------------
122
+ /**
123
+ * Is visitor is already recorded
124
+ *
125
+ * @return boolean
126
+ */
127
+ protected function isVisitorRecorded(){
128
+ global $wpdb;
129
+ $sql = "SELECT COUNT(`hit_id`) AS ct FROM `ahc_hits` WHERE DATE(`hit_date`) = DATE(NOW()) AND `hit_ip_address` = %s";
130
+ $result = $wpdb->get_results($wpdb->prepare($sql, $this->ipAddress), OBJECT);
131
+ if($result !== false){
132
+ return ((int) $result[0]->ct > 0);
133
+ }
134
+ }
135
+ //--------------------------------------------
136
+ /**
137
+ * Detect client browser
138
+ *
139
+ * @return void
140
+ */
141
+ protected function getBrowser(){
142
+ if(strpos($this->userAgent, 'MSIE') !== false){
143
+ $this->browser = 1;
144
+ }
145
+ elseif(strpos($this->userAgent, 'Trident') !== false){
146
+ $this->browser = 1;
147
+ }
148
+ elseif(strpos($this->userAgent, 'Gecko') !== false){
149
+ if(strpos($this->userAgent, 'Firefox') !== false){
150
+ $this->browser = 2;
151
+ }
152
+ elseif(strpos($this->userAgent, 'Netscape') !== false){
153
+ $this->browser = 3;
154
+ }
155
+ elseif(strpos($this->userAgent, 'Chrome') !== false){
156
+ $this->browser = 4;
157
+ }
158
+ else{
159
+ $this->browser = 5;
160
+ }
161
+ }
162
+ elseif(strpos($this->userAgent, 'Opera Mini') !== false){
163
+ $this->browser = 6;
164
+ }
165
+ elseif(strpos($this->userAgent, 'Opera') !== false){
166
+ $this->browser = 7;
167
+ }
168
+ elseif(strpos($this->userAgent, 'Safari') !== false){
169
+ $this->browser = 8;
170
+ }
171
+ elseif(strpos($this->userAgent, 'iPad') !== false){
172
+ $this->browser = 9;
173
+ }
174
+ elseif(strpos($this->userAgent, 'Android') !== false){
175
+ $this->browser = 10;
176
+ }
177
+ elseif(strpos($this->userAgent, 'AIR') !== false){
178
+ $this->browser = 11;
179
+ }
180
+ elseif(strpos($this->userAgent, 'Fluid') !== false){
181
+ $this->browser = 12;
182
+ }
183
+ elseif(strpos($this->userAgent, 'Maxthon') !== false){
184
+ $this->browser = 13;
185
+ }
186
+ else{
187
+ $this->browser = 14;
188
+ }
189
+ }
190
+ //--------------------------------------------
191
+ /**
192
+ * Detect search engine
193
+ *
194
+ * @uses wpdb::prepare()
195
+ * @uses wpdb::get_results()
196
+ *
197
+ * @return void
198
+ */
199
+ protected function getSearchEngine(){
200
+ global $wpdb;
201
+ $sql = "SELECT `srh_id`, `srh_query_parameter`, `srh_identifier` FROM `ahc_search_engines`";
202
+ $results = $wpdb->get_results($sql, OBJECT);
203
+ if($results !== false){
204
+ foreach($results as $s){
205
+ if(strpos($this->referer, $s->srh_identifier.'.') !== false){
206
+ $this->searchEngine = $s->srh_id;
207
+ $this->getKeyWords($s->srh_query_parameter);
208
+ }
209
+ }
210
+ }
211
+ }
212
+ //--------------------------------------------
213
+ /**
214
+ * Detect search engine
215
+ *
216
+ * @uses wpdb::prepare()
217
+ * @uses wpdb::get_results()
218
+ *
219
+ * @return void
220
+ */
221
+ protected function getKeyWords($query_param){
222
+ $query = parse_url($this->referer, PHP_URL_QUERY);
223
+ $query = rawurldecode($query);
224
+ $arr = array();
225
+ parse_str($query, $arr);
226
+ if(isset($arr[$query_param])){
227
+ $this->keyWords = $arr[$query_param];
228
+ }
229
+ }
230
+ //--------------------------------------------
231
+ /**
232
+ * Is there a record prepared for today's visits
233
+ *
234
+ * @uses wpdb::get_results()
235
+ *
236
+ * @return boolean
237
+ */
238
+ protected function isTodayPreparedInDb(){
239
+ global $wpdb;
240
+ $sql = "SELECT COUNT(`vst_id`) AS ct FROM `ahc_visitors` WHERE DATE(`vst_date`) = DATE(NOW())";
241
+ $result = $wpdb->get_results($sql, OBJECT);
242
+ if($result !== false){
243
+ return ((int) $result[0]->ct > 0);
244
+ }
245
+ }
246
+ //--------------------------------------------
247
+ /**
248
+ * Prepared a record for today's visits
249
+ *
250
+ * @uses wpdb::query()
251
+ *
252
+ * @return boolean
253
+ */
254
+ protected function PrepareForTodayInDb(){
255
+ global $wpdb;
256
+ $sql = "INSERT INTO `ahc_visitors` (`vst_date`, `vst_visitors`, `vst_visits`) VALUES (NOW(), 0, 0)";
257
+ if($wpdb->query($sql) !== false){
258
+ return true;
259
+ }
260
+ return false;
261
+ }
262
+ //--------------------------------------------
263
+ /**
264
+ * Clean daily hits table
265
+ *
266
+ * @uses wpdb::query()
267
+ *
268
+ * @return boolean
269
+ */
270
+ protected function cleanHitsTable(){
271
+ global $wpdb;
272
+ $sql = "DELETE FROM `ahc_hits` WHERE DATE(`hit_date`) <> DATE(NOW())";
273
+ if($wpdb->query($sql) !== false){
274
+ return true;
275
+ } else{
276
+ return false;
277
+ }
278
+ }
279
+ //--------------------------------------------
280
+ /**
281
+ * Update browser visits
282
+ *
283
+ * @uses wpdb::prepare()
284
+ * @uses wpdb::query()
285
+ *
286
+ * @param integer $bsr_id
287
+ * @return boolean
288
+ */
289
+ protected function updateBrowsers($bsr_id){
290
+ global $wpdb;
291
+ $sql = "UPDATE `ahc_browsers` SET bsr_visits = bsr_visits + 1 WHERE bsr_id = %d";
292
+ if($wpdb->query($wpdb->prepare($sql, $bsr_id)) !== false){
293
+ return true;
294
+ }
295
+ return false;
296
+ }
297
+ //--------------------------------------------
298
+ /**
299
+ * Update visits sum order by search engine
300
+ *
301
+ * @uses wpdb::prepare()
302
+ * @uses wpdb::get_results()
303
+ * @uses wpdb::query()
304
+ *
305
+ * @param integer $srh_id
306
+ * @return boolean
307
+ */
308
+ protected function updateSearchingVisits($srh_id){
309
+ global $wpdb;
310
+ $sql = "SELECT vtsh_id FROM `ahc_searching_visits` WHERE srh_id = %d AND DATE(vtsh_date) = DATE(NOW())";
311
+ $result = $wpdb->get_results($wpdb->prepare($sql, $srh_id), OBJECT);
312
+ if($result !== false){
313
+ if($wpdb->num_rows > 0){
314
+ $sql2 = "UPDATE `ahc_searching_visits` SET vtsh_visits = vtsh_visits + 1 WHERE vtsh_id = %d";
315
+ return ($wpdb->query($wpdb->prepare($sql2, $result[0]->vtsh_id)) !== false);
316
+ } else{
317
+ $sql2 = "INSERT INTO `ahc_searching_visits` (srh_id, vtsh_date, vtsh_visits)
318
+ VALUES (%d, NOW(), 1)";
319
+ return ($wpdb->query($wpdb->prepare($sql2, $srh_id)) !== false);
320
+ }
321
+ } else{
322
+ return false;
323
+ }
324
+ }
325
+ //--------------------------------------------
326
+ /**
327
+ * Update visitors count
328
+ *
329
+ * @uses wpdb::prepare()
330
+ * @uses wpdb::query()
331
+ *
332
+ * @param integer $visitors Optional
333
+ * @param integer $visits Optional
334
+ * @return boolean
335
+ */
336
+ protected function updateVisitors($visitors = 0, $visits = 0){
337
+ global $wpdb;
338
+ $sql = "UPDATE `ahc_visitors` SET vst_visitors = vst_visitors + %d, vst_visits = vst_visits + %d
339
+ WHERE DATE(vst_date) = DATE(NOW())";
340
+ return ($wpdb->query($wpdb->prepare($sql, $visitors, $visits)) !== false);
341
+ }
342
+ //--------------------------------------------
343
+ /**
344
+ * Update referring sites visits table
345
+ *
346
+ * @uses wpdb::prepare()
347
+ * @uses wpdb::query()
348
+ * @uses wpdb::get_results()
349
+ *
350
+ * @param string $rfr_site_name. referring site name
351
+ * @return boolean
352
+ */
353
+ protected function updateReferingSites($rfr_site_name){
354
+ global $wpdb;
355
+ $sql = "SELECT rfr_id FROM `ahc_refering_sites` where rfr_site_name = %s";
356
+ $result = $wpdb->get_results($wpdb->prepare($sql, $rfr_site_name), OBJECT);
357
+ if($result !== false){
358
+ if(!empty($result)){
359
+ $sql2 = "UPDATE `ahc_refering_sites` SET rfr_visits = rfr_visits + 1 WHERE rfr_id = %d";
360
+ return ($wpdb->query($wpdb->prepare($sql2, $result[0]->rfr_id)) !== false);
361
+ } else{
362
+ $sql2 = "INSERT INTO `ahc_refering_sites` (rfr_site_name, rfr_visits)
363
+ VALUES(%s, 1)";
364
+ return ($wpdb->query($wpdb->prepare($sql2, $rfr_site_name)) !== false);
365
+ }
366
+ } else{
367
+ return false;
368
+ }
369
+ }
370
+ //--------------------------------------------
371
+ /**
372
+ * Update recent visitors table
373
+ *
374
+ * @uses wpdb::prepare()
375
+ * @uses wpdb::query()
376
+ *
377
+ * @param string $vtr_ip_address. IP address
378
+ * @param string $vtr_referer Optional. Referring site name
379
+ * @param integer $srh_id Optional. Search engine ID
380
+ * @param integer $bsr_id Optional. Browser ID
381
+ * @param integer $ctr_id Optional. Country ID
382
+ * @return boolean
383
+ */
384
+ protected function updateRecentVisitors($vtr_ip_address, $vtr_referer = '', $srh_id = NULL, $bsr_id = NULL, $ctr_id = NULL){
385
+ global $wpdb;
386
+ $sql = "INSERT INTO `ahc_recent_visitors` (vtr_ip_address, vtr_referer, srh_id, bsr_id, ctr_id, vtr_date, vtr_time)
387
+ VALUES (%s, %s, %d, %d, %d, NOW(), NOW())";
388
+ return ($wpdb->query($wpdb->prepare($sql, $vtr_ip_address, $vtr_referer, $srh_id, $bsr_id, $ctr_id)) !== false);
389
+ }
390
+ //--------------------------------------------
391
+ /**
392
+ * Update key words table
393
+ *
394
+ * @uses wpdb::prepare()
395
+ * @uses wpdb::query()
396
+ *
397
+ * @param string $vtr_ip_address. IP address
398
+ * @param string $kwd_keywords. Key word
399
+ * @param string $kwd_referer. Referring site name.
400
+ * @param integer $srh_id. Search engine ID
401
+ * @param integer $bsr_id. Browser ID
402
+ * @return boolean
403
+ */
404
+ protected function updateKeywords($kwd_ip_address, $kwd_keywords, $kwd_referer, $srh_id, $bsr_id){
405
+ global $wpdb;
406
+ $sql = "INSERT INTO `ahc_keywords` (kwd_ip_address, kwd_keywords, kwd_referer, srh_id, bsr_id, kwd_date, kwd_time)
407
+ VALUES (%s, %s, %s, %d, %d, NOW(), NOW())";
408
+ return ($wpdb->query($wpdb->prepare($sql, $kwd_ip_address, $kwd_keywords, $kwd_referer, $srh_id, $bsr_id)) !== false);
409
+ }
410
+ //--------------------------------------------
411
+ /**
412
+ * Clean unwanted records. Only keeping a limit of fresh records. Limit is set by AHC_RECENT_VISITORS_LIMIT
413
+ *
414
+ * @uses wpdb::prepare()
415
+ * @uses wpdb::get_results()
416
+ * @uses wpdb::query()
417
+ *
418
+ * @return boolean
419
+ */
420
+ protected function cleanUnwantedRecords(){
421
+ global $wpdb;
422
+ $sql11 = "SELECT vtr_id FROM `ahc_recent_visitors` ORDER BY vtr_id LIMIT %d";
423
+ $result = $wpdb->get_results($wpdb->prepare($sql11, AHC_RECENT_VISITORS_LIMIT), OBJECT);
424
+ if($result !== false){
425
+ $ids1 = array();
426
+ $length = count($result);
427
+ foreach($result as $r){
428
+ $ids1[] = $r->vtr_id;
429
+ }
430
+ $ids1 = implode(',', $ids1);
431
+ $sql12 = "DELETE FROM `ahc_recent_visitors`".((!empty($ids1))? " WHERE vtr_id NOT IN (".$ids1.")" : "");
432
+
433
+ $sql21 = "SELECT kwd_id FROM `ahc_keywords` ORDER BY kwd_id LIMIT %d";
434
+ $result2 = $wpdb->get_results($wpdb->prepare($sql21, AHC_RECENT_KEYWORDS_LIMIT), OBJECT);
435
+ if($result2 !== false){
436
+ $ids2 = array();
437
+ foreach($result2 as $r){
438
+ $ids2[] = $r->kwd_id;
439
+ }
440
+ $ids2 = implode(',', $ids2);
441
+ $sql22 = "DELETE FROM `ahc_keywords`".((!empty($ids2))? " WHERE kwd_id NOT IN (".$ids2.")" : "");
442
+
443
+ if($wpdb->query($sql12) !== false){
444
+ return ($wpdb->query($sql22) !== false);
445
+ }
446
+ }
447
+ }
448
+ return false;
449
+ }
450
+ //--------------------------------------------
451
+ /**
452
+ * Update traffic by title table
453
+ *
454
+ * @uses wpdb::prepare()
455
+ * @uses wpdb::get_results()
456
+ * @uses wpdb::query()
457
+ *
458
+ * @param integer $til_page_id
459
+ * @param string $til_page_title
460
+ * @return boolean
461
+ */
462
+ protected function updateTitleTraffic($til_page_id, $til_page_title){
463
+ global $wpdb;
464
+ $sql = "SELECT til_id FROM `ahc_title_traffic` where til_page_id = %s";
465
+ $result = $wpdb->get_results($wpdb->prepare($sql, $til_page_id), OBJECT);
466
+ if($result !== false){
467
+ if(!empty($result)){
468
+ $sql2 = "UPDATE `ahc_title_traffic`
469
+ SET til_hits = til_hits + 1, til_page_title = %s
470
+ WHERE til_id = %d";
471
+ return ($wpdb->query($wpdb->prepare($sql2, $til_page_title, $result[0]->til_id)) !== false);
472
+ } else{
473
+ $sql2 = "INSERT INTO `ahc_title_traffic` (til_page_id, til_page_title, til_hits)
474
+ VALUES(%s, %s, 1)";
475
+ return ($wpdb->query($wpdb->prepare($sql2, $til_page_id, $til_page_title)) !== false);
476
+ }
477
+ } else{
478
+ return false;
479
+ }
480
+ }
481
+ //--------------------------------------------
482
+ /**
483
+ * Update visitor's & visits' times table
484
+ *
485
+ * @uses wpdb::prepare()
486
+ * @uses wpdb::query()
487
+ *
488
+ * @param integer $visitors Optional
489
+ * @param integer $visits Optional
490
+ * @return boolean
491
+ */
492
+ protected function updateVisitsTime($visitors = 0, $visits = 0){
493
+ global $wpdb;
494
+ $sql = "UPDATE `ahc_visits_time` SET vtm_visitors = vtm_visitors + %d, vtm_visits = vtm_visits + %d
495
+ WHERE TIME(vtm_time_from) <= TIME(NOW()) AND TIME(vtm_time_to) >= TIME(NOW())";
496
+ return ($wpdb->query($wpdb->prepare($sql, $visitors, $visits)) !== false);
497
+ }
498
+ //--------------------------------------------
499
+ /**
500
+ * Record (insert) the visit
501
+ *
502
+ * @uses wpdb::prepare()
503
+ * @uses wpdb::query()
504
+ *
505
+ * @return boolean
506
+ */
507
+ protected function recordThisHits(){
508
+ global $wpdb;
509
+ $sql = "INSERT INTO `ahc_hits`
510
+ (`hit_ip_address`, `hit_user_agent`, `hit_request_uri`, `hit_page_id`, `hit_page_title`, `hit_referer`, `hit_referer_site`,
511
+ `srh_id`, `hit_search_words`, `bsr_id`, `hit_date`, `hit_time`)
512
+ VALUES (%s, %s, %s, %s, %s, %s, %s, %d, %s, %d, NOW(), NOW())";
513
+ $result = $wpdb->query($wpdb->prepare($sql, $this->ipAddress, $this->userAgent, $this->requestUri, $this->pageId, $this->pageTitle,
514
+ $this->referer, $this->refererSite, $this->searchEngine, $this->keyWords, $this->browser));
515
+ return ($result !== false);
516
+ }
517
+ //--------------------------------------------
518
+ }
519
+ ?>
crawlers.php ADDED
@@ -0,0 +1,37 @@
1
+ <?php
2
+ function crawlerDetect($USER_AGENT)
3
+ {
4
+ $crawlers = array(
5
+ 'Google' => 'Google',
6
+ 'MSN' => 'msnbot',
7
+ 'Rambler' => 'Rambler',
8
+ 'Yahoo' => 'Yahoo',
9
+ 'AbachoBOT' => 'AbachoBOT',
10
+ 'accoona' => 'Accoona',
11
+ 'AcoiRobot' => 'AcoiRobot',
12
+ 'ASPSeek' => 'ASPSeek',
13
+ 'CrocCrawler' => 'CrocCrawler',
14
+ 'Dumbot' => 'Dumbot',
15
+ 'FAST-WebCrawler' => 'FAST-WebCrawler',
16
+ 'GeonaBot' => 'GeonaBot',
17
+ 'Gigabot' => 'Gigabot',
18
+ 'Lycos spider' => 'Lycos',
19
+ 'MSRBOT' => 'MSRBOT',
20
+ 'Altavista robot' => 'Scooter',
21
+ 'AltaVista robot' => 'Altavista',
22
+ 'ID-Search Bot' => 'IDBot',
23
+ 'eStyle Bot' => 'eStyle',
24
+ 'Scrubby robot' => 'Scrubby',
25
+ 'Facebook' => 'facebookexternalhit',
26
+ );
27
+ // to get crawlers string used in function uncomment it
28
+ // it is better to save it in string than use implode every time
29
+ // global $crawlers
30
+ $crawlers_agents = implode('|',$crawlers);
31
+ if (strpos($crawlers_agents, $USER_AGENT) === false)
32
+ return false;
33
+ else {
34
+ return TRUE;
35
+ }
36
+ }
37
+ ?>
css/ar_css.css ADDED
@@ -0,0 +1,73 @@
1
+
2
+ html {height: 100%}
3
+ body {height: 100%; margin:0; padding:0; overflow-x:hidden; font: 10px verdana;}
4
+
5
+ .ahc_main_container{
6
+ direction: rtl; /* ## */
7
+ padding: 60px 20px;
8
+ }
9
+ .rightPanelsContainer{float: right; /* ## */ margin: 0; padding: 0;}
10
+ .leftPanelsContainer{float: left; /* ## */ margin: 0; padding: 0;}
11
+ .cleaner{clear: both;}
12
+ .panel, .panelcollapsed{
13
+ background: #eee;
14
+ margin: 10px 0px;
15
+ padding: 0px 0px 5px;
16
+ -moz-border-radius: 4px;
17
+ -webkit-border-radius: 4px;
18
+ }
19
+ .panel h2, .panelcollapsed h2{
20
+ font-size: 18px;
21
+ font-weight: normal;
22
+ margin: 0px;
23
+ padding: 4px;
24
+ background: #FFF url(../images/arrow_up.png) no-repeat 1% 50%; /* ## */
25
+ border-bottom: 1px solid #CCC;
26
+ -moz-border-radius: 3px;
27
+ -webkit-border-radius: 3px;
28
+ border-top: 1px solid #FFF;
29
+ border-right: 1px solid #FFF;
30
+ border-left: 1px solid #FFF;
31
+ }
32
+ .panelcollapsed h2{
33
+ background: #FFF url(../images/arrow_down.png) no-repeat 1% 50%; /* ## */
34
+ border-color: #CCC;
35
+ }
36
+ .panelcontent{
37
+ padding: 10px;
38
+ background: #FFF;
39
+ }
40
+ .panelcollapsed .panelcontent {display: none;}
41
+ .panelcontent td, .panelcontent th{font-size: 14px; font-weight: 0; padding: 5px;}
42
+ .panelcontent td.values{text-align: center; color: #395A7C; font-size: 14px;}
43
+
44
+ .fineFont{font-size: 12px !important}
45
+
46
+ .lastVisitorsDetails{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
47
+ .lastVisitorsDetails span{margin-right: 3px;}
48
+ .lastVisitorsDetails img{vertical-align: middle;}
49
+ .ipAddress{float: left; font-size: 14px; color: #3B9EF9; margin-bottom: 10px; margin-bottom: 10px;}
50
+ .referingSite{color: #3B9EF9; margin-left: 5px; font-size: 12px;}
51
+ .visitDateTime{float: right; color: #3B9EF9; font-size: 12px;}
52
+
53
+ .lastSearchKeyWords, .visitorMarker{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
54
+ .lastSearchKeyWords span, .countryMarker span{margin-right: 3px;}
55
+ .lastSearchKeyWords img{vertical-align: middle;}
56
+ .countryMarker{direction: ltr; padding: 5px;}
57
+ .searchKeyWords{font-size: 14px;}
58
+
59
+ .languageChanger{direction: ltr; /* ## */ font-size: 18px;}
60
+
61
+ .countryMarker span.countryName, .visitorMarker span.ipAddress{margin-left: 5px;}
62
+
63
+ .visitorMarker{border-bottom: dashed 1px #dad6ca;}
64
+ .countryMarker span.countryName{font-size: 12px;}
65
+ .countryMarker img{vertical-align: middle;}
66
+ .visitorMarker span.ipAddress{font-size: 12px;}
67
+ .visitorMarker span{float: left;}
68
+
69
+ /* visitors graph begin */
70
+ div.visitorsGraphContainer{float: right; width: 70%} /* ### */
71
+ div.visitorsGraphContainer div.visitorsGraph{float: right; background-color: #82CE69; border-radius: 2px;}
72
+ div.visitorsPercent{float: right; width: 25%; margin-right: 5px;} /* ### */
73
+ /* visitors graph end */
css/en_css.css ADDED
@@ -0,0 +1,117 @@
1
+ body {font: 10px verdana; background:#F1F1F1 !important}
2
+
3
+ .legendsContainer{min-height: 410px; border: solid 1px #CCCCCC; border-radius: 5px; width:200px !important; padding: 10px; background-color: #F1F1F1;}
4
+ .legendsContainer div.legend{float: left;display:inline; height:auto; width:180px !important; margin: 0 10px 10px 0;}
5
+ div.legend span{font-size: 12px; line-height: 0.9;}
6
+ div.legend span.color{display: block; float: left; width: 15px; height: 95%; margin-right: 8px;}
7
+ div.legend span.name{margin-right: 5px;}
8
+ div.legend span.value{color: #D34E4E;}
9
+ .panel{
10
+ margin-left:20px
11
+ }
12
+
13
+ .disabled_panel{
14
+ background:#666;
15
+ position:absolute
16
+
17
+ }
18
+
19
+ .ahc_main_container{
20
+ direction: ltr; /* ## */
21
+ font-family:Verdana, Geneva, sans-serif; font-size:8px !important;
22
+ width:98%;
23
+ }
24
+ .ahc_main_container h1{
25
+ font-size:20px;
26
+ font-weight:normal;
27
+ color:#657f97;
28
+
29
+ }
30
+ .hitsLogo{
31
+ background:url(../images/hitslogo.png) left no-repeat;
32
+ height:55px;
33
+ width:55px;
34
+ display:inline;
35
+ float:left;
36
+ }
37
+ .rightPanelsContainer{float: left; /* ## */ margin: 0; padding: 0;}
38
+ .leftPanelsContainer{float: right; /* ## */ margin: 0; padding: 0;}
39
+ .cleaner{clear: both;}
40
+ .panel, .panelcollapsed{
41
+ background: #eee;
42
+ border:#dfdfdf solid 1px;
43
+ margin: 10px 0px;
44
+ padding: 0px 0px 5px;
45
+ -moz-border-radius: 4px;
46
+ -webkit-border-radius: 4px;
47
+
48
+ }
49
+ .panel h2, .panelcollapsed h2{
50
+ font-size: 12px !important;
51
+ font-weight: normal !important;
52
+ margin: 0px !important;
53
+
54
+ background-color:#666 !important;
55
+ padding-top:10px !important;
56
+ padding-left:7px !important;
57
+ color: #657f97 !important;
58
+ font-weight:bold !important;
59
+ padding: 4px !important;
60
+ background: url(../images/myheaderbg.png) repeat-x !important; /* ## */
61
+
62
+ -moz-border-radius: 3px !important;
63
+ -webkit-border-radius: 3px !important;
64
+ height:20px !important;
65
+ }
66
+ .panelcollapsed h2{
67
+ background: #FFF url(../images/arrow_down.png) no-repeat 99% 50% !important;; /* ## */
68
+ border-color: #CCC !important;;
69
+ }
70
+ .panelcontent{
71
+ padding: 10px;
72
+ background: #FFF;
73
+ min-height:400px;
74
+ }
75
+ .panelcollapsed .panelcontent {display: none;}
76
+ .panelcontent th{font-size: 12px; color: #657f97; font-weight: 0; padding: 5px; text-align: left; border-bottom:#CCC solid 1px; }
77
+ .panelcontent td, .panelcontent td.values{text-align: left; color:#000; font-size: 12px; font-weight: 0; padding: 5px; text-align: left; border-bottom:#EFEFEF solid 1px}
78
+ .panelcontent tr:hover{
79
+ background:#F5F5F5
80
+ }
81
+
82
+ .fineFont{font-size: 10px !important}
83
+
84
+ .lastVisitorsDetails{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
85
+ .lastVisitorsDetails span{margin-right: 3px;}
86
+ .lastVisitorsDetails img{vertical-align: middle;}
87
+ .ipAddress{float: left; font-size: 14px; color: #3B9EF9; margin-bottom: 10px; margin-bottom: 10px;}
88
+ .referingSite{color: #3B9EF9; margin-left: 5px; font-size: 12px;}
89
+ .visitDateTime{float: right; color: #3B9EF9; font-size: 12px;}
90
+
91
+ .lastSearchKeyWords, .visitorMarker{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
92
+ .lastSearchKeyWords span, .countryMarker span{margin-right: 3px;}
93
+ .lastSearchKeyWords img{vertical-align: middle;}
94
+ .countryMarker{direction: ltr; padding: 5px;}
95
+ .searchKeyWords{font-size: 14px;}
96
+
97
+ .languageChanger{direction: rtl; /* ## */ font-size: 18px;}
98
+
99
+ .countryMarker span.countryName, .visitorMarker span.ipAddress{margin-left: 5px;}
100
+
101
+ .visitorMarker{border-bottom: dashed 1px #dad6ca;}
102
+ .countryMarker span.countryName{font-size: 12px;}
103
+ .countryMarker img{vertical-align: middle;}
104
+ .visitorMarker span.ipAddress{font-size: 12px;}
105
+ .visitorMarker span{float: left;}
106
+
107
+ /* visitors graph begin */
108
+ div.visitorsGraphContainer{float: left; width: 70%} /* ### */
109
+ div.visitorsGraphContainer div.visitorsGraph{float: left; background-color: #82CE69; border-radius: 2px;}
110
+ div.visitorsPercent{float: left; width: 25%; margin-left: 5px;} /* ### */
111
+ /* visitors graph end */
112
+
113
+ h2{
114
+ text-align:left !important;
115
+ font-size:14px !important;
116
+ height:30px !important;
117
+ }
css/en_newcss.css ADDED
@@ -0,0 +1,115 @@
1
+ body {font: 10px verdana; background:#F1F1F1 !important}
2
+
3
+ .legendsContainer{min-height: 410px; border: solid 1px #CCCCCC; border-radius: 5px; width:200px !important; padding: 10px; background-color: #F1F1F1;}
4
+ .legendsContainer div.legend{float: left;display:inline; height:auto; width:180px !important; margin: 0 10px 10px 0;}
5
+ div.legend span{font-size: 12px; line-height: 0.9;}
6
+ div.legend span.color{display: block; float: left; width: 15px; height: 95%; margin-right: 8px;}
7
+ div.legend span.name{margin-right: 5px;}
8
+ div.legend span.value{color: #D34E4E;}
9
+ .panel{
10
+ margin-left:20px
11
+ }
12
+
13
+ .disabled_panel{
14
+ background:#666;
15
+ position:absolute
16
+
17
+ }
18
+
19
+ .ahc_main_container{
20
+ direction: ltr; /* ## */
21
+ font-family:Verdana, Geneva, sans-serif; font-size:8px !important;
22
+ width:98%;
23
+ }
24
+ .ahc_main_container h1{
25
+ font-size:20px;
26
+ font-weight:normal;
27
+ color:#657f97;
28
+
29
+ }
30
+ .hitsLogo{
31
+ background:url(../images/hitslogo.png) left no-repeat;
32
+ height:55px;
33
+ width:55px;
34
+ display:inline;
35
+ float:left;
36
+ }
37
+ .rightPanelsContainer{float: left; /* ## */ margin: 0; padding: 0;}
38
+ .leftPanelsContainer{float: right; /* ## */ margin: 0; padding: 0;}
39
+ .cleaner{clear: both;}
40
+ .panel, .panelcollapsed{
41
+ background: #23282D;
42
+ border:#23282D solid 1px;
43
+ margin: 10px 0px;
44
+ -moz-border-radius: 4px;
45
+ -webkit-border-radius: 4px;
46
+
47
+ }
48
+ .panel h2, .panelcollapsed h2{
49
+ font-size: 12px !important;
50
+ font-weight: normal !important;
51
+ margin: 0px !important;
52
+
53
+ background-color:#666 !important;
54
+ padding:5px !important;
55
+
56
+ color: white !important;
57
+ font-weight:bold !important;
58
+ background-color:#23282D;
59
+
60
+ -moz-border-radius: 3px !important;
61
+ -webkit-border-radius: 3px !important;
62
+ height:20px !important;
63
+ }
64
+ .panelcollapsed h2{
65
+ background: #FFF url(../images/arrow_down.png) no-repeat 99% 50% !important;; /* ## */
66
+ border-color: #CCC !important;;
67
+ }
68
+ .panelcontent{
69
+ padding: 10px;
70
+ background: #FFF;
71
+ min-height:400px;
72
+ }
73
+ .panelcollapsed .panelcontent {display: none;}
74
+ .panelcontent th{font-size: 12px; color: #657f97; font-weight: 0; padding: 5px; text-align: left; border-bottom:#CCC solid 1px; }
75
+ .panelcontent td, .panelcontent td.values{text-align: left; color:#000; font-size: 12px; font-weight: 0; padding: 5px; text-align: left; border-bottom:#EFEFEF solid 1px}
76
+ .panelcontent tr:hover{
77
+ background:#F5F5F5
78
+ }
79
+
80
+ .fineFont{font-size: 10px !important}
81
+
82
+ .lastVisitorsDetails{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
83
+ .lastVisitorsDetails span{margin-right: 3px;}
84
+ .lastVisitorsDetails img{vertical-align: middle;}
85
+ .ipAddress{float: left; font-size: 14px; color: #3B9EF9; margin-bottom: 10px; margin-bottom: 10px;}
86
+ .referingSite{color: #3B9EF9; margin-left: 5px; font-size: 12px;}
87
+ .visitDateTime{float: right; color: #3B9EF9; font-size: 12px;}
88
+
89
+ .lastSearchKeyWords, .visitorMarker{border-bottom: solid 1px #dad6ca; direction: ltr; padding: 5px;}
90
+ .lastSearchKeyWords span, .countryMarker span{margin-right: 3px;}
91
+ .lastSearchKeyWords img{vertical-align: middle;}
92
+ .countryMarker{direction: ltr; padding: 5px;}
93
+ .searchKeyWords{font-size: 14px;}
94
+
95
+ .languageChanger{direction: rtl; /* ## */ font-size: 18px;}
96
+
97
+ .countryMarker span.countryName, .visitorMarker span.ipAddress{margin-left: 5px;}
98
+
99
+ .visitorMarker{border-bottom: dashed 1px #dad6ca;}
100
+ .countryMarker span.countryName{font-size: 12px;}
101
+ .countryMarker img{vertical-align: middle;}
102
+ .visitorMarker span.ipAddress{font-size: 12px;}
103
+ .visitorMarker span{float: left;}
104
+
105
+ /* visitors graph begin */
106
+ div.visitorsGraphContainer{float: left; width: 70%} /* ### */
107
+ div.visitorsGraphContainer div.visitorsGraph{float: left; background-color: #82CE69; border-radius: 2px;}
108
+ div.visitorsPercent{float: left; width: 25%; margin-left: 5px;} /* ### */
109
+ /* visitors graph end */
110
+
111
+ h2{
112
+ text-align:left !important;
113
+ font-size:14px !important;
114
+ height:30px !important;
115
+ }
database_basics_data.php ADDED
@@ -0,0 +1,265 @@
1
+ <?php
2
+ $internetCountryCodes = array(
3
+ 'A1' => 'Anonymous Proxy', 'A2' => 'Satellite Provider', 'O1' => 'Other Country', 'AD' => 'Andorra',
4
+ 'AE' => 'United Arab Emirates', 'AF' => 'Afghanistan', 'AG' => 'Antigua and Barbuda', 'AI' => 'Anguilla',
5
+ 'AL' => 'Albania', 'AM' => 'Armenia', 'AN' => 'Netherlands Antilles ', 'AO' => 'Angola',
6
+ 'AP' => 'Asia/Pacific Region', 'AQ' => 'Antarctica', 'AR' => 'Argentina', 'AS' => 'American Samoa',
7
+ 'AT' => 'Austria', 'AU' => 'Australia', 'AW' => 'Aruba', 'AX' => 'Aland Islands', 'AZ' => 'Azerbaijan',
8
+ 'BA' => 'Bosnia and Herzegovina', 'BB' => 'Barbados', 'BD' => 'Bangladesh', 'BE' => 'Belgium',
9
+ 'BF' => 'Burkina Faso', 'BG' => 'Bulgaria', 'BH' => 'Bahrain', 'BI' => 'Burundi',
10
+ 'BJ' => 'Benin', 'BL' => 'Saint Bartelemey', 'BM' => 'Bermuda', 'BN' => 'Brunei Darussalam',
11
+ 'BO' => 'Bolivia', 'BQ' => 'Bonaire', 'BR' => 'Brazil', 'BS' => 'Bahamas',
12
+ 'BT' => 'Bhutan', 'BV' => 'Bouvet Island', 'BW' => 'Botswana', 'BY' => 'Belarus',
13
+ 'BZ' => 'Belize', 'CA' => 'Canada', 'CC' => 'Cocos (Keeling) Islands', 'CD' => 'Congo',
14
+ 'CF' => 'Central African Republic', 'CG' => 'Congo', 'CH' => 'Switzerland', 'CI' => 'Cote d\'Ivoire',
15
+ 'CK' => 'Cook Islands', 'CL' => 'Chile', 'CM' => 'Cameroon', 'CN' => 'China',
16
+ 'CO' => 'Colombia', 'CR' => 'Costa Rica', 'CU' => 'Cuba', 'CV' => 'Cape Verde',
17
+ 'CW' => 'Curacao', 'CX' => 'Christmas Island', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic',
18
+ 'DE' => 'Germany', 'DJ' => 'Djibouti', 'DK' => 'Denmark', 'DM' => 'Dominica',
19
+ 'DO' => 'Dominican Republic', 'DZ' => 'Algeria', 'EC' => 'Ecuador', 'EE' => 'Estonia',
20
+ 'EG' => 'Egypt', 'EH' => 'Western Sahara', 'ER' => 'Eritrea', 'ES' => 'Spain',
21
+ 'ET' => 'Ethiopia', 'EU' => 'Europe', 'FI' => 'Finland', 'FJ' => 'Fiji',
22
+ 'FK' => 'Falkland Islands (Malvinas)', 'FM' => 'Micronesia', 'FO' => 'Faroe Islands', 'FR' => 'France',
23
+ 'GA' => 'Gabon', 'GB' => 'United Kingdom', 'GD' => 'Grenada', 'GE' => 'Georgia',
24
+ 'GF' => 'French Guiana', 'GG' => 'Guernsey', 'GH' => 'Ghana', 'GI' => 'Gibraltar',
25
+ 'GL' => 'Greenland', 'GM' => 'Gambia', 'GN' => 'Guinea', 'GP' => 'Guadeloupe',
26
+ 'GQ' => 'Equatorial Guinea', 'GR' => 'Greece', 'GS' => 'South Georgia and the South Sandwich Islands', 'GT' => 'Guatemala',
27
+ 'GU' => 'Guam', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HK' => 'Hong Kong',
28
+ 'HM' => 'Heard Island and McDonald Islands', 'HN' => 'Honduras', 'HR' => 'Croatia', 'HT' => 'Haiti',
29
+ 'HU' => 'Hungary', 'ID' => 'Indonesia', 'IE' => 'Ireland', 'IL' => 'Israel',
30
+ 'IM' => 'Isle of Man', 'IN' => 'India', 'IO' => 'British Indian Ocean Territory', 'IQ' => 'Iraq',
31
+ 'IR' => 'Iran', 'IS' => 'Iceland', 'IT' => 'Italy', 'JE' => 'Jersey',
32
+ 'JM' => 'Jamaica', 'JO' => 'Jordan', 'JP' => 'Japan', 'KE' => 'Kenya',
33
+ 'KG' => 'Kyrgyzstan', 'KH' => 'Cambodia', 'KI' => 'Kiribati', 'KM' => 'Comoros',
34
+ 'KN' => 'Saint Kitts and Nevis', 'KP' => 'Korea', 'KR' => 'Korea', 'KW' => 'Kuwait',
35
+ 'KY' => 'Cayman Islands', 'KZ' => 'Kazakhstan', 'LA' => 'Lao People\'s Democratic Republic', 'LB' => 'Lebanon',
36
+ 'LC' => 'Saint Lucia', 'LI' => 'Liechtenstein', 'LK' => 'Sri Lanka', 'LR' => 'Liberia',
37
+ 'LS' => 'Lesotho', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'LV' => 'Latvia',
38
+ 'LY' => 'Libyan Arab Jamahiriya', 'MA' => 'Morocco', 'MC' => 'Monaco', 'MD' => 'Moldova',
39
+ 'ME' => 'Montenegro', 'MF' => 'Saint Martin', 'MG' => 'Madagascar', 'MH' => 'Marshall Islands',
40
+ 'MK' => 'Macedonia', 'ML' => 'Mali', 'MM' => 'Myanmar', 'MN' => 'Mongolia',
41
+ 'MO' => 'Macao', 'MP' => 'Northern Mariana Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania',
42
+ 'MS' => 'Montserrat', 'MT' => 'Malta', 'MU' => 'Mauritius', 'MV' => 'Maldives',
43
+ 'MW' => 'Malawi', 'MX' => 'Mexico', 'MY' => 'Malaysia', 'MZ' => 'Mozambique',
44
+ 'NA' => 'Namibia', 'NC' => 'New Caledonia', 'NE' => 'Niger', 'NF' => 'Norfolk Island',
45
+ 'NG' => 'Nigeria', 'NI' => 'Nicaragua', 'NL' => 'Netherlands', 'NO' => 'Norway',
46
+ 'NP' => 'Nepal', 'NR' => 'Nauru', 'NU' => 'Niue', 'NZ' => 'New Zealand',
47
+ 'OM' => 'Oman', 'PA' => 'Panama', 'PE' => 'Peru', 'PF' => 'French Polynesia',
48
+ 'PG' => 'Papua New Guinea', 'PH' => 'Philippines', 'PK' => 'Pakistan', 'PL' => 'Poland',
49
+ 'PM' => 'Saint Pierre and Miquelon', 'PN' => 'Pitcairn', 'PR' => 'Puerto Rico', 'PS' => 'Palestinian Territory',
50
+ 'PT' => 'Portugal', 'PW' => 'Palau', 'PY' => 'Paraguay', 'QA' => 'Qatar',
51
+ 'RE' => 'Reunion', 'RO' => 'Romania', 'RS' => 'Serbia', 'RU' => 'Russian Federation',
52
+ 'RW' => 'Rwanda', 'SA' => 'Saudi Arabia', 'SB' => 'Solomon Islands', 'SC' => 'Seychelles',
53
+ 'SD' => 'Sudan', 'SE' => 'Sweden', 'SG' => 'Singapore', 'SH' => 'Saint Helena',
54
+ 'SI' => 'Slovenia', 'SJ' => 'Svalbard and Jan Mayen', 'SK' => 'Slovakia', 'SL' => 'Sierra Leone',
55
+ 'SM' => 'San Marino', 'SN' => 'Senegal', 'SO' => 'Somalia', 'SR' => 'Suriname',
56
+ 'SS' => 'South Sudan', 'ST' => 'Sao Tome and Principe', 'SV' => 'El Salvador', 'SX' => 'Sint Maarten',
57
+ 'SY' => 'Syrian Arab Republic', 'SZ' => 'Swaziland', 'TC' => 'Turks and Caicos Islands', 'TD' => 'Chad',
58
+ 'TF' => 'French Southern Territories', 'TG' => 'Togo', 'TH' => 'Thailand', 'TJ' => 'Tajikistan',
59
+ 'TK' => 'Tokelau', 'TL' => 'Timor-Leste', 'TM' => 'Turkmenistan', 'TN' => 'Tunisia',
60
+ 'TO' => 'Tonga', 'TR' => 'Turkey', 'TT' => 'Trinidad and Tobago', 'TV' => 'Tuvalu',
61
+ 'TW' => 'Taiwan', 'TZ' => 'Tanzania', 'UA' => 'Ukraine', 'UG' => 'Uganda',
62
+ 'UM' => 'United States Minor Outlying Islands', 'US' => 'United States', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan',
63
+ 'VA' => 'Holy See (Vatican City State)', 'VC' => 'Saint Vincent and the Grenadines', 'VE' => 'Venezuela', 'VG' => 'Virgin Islands',
64
+ 'VI' => 'Virgin Islands', 'VN' => 'Vietnam', 'VU' => 'Vanuatu', 'WF' => 'Wallis and Futuna',
65
+ 'WS' => 'Samoa', 'YE' => 'Yemen', 'YT' => 'Mayotte', 'ZA' => 'South Africa', 'ZM' => 'Zambia',
66
+ 'ZR' => 'Zaire', 'ZW' => 'Zimbabwe', 'XX' => 'Anonymous Proxy'
67
+ );
68
+
69
+ $contriesLatLng = array(
70
+ 'AD' => array('42.5000', '1.5000'), 'AE' => array('24.0000', '54.0000'), 'AF' => array('33.0000', '65.0000'),
71
+ 'AG' => array('17.0500', '-61.8000'), 'AI' => array('18.2500', '-63.1667'), 'AL' => array('41.0000', '20.0000'),
72
+ 'AM' => array('40.0000', '45.0000'), 'AN' => array('12.2500', '-68.7500'), 'AO' => array('-12.5000', '18.5000'),
73
+ 'AP' => array('35.0000', '105.0000'), 'AQ' => array('-90.0000', '0.0000'), 'AR' => array('-34.0000', '-64.0000'),
74
+ 'AS' => array('-14.3333', '-170.0000'), 'AT' => array('47.3333', '13.3333'), 'AU' => array('-27.0000', '133.0000'),
75
+ 'AW' => array('12.5000', '-69.9667'), 'AX' => array('60.178525', '19.91561'), 'AZ' => array('40.5000', '47.5000'),
76
+ 'BA' => array('44.0000', '18.0000'), 'BB' => array('13.1667', '-59.5333'), 'BD' => array('24.0000', '90.0000'),
77
+ 'BE' => array('50.8333', '4.0000'), 'BF' => array('13.0000', '-2.0000'), 'BG' => array('43.0000', '25.0000'),
78
+ 'BH' => array('26.0000', '50.5500'), 'BI' => array('-3.5000', '30.0000'), 'BJ' => array('9.5000', '2.2500'),
79
+ 'BM' => array('32.3333', '-64.7500'), 'BN' => array('4.5000', '114.6667'), 'BL' => array('17.9', '-62.833333'),
80
+ 'BO' => array('-17.0000', '-65.0000'), 'BQ' => array('12.178361', '-68.238534'), 'BR' => array('-10.0000', '-55.0000'),
81
+ 'BS' => array('24.2500', '-76.0000'), 'BT' => array('27.5000', '90.5000'), 'BV' => array('-54.4333', '3.4000'),
82
+ 'BW' => array('-22.0000', '24.0000'), 'BY' => array('53.0000', '28.0000'), 'BZ' => array('17.2500', '-88.7500'),
83
+ 'CA' => array('60.0000', '-95.0000'), 'CC' => array('-12.5000', '96.8333'), 'CD' => array('0.0000', '25.0000'),
84
+ 'CF' => array('7.0000', '21.0000'), 'CG' => array('-1.0000', '15.0000'), 'CH' => array('47.0000', '8.0000'),
85
+ 'CI' => array('8.0000', '-5.0000'), 'CK' => array('-21.2333', '-159.7667'), 'CL' => array('-30.0000', '-71.0000'),
86
+ 'CM' => array('6.0000', '12.0000'), 'CN' => array('35.0000', '105.0000'), 'CO' => array('4.0000', '-72.0000'),
87
+ 'CR' => array('10.0000', '-84.0000'), 'CU' => array('21.5000', '-80.0000'), 'CW' => array('12.16957', '-68.99002'),
88
+ 'CV' => array('16.0000', '-24.0000'), 'CX' => array('-10.5000', '105.6667'), 'CY' => array('35.0000', '33.0000'),
89
+ 'CZ' => array('49.7500', '15.5000'), 'DE' => array('51.0000', '9.0000'), 'DJ' => array('11.5000', '43.0000'),
90
+ 'DK' => array('56.0000', '10.0000'), 'DM' => array('15.4167', '-61.3333'), 'DO' => array('19.0000', '-70.6667'),
91
+ 'DZ' => array('28.0000', '3.0000'), 'EC' => array('-2.0000', '-77.5000'), 'EE' => array('59.0000', '26.0000'),
92
+ 'EG' => array('27.0000', '30.0000'), 'EH' => array('24.5000', '-13.0000'), 'ER' => array('15.0000', '39.0000'),
93
+ 'ES' => array('40.0000', '-4.0000'), 'ET' => array('8.0000', '38.0000'), 'EU' => array('47.0000', '8.0000'),
94
+ 'FI' => array('64.0000', '26.0000'), 'FJ' => array('-18.0000', '175.0000'), 'FK' => array('-51.7500', '-59.0000'),
95
+ 'FM' => array('6.9167', '158.2500'), 'FO' => array('62.0000', '-7.0000'), 'FR' => array('46.0000', '2.0000'),
96
+ 'GA' => array('-1.0000', '11.7500'), 'GB' => array('54.0000', '-2.0000'), 'GD' => array('12.1167', '-61.6667'),
97
+ 'GE' => array('42.0000', '43.5000'), 'GF' => array('4.0000', '-53.0000'), 'GH' => array('8.0000', '-2.0000'),
98
+ 'GG' => array('49.465691', '-2.585278'), 'GI' => array('36.1833', '-5.3667'), 'GL' => array('72.0000', '-40.0000'),
99
+ 'GM' => array('13.4667', '-16.5667'), 'GN' => array('11.0000', '-10.0000'), 'GP' => array('16.2500', '-61.5833'),
100
+ 'GQ' => array('2.0000', '10.0000'), 'GR' => array('39.0000', '22.0000'), 'GS' => array('-54.5000', '-37.0000'),
101
+ 'GT' => array('15.5000', '-90.2500'), 'GU' => array('13.4667', '144.7833'), 'GW' => array('12.0000', '-15.0000'),
102
+ 'GY' => array('5.0000', '-59.0000'), 'HK' => array('22.2500', '114.1667'), 'HM' => array('-53.1000', '72.5167'),
103
+ 'HN' => array('15.0000', '-86.5000'), 'HR' => array('45.1667', '15.5000'), 'HT' => array('19.0000', '-72.4167'),
104
+ 'HU' => array('47.0000', '20.0000'), 'ID' => array('-5.0000', '120.0000'), 'IE' => array('53.0000', '-8.0000'),
105
+ 'IL' => array('31.5000', '34.7500'), 'IM' => array('54.236107', '-4.548056'), 'IN' => array('20.0000', '77.0000'),
106
+ 'IO' => array('-6.0000', '71.5000'), 'IQ' => array('33.0000', '44.0000'), 'IR' => array('32.0000', '53.0000'),
107
+ 'IS' => array('65.0000', '-18.0000'), 'IT' => array('42.8333', '12.8333'), 'JE' => array('49.214439', '-2.13125'),
108
+ 'JM' => array('18.2500', '-77.5000'), 'JO' => array('31.0000', '36.0000'), 'JP' => array('36.0000', '138.0000'),
109
+ 'KE' => array('1.0000', '38.0000'), 'KG' => array('41.0000', '75.0000'), 'KH' => array('13.0000', '105.0000'),
110
+ 'KI' => array('1.4167', '173.0000'), 'KM' => array('-12.1667', '44.2500'), 'KN' => array('17.3333', '-62.7500'),
111
+ 'KP' => array('40.0000', '127.0000'), 'KR' => array('37.0000', '127.5000'), 'KW' => array('29.3375', '47.6581'),
112
+ 'KY' => array('19.5000', '-80.5000'), 'KZ' => array('48.0000', '68.0000'), 'LA' => array('18.0000', '105.0000'),
113
+ 'LB' => array('33.8333', '35.8333'), 'LC' => array('13.8833', '-61.1333'), 'LI' => array('47.1667', '9.5333'),
114
+ 'LK' => array('7.0000', '81.0000'), 'LR' => array('6.5000', '-9.5000'), 'LS' => array('-29.5000', '28.5000'),
115
+ 'LT' => array('56.0000', '24.0000'), 'LU' => array('49.7500', '6.1667'), 'LV' => array('57.0000', '25.0000'),
116
+ 'LY' => array('25.0000', '17.0000'), 'MA' => array('32.0000', '-5.0000'), 'MC' => array('43.7333', '7.4000'),
117
+ 'MD' => array('47.0000', '29.0000'), 'ME' => array('42.0000', '19.0000'), 'MF' => array('18.08255', '-63.052251'),
118
+ 'MG' => array('-20.0000', '47.0000'), 'MH' => array('9.0000', '168.0000'), 'MK' => array('41.8333', '22.0000'),
119
+ 'ML' => array('17.0000', '-4.0000'), 'MM' => array('22.0000', '98.0000'), 'MN' => array('46.0000', '105.0000'),
120
+ 'MO' => array('22.1667', '113.5500'), 'MP' => array('15.2000', '145.7500'), 'MQ' => array('14.6667', '-61.0000'),
121
+ 'MR' => array('20.0000', '-12.0000'), 'MS' => array('16.7500', '-62.2000'), 'MT' => array('35.8333', '14.5833'),
122
+ 'MU' => array('-20.2833', '57.5500'), 'MV' => array('3.2500', '73.0000'), 'MW' => array('-13.5000', '34.0000'),
123
+ 'MX' => array('23.0000', '-102.0000'), 'MY' => array('2.5000', '112.5000'), 'MZ' => array('-18.2500', '35.0000'),
124
+ 'NA' => array('-22.0000', '17.0000'), 'NC' => array('-21.5000', '165.5000'), 'NE' => array('16.0000', '8.0000'),
125
+ 'NF' => array('-29.0333', '167.9500'), 'NG' => array('10.0000', '8.0000'), 'NI' => array('13.0000', '-85.0000'),
126
+ 'NL' => array('52.5000', '5.7500'), 'NO' => array('62.0000', '10.0000'), 'NP' => array('28.0000', '84.0000'),
127
+ 'NR' => array('-0.5333', '166.9167'), 'NU' => array('-19.0333', '-169.8667'), 'NZ' => array('-41.0000', '174.0000'),
128
+ 'OM' => array('21.0000', '57.0000'), 'PA' => array('9.0000', '-80.0000'), 'PE' => array('-10.0000', '-76.0000'),
129
+ 'PF' => array('-15.0000', '-140.0000'), 'PG' => array('-6.0000', '147.0000'), 'PH' => array('13.0000', '122.0000'),
130
+ 'PK' => array('30.0000', '70.0000'), 'PL' => array('52.0000', '20.0000'), 'PM' => array('46.8333', '-56.3333'),
131
+ 'PN' => array('-24.376766', '-128.324339'), 'PR' => array('18.2500', '-66.5000'), 'PS' => array('32.0000', '35.2500'),
132
+ 'PT' => array('39.5000', '-8.0000'), 'PW' => array('7.5000', '134.5000'), 'PY' => array('-23.0000', '-58.0000'),
133
+ 'QA' => array('25.5000', '51.2500'), 'RE' => array('-21.1000', '55.6000'), 'RO' => array('46.0000', '25.0000'),
134
+ 'RS' => array('44.0000', '21.0000'), 'RU' => array('60.0000', '100.0000'), 'RW' => array('-2.0000', '30.0000'),
135
+ 'SA' => array('25.0000', '45.0000'), 'SB' => array('-8.0000', '159.0000'), 'SC' => array('-4.5833', '55.6667'),
136
+ 'SD' => array('15.0000', '30.0000'), 'SE' => array('62.0000', '15.0000'), 'SG' => array('1.3667', '103.8000'),
137
+ 'SH' => array('-15.9333', '-5.7000'), 'SI' => array('46.0000', '15.0000'), 'SJ' => array('78.0000', '20.0000'),
138
+ 'SK' => array('48.6667', '19.5000'), 'SL' => array('8.5000', '-11.5000'), 'SM' => array('43.7667', '12.4167'),
139
+ 'SS' => array('6.876992', '31.306979'), 'SN' => array('14.0000', '-14.0000'), 'SO' => array('10.0000', '49.0000'),
140
+ 'SR' => array('4.0000', '-56.0000'), 'ST' => array('1.0000', '7.0000'), 'SV' => array('13.8333', '-88.9167'),
141
+ 'SX' => array('18.041216', '-63.053073'), 'SY' => array('35.0000', '38.0000'), 'SZ' => array('-26.5000', '31.5000'),
142
+ 'TC' => array('21.7500', '-71.5833'), 'TD' => array('15.0000', '19.0000'), 'TF' => array('-43.0000', '67.0000'),
143
+ 'TG' => array('8.0000', '1.1667'), 'TH' => array('15.0000', '100.0000'), 'TJ' => array('39.0000', '71.0000'),
144
+ 'TK' => array('-9.0000', '-172.0000'), 'TL' => array('-8.874217', '125.727539'), 'TM' => array('40.0000', '60.0000'),
145
+ 'TN' => array('34.0000', '9.0000'), 'TO' => array('-20.0000', '-175.0000'), 'TR' => array('39.0000', '35.0000'),
146
+ 'TT' => array('11.0000', '-61.0000'), 'TV' => array('-8.0000', '178.0000'), 'TW' => array('23.5000', '121.0000'),
147
+ 'TZ' => array('-6.0000', '35.0000'), 'UA' => array('49.0000', '32.0000'), 'UG' => array('1.0000', '32.0000'),
148
+ 'UM' => array('19.2833', '166.6000'), 'US' => array('38.0000', '-97.0000'), 'UY' => array('-33.0000', '-56.0000'),
149
+ 'UZ' => array('41.0000', '64.0000'), 'VA' => array('41.9000', '12.4500'), 'VC' => array('13.2500', '-61.2000'),
150
+ 'VE' => array('8.0000', '-66.0000'), 'VG' => array('18.5000', '-64.5000'), 'VI' => array('18.3333', '-64.8333'),
151
+ 'VN' => array('16.0000', '106.0000'), 'VU' => array('-16.0000', '167.0000'), 'WF' => array('-13.3000', '-176.2000'),
152
+ 'WS' => array('-13.5833', '-172.3333'), 'YE' => array('15.0000', '48.0000'), 'YT' => array('-12.8333', '45.1667'),
153
+ 'ZA' => array('-29.0000', '24.0000'), 'ZM' => array('-15.0000', '30.0000'), 'ZR' => array('-4.038333', '21.758664'),
154
+ 'ZW' => array('-20.0000', '30.0000')
155
+ );
156
+
157
+ $searchEngines = array(
158
+ array('srh_name' => 'Google', 'srh_icon' => 'google.png', 'srh_query_parameter' => 'q', 'srh_identifier' => 'google',
159
+ 'crawlers' => array(
160
+ 'Googlebot',
161
+ 'Googlebot-News',
162
+ 'Googlebot-Image',
163
+ 'Googlebot-Video',
164
+ 'Googlebot-Mobile',
165
+ 'Mediapartners-Google',
166
+ 'Mediapartners',
167
+ 'Mediapartners-Google',
168
+ 'Mediapartners',
169
+ 'AdsBot-Google'
170
+ )
171
+ ),
172
+ array('srh_name' => 'Bing', 'srh_icon' => 'bing.png', 'srh_query_parameter' => 'q', 'srh_identifier' => 'bing',
173
+ 'crawlers' => array(
174
+ 'bingbot'
175
+ )
176
+ ),
177
+ array('srh_name' => 'Yahoo Search', 'srh_icon' => 'yahoo.png', 'srh_query_parameter' => 'p', 'srh_identifier' => 'yahoo',
178
+ 'crawlers' => array(
179
+ 'Yahoo! Slurp',
180
+ 'Yahoo! Slurp China',
181
+ 'YahooSeeker'
182
+ )
183
+ ),
184
+ array('srh_name' => 'Ask', 'srh_icon' => 'ask.png', 'srh_query_parameter' => 'q', 'srh_identifier' => 'ask',
185
+ 'crawlers' => array(
186
+ 'Ask Jeeves'
187
+ )
188
+ ),
189
+ array('srh_name' => 'WebCrawler', 'srh_icon' => 'webcrawler.gif', 'srh_query_parameter' => 'q', 'srh_identifier' => 'webcrawler',
190
+ 'crawlers' => array(
191
+ 'FAST-WebCrawler'
192
+ )
193
+ ),
194
+ array('srh_name' => 'Baiduspider', 'srh_icon' => 'baiduspider.png', 'srh_query_parameter' => 'domain_name', 'srh_identifier' => 'baiduspider',
195
+ 'crawlers' => array(
196
+ 'Baiduspider'
197
+ )
198
+ ),
199
+ array('srh_name' => 'DuckDuckGo', 'srh_icon' => 'duckduckgo.png', 'srh_query_parameter' => 'q', 'srh_identifier' => 'duckduckgo',
200
+ 'crawlers' => array(
201
+ 'DuckDuckBot'
202
+ )
203
+ ),
204
+ array('srh_name' => 'Yandex', 'srh_icon' => 'yandex.png', 'srh_query_parameter' => 'text', 'srh_identifier' => 'yandex',
205
+ 'crawlers' => array(
206
+ 'YandexBot'
207
+ )
208
+ ),
209
+ array('srh_name' => 'Aol Search', 'srh_icon' => 'aol.png', 'srh_query_parameter' => 'q', 'srh_identifier' => 'aol',
210
+ 'crawlers' => array(
211
+ 'inktomi',
212
+ 'aol.com'
213
+ )
214
+ ),
215
+ array('srh_name' => 'Dotmic', 'srh_icon' => 'dotmic.gif', 'srh_query_parameter' => 'q', 'srh_identifier' => 'dotmic',
216
+ 'crawlers' => array(
217
+ 'DotBot',
218
+ )
219
+ ),
220
+ );
221
+
222
+ $browsers = array(
223
+ array('bsr_id' => 1, 'bsr_name' => 'IE', 'bsr_icon' => 'ie.png'),
224
+ array('bsr_id' => 2, 'bsr_name' => 'Firefox', 'bsr_icon' => 'firefox.png'),
225
+ array('bsr_id' => 3, 'bsr_name' => 'Netscape', 'bsr_icon' => 'netscape.png'),
226
+ array('bsr_id' => 4, 'bsr_name' => 'Chrome', 'bsr_icon' => 'chrome.png'),
227
+ array('bsr_id' => 5, 'bsr_name' => 'Gecko/Mozilla', 'bsr_icon' => 'mozilla.png'),
228
+ array('bsr_id' => 6, 'bsr_name' => 'Opera Mini', 'bsr_icon' => 'opera.png'),
229
+ array('bsr_id' => 7, 'bsr_name' => 'Opera', 'bsr_icon' => 'opera.png'),
230
+ array('bsr_id' => 8, 'bsr_name' => 'Safari', 'bsr_icon' => 'safari.png'),
231
+ array('bsr_id' => 9, 'bsr_name' => 'iPad', 'bsr_icon' => 'ipad.png'),
232
+ array('bsr_id' => 10, 'bsr_name' => 'Android', 'bsr_icon' => 'android.png'),
233
+ array('bsr_id' => 11, 'bsr_name' => 'AIR', 'bsr_icon' => 'air.png'),
234
+ array('bsr_id' => 12, 'bsr_name' => 'Fluid', 'bsr_icon' => 'fluid.png'),
235
+ array('bsr_id' => 13, 'bsr_name' => 'Maxthon', 'bsr_icon' => 'maxthon.png'),
236
+ array('bsr_id' => 14, 'bsr_name' => 'unknown', 'bsr_icon' => 'unknown.png')
237
+ );
238
+
239
+ $dayHours = array(
240
+ array('vtm_time_from' => '00:00:00', 'vtm_time_to' => '00:59:59'),
241
+ array('vtm_time_from' => '01:00:00', 'vtm_time_to' => '01:59:59'),
242
+ array('vtm_time_from' => '02:00:00', 'vtm_time_to' => '02:59:59'),
243
+ array('vtm_time_from' => '03:00:00', 'vtm_time_to' => '03:59:59'),
244
+ array('vtm_time_from' => '04:00:00', 'vtm_time_to' => '04:59:59'),
245
+ array('vtm_time_from' => '05:00:00', 'vtm_time_to' => '05:59:59'),
246
+ array('vtm_time_from' => '06:00:00', 'vtm_time_to' => '06:59:59'),
247
+ array('vtm_time_from' => '07:00:00', 'vtm_time_to' => '07:59:59'),
248
+ array('vtm_time_from' => '08:00:00', 'vtm_time_to' => '08:59:59'),
249
+ array('vtm_time_from' => '09:00:00', 'vtm_time_to' => '09:59:59'),
250
+ array('vtm_time_from' => '10:00:00', 'vtm_time_to' => '10:59:59'),
251
+ array('vtm_time_from' => '11:00:00', 'vtm_time_to' => '11:59:59'),
252
+ array('vtm_time_from' => '12:00:00', 'vtm_time_to' => '12:59:59'),
253
+ array('vtm_time_from' => '13:00:00', 'vtm_time_to' => '13:59:59'),
254
+ array('vtm_time_from' => '14:00:00', 'vtm_time_to' => '14:59:59'),
255
+ array('vtm_time_from' => '15:00:00', 'vtm_time_to' => '15:59:59'),
256
+ array('vtm_time_from' => '16:00:00', 'vtm_time_to' => '16:59:59'),
257
+ array('vtm_time_from' => '17:00:00', 'vtm_time_to' => '17:59:59'),
258
+ array('vtm_time_from' => '18:00:00', 'vtm_time_to' => '18:59:59'),
259
+ array('vtm_time_from' => '19:00:00', 'vtm_time_to' => '19:59:59'),
260
+ array('vtm_time_from' => '20:00:00', 'vtm_time_to' => '20:59:59'),
261
+ array('vtm_time_from' => '21:00:00', 'vtm_time_to' => '21:59:59'),
262
+ array('vtm_time_from' => '22:00:00', 'vtm_time_to' => '22:59:59'),
263
+ array('vtm_time_from' => '23:00:00', 'vtm_time_to' => '23:59:59'),
264
+ );
265
+ ?>
functions.php ADDED
@@ -0,0 +1,1514 @@