diff --git a/System/UTSAccuBeta4_2.u b/System/UTSAccuBeta4_2.u
new file mode 100755
index 0000000..bb4ff71
Binary files /dev/null and b/System/UTSAccuBeta4_2.u differ
diff --git a/System/UTStatsBeta4_2.u b/System/UTStatsBeta4_2.u
new file mode 100755
index 0000000..9c0f763
Binary files /dev/null and b/System/UTStatsBeta4_2.u differ
diff --git a/html/GeoIP.dat b/html/GeoIP.dat
new file mode 100755
index 0000000..d898243
Binary files /dev/null and b/html/GeoIP.dat differ
diff --git a/html/admin.php b/html/admin.php
new file mode 100755
index 0000000..74eb5b7
--- /dev/null
+++ b/html/admin.php
@@ -0,0 +1,60 @@
+
+
+ UTStats Administration |
+
';
+
+IF (empty($import_adminkey)) {
+ echo'Error: |
+ No key set in config.php |
+
';
+ include("includes/footer.php");
+ return;
+}
+
+
+IF (!empty($adminkey) and $adminkey != $import_adminkey) {
+ echo'Error: |
+ Keys do not match |
+
';
+ $adminkey = '';
+}
+
+IF (empty($adminkey)) {
+ echo'
+ Enter Admin key: |
+ |
+
';
+ include("includes/footer.php");
+ return;
+}
+
+
+echo'
+
';
+
+$action = str_replace(array('.', '/', '<', ':'), array(), $action);
+$fn = "pages/admin/$action.php";
+if (!file_exists($fn) or !is_file($fn)) die('bla');
+require($fn);
+
+include('includes/footer.php');
+
+?>
diff --git a/html/images/bars/h_bar1.png b/html/images/bars/h_bar1.png
new file mode 100755
index 0000000..c6638fd
Binary files /dev/null and b/html/images/bars/h_bar1.png differ
diff --git a/html/images/bars/h_bar10.png b/html/images/bars/h_bar10.png
new file mode 100755
index 0000000..50f7e14
Binary files /dev/null and b/html/images/bars/h_bar10.png differ
diff --git a/html/images/bars/h_bar11.png b/html/images/bars/h_bar11.png
new file mode 100755
index 0000000..17176f1
Binary files /dev/null and b/html/images/bars/h_bar11.png differ
diff --git a/html/images/bars/h_bar12.png b/html/images/bars/h_bar12.png
new file mode 100755
index 0000000..5a6a8b3
Binary files /dev/null and b/html/images/bars/h_bar12.png differ
diff --git a/html/images/bars/h_bar13.png b/html/images/bars/h_bar13.png
new file mode 100755
index 0000000..c798d7b
Binary files /dev/null and b/html/images/bars/h_bar13.png differ
diff --git a/html/images/bars/h_bar14.png b/html/images/bars/h_bar14.png
new file mode 100755
index 0000000..02ea0a9
Binary files /dev/null and b/html/images/bars/h_bar14.png differ
diff --git a/html/images/bars/h_bar15.png b/html/images/bars/h_bar15.png
new file mode 100755
index 0000000..7330058
Binary files /dev/null and b/html/images/bars/h_bar15.png differ
diff --git a/html/images/bars/h_bar16.png b/html/images/bars/h_bar16.png
new file mode 100755
index 0000000..21c0456
Binary files /dev/null and b/html/images/bars/h_bar16.png differ
diff --git a/html/images/bars/h_bar2.png b/html/images/bars/h_bar2.png
new file mode 100755
index 0000000..7302d90
Binary files /dev/null and b/html/images/bars/h_bar2.png differ
diff --git a/html/images/bars/h_bar3.png b/html/images/bars/h_bar3.png
new file mode 100755
index 0000000..d8ccc70
Binary files /dev/null and b/html/images/bars/h_bar3.png differ
diff --git a/html/images/bars/h_bar4.png b/html/images/bars/h_bar4.png
new file mode 100755
index 0000000..615d588
Binary files /dev/null and b/html/images/bars/h_bar4.png differ
diff --git a/html/images/bars/h_bar5.png b/html/images/bars/h_bar5.png
new file mode 100755
index 0000000..91a8513
Binary files /dev/null and b/html/images/bars/h_bar5.png differ
diff --git a/html/images/bars/h_bar6.png b/html/images/bars/h_bar6.png
new file mode 100755
index 0000000..59266f0
Binary files /dev/null and b/html/images/bars/h_bar6.png differ
diff --git a/html/images/bars/h_bar7.png b/html/images/bars/h_bar7.png
new file mode 100755
index 0000000..9d15c10
Binary files /dev/null and b/html/images/bars/h_bar7.png differ
diff --git a/html/images/bars/h_bar8.png b/html/images/bars/h_bar8.png
new file mode 100755
index 0000000..f7a35d0
Binary files /dev/null and b/html/images/bars/h_bar8.png differ
diff --git a/html/images/bars/h_bar9.png b/html/images/bars/h_bar9.png
new file mode 100755
index 0000000..22cbba2
Binary files /dev/null and b/html/images/bars/h_bar9.png differ
diff --git a/html/images/bars/index.htm b/html/images/bars/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/bars/v_bar1.png b/html/images/bars/v_bar1.png
new file mode 100755
index 0000000..6ae04ff
Binary files /dev/null and b/html/images/bars/v_bar1.png differ
diff --git a/html/images/bars/v_bar10.png b/html/images/bars/v_bar10.png
new file mode 100755
index 0000000..fa91fa8
Binary files /dev/null and b/html/images/bars/v_bar10.png differ
diff --git a/html/images/bars/v_bar11.png b/html/images/bars/v_bar11.png
new file mode 100755
index 0000000..49bd4c0
Binary files /dev/null and b/html/images/bars/v_bar11.png differ
diff --git a/html/images/bars/v_bar12.png b/html/images/bars/v_bar12.png
new file mode 100755
index 0000000..07c6dab
Binary files /dev/null and b/html/images/bars/v_bar12.png differ
diff --git a/html/images/bars/v_bar13.png b/html/images/bars/v_bar13.png
new file mode 100755
index 0000000..ec5950b
Binary files /dev/null and b/html/images/bars/v_bar13.png differ
diff --git a/html/images/bars/v_bar14.png b/html/images/bars/v_bar14.png
new file mode 100755
index 0000000..5f6401d
Binary files /dev/null and b/html/images/bars/v_bar14.png differ
diff --git a/html/images/bars/v_bar15.png b/html/images/bars/v_bar15.png
new file mode 100755
index 0000000..dc65286
Binary files /dev/null and b/html/images/bars/v_bar15.png differ
diff --git a/html/images/bars/v_bar16.png b/html/images/bars/v_bar16.png
new file mode 100755
index 0000000..a8893b9
Binary files /dev/null and b/html/images/bars/v_bar16.png differ
diff --git a/html/images/bars/v_bar2.png b/html/images/bars/v_bar2.png
new file mode 100755
index 0000000..f90b7f6
Binary files /dev/null and b/html/images/bars/v_bar2.png differ
diff --git a/html/images/bars/v_bar3.png b/html/images/bars/v_bar3.png
new file mode 100755
index 0000000..156862c
Binary files /dev/null and b/html/images/bars/v_bar3.png differ
diff --git a/html/images/bars/v_bar4.png b/html/images/bars/v_bar4.png
new file mode 100755
index 0000000..0f6b2b0
Binary files /dev/null and b/html/images/bars/v_bar4.png differ
diff --git a/html/images/bars/v_bar5.png b/html/images/bars/v_bar5.png
new file mode 100755
index 0000000..0771a95
Binary files /dev/null and b/html/images/bars/v_bar5.png differ
diff --git a/html/images/bars/v_bar6.png b/html/images/bars/v_bar6.png
new file mode 100755
index 0000000..d30c8fd
Binary files /dev/null and b/html/images/bars/v_bar6.png differ
diff --git a/html/images/bars/v_bar7.png b/html/images/bars/v_bar7.png
new file mode 100755
index 0000000..9496f8c
Binary files /dev/null and b/html/images/bars/v_bar7.png differ
diff --git a/html/images/bars/v_bar8.png b/html/images/bars/v_bar8.png
new file mode 100755
index 0000000..5a9fa53
Binary files /dev/null and b/html/images/bars/v_bar8.png differ
diff --git a/html/images/bars/v_bar9.png b/html/images/bars/v_bar9.png
new file mode 100755
index 0000000..3559892
Binary files /dev/null and b/html/images/bars/v_bar9.png differ
diff --git a/html/images/blankbar.gif b/html/images/blankbar.gif
new file mode 100755
index 0000000..6ba6306
Binary files /dev/null and b/html/images/blankbar.gif differ
diff --git a/html/images/characters/char1.jpg b/html/images/characters/char1.jpg
new file mode 100755
index 0000000..3e9dc9d
Binary files /dev/null and b/html/images/characters/char1.jpg differ
diff --git a/html/images/characters/char10.jpg b/html/images/characters/char10.jpg
new file mode 100755
index 0000000..d42ffd8
Binary files /dev/null and b/html/images/characters/char10.jpg differ
diff --git a/html/images/characters/char11.jpg b/html/images/characters/char11.jpg
new file mode 100755
index 0000000..2fc3adc
Binary files /dev/null and b/html/images/characters/char11.jpg differ
diff --git a/html/images/characters/char12.jpg b/html/images/characters/char12.jpg
new file mode 100755
index 0000000..0288d05
Binary files /dev/null and b/html/images/characters/char12.jpg differ
diff --git a/html/images/characters/char13.jpg b/html/images/characters/char13.jpg
new file mode 100755
index 0000000..bfffa5d
Binary files /dev/null and b/html/images/characters/char13.jpg differ
diff --git a/html/images/characters/char14.jpg b/html/images/characters/char14.jpg
new file mode 100755
index 0000000..ca92844
Binary files /dev/null and b/html/images/characters/char14.jpg differ
diff --git a/html/images/characters/char2.jpg b/html/images/characters/char2.jpg
new file mode 100755
index 0000000..8e9ef8c
Binary files /dev/null and b/html/images/characters/char2.jpg differ
diff --git a/html/images/characters/char3.jpg b/html/images/characters/char3.jpg
new file mode 100755
index 0000000..eb1c174
Binary files /dev/null and b/html/images/characters/char3.jpg differ
diff --git a/html/images/characters/char4.jpg b/html/images/characters/char4.jpg
new file mode 100755
index 0000000..f7edb22
Binary files /dev/null and b/html/images/characters/char4.jpg differ
diff --git a/html/images/characters/char5.jpg b/html/images/characters/char5.jpg
new file mode 100755
index 0000000..137e981
Binary files /dev/null and b/html/images/characters/char5.jpg differ
diff --git a/html/images/characters/char6.jpg b/html/images/characters/char6.jpg
new file mode 100755
index 0000000..e2a8b31
Binary files /dev/null and b/html/images/characters/char6.jpg differ
diff --git a/html/images/characters/char7.jpg b/html/images/characters/char7.jpg
new file mode 100755
index 0000000..a55d8c0
Binary files /dev/null and b/html/images/characters/char7.jpg differ
diff --git a/html/images/characters/char8.jpg b/html/images/characters/char8.jpg
new file mode 100755
index 0000000..8bb9040
Binary files /dev/null and b/html/images/characters/char8.jpg differ
diff --git a/html/images/characters/char9.jpg b/html/images/characters/char9.jpg
new file mode 100755
index 0000000..581d022
Binary files /dev/null and b/html/images/characters/char9.jpg differ
diff --git a/html/images/characters/index.htm b/html/images/characters/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/del.png b/html/images/del.png
new file mode 100755
index 0000000..6fc4d3b
Binary files /dev/null and b/html/images/del.png differ
diff --git a/html/images/favicon.ico b/html/images/favicon.ico
new file mode 100755
index 0000000..765407a
Binary files /dev/null and b/html/images/favicon.ico differ
diff --git a/html/images/flags/ad.png b/html/images/flags/ad.png
new file mode 100755
index 0000000..8e7d7b8
Binary files /dev/null and b/html/images/flags/ad.png differ
diff --git a/html/images/flags/ae.png b/html/images/flags/ae.png
new file mode 100755
index 0000000..be9d284
Binary files /dev/null and b/html/images/flags/ae.png differ
diff --git a/html/images/flags/af.png b/html/images/flags/af.png
new file mode 100755
index 0000000..385de43
Binary files /dev/null and b/html/images/flags/af.png differ
diff --git a/html/images/flags/ag.png b/html/images/flags/ag.png
new file mode 100755
index 0000000..20440ba
Binary files /dev/null and b/html/images/flags/ag.png differ
diff --git a/html/images/flags/ai.png b/html/images/flags/ai.png
new file mode 100755
index 0000000..c71ec83
Binary files /dev/null and b/html/images/flags/ai.png differ
diff --git a/html/images/flags/al.png b/html/images/flags/al.png
new file mode 100755
index 0000000..2afeb63
Binary files /dev/null and b/html/images/flags/al.png differ
diff --git a/html/images/flags/am.png b/html/images/flags/am.png
new file mode 100755
index 0000000..134ff6b
Binary files /dev/null and b/html/images/flags/am.png differ
diff --git a/html/images/flags/an.png b/html/images/flags/an.png
new file mode 100755
index 0000000..ce2a9c3
Binary files /dev/null and b/html/images/flags/an.png differ
diff --git a/html/images/flags/ao.png b/html/images/flags/ao.png
new file mode 100755
index 0000000..94831db
Binary files /dev/null and b/html/images/flags/ao.png differ
diff --git a/html/images/flags/aq.png b/html/images/flags/aq.png
new file mode 100755
index 0000000..f214498
Binary files /dev/null and b/html/images/flags/aq.png differ
diff --git a/html/images/flags/ar.png b/html/images/flags/ar.png
new file mode 100755
index 0000000..f7d1d93
Binary files /dev/null and b/html/images/flags/ar.png differ
diff --git a/html/images/flags/as.png b/html/images/flags/as.png
new file mode 100755
index 0000000..5e6b4cd
Binary files /dev/null and b/html/images/flags/as.png differ
diff --git a/html/images/flags/at.png b/html/images/flags/at.png
new file mode 100755
index 0000000..d098a34
Binary files /dev/null and b/html/images/flags/at.png differ
diff --git a/html/images/flags/au.png b/html/images/flags/au.png
new file mode 100755
index 0000000..2539471
Binary files /dev/null and b/html/images/flags/au.png differ
diff --git a/html/images/flags/aw.png b/html/images/flags/aw.png
new file mode 100755
index 0000000..d0a9950
Binary files /dev/null and b/html/images/flags/aw.png differ
diff --git a/html/images/flags/az.png b/html/images/flags/az.png
new file mode 100755
index 0000000..38d856d
Binary files /dev/null and b/html/images/flags/az.png differ
diff --git a/html/images/flags/ba.png b/html/images/flags/ba.png
new file mode 100755
index 0000000..a7802bc
Binary files /dev/null and b/html/images/flags/ba.png differ
diff --git a/html/images/flags/bb.png b/html/images/flags/bb.png
new file mode 100755
index 0000000..205ab1f
Binary files /dev/null and b/html/images/flags/bb.png differ
diff --git a/html/images/flags/bd.png b/html/images/flags/bd.png
new file mode 100755
index 0000000..f5d70f7
Binary files /dev/null and b/html/images/flags/bd.png differ
diff --git a/html/images/flags/be.png b/html/images/flags/be.png
new file mode 100755
index 0000000..cfc02c9
Binary files /dev/null and b/html/images/flags/be.png differ
diff --git a/html/images/flags/bf.png b/html/images/flags/bf.png
new file mode 100755
index 0000000..602d349
Binary files /dev/null and b/html/images/flags/bf.png differ
diff --git a/html/images/flags/bg.png b/html/images/flags/bg.png
new file mode 100755
index 0000000..41543f2
Binary files /dev/null and b/html/images/flags/bg.png differ
diff --git a/html/images/flags/bh.png b/html/images/flags/bh.png
new file mode 100755
index 0000000..ba1a0b3
Binary files /dev/null and b/html/images/flags/bh.png differ
diff --git a/html/images/flags/bi.png b/html/images/flags/bi.png
new file mode 100755
index 0000000..4a31c28
Binary files /dev/null and b/html/images/flags/bi.png differ
diff --git a/html/images/flags/bj.png b/html/images/flags/bj.png
new file mode 100755
index 0000000..3f633b2
Binary files /dev/null and b/html/images/flags/bj.png differ
diff --git a/html/images/flags/bm.png b/html/images/flags/bm.png
new file mode 100755
index 0000000..4226252
Binary files /dev/null and b/html/images/flags/bm.png differ
diff --git a/html/images/flags/bn.png b/html/images/flags/bn.png
new file mode 100755
index 0000000..7977797
Binary files /dev/null and b/html/images/flags/bn.png differ
diff --git a/html/images/flags/bo.png b/html/images/flags/bo.png
new file mode 100755
index 0000000..bcd0bed
Binary files /dev/null and b/html/images/flags/bo.png differ
diff --git a/html/images/flags/br.png b/html/images/flags/br.png
new file mode 100755
index 0000000..006a820
Binary files /dev/null and b/html/images/flags/br.png differ
diff --git a/html/images/flags/bs.png b/html/images/flags/bs.png
new file mode 100755
index 0000000..c1f396b
Binary files /dev/null and b/html/images/flags/bs.png differ
diff --git a/html/images/flags/bt.png b/html/images/flags/bt.png
new file mode 100755
index 0000000..dbc798a
Binary files /dev/null and b/html/images/flags/bt.png differ
diff --git a/html/images/flags/bv.png b/html/images/flags/bv.png
new file mode 100755
index 0000000..bac14bc
Binary files /dev/null and b/html/images/flags/bv.png differ
diff --git a/html/images/flags/bw.png b/html/images/flags/bw.png
new file mode 100755
index 0000000..0f578cb
Binary files /dev/null and b/html/images/flags/bw.png differ
diff --git a/html/images/flags/by.png b/html/images/flags/by.png
new file mode 100755
index 0000000..f1e19f3
Binary files /dev/null and b/html/images/flags/by.png differ
diff --git a/html/images/flags/bz.png b/html/images/flags/bz.png
new file mode 100755
index 0000000..b9eb10d
Binary files /dev/null and b/html/images/flags/bz.png differ
diff --git a/html/images/flags/ca.png b/html/images/flags/ca.png
new file mode 100755
index 0000000..0d4d74d
Binary files /dev/null and b/html/images/flags/ca.png differ
diff --git a/html/images/flags/cc.png b/html/images/flags/cc.png
new file mode 100755
index 0000000..82310fa
Binary files /dev/null and b/html/images/flags/cc.png differ
diff --git a/html/images/flags/cd.png b/html/images/flags/cd.png
new file mode 100755
index 0000000..05f14ca
Binary files /dev/null and b/html/images/flags/cd.png differ
diff --git a/html/images/flags/cf.png b/html/images/flags/cf.png
new file mode 100755
index 0000000..c443e16
Binary files /dev/null and b/html/images/flags/cf.png differ
diff --git a/html/images/flags/cg.png b/html/images/flags/cg.png
new file mode 100755
index 0000000..503e7b3
Binary files /dev/null and b/html/images/flags/cg.png differ
diff --git a/html/images/flags/ch.png b/html/images/flags/ch.png
new file mode 100755
index 0000000..cf13acb
Binary files /dev/null and b/html/images/flags/ch.png differ
diff --git a/html/images/flags/ci.png b/html/images/flags/ci.png
new file mode 100755
index 0000000..a25068b
Binary files /dev/null and b/html/images/flags/ci.png differ
diff --git a/html/images/flags/ck.png b/html/images/flags/ck.png
new file mode 100755
index 0000000..e5a036d
Binary files /dev/null and b/html/images/flags/ck.png differ
diff --git a/html/images/flags/cl.png b/html/images/flags/cl.png
new file mode 100755
index 0000000..bcacb1d
Binary files /dev/null and b/html/images/flags/cl.png differ
diff --git a/html/images/flags/cm.png b/html/images/flags/cm.png
new file mode 100755
index 0000000..7ef0fec
Binary files /dev/null and b/html/images/flags/cm.png differ
diff --git a/html/images/flags/cn.png b/html/images/flags/cn.png
new file mode 100755
index 0000000..c691364
Binary files /dev/null and b/html/images/flags/cn.png differ
diff --git a/html/images/flags/co.png b/html/images/flags/co.png
new file mode 100755
index 0000000..b7213de
Binary files /dev/null and b/html/images/flags/co.png differ
diff --git a/html/images/flags/cr.png b/html/images/flags/cr.png
new file mode 100755
index 0000000..f8e7811
Binary files /dev/null and b/html/images/flags/cr.png differ
diff --git a/html/images/flags/cs.png b/html/images/flags/cs.png
new file mode 100755
index 0000000..33ea6c1
Binary files /dev/null and b/html/images/flags/cs.png differ
diff --git a/html/images/flags/cu.png b/html/images/flags/cu.png
new file mode 100755
index 0000000..4725b37
Binary files /dev/null and b/html/images/flags/cu.png differ
diff --git a/html/images/flags/cv.png b/html/images/flags/cv.png
new file mode 100755
index 0000000..5321516
Binary files /dev/null and b/html/images/flags/cv.png differ
diff --git a/html/images/flags/cx.png b/html/images/flags/cx.png
new file mode 100755
index 0000000..e197852
Binary files /dev/null and b/html/images/flags/cx.png differ
diff --git a/html/images/flags/cy.png b/html/images/flags/cy.png
new file mode 100755
index 0000000..94c1333
Binary files /dev/null and b/html/images/flags/cy.png differ
diff --git a/html/images/flags/cz.png b/html/images/flags/cz.png
new file mode 100755
index 0000000..0a3bedf
Binary files /dev/null and b/html/images/flags/cz.png differ
diff --git a/html/images/flags/de.png b/html/images/flags/de.png
new file mode 100755
index 0000000..6971ba3
Binary files /dev/null and b/html/images/flags/de.png differ
diff --git a/html/images/flags/dj.png b/html/images/flags/dj.png
new file mode 100755
index 0000000..a9b2adf
Binary files /dev/null and b/html/images/flags/dj.png differ
diff --git a/html/images/flags/dk.png b/html/images/flags/dk.png
new file mode 100755
index 0000000..8f34fe5
Binary files /dev/null and b/html/images/flags/dk.png differ
diff --git a/html/images/flags/dm.png b/html/images/flags/dm.png
new file mode 100755
index 0000000..31fa4cd
Binary files /dev/null and b/html/images/flags/dm.png differ
diff --git a/html/images/flags/do.png b/html/images/flags/do.png
new file mode 100755
index 0000000..818b2ce
Binary files /dev/null and b/html/images/flags/do.png differ
diff --git a/html/images/flags/dz.png b/html/images/flags/dz.png
new file mode 100755
index 0000000..0b1b336
Binary files /dev/null and b/html/images/flags/dz.png differ
diff --git a/html/images/flags/ec.png b/html/images/flags/ec.png
new file mode 100755
index 0000000..a9a1e8b
Binary files /dev/null and b/html/images/flags/ec.png differ
diff --git a/html/images/flags/ee.png b/html/images/flags/ee.png
new file mode 100755
index 0000000..a8fc075
Binary files /dev/null and b/html/images/flags/ee.png differ
diff --git a/html/images/flags/eg.png b/html/images/flags/eg.png
new file mode 100755
index 0000000..02b02e5
Binary files /dev/null and b/html/images/flags/eg.png differ
diff --git a/html/images/flags/eh.png b/html/images/flags/eh.png
new file mode 100755
index 0000000..9f6cb1c
Binary files /dev/null and b/html/images/flags/eh.png differ
diff --git a/html/images/flags/er.png b/html/images/flags/er.png
new file mode 100755
index 0000000..6811a68
Binary files /dev/null and b/html/images/flags/er.png differ
diff --git a/html/images/flags/es.png b/html/images/flags/es.png
new file mode 100755
index 0000000..bba29f5
Binary files /dev/null and b/html/images/flags/es.png differ
diff --git a/html/images/flags/et.png b/html/images/flags/et.png
new file mode 100755
index 0000000..d7904c9
Binary files /dev/null and b/html/images/flags/et.png differ
diff --git a/html/images/flags/fi.png b/html/images/flags/fi.png
new file mode 100755
index 0000000..9144a0f
Binary files /dev/null and b/html/images/flags/fi.png differ
diff --git a/html/images/flags/fj.png b/html/images/flags/fj.png
new file mode 100755
index 0000000..fbe2eb6
Binary files /dev/null and b/html/images/flags/fj.png differ
diff --git a/html/images/flags/fk.png b/html/images/flags/fk.png
new file mode 100755
index 0000000..2b721f9
Binary files /dev/null and b/html/images/flags/fk.png differ
diff --git a/html/images/flags/fm.png b/html/images/flags/fm.png
new file mode 100755
index 0000000..1a91064
Binary files /dev/null and b/html/images/flags/fm.png differ
diff --git a/html/images/flags/fo.png b/html/images/flags/fo.png
new file mode 100755
index 0000000..5e17381
Binary files /dev/null and b/html/images/flags/fo.png differ
diff --git a/html/images/flags/fr.png b/html/images/flags/fr.png
new file mode 100755
index 0000000..b0c177f
Binary files /dev/null and b/html/images/flags/fr.png differ
diff --git a/html/images/flags/ga.png b/html/images/flags/ga.png
new file mode 100755
index 0000000..744515d
Binary files /dev/null and b/html/images/flags/ga.png differ
diff --git a/html/images/flags/gb.png b/html/images/flags/gb.png
new file mode 100755
index 0000000..ce4c90a
Binary files /dev/null and b/html/images/flags/gb.png differ
diff --git a/html/images/flags/gd.png b/html/images/flags/gd.png
new file mode 100755
index 0000000..70467ac
Binary files /dev/null and b/html/images/flags/gd.png differ
diff --git a/html/images/flags/ge.png b/html/images/flags/ge.png
new file mode 100755
index 0000000..3768ccd
Binary files /dev/null and b/html/images/flags/ge.png differ
diff --git a/html/images/flags/gf.png b/html/images/flags/gf.png
new file mode 100755
index 0000000..d4616ed
Binary files /dev/null and b/html/images/flags/gf.png differ
diff --git a/html/images/flags/gh.png b/html/images/flags/gh.png
new file mode 100755
index 0000000..3f3b980
Binary files /dev/null and b/html/images/flags/gh.png differ
diff --git a/html/images/flags/gi.png b/html/images/flags/gi.png
new file mode 100755
index 0000000..482c717
Binary files /dev/null and b/html/images/flags/gi.png differ
diff --git a/html/images/flags/gl.png b/html/images/flags/gl.png
new file mode 100755
index 0000000..39fb25e
Binary files /dev/null and b/html/images/flags/gl.png differ
diff --git a/html/images/flags/gm.png b/html/images/flags/gm.png
new file mode 100755
index 0000000..95cce12
Binary files /dev/null and b/html/images/flags/gm.png differ
diff --git a/html/images/flags/gn.png b/html/images/flags/gn.png
new file mode 100755
index 0000000..5f8bba1
Binary files /dev/null and b/html/images/flags/gn.png differ
diff --git a/html/images/flags/gp.png b/html/images/flags/gp.png
new file mode 100755
index 0000000..5525d33
Binary files /dev/null and b/html/images/flags/gp.png differ
diff --git a/html/images/flags/gq.png b/html/images/flags/gq.png
new file mode 100755
index 0000000..2cbd4a8
Binary files /dev/null and b/html/images/flags/gq.png differ
diff --git a/html/images/flags/gr.png b/html/images/flags/gr.png
new file mode 100755
index 0000000..45b1589
Binary files /dev/null and b/html/images/flags/gr.png differ
diff --git a/html/images/flags/gs.png b/html/images/flags/gs.png
new file mode 100755
index 0000000..7706171
Binary files /dev/null and b/html/images/flags/gs.png differ
diff --git a/html/images/flags/gt.png b/html/images/flags/gt.png
new file mode 100755
index 0000000..6ecdbff
Binary files /dev/null and b/html/images/flags/gt.png differ
diff --git a/html/images/flags/gu.png b/html/images/flags/gu.png
new file mode 100755
index 0000000..bce752f
Binary files /dev/null and b/html/images/flags/gu.png differ
diff --git a/html/images/flags/gw.png b/html/images/flags/gw.png
new file mode 100755
index 0000000..5e70972
Binary files /dev/null and b/html/images/flags/gw.png differ
diff --git a/html/images/flags/gy.png b/html/images/flags/gy.png
new file mode 100755
index 0000000..2cb64d2
Binary files /dev/null and b/html/images/flags/gy.png differ
diff --git a/html/images/flags/hk.png b/html/images/flags/hk.png
new file mode 100755
index 0000000..5fb3aff
Binary files /dev/null and b/html/images/flags/hk.png differ
diff --git a/html/images/flags/hm.png b/html/images/flags/hm.png
new file mode 100755
index 0000000..214924d
Binary files /dev/null and b/html/images/flags/hm.png differ
diff --git a/html/images/flags/hn.png b/html/images/flags/hn.png
new file mode 100755
index 0000000..de08a36
Binary files /dev/null and b/html/images/flags/hn.png differ
diff --git a/html/images/flags/hr.png b/html/images/flags/hr.png
new file mode 100755
index 0000000..3d8d894
Binary files /dev/null and b/html/images/flags/hr.png differ
diff --git a/html/images/flags/ht.png b/html/images/flags/ht.png
new file mode 100755
index 0000000..dc6d443
Binary files /dev/null and b/html/images/flags/ht.png differ
diff --git a/html/images/flags/hu.png b/html/images/flags/hu.png
new file mode 100755
index 0000000..d9eb523
Binary files /dev/null and b/html/images/flags/hu.png differ
diff --git a/html/images/flags/id.png b/html/images/flags/id.png
new file mode 100755
index 0000000..f62aaaa
Binary files /dev/null and b/html/images/flags/id.png differ
diff --git a/html/images/flags/ie.png b/html/images/flags/ie.png
new file mode 100755
index 0000000..c7be694
Binary files /dev/null and b/html/images/flags/ie.png differ
diff --git a/html/images/flags/il.png b/html/images/flags/il.png
new file mode 100755
index 0000000..4f8743e
Binary files /dev/null and b/html/images/flags/il.png differ
diff --git a/html/images/flags/in.png b/html/images/flags/in.png
new file mode 100755
index 0000000..f1d201f
Binary files /dev/null and b/html/images/flags/in.png differ
diff --git a/html/images/flags/index.htm b/html/images/flags/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/flags/io.png b/html/images/flags/io.png
new file mode 100755
index 0000000..9ece8ab
Binary files /dev/null and b/html/images/flags/io.png differ
diff --git a/html/images/flags/iq.png b/html/images/flags/iq.png
new file mode 100755
index 0000000..80561ac
Binary files /dev/null and b/html/images/flags/iq.png differ
diff --git a/html/images/flags/ir.png b/html/images/flags/ir.png
new file mode 100755
index 0000000..395c6e7
Binary files /dev/null and b/html/images/flags/ir.png differ
diff --git a/html/images/flags/is.png b/html/images/flags/is.png
new file mode 100755
index 0000000..bf733b5
Binary files /dev/null and b/html/images/flags/is.png differ
diff --git a/html/images/flags/it.png b/html/images/flags/it.png
new file mode 100755
index 0000000..480f387
Binary files /dev/null and b/html/images/flags/it.png differ
diff --git a/html/images/flags/jm.png b/html/images/flags/jm.png
new file mode 100755
index 0000000..1524b9e
Binary files /dev/null and b/html/images/flags/jm.png differ
diff --git a/html/images/flags/jo.png b/html/images/flags/jo.png
new file mode 100755
index 0000000..4d25698
Binary files /dev/null and b/html/images/flags/jo.png differ
diff --git a/html/images/flags/jp.png b/html/images/flags/jp.png
new file mode 100755
index 0000000..5aacb34
Binary files /dev/null and b/html/images/flags/jp.png differ
diff --git a/html/images/flags/ke.png b/html/images/flags/ke.png
new file mode 100755
index 0000000..59c790a
Binary files /dev/null and b/html/images/flags/ke.png differ
diff --git a/html/images/flags/kg.png b/html/images/flags/kg.png
new file mode 100755
index 0000000..9a02593
Binary files /dev/null and b/html/images/flags/kg.png differ
diff --git a/html/images/flags/kh.png b/html/images/flags/kh.png
new file mode 100755
index 0000000..8fad7cb
Binary files /dev/null and b/html/images/flags/kh.png differ
diff --git a/html/images/flags/ki.png b/html/images/flags/ki.png
new file mode 100755
index 0000000..71c515a
Binary files /dev/null and b/html/images/flags/ki.png differ
diff --git a/html/images/flags/km.png b/html/images/flags/km.png
new file mode 100755
index 0000000..f0aab2e
Binary files /dev/null and b/html/images/flags/km.png differ
diff --git a/html/images/flags/kn.png b/html/images/flags/kn.png
new file mode 100755
index 0000000..887c87c
Binary files /dev/null and b/html/images/flags/kn.png differ
diff --git a/html/images/flags/kp.png b/html/images/flags/kp.png
new file mode 100755
index 0000000..139afed
Binary files /dev/null and b/html/images/flags/kp.png differ
diff --git a/html/images/flags/kr.png b/html/images/flags/kr.png
new file mode 100755
index 0000000..425c9a9
Binary files /dev/null and b/html/images/flags/kr.png differ
diff --git a/html/images/flags/kw.png b/html/images/flags/kw.png
new file mode 100755
index 0000000..a4c27ff
Binary files /dev/null and b/html/images/flags/kw.png differ
diff --git a/html/images/flags/ky.png b/html/images/flags/ky.png
new file mode 100755
index 0000000..b9e233c
Binary files /dev/null and b/html/images/flags/ky.png differ
diff --git a/html/images/flags/kz.png b/html/images/flags/kz.png
new file mode 100755
index 0000000..215c45c
Binary files /dev/null and b/html/images/flags/kz.png differ
diff --git a/html/images/flags/la.png b/html/images/flags/la.png
new file mode 100755
index 0000000..fd70e04
Binary files /dev/null and b/html/images/flags/la.png differ
diff --git a/html/images/flags/lb.png b/html/images/flags/lb.png
new file mode 100755
index 0000000..cbc27a2
Binary files /dev/null and b/html/images/flags/lb.png differ
diff --git a/html/images/flags/lc.png b/html/images/flags/lc.png
new file mode 100755
index 0000000..b47370b
Binary files /dev/null and b/html/images/flags/lc.png differ
diff --git a/html/images/flags/li.png b/html/images/flags/li.png
new file mode 100755
index 0000000..156079c
Binary files /dev/null and b/html/images/flags/li.png differ
diff --git a/html/images/flags/lk.png b/html/images/flags/lk.png
new file mode 100755
index 0000000..91c7a51
Binary files /dev/null and b/html/images/flags/lk.png differ
diff --git a/html/images/flags/lr.png b/html/images/flags/lr.png
new file mode 100755
index 0000000..a779984
Binary files /dev/null and b/html/images/flags/lr.png differ
diff --git a/html/images/flags/ls.png b/html/images/flags/ls.png
new file mode 100755
index 0000000..377d7da
Binary files /dev/null and b/html/images/flags/ls.png differ
diff --git a/html/images/flags/lt.png b/html/images/flags/lt.png
new file mode 100755
index 0000000..8cf8561
Binary files /dev/null and b/html/images/flags/lt.png differ
diff --git a/html/images/flags/lu.png b/html/images/flags/lu.png
new file mode 100755
index 0000000..0925952
Binary files /dev/null and b/html/images/flags/lu.png differ
diff --git a/html/images/flags/lv.png b/html/images/flags/lv.png
new file mode 100755
index 0000000..72511ac
Binary files /dev/null and b/html/images/flags/lv.png differ
diff --git a/html/images/flags/ly.png b/html/images/flags/ly.png
new file mode 100755
index 0000000..c3ff32e
Binary files /dev/null and b/html/images/flags/ly.png differ
diff --git a/html/images/flags/ma.png b/html/images/flags/ma.png
new file mode 100755
index 0000000..70f0912
Binary files /dev/null and b/html/images/flags/ma.png differ
diff --git a/html/images/flags/mc.png b/html/images/flags/mc.png
new file mode 100755
index 0000000..e28ffd6
Binary files /dev/null and b/html/images/flags/mc.png differ
diff --git a/html/images/flags/md.png b/html/images/flags/md.png
new file mode 100755
index 0000000..a48b555
Binary files /dev/null and b/html/images/flags/md.png differ
diff --git a/html/images/flags/mg.png b/html/images/flags/mg.png
new file mode 100755
index 0000000..7d59a91
Binary files /dev/null and b/html/images/flags/mg.png differ
diff --git a/html/images/flags/mh.png b/html/images/flags/mh.png
new file mode 100755
index 0000000..7463976
Binary files /dev/null and b/html/images/flags/mh.png differ
diff --git a/html/images/flags/mk.png b/html/images/flags/mk.png
new file mode 100755
index 0000000..2e72beb
Binary files /dev/null and b/html/images/flags/mk.png differ
diff --git a/html/images/flags/ml.png b/html/images/flags/ml.png
new file mode 100755
index 0000000..36a632e
Binary files /dev/null and b/html/images/flags/ml.png differ
diff --git a/html/images/flags/mm.png b/html/images/flags/mm.png
new file mode 100755
index 0000000..86ecd2c
Binary files /dev/null and b/html/images/flags/mm.png differ
diff --git a/html/images/flags/mn.png b/html/images/flags/mn.png
new file mode 100755
index 0000000..22aa6cb
Binary files /dev/null and b/html/images/flags/mn.png differ
diff --git a/html/images/flags/mo.png b/html/images/flags/mo.png
new file mode 100755
index 0000000..f22e255
Binary files /dev/null and b/html/images/flags/mo.png differ
diff --git a/html/images/flags/mp.png b/html/images/flags/mp.png
new file mode 100755
index 0000000..9cdccae
Binary files /dev/null and b/html/images/flags/mp.png differ
diff --git a/html/images/flags/mq.png b/html/images/flags/mq.png
new file mode 100755
index 0000000..d4616ed
Binary files /dev/null and b/html/images/flags/mq.png differ
diff --git a/html/images/flags/mr.png b/html/images/flags/mr.png
new file mode 100755
index 0000000..1460ab7
Binary files /dev/null and b/html/images/flags/mr.png differ
diff --git a/html/images/flags/ms.png b/html/images/flags/ms.png
new file mode 100755
index 0000000..31e6ef0
Binary files /dev/null and b/html/images/flags/ms.png differ
diff --git a/html/images/flags/mt.png b/html/images/flags/mt.png
new file mode 100755
index 0000000..bb243c5
Binary files /dev/null and b/html/images/flags/mt.png differ
diff --git a/html/images/flags/mu.png b/html/images/flags/mu.png
new file mode 100755
index 0000000..d8b22cc
Binary files /dev/null and b/html/images/flags/mu.png differ
diff --git a/html/images/flags/mv.png b/html/images/flags/mv.png
new file mode 100755
index 0000000..0024b86
Binary files /dev/null and b/html/images/flags/mv.png differ
diff --git a/html/images/flags/mw.png b/html/images/flags/mw.png
new file mode 100755
index 0000000..975fb0a
Binary files /dev/null and b/html/images/flags/mw.png differ
diff --git a/html/images/flags/mx.png b/html/images/flags/mx.png
new file mode 100755
index 0000000..98be90b
Binary files /dev/null and b/html/images/flags/mx.png differ
diff --git a/html/images/flags/my.png b/html/images/flags/my.png
new file mode 100755
index 0000000..1865930
Binary files /dev/null and b/html/images/flags/my.png differ
diff --git a/html/images/flags/mz.png b/html/images/flags/mz.png
new file mode 100755
index 0000000..87672b7
Binary files /dev/null and b/html/images/flags/mz.png differ
diff --git a/html/images/flags/na.png b/html/images/flags/na.png
new file mode 100755
index 0000000..040daf2
Binary files /dev/null and b/html/images/flags/na.png differ
diff --git a/html/images/flags/nc.png b/html/images/flags/nc.png
new file mode 100755
index 0000000..bf6f02e
Binary files /dev/null and b/html/images/flags/nc.png differ
diff --git a/html/images/flags/ne.png b/html/images/flags/ne.png
new file mode 100755
index 0000000..8e6eb32
Binary files /dev/null and b/html/images/flags/ne.png differ
diff --git a/html/images/flags/nf.png b/html/images/flags/nf.png
new file mode 100755
index 0000000..9060d53
Binary files /dev/null and b/html/images/flags/nf.png differ
diff --git a/html/images/flags/ng.png b/html/images/flags/ng.png
new file mode 100755
index 0000000..46dceb2
Binary files /dev/null and b/html/images/flags/ng.png differ
diff --git a/html/images/flags/ni.png b/html/images/flags/ni.png
new file mode 100755
index 0000000..4527065
Binary files /dev/null and b/html/images/flags/ni.png differ
diff --git a/html/images/flags/nl.png b/html/images/flags/nl.png
new file mode 100755
index 0000000..c078391
Binary files /dev/null and b/html/images/flags/nl.png differ
diff --git a/html/images/flags/no.png b/html/images/flags/no.png
new file mode 100755
index 0000000..d0073fd
Binary files /dev/null and b/html/images/flags/no.png differ
diff --git a/html/images/flags/np.png b/html/images/flags/np.png
new file mode 100755
index 0000000..543c902
Binary files /dev/null and b/html/images/flags/np.png differ
diff --git a/html/images/flags/nr.png b/html/images/flags/nr.png
new file mode 100755
index 0000000..05ba8e1
Binary files /dev/null and b/html/images/flags/nr.png differ
diff --git a/html/images/flags/nu.png b/html/images/flags/nu.png
new file mode 100755
index 0000000..eafce7b
Binary files /dev/null and b/html/images/flags/nu.png differ
diff --git a/html/images/flags/nz.png b/html/images/flags/nz.png
new file mode 100755
index 0000000..af703c0
Binary files /dev/null and b/html/images/flags/nz.png differ
diff --git a/html/images/flags/om.png b/html/images/flags/om.png
new file mode 100755
index 0000000..e1c9598
Binary files /dev/null and b/html/images/flags/om.png differ
diff --git a/html/images/flags/pa.png b/html/images/flags/pa.png
new file mode 100755
index 0000000..aca9541
Binary files /dev/null and b/html/images/flags/pa.png differ
diff --git a/html/images/flags/pe.png b/html/images/flags/pe.png
new file mode 100755
index 0000000..a801662
Binary files /dev/null and b/html/images/flags/pe.png differ
diff --git a/html/images/flags/pf.png b/html/images/flags/pf.png
new file mode 100755
index 0000000..cf4d029
Binary files /dev/null and b/html/images/flags/pf.png differ
diff --git a/html/images/flags/pg.png b/html/images/flags/pg.png
new file mode 100755
index 0000000..d704154
Binary files /dev/null and b/html/images/flags/pg.png differ
diff --git a/html/images/flags/ph.png b/html/images/flags/ph.png
new file mode 100755
index 0000000..55d850e
Binary files /dev/null and b/html/images/flags/ph.png differ
diff --git a/html/images/flags/pk.png b/html/images/flags/pk.png
new file mode 100755
index 0000000..4c8ee9f
Binary files /dev/null and b/html/images/flags/pk.png differ
diff --git a/html/images/flags/pl.png b/html/images/flags/pl.png
new file mode 100755
index 0000000..eb722dc
Binary files /dev/null and b/html/images/flags/pl.png differ
diff --git a/html/images/flags/pm.png b/html/images/flags/pm.png
new file mode 100755
index 0000000..681bcd8
Binary files /dev/null and b/html/images/flags/pm.png differ
diff --git a/html/images/flags/pn.png b/html/images/flags/pn.png
new file mode 100755
index 0000000..f5743c5
Binary files /dev/null and b/html/images/flags/pn.png differ
diff --git a/html/images/flags/pr.png b/html/images/flags/pr.png
new file mode 100755
index 0000000..0536dcb
Binary files /dev/null and b/html/images/flags/pr.png differ
diff --git a/html/images/flags/ps.png b/html/images/flags/ps.png
new file mode 100755
index 0000000..94c6512
Binary files /dev/null and b/html/images/flags/ps.png differ
diff --git a/html/images/flags/pt.png b/html/images/flags/pt.png
new file mode 100755
index 0000000..6cd086e
Binary files /dev/null and b/html/images/flags/pt.png differ
diff --git a/html/images/flags/pw.png b/html/images/flags/pw.png
new file mode 100755
index 0000000..6ab9422
Binary files /dev/null and b/html/images/flags/pw.png differ
diff --git a/html/images/flags/py.png b/html/images/flags/py.png
new file mode 100755
index 0000000..2eab2bf
Binary files /dev/null and b/html/images/flags/py.png differ
diff --git a/html/images/flags/qa.png b/html/images/flags/qa.png
new file mode 100755
index 0000000..0b8c897
Binary files /dev/null and b/html/images/flags/qa.png differ
diff --git a/html/images/flags/re.png b/html/images/flags/re.png
new file mode 100755
index 0000000..d4616ed
Binary files /dev/null and b/html/images/flags/re.png differ
diff --git a/html/images/flags/ro.png b/html/images/flags/ro.png
new file mode 100755
index 0000000..ce0a889
Binary files /dev/null and b/html/images/flags/ro.png differ
diff --git a/html/images/flags/ru.png b/html/images/flags/ru.png
new file mode 100755
index 0000000..fb4f54a
Binary files /dev/null and b/html/images/flags/ru.png differ
diff --git a/html/images/flags/rw.png b/html/images/flags/rw.png
new file mode 100755
index 0000000..774d035
Binary files /dev/null and b/html/images/flags/rw.png differ
diff --git a/html/images/flags/sa.png b/html/images/flags/sa.png
new file mode 100755
index 0000000..80b0a05
Binary files /dev/null and b/html/images/flags/sa.png differ
diff --git a/html/images/flags/sb.png b/html/images/flags/sb.png
new file mode 100755
index 0000000..7b75f5c
Binary files /dev/null and b/html/images/flags/sb.png differ
diff --git a/html/images/flags/sc.png b/html/images/flags/sc.png
new file mode 100755
index 0000000..804ff98
Binary files /dev/null and b/html/images/flags/sc.png differ
diff --git a/html/images/flags/sd.png b/html/images/flags/sd.png
new file mode 100755
index 0000000..75229d5
Binary files /dev/null and b/html/images/flags/sd.png differ
diff --git a/html/images/flags/se.png b/html/images/flags/se.png
new file mode 100755
index 0000000..e13cc6f
Binary files /dev/null and b/html/images/flags/se.png differ
diff --git a/html/images/flags/sg.png b/html/images/flags/sg.png
new file mode 100755
index 0000000..337b1be
Binary files /dev/null and b/html/images/flags/sg.png differ
diff --git a/html/images/flags/sh.png b/html/images/flags/sh.png
new file mode 100755
index 0000000..c696327
Binary files /dev/null and b/html/images/flags/sh.png differ
diff --git a/html/images/flags/si.png b/html/images/flags/si.png
new file mode 100755
index 0000000..907b389
Binary files /dev/null and b/html/images/flags/si.png differ
diff --git a/html/images/flags/sj.png b/html/images/flags/sj.png
new file mode 100755
index 0000000..bac14bc
Binary files /dev/null and b/html/images/flags/sj.png differ
diff --git a/html/images/flags/sk.png b/html/images/flags/sk.png
new file mode 100755
index 0000000..6ab7df8
Binary files /dev/null and b/html/images/flags/sk.png differ
diff --git a/html/images/flags/sl.png b/html/images/flags/sl.png
new file mode 100755
index 0000000..4c543da
Binary files /dev/null and b/html/images/flags/sl.png differ
diff --git a/html/images/flags/sm.png b/html/images/flags/sm.png
new file mode 100755
index 0000000..fe0cace
Binary files /dev/null and b/html/images/flags/sm.png differ
diff --git a/html/images/flags/sn.png b/html/images/flags/sn.png
new file mode 100755
index 0000000..e3edef7
Binary files /dev/null and b/html/images/flags/sn.png differ
diff --git a/html/images/flags/so.png b/html/images/flags/so.png
new file mode 100755
index 0000000..2c34d60
Binary files /dev/null and b/html/images/flags/so.png differ
diff --git a/html/images/flags/sr.png b/html/images/flags/sr.png
new file mode 100755
index 0000000..8ccf0c1
Binary files /dev/null and b/html/images/flags/sr.png differ
diff --git a/html/images/flags/st.png b/html/images/flags/st.png
new file mode 100755
index 0000000..c83b44c
Binary files /dev/null and b/html/images/flags/st.png differ
diff --git a/html/images/flags/sv.png b/html/images/flags/sv.png
new file mode 100755
index 0000000..f6e2c2f
Binary files /dev/null and b/html/images/flags/sv.png differ
diff --git a/html/images/flags/sy.png b/html/images/flags/sy.png
new file mode 100755
index 0000000..9f2dc3e
Binary files /dev/null and b/html/images/flags/sy.png differ
diff --git a/html/images/flags/sz.png b/html/images/flags/sz.png
new file mode 100755
index 0000000..c880f71
Binary files /dev/null and b/html/images/flags/sz.png differ
diff --git a/html/images/flags/tc.png b/html/images/flags/tc.png
new file mode 100755
index 0000000..a4d1069
Binary files /dev/null and b/html/images/flags/tc.png differ
diff --git a/html/images/flags/td.png b/html/images/flags/td.png
new file mode 100755
index 0000000..cf8e057
Binary files /dev/null and b/html/images/flags/td.png differ
diff --git a/html/images/flags/tf.png b/html/images/flags/tf.png
new file mode 100755
index 0000000..88d2158
Binary files /dev/null and b/html/images/flags/tf.png differ
diff --git a/html/images/flags/tg.png b/html/images/flags/tg.png
new file mode 100755
index 0000000..c360da6
Binary files /dev/null and b/html/images/flags/tg.png differ
diff --git a/html/images/flags/th.png b/html/images/flags/th.png
new file mode 100755
index 0000000..eed829d
Binary files /dev/null and b/html/images/flags/th.png differ
diff --git a/html/images/flags/ti.png b/html/images/flags/ti.png
new file mode 100755
index 0000000..6eacaf4
Binary files /dev/null and b/html/images/flags/ti.png differ
diff --git a/html/images/flags/tj.png b/html/images/flags/tj.png
new file mode 100755
index 0000000..efad9a5
Binary files /dev/null and b/html/images/flags/tj.png differ
diff --git a/html/images/flags/tk.png b/html/images/flags/tk.png
new file mode 100755
index 0000000..36a08b1
Binary files /dev/null and b/html/images/flags/tk.png differ
diff --git a/html/images/flags/tl.png b/html/images/flags/tl.png
new file mode 100755
index 0000000..b5df531
Binary files /dev/null and b/html/images/flags/tl.png differ
diff --git a/html/images/flags/tm.png b/html/images/flags/tm.png
new file mode 100755
index 0000000..88d2158
Binary files /dev/null and b/html/images/flags/tm.png differ
diff --git a/html/images/flags/tn.png b/html/images/flags/tn.png
new file mode 100755
index 0000000..3475a44
Binary files /dev/null and b/html/images/flags/tn.png differ
diff --git a/html/images/flags/to.png b/html/images/flags/to.png
new file mode 100755
index 0000000..7be6de8
Binary files /dev/null and b/html/images/flags/to.png differ
diff --git a/html/images/flags/tp.png b/html/images/flags/tp.png
new file mode 100755
index 0000000..c5884b6
Binary files /dev/null and b/html/images/flags/tp.png differ
diff --git a/html/images/flags/tr.png b/html/images/flags/tr.png
new file mode 100755
index 0000000..d9dfbb8
Binary files /dev/null and b/html/images/flags/tr.png differ
diff --git a/html/images/flags/tt.png b/html/images/flags/tt.png
new file mode 100755
index 0000000..5b37c6f
Binary files /dev/null and b/html/images/flags/tt.png differ
diff --git a/html/images/flags/tv.png b/html/images/flags/tv.png
new file mode 100755
index 0000000..23614ac
Binary files /dev/null and b/html/images/flags/tv.png differ
diff --git a/html/images/flags/tw.png b/html/images/flags/tw.png
new file mode 100755
index 0000000..9787569
Binary files /dev/null and b/html/images/flags/tw.png differ
diff --git a/html/images/flags/tz.png b/html/images/flags/tz.png
new file mode 100755
index 0000000..3d39b1b
Binary files /dev/null and b/html/images/flags/tz.png differ
diff --git a/html/images/flags/ua.png b/html/images/flags/ua.png
new file mode 100755
index 0000000..1fbe64c
Binary files /dev/null and b/html/images/flags/ua.png differ
diff --git a/html/images/flags/ug.png b/html/images/flags/ug.png
new file mode 100755
index 0000000..3a7f3a4
Binary files /dev/null and b/html/images/flags/ug.png differ
diff --git a/html/images/flags/uk.png b/html/images/flags/uk.png
new file mode 100755
index 0000000..ce4c90a
Binary files /dev/null and b/html/images/flags/uk.png differ
diff --git a/html/images/flags/um.png b/html/images/flags/um.png
new file mode 100755
index 0000000..a21bdc5
Binary files /dev/null and b/html/images/flags/um.png differ
diff --git a/html/images/flags/us.png b/html/images/flags/us.png
new file mode 100755
index 0000000..d2eacb2
Binary files /dev/null and b/html/images/flags/us.png differ
diff --git a/html/images/flags/uy.png b/html/images/flags/uy.png
new file mode 100755
index 0000000..e279248
Binary files /dev/null and b/html/images/flags/uy.png differ
diff --git a/html/images/flags/uz.png b/html/images/flags/uz.png
new file mode 100755
index 0000000..456d359
Binary files /dev/null and b/html/images/flags/uz.png differ
diff --git a/html/images/flags/va.png b/html/images/flags/va.png
new file mode 100755
index 0000000..c3c20ba
Binary files /dev/null and b/html/images/flags/va.png differ
diff --git a/html/images/flags/vc.png b/html/images/flags/vc.png
new file mode 100755
index 0000000..6824712
Binary files /dev/null and b/html/images/flags/vc.png differ
diff --git a/html/images/flags/ve.png b/html/images/flags/ve.png
new file mode 100755
index 0000000..ef96a14
Binary files /dev/null and b/html/images/flags/ve.png differ
diff --git a/html/images/flags/vg.png b/html/images/flags/vg.png
new file mode 100755
index 0000000..66c42a1
Binary files /dev/null and b/html/images/flags/vg.png differ
diff --git a/html/images/flags/vi.png b/html/images/flags/vi.png
new file mode 100755
index 0000000..8ff456e
Binary files /dev/null and b/html/images/flags/vi.png differ
diff --git a/html/images/flags/vn.png b/html/images/flags/vn.png
new file mode 100755
index 0000000..36e2155
Binary files /dev/null and b/html/images/flags/vn.png differ
diff --git a/html/images/flags/vu.png b/html/images/flags/vu.png
new file mode 100755
index 0000000..4962e7b
Binary files /dev/null and b/html/images/flags/vu.png differ
diff --git a/html/images/flags/wf.png b/html/images/flags/wf.png
new file mode 100755
index 0000000..d4616ed
Binary files /dev/null and b/html/images/flags/wf.png differ
diff --git a/html/images/flags/ws.png b/html/images/flags/ws.png
new file mode 100755
index 0000000..dd4e683
Binary files /dev/null and b/html/images/flags/ws.png differ
diff --git a/html/images/flags/xx.png b/html/images/flags/xx.png
new file mode 100755
index 0000000..cd2dafb
Binary files /dev/null and b/html/images/flags/xx.png differ
diff --git a/html/images/flags/ye.png b/html/images/flags/ye.png
new file mode 100755
index 0000000..87463a8
Binary files /dev/null and b/html/images/flags/ye.png differ
diff --git a/html/images/flags/yt.png b/html/images/flags/yt.png
new file mode 100755
index 0000000..d4616ed
Binary files /dev/null and b/html/images/flags/yt.png differ
diff --git a/html/images/flags/yu.png b/html/images/flags/yu.png
new file mode 100755
index 0000000..33ea6c1
Binary files /dev/null and b/html/images/flags/yu.png differ
diff --git a/html/images/flags/za.png b/html/images/flags/za.png
new file mode 100755
index 0000000..e10ff5a
Binary files /dev/null and b/html/images/flags/za.png differ
diff --git a/html/images/flags/zm.png b/html/images/flags/zm.png
new file mode 100755
index 0000000..4fe4cbe
Binary files /dev/null and b/html/images/flags/zm.png differ
diff --git a/html/images/flags/zw.png b/html/images/flags/zw.png
new file mode 100755
index 0000000..413ae62
Binary files /dev/null and b/html/images/flags/zw.png differ
diff --git a/html/images/fonts/arbocrest.ttf b/html/images/fonts/arbocrest.ttf
new file mode 100755
index 0000000..934f65e
Binary files /dev/null and b/html/images/fonts/arbocrest.ttf differ
diff --git a/html/images/fonts/arbocrest.txt b/html/images/fonts/arbocrest.txt
new file mode 100755
index 0000000..ecc9bf4
--- /dev/null
+++ b/html/images/fonts/arbocrest.txt
@@ -0,0 +1,36 @@
+------------------------------------------------------------------------
+ShyFonts Freeware Terms of Use
+------------------------------------------------------------------------
+
+By downloading this font package you agree to the following terms
+of use:
+
+ - This FONT PACKAGE is freeware.
+
+ - This FONT PACKAGE may be distributed ONLY via the Internet for
+ FREE. Under NO circumstances may this FONT PACKAGE be sold for
+ a profit nor be included as part of another product or CD-ROM
+ compilation. If you wish to include this FONT PACKAGE for FREE
+ distribution on your Web Site, please include all of the fonts
+ and original documentation supplied with this FONT PACKAGE.
+
+ - You may install and use this FONT PACKAGE on an unlimited
+ amount of machines.
+
+ - You may NOT rename, edit, or create any alternate variations of
+ the fonts included in this FONT PACKAGE.
+
+ - This FONT PACKAGE comes "as is" with NO warranty whatsoever.
+ SHYFONTS accepts NO responsibility for any damages or loss of
+ any kind due to the use of this FONT PACKAGE. The use of this
+ FONT PACKAGE is solely your responsibility -- you use this FONT
+ PACKAGE at your own risk.
+
+ - Enjoy the fonts!
+
+If you have any question regarding this document or the usage of
+this font package, feel free to contact us at info@shyfonts.com.
+Thank you for downloading this font package and enjoy!
+
+------------------------------------------------------------------------
+©1999 ShyFonts Type Foundry -- http://www.shyfonts.com
\ No newline at end of file
diff --git a/html/images/fonts/index.htm b/html/images/fonts/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/index.htm b/html/images/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/magnify.gif b/html/images/magnify.gif
new file mode 100755
index 0000000..18119f2
Binary files /dev/null and b/html/images/magnify.gif differ
diff --git a/html/images/maps/blank.jpg b/html/images/maps/blank.jpg
new file mode 100755
index 0000000..f63726c
Binary files /dev/null and b/html/images/maps/blank.jpg differ
diff --git a/html/images/maps/index.htm b/html/images/maps/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/ranks/1.png b/html/images/ranks/1.png
new file mode 100755
index 0000000..8b89495
Binary files /dev/null and b/html/images/ranks/1.png differ
diff --git a/html/images/ranks/2.png b/html/images/ranks/2.png
new file mode 100755
index 0000000..5942ac0
Binary files /dev/null and b/html/images/ranks/2.png differ
diff --git a/html/images/ranks/3.png b/html/images/ranks/3.png
new file mode 100755
index 0000000..6c5b6d6
Binary files /dev/null and b/html/images/ranks/3.png differ
diff --git a/html/images/ranks/down.png b/html/images/ranks/down.png
new file mode 100755
index 0000000..e6a4976
Binary files /dev/null and b/html/images/ranks/down.png differ
diff --git a/html/images/ranks/index.htm b/html/images/ranks/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/ranks/same.png b/html/images/ranks/same.png
new file mode 100755
index 0000000..81a5ed8
Binary files /dev/null and b/html/images/ranks/same.png differ
diff --git a/html/images/ranks/up.png b/html/images/ranks/up.png
new file mode 100755
index 0000000..8e8a64a
Binary files /dev/null and b/html/images/ranks/up.png differ
diff --git a/html/images/s_asc.png b/html/images/s_asc.png
new file mode 100755
index 0000000..9990376
Binary files /dev/null and b/html/images/s_asc.png differ
diff --git a/html/images/s_desc.png b/html/images/s_desc.png
new file mode 100755
index 0000000..a03226d
Binary files /dev/null and b/html/images/s_desc.png differ
diff --git a/html/images/sidebar.gif b/html/images/sidebar.gif
new file mode 100755
index 0000000..49d4efe
Binary files /dev/null and b/html/images/sidebar.gif differ
diff --git a/html/images/statslogo.gif b/html/images/statslogo.gif
new file mode 100755
index 0000000..9557cd7
Binary files /dev/null and b/html/images/statslogo.gif differ
diff --git a/html/images/templates/basic.png b/html/images/templates/basic.png
new file mode 100755
index 0000000..7cf650a
Binary files /dev/null and b/html/images/templates/basic.png differ
diff --git a/html/images/templates/err_banned.png b/html/images/templates/err_banned.png
new file mode 100755
index 0000000..53105cf
Binary files /dev/null and b/html/images/templates/err_banned.png differ
diff --git a/html/images/templates/err_disabled.png b/html/images/templates/err_disabled.png
new file mode 100755
index 0000000..cd5f8bc
Binary files /dev/null and b/html/images/templates/err_disabled.png differ
diff --git a/html/images/templates/err_na.png b/html/images/templates/err_na.png
new file mode 100755
index 0000000..d47ec58
Binary files /dev/null and b/html/images/templates/err_na.png differ
diff --git a/html/images/templates/err_no_ft.png b/html/images/templates/err_no_ft.png
new file mode 100755
index 0000000..6899499
Binary files /dev/null and b/html/images/templates/err_no_ft.png differ
diff --git a/html/images/templates/err_no_gd.png b/html/images/templates/err_no_gd.png
new file mode 100755
index 0000000..8f4f504
Binary files /dev/null and b/html/images/templates/err_no_gd.png differ
diff --git a/html/images/templates/index.htm b/html/images/templates/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/unwatch.png b/html/images/unwatch.png
new file mode 100755
index 0000000..724a95a
Binary files /dev/null and b/html/images/unwatch.png differ
diff --git a/html/images/utlogo.gif b/html/images/utlogo.gif
new file mode 100755
index 0000000..4cc5c6e
Binary files /dev/null and b/html/images/utlogo.gif differ
diff --git a/html/images/watch.png b/html/images/watch.png
new file mode 100755
index 0000000..3a1230d
Binary files /dev/null and b/html/images/watch.png differ
diff --git a/html/images/watermark.png b/html/images/watermark.png
new file mode 100755
index 0000000..6ce8859
Binary files /dev/null and b/html/images/watermark.png differ
diff --git a/html/images/weapons/avenger.jpg b/html/images/weapons/avenger.jpg
new file mode 100755
index 0000000..8a7b949
Binary files /dev/null and b/html/images/weapons/avenger.jpg differ
diff --git a/html/images/weapons/bio.jpg b/html/images/weapons/bio.jpg
new file mode 100755
index 0000000..a43d0b0
Binary files /dev/null and b/html/images/weapons/bio.jpg differ
diff --git a/html/images/weapons/blank.jpg b/html/images/weapons/blank.jpg
new file mode 100755
index 0000000..c8fac8b
Binary files /dev/null and b/html/images/weapons/blank.jpg differ
diff --git a/html/images/weapons/chainsaw.jpg b/html/images/weapons/chainsaw.jpg
new file mode 100755
index 0000000..0e52c9b
Binary files /dev/null and b/html/images/weapons/chainsaw.jpg differ
diff --git a/html/images/weapons/creepinator.jpg b/html/images/weapons/creepinator.jpg
new file mode 100755
index 0000000..3a604ba
Binary files /dev/null and b/html/images/weapons/creepinator.jpg differ
diff --git a/html/images/weapons/deemer.jpg b/html/images/weapons/deemer.jpg
new file mode 100755
index 0000000..9eab790
Binary files /dev/null and b/html/images/weapons/deemer.jpg differ
diff --git a/html/images/weapons/enforcer.jpg b/html/images/weapons/enforcer.jpg
new file mode 100755
index 0000000..398ae87
Binary files /dev/null and b/html/images/weapons/enforcer.jpg differ
diff --git a/html/images/weapons/enforcer2.jpg b/html/images/weapons/enforcer2.jpg
new file mode 100755
index 0000000..ccddb61
Binary files /dev/null and b/html/images/weapons/enforcer2.jpg differ
diff --git a/html/images/weapons/fighter.jpg b/html/images/weapons/fighter.jpg
new file mode 100755
index 0000000..3778819
Binary files /dev/null and b/html/images/weapons/fighter.jpg differ
diff --git a/html/images/weapons/flak.jpg b/html/images/weapons/flak.jpg
new file mode 100755
index 0000000..df163de
Binary files /dev/null and b/html/images/weapons/flak.jpg differ
diff --git a/html/images/weapons/gandi.jpg b/html/images/weapons/gandi.jpg
new file mode 100755
index 0000000..8af7341
Binary files /dev/null and b/html/images/weapons/gandi.jpg differ
diff --git a/html/images/weapons/impact.jpg b/html/images/weapons/impact.jpg
new file mode 100755
index 0000000..d95a729
Binary files /dev/null and b/html/images/weapons/impact.jpg differ
diff --git a/html/images/weapons/index.htm b/html/images/weapons/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/images/weapons/ishock.jpg b/html/images/weapons/ishock.jpg
new file mode 100755
index 0000000..e0c14bd
Binary files /dev/null and b/html/images/weapons/ishock.jpg differ
diff --git a/html/images/weapons/minigun.jpg b/html/images/weapons/minigun.jpg
new file mode 100755
index 0000000..55ce638
Binary files /dev/null and b/html/images/weapons/minigun.jpg differ
diff --git a/html/images/weapons/pulse.jpg b/html/images/weapons/pulse.jpg
new file mode 100755
index 0000000..7f714c4
Binary files /dev/null and b/html/images/weapons/pulse.jpg differ
diff --git a/html/images/weapons/ripper.jpg b/html/images/weapons/ripper.jpg
new file mode 100755
index 0000000..d8cff4b
Binary files /dev/null and b/html/images/weapons/ripper.jpg differ
diff --git a/html/images/weapons/rockets.jpg b/html/images/weapons/rockets.jpg
new file mode 100755
index 0000000..8dd9ce5
Binary files /dev/null and b/html/images/weapons/rockets.jpg differ
diff --git a/html/images/weapons/shock.jpg b/html/images/weapons/shock.jpg
new file mode 100755
index 0000000..7509301
Binary files /dev/null and b/html/images/weapons/shock.jpg differ
diff --git a/html/images/weapons/slv.jpg b/html/images/weapons/slv.jpg
new file mode 100755
index 0000000..16b3b3b
Binary files /dev/null and b/html/images/weapons/slv.jpg differ
diff --git a/html/images/weapons/sniper.jpg b/html/images/weapons/sniper.jpg
new file mode 100755
index 0000000..0f00cdb
Binary files /dev/null and b/html/images/weapons/sniper.jpg differ
diff --git a/html/images/weapons/titan.jpg b/html/images/weapons/titan.jpg
new file mode 100755
index 0000000..1bfb246
Binary files /dev/null and b/html/images/weapons/titan.jpg differ
diff --git a/html/images/weapons/trans.jpg b/html/images/weapons/trans.jpg
new file mode 100755
index 0000000..86e720e
Binary files /dev/null and b/html/images/weapons/trans.jpg differ
diff --git a/html/import.php b/html/import.php
new file mode 100755
index 0000000..250e841
--- /dev/null
+++ b/html/import.php
@@ -0,0 +1,920 @@
+");
+}
+
+?>
+
+
+ Importing Latest Log Files |
+
';
+}
+
+
+IF (empty($import_adminkey)) {
+ if ($html) echo'Error: | ';
+ echo "\$import_adminkey not set in config.php!\n";
+ if ($html) {
+ echo ' |
';
+ include("includes/footer.php");
+ }
+ return;
+}
+
+IF (!empty($adminkey) and $adminkey != $import_adminkey) {
+ if ($html) echo'Error: | ';
+ echo "Keys do not match\n";
+ $adminkey = '';
+ if (!$html) return;
+}
+
+IF (empty($adminkey)) {
+ if (!$html) die('Please provide the adminkey' ."\n");
+ echo' |
+ Enter Admin key: |
+ |
+
';
+ include("includes/footer.php");
+ return;
+}
+
+
+IF (!@is_dir('logs')) {
+ if ($html) echo'Error: | ';
+ echo "Can't find the logs directory!\n";
+ if ($html) echo " ";
+ echo "Current working directory is: ". getcwd() ."\n";
+ if ($html) echo " ";
+ if (!$html) echo "You forgot to cd to my home directory? Take a look at \$import_homedir in config.php.\n";
+ if ($html) {
+ echo ' |
';
+ include("includes/footer.php");
+ }
+ return;
+}
+
+
+
+if ($html) echo'
';
+echo "\n";
+
+$start_time = time();
+$files = isset($_REQUEST['files']) ? $_REQUEST['files'] : 0;
+$elapsed = isset($_REQUEST['elapsed']) ? $_REQUEST['elapsed'] : 0;
+
+if ($ftp_use and !isset($_GET['no_ftp'])) {
+ DeBugMessage("Use ftp: yes\n\$ftp_use: " . gettype($ftp_use) . ":". var_export($ftp_use, true));
+ require("includes/ftp.php");
+ $elapsed = $elapsed - (time() - $start_time);
+}
+else {
+ ob_flush();
+ DeBugMessage("Use ftp: no\n\$ftp_use: " . gettype($ftp_use) . ":". var_export($ftp_use, true));
+}
+
+
+$logdir = opendir('logs');
+
+DeBugMessage("Open logdir and read logs");
+
+while (false !== ($filename = readdir($logdir)))
+{
+// Our (self set) timelimit exceeded => reload the page to prevent srcipt abort
+ if (!empty($import_reload_after) and $start_time + $import_reload_after <= time()) {
+ if (!$html) die('Time limit exceeded - unable to reload page (no HTML output)' ."\n");
+
+ $elapsed = $elapsed + time() - $start_time;
+ $target = $PHP_SELF ."?key=". urlencode($adminkey) ."&".str_rand()."=".str_rand()."&no_ftp=1&debug=$debug&files=$files&elapsed=$elapsed";
+ echo '';
+
+ echo'
+
+ Maximum execution time exeeded; restarting ... |
+
+
';
+
+ include("includes/footer.php");
+ return;
+ }
+
+ $oldfilename = $filename;
+ $filename = 'logs/' . $filename;
+ $backupfilename = 'logs/backup/' . $oldfilename;
+
+ // UTDC log: Move to logs/utdc/
+ if ($import_utdc_download_enable
+ and substr($filename, strlen($filename) - strlen($import_utdc_log_extension)) == $import_utdc_log_extension
+ and substr($oldfilename, 0, strlen($import_utdc_log_start)) == $import_utdc_log_start) {
+ if ($import_utdc_log_compress == 'no') $import_utdc_log_compress = 'yes';
+ if ($html) {
+ echo'
+
+ UTDC log: '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "UTDC log: $oldfilename:\n";
+ }
+ echo 'Moving to logs/utdc/: ';
+ if ($html) echo ' | ';
+ echo backup_logfile($import_utdc_log_compress, $filename, 'logs/utdc/'.$oldfilename, true) . "\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+ unlink($filename);
+ continue;
+ }
+
+ // UTDC shot: Move to logs/utdc/
+ if ($import_utdc_download_enable
+ and substr($filename, strlen($filename) - strlen($import_utdc_screenshot_extension)) == $import_utdc_screenshot_extension
+ and substr($oldfilename, 0, strlen($import_utdc_screenshot_start)) == $import_utdc_screenshot_start) {
+ if ($import_utdc_log_compress == 'no') $import_utdc_log_compress = 'yes';
+ if ($html) {
+ echo'
+
+ UTDC log: '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "UTDC log: $oldfilename:\n";
+ }
+ echo 'Moving to logs/utdc/: ';
+ if ($html) echo ' | ';
+ echo backup_logfile("none", $filename, 'logs/utdc/'.$oldfilename, true) . "\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+ unlink($filename);
+ continue;
+ }
+
+ // ACE log: Move to logs/ace/
+ if ($import_ace_download_enable
+ and substr($filename, strlen($filename) - strlen($import_ace_log_extension)) == $import_ace_log_extension
+ and substr($oldfilename, 0, strlen($import_ace_log_start)) == $import_ace_log_start) {
+ if ($import_ace_log_compress == 'no') $import_ace_log_compress = 'yes';
+ if ($html) {
+ echo'
+
+ ACE log: '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "ACE log: $oldfilename:\n";
+ }
+ echo 'Moving to logs/ace/: ';
+ if ($html) echo ' | ';
+ echo backup_logfile($import_ace_log_compress, $filename, 'logs/ace/'.$oldfilename, true) . "\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+ unlink($filename);
+ continue;
+ }
+
+ if ($import_ace_download_enable
+ and substr($filename, strlen($filename) - strlen($import_ace_screenshot_extension)) == $import_ace_screenshot_extension
+ and substr($oldfilename, 0, strlen($import_ace_screenshot_start)) == $import_ace_screenshot_start) {
+ if ($html) {
+ echo'
+
+ ACE Screenshot: '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "ACE screenshot: $oldfilename:\n";
+ }
+ echo 'Moving to logs/ace/: ';
+ if ($html) echo ' | ';
+ echo backup_logfile("none", $filename, 'logs/ace/'.$oldfilename, false) . "\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+ unlink($filename);
+ continue;
+ }
+
+
+
+ // AnthChecker log: Move to logs/ac/
+ if ($import_ac_download_enable
+ and substr($filename, strlen($filename) - strlen($import_ac_log_extension)) == $import_ac_log_extension
+ and substr($oldfilename, 0, strlen($import_ac_log_start)) == $import_ac_log_start) {
+ if ($import_ac_log_compress == 'no') $import_ac_log_compress = 'yes';
+ if ($html) {
+ echo'
+
+ AC log: '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "AC log: $oldfilename:\n";
+ }
+ echo 'Moving to logs/ac/: ';
+ if ($html) echo ' | ';
+ echo backup_logfile($import_ac_log_compress, $filename, 'logs/ac/'.$oldfilename, true) . "\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+ unlink($filename);
+ continue;
+ }
+
+ if(substr($filename, strlen($filename) - strlen($import_log_extension)) != $import_log_extension) continue;
+ if(substr($oldfilename, 0, strlen($import_log_start)) != $import_log_start) continue;
+
+ // Create a unique ID
+ $uid = str_rand();
+
+ // Check if there are any logs to do ...
+
+ // Create our temp Table
+
+ for (;;) {
+ $sql = "CREATE ". ($import_use_temporary_tables ? 'TEMPORARY ' : '') ."TABLE `uts_temp_$uid` (
+ `id` mediumint(5) NOT NULL,
+ `col0` char(20) NOT NULL default '',
+ `col1` char(120) NOT NULL default '',
+ `col2` char(120) NOT NULL default '',
+ `col3` char(120) NOT NULL default '',
+ `col4` char(120) NOT NULL default '',
+ KEY `part1` (`col1` (20),`col2` (20)),
+ KEY `part2` (`col0` (20),`col1` (20),`col2` (20)),
+ KEY `full` (`col0` (20),`col1` (20),`col2` (20),`col3` (20),`col4` (20))
+ ) TYPE=". ($import_use_heap_tables ? 'HEAP' : 'MyISAM') .";";
+
+ $result = mysql_query($sql);
+ if ($result) break;
+
+ if (mysql_errno() == 1044 and $import_use_temporary_tables) {
+ echo "
WARNING: Unable to create temporary table (". mysql_error() .")
";
+ echo "I'll retry without using MySQL's temporary table feature (see \$import_use_temporary_tables in config.php for details).
";
+ $import_use_temporary_tables = false;
+ continue;
+ }
+ die("
Unable to create the temporary table - are you allowed to create tables in this database?
");
+ }
+ $id = 0;
+
+ if ($html) {
+ echo'
+
+ Importing '.$oldfilename.' |
+
+
+ ';
+ } else {
+ echo "Importing $oldfilename:\n";
+ }
+ echo 'Creating Temp MySQL Table: ';
+ if ($html) echo ' | ';
+ echo "uts_temp_$uid\n";
+ if ($html) echo ' |
';
+ echo 'Backing Up Log File: ';
+ if ($html) echo ' | ';
+
+ // Copy the file to backup folder first
+ echo backup_logfile($import_log_backup, $filename, $backupfilename, true) . "\n";
+
+ if ($html) echo ' |
';
+ echo 'Player Data Moved to Temp MySQL: ';
+ if ($html) echo ' | ';
+
+ // Create sql for NGLog
+ $row = 1;
+ $handle = fopen("$filename", "r");
+
+ while (($data = my_fgets($handle, 5000)) !== FALSE) {
+ if ($debug) debug_output('Raw input ', $data);
+ $data = preg_replace('/[\x00]/', '', $data);
+ if ($debug) debug_output('After preg_replace', $data);
+ $data = explode("\t", $data);
+
+ $num = count($data);
+ $row++;
+ for ($c=0; $c < 1; $c++) {
+
+ $col0 = addslashes($data[0]);
+ $col1 = addslashes($data[1]);
+ $col2 = addslashes($data[2]);
+ $col3 = addslashes($data[3]);
+ $col4 = addslashes($data[4]);
+
+ $col0 = trim($col0, " \n\r");
+ $col1 = trim($col1, " \n\r");
+ $col2 = trim($col2, " \n\r");
+ $col3 = trim($col3, " \n\r");
+ $col4 = trim($col4, " \n\r");
+
+ $id++;
+ mysql_query("INSERT INTO uts_temp_$uid VALUES ($id, '$col0', '$col1', '$col2', '$col3', '$col4');") or die(mysql_error());
+ }
+ }
+ fclose($handle);
+ $files++;
+
+ if ($html) echo'';
+ echo "Yes\n";
+
+
+
+ $log_incompatible = false;
+ $actor_version = 'unknown';
+ $qm_logtype = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Log_Standard'");
+ if ($qm_logtype['col3'] == 'UTStats') {
+ $qm_logversion = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Log_Version'");
+ $actor_version = $qm_logversion['col3'];
+ }
+
+ if (!in_array($actor_version, $compatible_actor_versions)) {
+ if ($import_incompatible_logs) {
+ if ($html) echo ' |
';
+ echo "WARNING: ";
+ if ($html) echo ' | ';
+ echo "This logfile was created using an incompatible UTStats server actor version ($actor_version). You may experience strange results and/or bugs!\n";
+ } else {
+ $log_incompatible = true;
+ }
+ }
+
+
+ if ($html) echo ' |
';
+ echo "Match Data Created: ";
+ if ($html) echo ' | ';
+
+ // Get the match table info
+ $qm_time = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Absolute_Time'");
+ $qm_servername = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_ServerName'");
+ $qm_serverip = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'True_Server_IP'");
+ $qm_serverport = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_Port'");
+ $qm_gamename = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'GameName'");
+
+ $qm_gamestart = small_query("SELECT col0 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'realstart'");
+ $qm_gameend = small_query("SELECT col0 FROM uts_temp_$uid WHERE col1 = 'game_end'");
+
+ $qm_insta = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'insta'");
+ $qm_tournament = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'TournamentMode'");
+ $qm_teamgame = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'TeamGame'");
+ $qm_mapname = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'map' AND col2 = 'Title'");
+ $qm_mapfile = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'map' AND col2 = 'Name'");
+ $qm_frags = small_query("SELECT SUM(col4) AS frags FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'frags'");
+ $qm_kills = small_query("SELECT SUM(col4) AS kills FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'kills'");
+ $qm_suicides = small_query("SELECT SUM(col4) AS suicides FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'suicides'");
+ $qm_deaths = small_query("SELECT SUM(col4) AS deaths FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'deaths'");
+ $qm_teamkills = small_query("SELECT SUM(col4) AS teamkills FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'teamkills'");
+
+ $qm_playercount = small_count("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'rename' GROUP BY col3");
+
+ $s_frags = $qm_frags[frags];
+ $s_suicides = $qm_suicides[suicides];
+ $s_deaths = $qm_deaths[deaths];
+
+ // Add teamkills only if its a team game, else add them to kills total
+ IF ($qm_teamgame[col3] == "True") {
+ $s_kills = $qm_kills[kills];
+ $s_teamkills = $qm_teamkills[teamkills];
+ } else {
+ $s_kills = $qm_kills[kills]+$qm_teamkills[teamkills];
+ $s_teamkills = 0;
+ }
+
+ // Change the gamename to bunny track if needed:
+ if (($qm_gamename[col3] == "BunnyTrack2") || (($qm_gamename[col3] == "Capture the Flag") && (strtolower(substr($qm_mapfile[col3], 0, 7)) == "ctf-bt-"))) {
+ $qm_gamename[col3] = "Bunny Track";
+ }
+
+ // Check if anything happened, if it didnt stop everything now
+ //
+ IF (($qm_kills[kills] == 0 && $qm_deaths[deaths] == 0) && ($qm_gamename[col3] != "Bunny Track")) {
+ echo "No (Empty Match)\n";
+ if ($html) echo ' |
';
+ } elseIF (($qm_playercount < 2) || (($qm_gamename == "Bunny Track") and ($qm_playercount < 1))) {
+ echo "No (Not Enough Players)\n";
+ if ($html) echo '';
+ } elseIF ($log_incompatible) {
+ echo "No (Logfile incompatible [created by UTStats $actor_version])\n";
+ if ($html) echo '';
+ } elseIF ($import_ignore_if_gametime_less_than != 0 and ceil(($qm_gameend[col0] - $qm_gamestart[col0]) / 60) < $import_ignore_if_gametime_less_than) {
+ echo "No (game too short [". ceil(($qm_gameend[col0] - $qm_gamestart[col0]) / 60) ." < $import_ignore_if_gametime_less_than minutes])\n";
+ if ($html) echo '';
+ } else {
+
+ $sql_mutators = "SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'GoodMutator'";
+ $q_mutators = mysql_query($sql_mutators);
+ while ($r_mutators = mysql_fetch_array($q_mutators)) {
+ $qm_mutators .= "".$r_mutators[col3].", ";
+ }
+
+
+ $qm_serveran = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_AdminName'");
+ $qm_serverae = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_AdminEmail'");
+ $qm_serverm1 = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_MOTDLine1'");
+ $qm_serverm2 = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_MOTDLine2'");
+ $qm_serverm3 = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_MOTDLine3'");
+ $qm_serverm4 = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'info' AND col2 = 'Server_MOTDLine4'");
+
+ $qm_gameinfotl = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'TimeLimit'");
+ $qm_gameinfofl = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'FragLimit'");
+ $qm_gameinfogt = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'GoalTeamScore'");
+ $qm_gameinfomp = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'MaxPlayers'");
+ $qm_gameinfoms = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'MaxSpectators'");
+ $qm_gameinfogs = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'GameSpeed'");
+ $qm_gameinfout = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'UseTranslocator'");
+ $qm_gameinfoff = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'FriendlyFireScale'");
+ $qm_gameinfows = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'game' AND col2 = 'WeaponsStay'");
+
+ $gametime = $qm_time[col3];
+ $servername = addslashes($qm_servername[col3]);
+ $serverip = $qm_serverip[col3];
+ $serverport = $qm_serverport[col3];
+ $gamename = addslashes($qm_gamename[col3]);
+ $servergametime = get_dp($qm_gameend[col0] - $qm_gamestart[col0]);
+ $gamestart = $qm_gamestart[col0];
+ $gameend = $qm_gameend[col0];
+
+
+ $tournament = $qm_tournament[col3];
+ $teamgame = $qm_teamgame[col3];
+ $mapname = addslashes($qm_mapname[col3]);
+ $mapfile = addslashes($qm_mapfile[col3]);
+
+ // Lazy Hack for unknown gametypes
+ $unknowngt = substr("$mapfile", 0, 3); // Gets first 3 characters
+
+ IF ($unknowngt == "JB-") {
+ $gamename = "JailBreak";
+ $teamgame = 'True';
+ }
+
+ // Append insta to game if it was an insta game
+ IF (($qm_insta[col3] == "True") && ($gamename != "Bunny Track")) { $gameinsta = 1; $gamename = "$gamename (insta)"; } else { $gameinsta = 0; }
+
+ // Get the unique ID of this gametype.
+ // Create a new one if it has none yet.
+ $r_gid = small_query("SELECT id FROM uts_games WHERE gamename = '$gamename'");
+ if ($r_gid) {
+ $gid = $r_gid['id'];
+ } else {
+ mysql_query("INSERT INTO uts_games SET gamename = '$gamename', name = '$gamename'") or die(mysql_error());
+ $gid = mysql_insert_id();
+ }
+
+
+ // Check wheter we want to override the gametype for this match
+ // (Useful if we want a server to have separate stats for one server or if we want to
+ // combine DM and TDM rankings or ...)
+
+ // Read all rules
+ if (!isset($overriderules)) {
+ $overriderules = array();
+ $sql_overriderules = "SELECT id, serverip, gamename, mutator, gid FROM uts_gamestype ORDER BY id ASC;";
+ $q_overriderules = mysql_query($sql_overriderules);
+ while ($r_overriderules = mysql_fetch_array($q_overriderules)) {
+ $overriderules[$r_overriderules['id']]['serverip'] = $r_overriderules['serverip'];
+ $overriderules[$r_overriderules['id']]['gamename'] = $r_overriderules['gamename'];
+ $overriderules[$r_overriderules['id']]['mutator'] = $r_overriderules['mutator'];
+ $overriderules[$r_overriderules['id']]['gid'] = $r_overriderules['gid'];
+ }
+ }
+
+ // Check if one of our overriderules applies to this match
+ foreach($overriderules as $rule) {
+ if ($rule['serverip'] != '*' and $rule['serverip'] != "$serverip:$serverport") continue;
+ if ($rule['gamename'] != '*' and $rule['gamename'] != $gamename) continue;
+ if ($rule['mutator'] != '*' and stristr($qm_mutators, $rule['mutator']) === false) continue;
+ $gid = $rule['gid'];
+ break;
+ }
+
+
+ $qm_firstblood = small_query("SELECT col2 FROM uts_temp_$uid WHERE col1 = 'first_blood'");
+
+ $firstblood = addslashes($qm_firstblood[col2]);
+
+
+ $serverinfo = addslashes("Admin: $qm_serveran[col3]
Email: $qm_serverae[col3]
+ MOTD
$qm_serverm1[col3]
$qm_serverm2[col3]
$qm_serverm3[col3]
$qm_serverm4[col3]");
+
+
+ $gameinfo = addslashes( add_info('Time Limit:', $qm_gameinfotl[col3]) .
+ add_info('Frag Limit:', $qm_gameinfofl[col3]) .
+ add_info('Goal Team Score:', $qm_gameinfogt[col3]) .
+ add_info('Max Players:', $qm_gameinfomp[col3]) .
+ add_info('Max Specs:', $qm_gameinfoms[col3]) .
+ add_info('Game Speed:', $qm_gameinfogs[col3]) .
+ add_info('Translocator:', $qm_gameinfout[col3]) .
+ add_info('Friendly Fire:', $qm_gameinfoff[col3]) .
+ add_info('Weapon Stay:', $qm_gameinfows[col3]) .
+ add_info('UTStats Actor Version:', $actor_version));
+
+ // Tidy Up The Info
+
+ $mutators = substr("$qm_mutators", 0, -2); // remove trailing ,
+ $mutators = un_ut($mutators); // Remove Class and BotPack. etc
+ $mutators = addslashes($mutators);
+
+ $gametime = utdate($gametime);
+
+
+ // Get Teams Info
+ $sql_tinfo = "SELECT col4 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'TeamName' GROUP BY col4 ORDER BY col4 ASC";
+ $q_tinfo = mysql_query($sql_tinfo) or die(mysql_error());
+
+ $t0info = 0;
+ $t1info = 0;
+ $t2info = 0;
+ $t3info = 0;
+
+ while ($r_tinfo = mysql_fetch_array($q_tinfo)) {
+ IF ($r_tinfo[col4] == "Red") { $t0info = 1; }
+ IF ($r_tinfo[col4] == "Blue") { $t1info = 1; }
+ IF ($r_tinfo[col4] == "Green") { $t2info = 1; }
+ IF ($r_tinfo[col4] == "Gold") { $t3info = 1; }
+ }
+
+ // Get Teamscores
+ $sql_tscore = "SELECT col2 AS team, col3 AS score FROM uts_temp_$uid WHERE col1 = 'teamscore'";
+ $q_tscore = mysql_query($sql_tscore) or die(mysql_error());
+
+ $t0score = 0;
+ $t1score = 0;
+ $t2score = 0;
+ $t3score = 0;
+
+ while ($r_tscore = mysql_fetch_array($q_tscore)) {
+ if ($r_tscore['team'] == "0") $t0score = $r_tscore['score'];
+ if ($r_tscore['team'] == "1") $t1score = $r_tscore['score'];
+ if ($r_tscore['team'] == "2") $t2score = $r_tscore['score'];
+ if ($r_tscore['team'] == "3") $t3score = $r_tscore['score'];
+ }
+
+
+// Insert Server Info Into Database
+$sql_serverinfo = "INSERT INTO uts_match (time, servername, serverip, gamename, gid, gametime, mutators, insta, tournament, teamgame, mapname, mapfile, serverinfo, gameinfo, frags, kills, suicides, teamkills, deaths,
+t0, t1, t2, t3, t0score, t1score, t2score, t3score)
+VALUES ('$gametime', '$servername', '$serverip:$serverport', '$gamename', '$gid', '$servergametime', '$mutators', '$gameinsta', '$tournament',
+'$teamgame', '$mapname', '$mapfile', '$serverinfo', '$gameinfo', '$s_frags', '$s_kills', '$s_suicides', '$s_teamkills', '$s_deaths',
+$t0info, $t1info, $t2info, $t3info, $t0score, $t1score, $t2score, $t3score);";
+
+ $q_serverinfo = mysql_query($sql_serverinfo) or die(mysql_error());
+ $matchid = mysql_insert_id(); // Get our Match ID
+
+
+
+ echo "Yes (ID: $matchid)\n";
+ if ($html) echo '';
+
+ // Process Player Stuff
+ $playerid2pid = array();
+ $ignored_players = array();
+ $imported_players = array();
+
+ if ($html) echo '';
+ echo "Importing Players: ";
+ if ($html) echo ' | ';
+
+ // Get List of Player IDs and Process What They Have Done
+ $sql_player = "SELECT DISTINCT col4 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'rename' AND col4 <> ''";
+ $q_player = mysql_query($sql_player) or die(mysql_error());
+ while ($r_player = mysql_fetch_array($q_player)) {
+ $playerid = $r_player[col4];
+
+ // Get players last name used
+ $r_player2 = small_query("SELECT col3 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'rename' AND col4 = $playerid ORDER BY id DESC LIMIT 0,1");
+ $playername = addslashes($r_player2[col3]);
+
+
+ // Are they a Bot
+ $r_player1 = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'IsABot' AND col3 = $playerid ORDER BY id DESC LIMIT 0,1");
+ $playertype = $r_player1[col4];
+ // This player is a bot
+ if ($playertype == 'True' and $import_ignore_bots) {
+ $ignored_players[] = $playername;
+ // We do not want to know who killed and who was killed by this bot...
+ mysql_query("DELETE FROM uts_temp_$uid WHERE (col1 = 'kill' OR col1 = 'teamkill') AND (col2 = '$playerid' OR col4 = '$playerid');") or die(mysql_error());
+ if ($html) echo "";
+ echo "Bot:$playername ";
+ if ($html) echo "";
+ continue;
+ }
+
+ // Get players last team
+ $r_player3 = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'player' AND col2 = 'TeamChange' AND col3 = $playerid AND col4 != 255 ORDER BY id DESC LIMIT 0,1");
+ $playerteam = $r_player3[col4];
+
+ $qc_kills = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'kills'AND col3 = $playerid");
+ $qc_teamkills = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'teamkills' AND col3 = $playerid");
+ $qc_deaths = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'deaths' AND col3 = $playerid");
+
+ // Player had no kills, deaths or teamkills => ignore
+ IF ($qc_kills[col4] == 0 && $qc_deaths[col4] == 0 && $qc_teamkills[col4] ==0 && $gamename != "Bunny Track") {
+ $ignored_players[] = $playername;
+ continue;
+ }
+
+ // Process all the other player information
+ include("import/import_playerstuff.php");
+
+ if ($playerbanned) {
+ // Banned players don't have a rank.
+ mysql_query("DELETE FROM uts_rank WHERE pid = '$pid'");
+
+ if ($import_ban_type == 2) {
+ // We do not want to know who killed and who was killed by this banned player
+ $ignored_players[] = $playername;
+ mysql_query("DELETE FROM uts_temp_$uid WHERE (col1 = 'kill' OR col1 = 'teamkill') AND (col2 = '$playerid' OR col4 = '$playerid');") or die(mysql_error());
+ if ($html) echo "";
+ echo "Banned:$playername ";
+ if ($html) echo "";
+ continue;
+ }
+ }
+
+ // Get Gametype specific stuff done
+ IF ($gamename == "Assault" || $gamename == "Assault (insta)") { include("import/import_ass.php"); }
+ IF ($gamename == "Capture the Flag" || $gamename == "Capture the Flag (insta)") { include("import/import_ctf.php"); }
+ IF ($gamename == "Bunny Track") { include("import/import_bt.php"); }
+ IF ($gamename == "Domination" || $gamename == "Domination (insta)") { include("import/import_dom.php"); }
+ IF ($gamename == "Tournament Team Game" || $gamename == "Tournament Team Game (insta)") { include("import/import_tdm.php"); }
+ IF ($gamename == "JailBreak" || $gamename == "JailBreak (insta)") { include("import/import_jailbreak.php"); }
+ IF ($gamename == "Last Man Standing" || $gamename == "Last Man Standing (insta)") { include("import/import_lms.php"); }
+ IF ($gamename == "Extended Last Man Standing" || $gamename == "Extended Last Man Standing (insta)") { include("import/import_lms.php"); }
+ IF ($gamename == "Last Man Standing +" || $gamename == "Last Man Standing + (insta)") { include("import/import_lms.php"); }
+ IF ($gamename == "Last Man Standing++" || $gamename == "Last Man Standing++ (insta)") { include("import/import_lms.php"); }
+
+ // Do the rankings
+ include("import/import_ranking.php");
+
+ if ($playerbanned) {
+ if ($html) echo "";
+ echo "Banned:";
+ }
+ echo $playername.' ';
+ if ($playerbanned and $html) echo "";
+ if ($html) echo " ";
+ $imported_players[] = $playername;
+ }
+ if ($html) echo ' |
';
+ // Check if theres any players left, if none or one delete the match (its possible ...)
+ $final_pcount = small_count("SELECT id FROM uts_player WHERE matchid = $matchid");
+
+ IF ($final_pcount == NULL || ($final_pcount == 1 && $gamename != "Bunny Track")) {
+ echo'
+ Deleting Match: |
+ 0 or 1 Player Entries Left |
+
';
+
+ $sql_radjust = "SELECT pid, gid, rank FROM uts_player WHERE matchid = $matchid";
+ $q_radjust = mysql_query($sql_radjust) or die(mysql_error());
+ while ($r_radjust = mysql_fetch_array($q_radjust)) {
+ $pid = $r_radjust[pid];
+ $gid = $r_radjust[gid];
+ $rank = $r_radjust[rank];
+
+ $sql_crank = small_query("SELECT id, rank, matches FROM uts_rank WHERE pid = $pid AND gid = $gid");
+ if (!$sql_crank) continue;
+
+ $rid = $sql_crank[id];
+ $newrank = $sql_crank[rank]-$rank;
+ $oldrank = $sql_crank[rank];
+ $matchcount = $sql_crank[matches]-1;
+
+ mysql_query("UPDATE uts_rank SET rank = $newrank, prevrank = $oldrank, matches = $matchcount WHERE id = $rid") or die(mysql_error());
+ }
+ mysql_query("DELETE FROM uts_rank WHERE matches = 0") or die(mysql_error());
+
+ $rem_mrecord = "DELETE FROM uts_match WHERE id = $matchid";
+ mysql_query($rem_mrecord);
+ $rem_precord = "DELETE FROM uts_player WHERE matchid = $matchid";
+ mysql_query($rem_precord);
+ $rem_precord = "DELETE FROM uts_events WHERE matchid = $matchid";
+ mysql_query($rem_precord);
+ } else {
+ // Make our weapons statistics
+ echo "\n";
+ if ($html) echo '';
+ echo "Importing weapon statistics: ";
+ if ($html) echo ' | ';
+ include("import/import_weapons.php");
+ echo "Done\n";
+ if ($html) echo ' |
';
+
+ // Make our kills matrix stuff ...
+ if ($html) echo '';
+ echo "Building kills matrix: ";
+ if ($html) echo ' | ';
+ include("import/import_killsmatrix.php");
+ echo "Done\n";
+
+
+ if ($html) echo ' |
';
+ echo "Combining Duplicate Player Entries: ";
+ if ($html) echo ' | ';
+
+ // Combine duplicate player entries ... very intensive :(
+ include("import/import_pcleanup.php");
+
+ echo "Done\n";
+ if ($html) echo' |
';
+
+
+ $updategameinfo = false;
+ if (count($ignored_players) > 0) {
+ // Maybe we imported the player and ignored another record of him?
+ $ignored_players = array_unique($ignored_players);
+ foreach($ignored_players as $t_id => $t_name) {
+ if (in_array($t_name, $imported_players)) unset($ignored_players[$t_id]);
+ }
+ if (count($ignored_players) > 0) {
+ $gameinfo .= addslashes(add_info('Ignored Players:', implode(', ', $ignored_players)));
+ $updategameinfo = true;
+ }
+ }
+ if ($updategameinfo) {
+ mysql_query("UPDATE uts_match SET gameinfo = '$gameinfo' WHERE id = '$matchid'");
+ $updategameinfo = false;
+ }
+ }
+ }
+
+ // Delete Temp MySQL Table
+ $droptable = "DROP TABLE uts_temp_$uid";
+ mysql_query($droptable) or die(mysql_error());
+
+ if ($html) echo'';
+ echo "Deleting Temp MySQL Table: ";
+ if ($html) echo ' | ';
+ echo "uts_temp_$uid\n";
+ if ($html) echo ' |
';
+ echo "\n\n";
+
+ // Clear variables
+
+ $asscode = "";
+ $assteam = "";
+ $asswin = "";
+ $avgping = "";
+ $data = "";
+ $domplayer = "";
+ $droptable = "";
+ $firstblood = "";
+ $gameinfo = "";
+ $gameinsta = "";
+ $gamename = "";
+ $gametime = "";
+ $highping = "";
+ $unknowngt = "";
+ $lowping = "";
+ $mapname = "";
+ $mapfile = "";
+ $matchid = "";
+ $mutators = "";
+ $num = "";
+ $playerid = "";
+ $playerfragscnt = "";
+ $playername = "";
+ $playerecordid = "";
+ $playerteam = "";
+ $qm_mutators = "";
+ $row = 1;
+ $servername = "";
+ $serverinfo = "";
+ $serverip = "";
+ $serverport = "";
+ $suicidecnt = "";
+ $t0info = "";
+ $t1info = "";
+ $t2info = "";
+ $t3info = "";
+ $t0score = "";
+ $t1score = "";
+ $t2score = "";
+ $t3score = "";
+ $teamgame = "";
+ $tournament = "";
+
+// Delete log file
+ unlink($filename);
+}
+closedir($logdir);
+
+if ($html) echo '
';
+echo "\n";
+
+// Import stats
+if ($files != 0) {
+ $elapsed = $elapsed + time() - $start_time;
+ if ($html) echo '';
+ echo "Processed $files ". ($files == 1 ? 'file' : 'files') ." in $elapsed ". ($elapsed == 1 ? 'second' : 'seconds') ." ";
+ echo "(". get_dp($elapsed / $files) ." seconds/file)\n";
+ if ($html) echo '
';
+}
+
+
+// Optimise database
+if (rand(0, 5) == 0) {
+ if ($html) echo '';
+ echo "Optimizing tables... ";
+ mysql_query("OPTIMIZE TABLE uts_match, uts_player, uts_rank, uts_killsmatrix, uts_weaponstats, uts_pinfo;") or die(mysql_error());
+ echo "Done\n";
+ if ($html) echo '
';
+}
+
+// Analyze Key distribution
+if (rand(0, 10) == 0) {
+ if ($html) echo '';
+ echo "Analyzing tables... ";
+ mysql_query("ANALYZE TABLE uts_match, uts_player, uts_rank, uts_killsmatrix, uts_weaponstats, uts_pinfo;") or die(mysql_error());
+ echo "Done\n";
+ if ($html) echo '
';
+}
+
+
+// Purge old logs
+if ($purged = (purge_backups('logs/backup', $import_log_backups_purge_after))) {
+ if ($html) echo '';
+ echo "Purged $purged old logfiles\n";
+ if ($html) echo '
';
+}
+
+// Purge old utdc logs
+if ($import_utdc_download_enable) {
+ if ($purged = (purge_backups('logs/utdc', $import_utdc_log_purge_after))) {
+ if ($html) echo '';
+ echo "Purged $purged old UTDC logfiles\n";
+ if ($html) echo '
';
+ }
+}
+
+// Purge old AnthChecker logs
+if ($import_ac_download_enable) {
+ if ($purged = (purge_backups('logs/ac', $import_ac_log_purge_after))) {
+ if ($html) echo '';
+ echo "Purged $purged old AC logfiles\n";
+ if ($html) echo '
';
+ }
+}
+
+// Purge old ACE logs
+if ($import_ace_download_enable) {
+ if ($purged = (purge_backups('logs/ace', $import_ace_log_purge_after))) {
+ if ($html) echo '';
+ echo "Purged $purged old ACE logfiles\n";
+ if ($html) echo '
';
+ }
+}
+
+echo "\n\n";
+if ($html) echo '
';
+echo "Import Script Completed\n";
+if ($html) echo ' |
';
+
+if ($html) include("includes/footer.php");
+?>
diff --git a/html/import/import_ass.php b/html/import/import_ass.php
new file mode 100755
index 0000000..9539bc5
--- /dev/null
+++ b/html/import/import_ass.php
@@ -0,0 +1,34 @@
+
diff --git a/html/import/import_bt.php b/html/import/import_bt.php
new file mode 100755
index 0000000..fe6a480
--- /dev/null
+++ b/html/import/import_bt.php
@@ -0,0 +1,46 @@
+ $cap_speed) {
+ $cap_speed = $r_capbt['col3'];
+ $col0 = $r_capbt['col0']; // time
+ $col1 = $r_capbt['col1']; // cap
+ $col2 = $r_capbt['col2']; // playerid
+ $col3 = $r_capbt['col3']; // speed in 2000 - seconds (old system) or 600000 - hundreds of seconds (new system)
+ $col4 = $r_capbt['col4']; // date in seconds since epoch
+ }
+ $flag_capture++;
+ }
+
+ if ($cap_speed != 0) {
+ # use col2 to store the rank, col3 to store the captime in seconds and col4 to store the date of the record
+ $col2 = small_count("SELECT DISTINCT col2 FROM uts_temp_$uid WHERE col1 = 'cap' AND col3 > $col3") + 1;
+ if ($col1 == "btcap") {
+ $col3 = ceil(600000 - $col3) / 100;
+ }
+ else if ($col1 == "cap") {
+ $col3 = ceil((2000 - $col3-1)*100/1.1) / 100;
+ $col1 = "btcap";
+ }
+ $col3 = sprintf("%01.2f", $col3);
+ $sql_eventsbt = "INSERT INTO uts_events
+ (matchid, playerid, col0, col1, col2, col3, col4) VALUES
+ ($matchid, $playerid, '$col0', '$col1', '$col2', '$col3', '$col4')";
+ mysql_query($sql_eventsbt) or die (mysql_error());
+ }
+
+ if ($flag_capture > 0) {
+ $sql_playerflags = " UPDATE uts_player
+ SET flag_capture = $flag_capture
+ WHERE id = $playerecordid";
+ mysql_query($sql_playerflags) or die(mysql_error());
+ }
+?>
diff --git a/html/import/import_ctf.php b/html/import/import_ctf.php
new file mode 100755
index 0000000..206cbb0
--- /dev/null
+++ b/html/import/import_ctf.php
@@ -0,0 +1,43 @@
+
diff --git a/html/import/import_dom.php b/html/import/import_dom.php
new file mode 100755
index 0000000..91106ac
--- /dev/null
+++ b/html/import/import_dom.php
@@ -0,0 +1,19 @@
+
\ No newline at end of file
diff --git a/html/import/import_jailbreak.php b/html/import/import_jailbreak.php
new file mode 100755
index 0000000..6d6e0da
--- /dev/null
+++ b/html/import/import_jailbreak.php
@@ -0,0 +1,22 @@
+ 'RedeemerDeath' and col4 <> 'JailRelease'");
+ $r_suicides = $q_suicides['suicides'];
+
+ $r_frags = $r_kills - $r_suicides;
+ $r_efficiency = get_dp(($r_kills / ($r_kills + $r_deaths + $r_suicides + $r_teamkills)) * 100);
+
+
+ mysql_query(" UPDATE uts_player
+ SET ass_obj = '$r_releases',
+ suicides = '$r_suicides',
+ frags = '$r_frags',
+ eff = '$r_efficiency'
+ WHERE id = $playerecordid;") or die(mysql_error());
+
+?>
\ No newline at end of file
diff --git a/html/import/import_killsmatrix.php b/html/import/import_killsmatrix.php
new file mode 100755
index 0000000..433a659
--- /dev/null
+++ b/html/import/import_killsmatrix.php
@@ -0,0 +1,22 @@
+
diff --git a/html/import/import_lms.php b/html/import/import_lms.php
new file mode 100755
index 0000000..eb3ebd7
--- /dev/null
+++ b/html/import/import_lms.php
@@ -0,0 +1,46 @@
+
diff --git a/html/import/import_pcleanup.php b/html/import/import_pcleanup.php
new file mode 100755
index 0000000..3e1be8a
--- /dev/null
+++ b/html/import/import_pcleanup.php
@@ -0,0 +1,256 @@
+ 3";
+ mysql_query($rem_srecord);
+}
+
+$cleaned = false;
+// Get list of players
+$sql_pname = "SELECT pid, name FROM uts_player, uts_pinfo AS pi WHERE matchid = $matchid AND pid = pi.id";
+$q_pname = mysql_query($sql_pname);
+while ($r_pname = mysql_fetch_array($q_pname)) {
+ $playername = addslashes($r_pname[name]);
+ $pid = $r_pname['pid'];
+
+
+ // Check if player has more than 1 record
+ $q_ids = mysql_query("SELECT playerid FROM uts_player WHERE pid = '$pid' AND matchid = $matchid");
+
+ IF (mysql_num_rows($q_ids) > 1) {
+ $numrecords = mysql_num_rows($q_ids);
+ echo $r_pname[name] .' ';
+ // get all the ids this player had
+ $playerids = array();
+ while ($r_ids = mysql_fetch_array($q_ids)) {
+ $playerids[] = $r_ids['playerid'];
+ }
+
+ $r_newplayerid = small_query("SELECT (MAX(playerid) + 1) AS newplayerid FROM uts_player WHERE matchid = $matchid");
+ $newplayerid = $r_newplayerid['newplayerid'];
+
+ // Fix the events table
+ foreach ($playerids as $i => $oldplayerid) {
+ mysql_query("UPDATE uts_events SET playerid = $newplayerid WHERE playerid = $oldplayerid AND matchid = $matchid");
+ }
+
+ // Fix matchcount in ranking table
+ // mysql_query("UPDATE uts_rank SET matches = matches - ". ($numrecords - 1) ." WHERE pid = '$pid' AND gid = '$gid'") or die(mysql_error());
+
+ // ***********************
+ // UPDATE THE KILLS MATRIX
+ $sql_kmupdate = " SELECT victim,
+ SUM(kills) AS kills
+ FROM uts_killsmatrix
+ WHERE matchid = $matchid
+ AND killer IN (". implode(",", $playerids) .")
+ GROUP BY victim;";
+
+ $q_kmupdate = mysql_query($sql_kmupdate);
+ while ($r_kmupdate = mysql_fetch_array($q_kmupdate)) {
+ mysql_query(" INSERT
+ INTO uts_killsmatrix
+ SET matchid = $matchid,
+ killer = $newplayerid,
+ victim = ${r_kmupdate['victim']},
+ kills = ${r_kmupdate['kills']};");
+ }
+
+ $sql_kmupdate = " SELECT killer,
+ SUM(kills) AS kills
+ FROM uts_killsmatrix
+ WHERE matchid = $matchid
+ AND victim IN (". implode(",", $playerids) .")
+ GROUP BY killer;";
+
+ $q_kmupdate = mysql_query($sql_kmupdate);
+ while ($r_kmupdate = mysql_fetch_array($q_kmupdate)) {
+ mysql_query(" INSERT
+ INTO uts_killsmatrix
+ SET matchid = $matchid,
+ killer = ${r_kmupdate['killer']},
+ victim = $newplayerid,
+ kills = ${r_kmupdate['kills']};");
+ }
+
+ mysql_query(" DELETE
+ FROM uts_killsmatrix
+ WHERE matchid = $matchid
+ AND (killer IN (". implode(",", $playerids) .")
+ OR victim IN (". implode(",", $playerids) ."));");
+
+
+ // FINISHED UPDATING THE KILLS MATRiX
+ // **********************************
+
+
+ // Get non summed information
+
+ $r_truepinfo1 = small_query("SELECT insta, pid, team, isabot, country, ip, gid FROM uts_player WHERE pid = '$pid' AND matchid = $matchid LIMIT 0,1");
+ // fix rejoin as spec
+ if ($r_treupinfo1['team'] == 255) {
+ $r_trueteam = small_query("SELECT team FROM uts_player WHERE pid = '$pid' AND matchid = $matchid AND team != 255 LIMIT 0,1");
+ if ($r_trueteam['team'] < 255) {
+ $r_truepinfo1['team'] = $r_trueteam['team'];
+ }
+ }
+
+ // Group Player Stuff so we only have 1 player record per match
+ if ($gamename == "Bunny Track") {
+ // In bunnytrack the gamescore is 2000 - fastest time in seconds so use MAX gamescore rather then SUM
+ $r_truepinfo2 = small_query("SELECT
+ SUM(gametime) AS gametime,
+ MAX(gamescore) AS gamescore,
+ AVG(lowping) AS lowping,
+ AVG(highping) AS highping,
+ AVG(avgping) AS avgping,
+ SUM(frags) AS frags,
+ SUM(deaths) AS deaths,
+ SUM(kills) AS kills,
+ SUM(suicides) AS suicides,
+ SUM(teamkills) AS teamkills,
+ AVG(eff) AS eff,
+ AVG(accuracy) AS accuracy,
+ AVG(ttl) AS ttl,
+ SUM(flag_taken) AS flag_taken,
+ SUM(flag_pickedup) AS flag_pickedup,
+ SUM(flag_dropped) AS flag_dropped,
+ SUM(flag_return) AS flag_return,
+ SUM(flag_capture) AS flag_capture,
+ SUM(flag_cover) AS flag_cover,
+ SUM(flag_seal) AS flag_seal,
+ SUM(flag_assist) AS flag_assist,
+ SUM(flag_kill) AS flag_kill,
+ SUM(dom_cp) AS dom_cp,
+ SUM(ass_obj) AS ass_obj,
+ SUM(spree_double) AS spree_double,
+ SUM(spree_triple) AS spree_triple,
+ SUM(spree_multi) AS spree_multi,
+ SUM(spree_mega) AS spree_mega,
+ SUM(spree_ultra) AS spree_ultra,
+ SUM(spree_monster) AS spree_monster,
+ SUM(spree_kill) AS spree_kill,
+ SUM(spree_rampage) AS spree_rampage,
+ SUM(spree_dom) AS spree_dom,
+ SUM(spree_uns) AS spree_uns,
+ SUM(spree_god) AS spree_god,
+ SUM(pu_pads) AS pu_pads,
+ SUM(pu_armour) AS pu_armour,
+ SUM(pu_keg) AS pu_keg,
+ SUM(pu_invis) AS pu_invis,
+ SUM(pu_belt) AS pu_belt,
+ SUM(pu_amp) AS pu_amp,
+ SUM(rank) AS rank
+ FROM uts_player WHERE matchid = $matchid AND pid = '$pid'");
+ }
+ else {
+ $r_truepinfo2 = small_query("SELECT
+ SUM(gametime) AS gametime,
+ SUM(gamescore) AS gamescore,
+ AVG(lowping) AS lowping,
+ AVG(highping) AS highping,
+ AVG(avgping) AS avgping,
+ SUM(frags) AS frags,
+ SUM(deaths) AS deaths,
+ SUM(kills) AS kills,
+ SUM(suicides) AS suicides,
+ SUM(teamkills) AS teamkills,
+ AVG(eff) AS eff,
+ AVG(accuracy) AS accuracy,
+ AVG(ttl) AS ttl,
+ SUM(flag_taken) AS flag_taken,
+ SUM(flag_pickedup) AS flag_pickedup,
+ SUM(flag_dropped) AS flag_dropped,
+ SUM(flag_return) AS flag_return,
+ SUM(flag_capture) AS flag_capture,
+ SUM(flag_cover) AS flag_cover,
+ SUM(flag_seal) AS flag_seal,
+ SUM(flag_assist) AS flag_assist,
+ SUM(flag_kill) AS flag_kill,
+ SUM(dom_cp) AS dom_cp,
+ SUM(ass_obj) AS ass_obj,
+ SUM(spree_double) AS spree_double,
+ SUM(spree_triple) AS spree_triple,
+ SUM(spree_multi) AS spree_multi,
+ SUM(spree_mega) AS spree_mega,
+ SUM(spree_ultra) AS spree_ultra,
+ SUM(spree_monster) AS spree_monster,
+ SUM(spree_kill) AS spree_kill,
+ SUM(spree_rampage) AS spree_rampage,
+ SUM(spree_dom) AS spree_dom,
+ SUM(spree_uns) AS spree_uns,
+ SUM(spree_god) AS spree_god,
+ SUM(pu_pads) AS pu_pads,
+ SUM(pu_armour) AS pu_armour,
+ SUM(pu_keg) AS pu_keg,
+ SUM(pu_invis) AS pu_invis,
+ SUM(pu_belt) AS pu_belt,
+ SUM(pu_amp) AS pu_amp,
+ SUM(rank) AS rank
+ FROM uts_player WHERE matchid = $matchid AND pid = '$pid'");
+ }
+
+ // Remove all of this player's records
+ $rem_precord = "DELETE FROM uts_player WHERE matchid = $matchid AND pid = '$pid'";
+ mysql_query($rem_precord);
+
+ // Add this new record to match
+ $upd_precord = " INSERT
+ INTO uts_player
+ SET matchid = $matchid,
+ insta = '$r_truepinfo1[insta]',
+ playerid = '$newplayerid',
+ pid = '$pid',
+ team = '$r_truepinfo1[team]',
+ isabot = '$r_truepinfo1[isabot]',
+ country = '$r_truepinfo1[country]',
+ ip = '$r_truepinfo1[ip]',
+ gid = '$r_truepinfo1[gid]',
+ gametime = '$r_truepinfo2[gametime]',
+ gamescore = '$r_truepinfo2[gamescore]',
+ lowping = '".(int)$r_truepinfo2[lowping]."',
+ highping = '".(int)$r_truepinfo2[highping]."',
+ avgping = '".(int)$r_truepinfo2[avgping]."',
+ frags = '$r_truepinfo2[frags]',
+ deaths = '$r_truepinfo2[deaths]',
+ kills = '$r_truepinfo2[kills]',
+ suicides = '$r_truepinfo2[suicides]',
+ teamkills = '$r_truepinfo2[teamkills]',
+ eff = '$r_truepinfo2[eff]',
+ accuracy = '$r_truepinfo2[accuracy]',
+ ttl = '$r_truepinfo2[ttl]',
+ flag_taken = '$r_truepinfo2[flag_taken]',
+ flag_dropped = '$r_truepinfo2[flag_dropped]',
+ flag_return = '$r_truepinfo2[flag_return]',
+ flag_capture = '$r_truepinfo2[flag_capture]',
+ flag_cover = '$r_truepinfo2[flag_cover]',
+ flag_seal = '$r_truepinfo2[flag_seal]',
+ flag_assist = '$r_truepinfo2[flag_assist]',
+ flag_kill = '$r_truepinfo2[flag_kill]',
+ flag_pickedup = '$r_truepinfo2[flag_pickedup]',
+ dom_cp = '$r_truepinfo2[dom_cp]',
+ ass_obj = '$r_truepinfo2[ass_obj]',
+ spree_double = '$r_truepinfo2[spree_double]',
+ spree_triple = '$r_truepinfo2[spree_triple]',
+ spree_multi = '$r_truepinfo2[spree_multi]',
+ spree_mega = '$r_truepinfo2[spree_mega]',
+ spree_ultra = '$r_truepinfo2[spree_ultra]',
+ spree_monster = '$r_truepinfo2[spree_monster]',
+ spree_kill = '$r_truepinfo2[spree_kill]',
+ spree_rampage = '$r_truepinfo2[spree_rampage]',
+ spree_dom = '$r_truepinfo2[spree_dom]',
+ spree_uns = '$r_truepinfo2[spree_uns]',
+ spree_god = '$r_truepinfo2[spree_god]',
+ pu_pads = '$r_truepinfo2[pu_pads]',
+ pu_armour = '$r_truepinfo2[pu_armour]',
+ pu_keg = '$r_truepinfo2[pu_keg]',
+ pu_invis = '$r_truepinfo2[pu_invis]',
+ pu_belt = '$r_truepinfo2[pu_belt]',
+ pu_amp = '$r_truepinfo2[pu_amp]',
+ rank = '$r_truepinfo2[rank]';";
+ mysql_query($upd_precord) or die(mysql_error());
+ $cleaned = true;
+ }
+}
+if ($cleaned and $html) echo "
";
+?>
\ No newline at end of file
diff --git a/html/import/import_playerstuff.php b/html/import/import_playerstuff.php
new file mode 100755
index 0000000..73714e4
--- /dev/null
+++ b/html/import/import_playerstuff.php
@@ -0,0 +1,182 @@
+ 0");
+ $lowping = $r_player9[lowping];
+ $highping = $r_player9[highping];
+ $avgping = (int)$r_player9[avgping];
+
+ // People who join at the end error the import, this stops it
+ IF ($lowping == NULL) { $lowping = 0; }
+ IF ($highping == NULL) { $highping = 0; }
+ IF ($avgping == NULL) { $avgping = 0; }
+
+ // Get accuracy, ttl etc
+ $r_acc = 0;
+ $r_deaths = 0;
+ $r_efficiency = 0;
+ $r_frags = 0;
+ $r_kills = 0;
+ $r_teamkills = 0;
+ $r_suicides = 0;
+ $r_tos = 0;
+ $r_ttl = 0;
+
+ $q_acc = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'accuracy' AND col3 = $playerid");
+ $q_deaths = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'deaths' AND col3 = $playerid");
+ $q_kills = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'kills' AND col3 = $playerid");
+ $q_teamkills = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'teamkills' AND col3 = $playerid");
+ $q_efficiency = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'efficiency' AND col3 = $playerid");
+ $q_suicides = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'suicides' AND col3 = $playerid");
+ $q_tos = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'time_on_server' AND col3 = $playerid");
+ $q_ttl = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'ttl' AND col3 = $playerid");
+ $q_score = small_query("SELECT col4 FROM uts_temp_$uid WHERE col1 = 'stat_player' AND col2 = 'score' AND col3 = $playerid");
+
+ IF ($teamgame == "True") {
+ $r_kills = $q_kills[col4];
+ $r_teamkills = $q_teamkills[col4];
+ }
+ IF ($teamgame == "False") {
+ $r_kills = $q_kills[col4] + $q_teamkills[col4];
+ $r_teamkills = 0;
+ }
+
+ $r_acc = get_dp($q_acc[col4]);
+ $r_efficiency = get_dp($q_efficiency[col4]);
+ $r_deaths = $q_deaths[col4];
+ $r_suicides = $q_suicides[col4];
+ $r_frags = $r_kills-$r_suicides-$r_teamkills;
+
+ $r_tos = get_dp($q_tos[col4]);
+ // time on server can't be longer then the server game time!
+ if ($r_tos > $servergametime) {
+ $r_tos = get_dp($servergametime);
+ }
+ $r_ttl = get_dp($q_ttl[col4]);
+ $r_score = $q_score[col4];
+
+ // Generate player record
+ $sql_playerid = " INSERT
+ INTO uts_player
+ SET matchid = '$matchid',
+ playerid = '$playerid',
+ pid = '$pid',
+ team = '$playerteam',
+ gid = '$gid',
+ insta = '$gameinsta',
+ country = '$playercountry',
+ ip = '$playerip',
+
+
+ spree_double = '$q_spree_dbl',
+ spree_multi = '$q_spree_mult',
+ spree_ultra = '$q_spree_ult',
+ spree_monster = '$q_spree_mon',
+ spree_kill = '$q_spree_kill',
+ spree_rampage = '$q_spree_rampage',
+ spree_dom = '$q_spree_dom',
+ spree_uns = '$q_spree_uns',
+ spree_god = '$q_spree_god',
+
+ pu_pads = '$pu_pads',
+ pu_armour = '$pu_armour',
+ pu_keg = '$pu_keg',
+ pu_belt = '$pu_belt',
+ pu_amp = '$pu_amp',
+ pu_invis = '$pu_invis',
+
+ lowping = '$lowping',
+ highping = '$highping',
+ avgping = '$avgping',
+
+ accuracy = '$r_acc',
+ frags = '$r_frags',
+ deaths = '$r_deaths',
+ kills = '$r_kills',
+ suicides = '$r_suicides',
+ teamkills = '$r_teamkills',
+ eff = '$r_efficiency',
+ gametime = '$r_tos',
+ ttl = '$r_ttl',
+ gamescore= '$r_score'";
+
+ $q_playerid = mysql_query($sql_playerid) or die(mysql_error());
+ $playerecordid = mysql_insert_id();
+
+
+?>
diff --git a/html/import/import_ranking.php b/html/import/import_ranking.php
new file mode 100755
index 0000000..9ad18a2
--- /dev/null
+++ b/html/import/import_ranking.php
@@ -0,0 +1,127 @@
+ 0 AND e.col2 <= 5 GROUP BY e.col2";
+ $q_btmaprank = mysql_query($sql_btmaprank) or die ("Can't retrieve \$q_btmaprank: ". mysql_error());
+ while($r_btmaprank = mysql_fetch_assoc($q_btmaprank)) {
+ IF ($r_btmaprank[no] == 1) {
+ $rank_bt += $r_btmaprank[count] * 10;
+ } elseIF ($r_btmaprank[no] == 2) {
+ $rank_bt += $r_btmaprank[count] * 8;
+ } elseIF ($r_btmaprank[no] == 3) {
+ $rank_bt += $r_btmaprank[count] * 6;
+ } elseIF ($r_btmaprank[no] == 4) {
+ $rank_bt += $r_btmaprank[count] * 4;
+ } elseIF ($r_btmaprank[no] == 5) {
+ $rank_bt += $r_btmaprank[count] * 2;
+ }
+ // if ($dbg) echo "| pid: $r_btmaprank[no]*$r_btmaprank[count] => $rank_bt
";
+ }
+
+ $rank_nrank = $rank_bt;
+ } else {
+ $rank_nrank = $rank_fpos-$rank_fneg;
+ }
+
+ // Average the rank over game minutes
+ if ($r_gametime == 0) {
+ // some bug occured, ignore
+ if ($dbg) echo "Skip ranking. " ;
+
+ return;
+ }
+
+ $rank_nrank = ($rank_nrank/$r_gametime) * 600;
+ if ($dbg) echo "Points: $rank_nrank
Time: $r_gametime
";
+
+ // Add rank gametime to previous amount
+ $rank_gametime = $r_gametime;
+
+ // Reduce ranking if player hasnt played that much
+ IF ($rank_gametime < 10) return;
+
+ IF ($rank_gametime < 50) {
+ $rank_nrank = $rank_nrank*.25;
+ }
+
+ IF ($rank_gametime >= 50 && $rank_gametime < 100) {
+ $rank_nrank = $rank_nrank*.50;
+ }
+
+ IF ($rank_gametime >= 100 && $rank_gametime < 200) {
+ $rank_nrank = $rank_nrank*.70;
+ }
+
+ IF ($rank_gametime >= 200 && $rank_gametime < 300) {
+ $rank_nrank = $rank_nrank*.85;
+ }
+
+ if ($dbg) echo "Reduced: $rank_nrank
";
+
+ // Add new rank record if one does not exist
+ IF($rank_id == NULL) {
+ mysql_query("INSERT INTO uts_rank SET time = '$r_gametime', pid = '$pid', gid = '$gid', rank = '0', matches = '0';") or die(mysql_error());
+ $rank_id = mysql_insert_id();
+ $rank_gametime = 0;
+ $rank_crank = 0;
+ $rank_matches = 0;
+ }
+
+ // Add number of matches played
+ $rank_matches = $rank_matches+1;
+
+ // Work out effective rank given
+ $eff_rank = $rank_nrank-$rank_crank;
+
+ // if ($dbg) echo "", intval($rank_crank), "-", intval($rank_nrank). "-", $rank_matches, " ";
+
+ // Add effective rank points given to uts_player record
+ mysql_query("UPDATE uts_player SET rank = $eff_rank WHERE id = $playerecordid") or die(mysql_error());
+
+ // Update the rank
+ mysql_query("UPDATE uts_rank SET time = '$rank_gametime', rank = '$rank_nrank', prevrank = '$rank_crank', matches = '$rank_matches' WHERE id = $rank_id;") or die(mysql_error());
+?>
diff --git a/html/import/import_tdm.php b/html/import/import_tdm.php
new file mode 100755
index 0000000..6595072
--- /dev/null
+++ b/html/import/import_tdm.php
@@ -0,0 +1,2 @@
+
diff --git a/html/import/import_weapons.php b/html/import/import_weapons.php
new file mode 100755
index 0000000..5d59a3f
--- /dev/null
+++ b/html/import/import_weapons.php
@@ -0,0 +1,209 @@
+ $r_weapons['kills'],
+ 'weap_shotcount' => 0,
+ 'weap_hitcount' => 0,
+ 'weap_damagegiven' => 0,
+ 'weap_accuracy' => 0
+ );
+
+
+}
+
+
+// Get the weapon statistics
+$sql_weapons = " SELECT col1 AS type,
+ col2 AS weaponname,
+ col3 AS player,
+ col4 AS value
+ FROM uts_temp_$uid
+ WHERE col1 LIKE 'weap_%'";
+
+$q_weapons = mysql_query($sql_weapons) or die(mysql_error());
+while ($r_weapons = mysql_fetch_array($q_weapons)) {
+ // Get the wepon's id or assign a new one
+ if (empty($r_weapons['weaponname'])) continue;
+ if (isset($weaponnames[$r_weapons['weaponname']])) {
+ $weaponid = $weaponnames[$r_weapons['weaponname']];
+ } else {
+ mysql_query("INSERT INTO uts_weapons SET name = '". addslashes($r_weapons['weaponname']) ."'") or die(mysql_error());
+ $weaponid = mysql_insert_id();
+ $weaponnames[$r_weapons['weaponname']] = $weaponid;
+ }
+
+ // Get the unique pid of this player
+ if (!isset($playerid2pid[$r_weapons['player']])) {
+// Happens if we're ignoring bots or banned players
+ continue;
+ } else {
+ $pid = $playerid2pid[$r_weapons['player']];
+ }
+
+ if (!isset($weapons[$pid][$weaponid]['weap_kills'])) {
+ $weapons[$pid][$weaponid] = array(
+ 'weap_kills' => 0,
+ 'weap_shotcount' => 0,
+ 'weap_hitcount' => 0,
+ 'weap_damagegiven' => 0,
+ 'weap_accuracy' => 0
+ );
+ }
+
+ $weapons[$pid][$weaponid][$r_weapons['type']] = $r_weapons['value'];
+}
+
+
+// Finally write the weapon statistics for this match
+$s_weapons = array();
+foreach($weapons as $playerid => $weapon) {
+ foreach($weapon as $weaponid => $infos) {
+ if ($infos['weap_kills'] == 0 and $infos['weap_shotcount'] == 0) continue;
+ mysql_query(" INSERT
+ INTO uts_weaponstats
+ SET matchid = '$matchid',
+ pid = '$playerid',
+ weapon = '$weaponid',
+ kills = '${infos['weap_kills']}',
+ shots = '${infos['weap_shotcount']}',
+ hits= '${infos['weap_hitcount']}',
+ damage = '${infos['weap_damagegiven']}',
+ acc = '". round($infos['weap_accuracy'], 2) ."';") or die(mysql_error());
+
+ // Summarize totals for this match
+ if (!isset($s_weapons[$weaponid]['weap_kills'])) {
+ $s_weapons[$weaponid]['weap_kills'] = $infos['weap_kills'];
+ $s_weapons[$weaponid]['weap_shotcount'] = $infos['weap_shotcount'];
+ $s_weapons[$weaponid]['weap_hitcount'] = $infos['weap_hitcount'];
+ $s_weapons[$weaponid]['weap_damagegiven'] = $infos['weap_damagegiven'];
+ $s_weapons[$weaponid]['weap_accuracy'] = $infos['weap_accuracy'];
+ } else {
+ $s_weapons[$weaponid]['weap_kills'] += $infos['weap_kills'];
+ $s_weapons[$weaponid]['weap_shotcount'] += $infos['weap_shotcount'];
+ $s_weapons[$weaponid]['weap_hitcount'] += $infos['weap_hitcount'];
+ $s_weapons[$weaponid]['weap_damagegiven'] += $infos['weap_damagegiven'];
+ $s_weapons[$weaponid]['weap_accuracy'] = ($s_weapons[$weaponid]['weap_accuracy'] + $infos['weap_accuracy']) / 2;
+ }
+ }
+}
+
+
+// Update the player's weapon statistics (matchid 0);
+foreach($weapons as $playerid => $weapon) {
+ foreach($weapon as $weaponid => $infos) {
+ if ($infos['weap_kills'] == 0 and $infos['weap_shotcount'] == 0) continue;
+ // Check whether a record for this player and weapon already
+ // exists
+ $r_pstat = small_query(" SELECT pid
+ FROM uts_weaponstats
+ WHERE matchid = '0'
+ AND pid = '$playerid'
+ AND weapon = '$weaponid'");
+ // No -> create
+ if (!$r_pstat) {
+ mysql_query(" INSERT
+ INTO uts_weaponstats
+ SET matchid = '0',
+ pid = '$playerid',
+ weapon = '$weaponid',
+ kills = '${infos['weap_kills']}',
+ shots = '${infos['weap_shotcount']}',
+ hits= '${infos['weap_hitcount']}',
+ damage = '${infos['weap_damagegiven']}',
+ acc = '". round($infos['weap_accuracy'], 2) ."';") or die(mysql_error());
+ // Yes -> update
+ } else {
+ mysql_query(" UPDATE uts_weaponstats
+ SET weapon = '$weaponid',
+ kills = kills + '${infos['weap_kills']}',
+ shots = shots + '${infos['weap_shotcount']}',
+ hits = hits + '${infos['weap_hitcount']}',
+ damage = damage + '${infos['weap_damagegiven']}',
+ acc = (acc + '". round($infos['weap_accuracy'], 2) ."') / 2
+ WHERE matchid = '0'
+ AND pid = '$playerid'
+ AND weapon = '$weaponid';") or die(mysql_error());
+ }
+ }
+}
+
+// Update the global weapon statistics (matchid 0, playerid 0 );
+foreach($s_weapons as $weaponid => $infos) {
+ if ($infos['weap_kills'] == 0 and $infos['weap_shotcount'] == 0) continue;
+ // Check whether the global record for this weapon already exists
+ $r_pstat = small_query(" SELECT pid
+ FROM uts_weaponstats
+ WHERE matchid = '0'
+ AND pid = '0'
+ AND weapon = '$weaponid'");
+ // No -> create
+ if (!$r_pstat) {
+ mysql_query(" INSERT
+ INTO uts_weaponstats
+ SET matchid = '0',
+ pid = '0',
+ weapon = '$weaponid',
+ kills = '${infos['weap_kills']}',
+ shots = '${infos['weap_shotcount']}',
+ hits= '${infos['weap_hitcount']}',
+ damage = '${infos['weap_damagegiven']}',
+ acc = '". round($infos['weap_accuracy'], 2) ."';") or die(mysql_error());
+ // Yes -> update
+ } else {
+ mysql_query(" UPDATE uts_weaponstats
+ SET weapon = '$weaponid',
+ kills = kills + '${infos['weap_kills']}',
+ shots = shots + '${infos['weap_shotcount']}',
+ hits = hits + '${infos['weap_hitcount']}',
+ damage = damage + '${infos['weap_damagegiven']}',
+ acc = (acc + '". round($infos['weap_accuracy'], 2) ."') / 2
+ WHERE matchid = '0'
+ AND pid = '0'
+ AND weapon = '$weaponid';") or die(mysql_error());
+ }
+}
+
+
+
+
+?>
\ No newline at end of file
diff --git a/html/import/index.htm b/html/import/index.htm
new file mode 100755
index 0000000..e69de29
diff --git a/html/includes/clanbase.php b/html/includes/clanbase.php
new file mode 100755
index 0000000..5ad7640
--- /dev/null
+++ b/html/includes/clanbase.php
@@ -0,0 +1,90 @@
+| )/U", $file, $out, PREG_SET_ORDER);
+
+
+ //for each player split the information and put all info in one array
+
+ for ($x=0;$x',$out[$x][1]);
+ }
+
+ //return the array
+
+ return ($player);
+
+ //All players are listed as:
+ //$player[0]
+ //$player[1]
+ //$player[2]
+ //etc.
+
+ //the info for each player is listed as:
+ //$player[0][0] = pid;
+ //$player[0][1] = name;
+}
+
+
+/*
+ This function is to get the clans from a war.
+ It will return an array with all the information.
+*/
+
+function get_clans($wid) {
+ //Load the page where all players are listed into a var.
+
+ $url = 'http://www.clanbase.com/warinfo.php?wid='.$wid.'&frame=1';
+ $file = implode('', file($url));
+
+ //Use an expression to get the tags from each clan
+
+ preg_match_all("/pagetitle'>Match (.*)vs (.*)<.div>/U", $file, $out, PREG_SET_ORDER);
+
+ //Add the information to one array
+
+ $clan[0][0]=$out[0][1];
+ $clan[1][0]=$out[0][2];
+
+ //Use an expression to get the cid + full name from each clan
+
+ preg_match_all("/claninfo\.php\?cid+=(.*)<.a>/U", $file, $out, PREG_SET_ORDER);
+
+ //Add the information to one array
+
+ $temp = explode('" class="slink">', $out[0][1]);
+ $clan[0][1]=$temp[0];
+ $clan[0][2]=$temp[1];
+
+ $temp = explode('" class="slink">', $out[1][1]);
+ $clan[1][1]=$temp[0];
+ $clan[1][2]=$temp[1];
+
+ //return the array
+
+ return ($clan);
+
+
+ //The clans are listed as:
+ //$clan[0]
+ //$clan[1]
+
+ //the info for each clan is listed as:
+ //$clan[0][0] = tag
+ //$clan[0][1] = cid
+ //$clan[0][2] = full name
+
+}
+?>
\ No newline at end of file
diff --git a/html/includes/config.php b/html/includes/config.php
new file mode 100755
index 0000000..7e9bd6f
--- /dev/null
+++ b/html/includes/config.php
@@ -0,0 +1,188 @@
+
\ No newline at end of file
diff --git a/html/includes/config_pic.php b/html/includes/config_pic.php
new file mode 100755
index 0000000..e70aee5
--- /dev/null
+++ b/html/includes/config_pic.php
@@ -0,0 +1,239 @@
+ 'Player has played a total of 57 Capture the Flag games.'
+//
+// '%PLAYERNAME%'s overall accuracy this month was %MONTH_ACC% % while it was %LMONTH_ACC% last month!'
+// ==> 'Player's overall accuracy this month was 42.22 % while it was 27.52 % last month!'
+
+
+$j=0;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = '%PLAYERNAME%';
+$pic[$i]['process'][$j]['fontcolor'] = '000000';
+$pic[$i]['process'][$j]['fontsize'] = 18;
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 23;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = '%GAMENAME%';
+$pic[$i]['process'][$j]['fontsize'] = 14;
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 43;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = 'Rank:';
+$pic[$i]['process'][$j]['fontcolor'] = 'DDDD20';
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 69;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['align'] = 'left';
+$pic[$i]['process'][$j]['value'] = '%RT%';
+$pic[$i]['process'][$j]['x_from'] = 65;
+$pic[$i]['process'][$j]['y_from'] = 69;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = 'Hours:';
+$pic[$i]['process'][$j]['fontcolor'] = '000000';
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 91;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['align'] = 'left';
+$pic[$i]['process'][$j]['value'] = '%TOTAL_GAMETIME%';
+$pic[$i]['process'][$j]['x_from'] = 75;
+$pic[$i]['process'][$j]['y_from'] = 91;
+$j++;
+
+
+
+
+
+
+
+
+// The next picture
+
+$i++;
+$pic[$i]['enabled'] = false;
+$pic[$i]['gidrequired'] = false;
+$pic[$i]['load']['template'] = 'basic.png';
+$pic[$i]['load']['recreate'] = true;
+$pic[$i]['load']['bgcolor'] = 'AAAAAA';
+$pic[$i]['load']['bgtransparent'] = false;
+
+$pic[$i]['output']['type'] = 'png';
+
+$pic[$i]['default']['align'] = 'left';
+$pic[$i]['default']['angle'] = 0;
+$pic[$i]['default']['font'] = 'microsbe.ttf';
+$pic[$i]['default']['fontcolor'] = 'FFFFFF';
+$pic[$i]['default']['fontsize'] = 10;
+
+$j=0;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = '%PLAYERNAME% sucks!';
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 23;
+$j++;
+$pic[$i]['process'][$j]['type'] = 'text';
+$pic[$i]['process'][$j]['value'] = 'in %GAMENAME% games that is...';
+$pic[$i]['process'][$j]['x_from'] = 9;
+$pic[$i]['process'][$j]['y_from'] = 43;
+$j++;
+
+
+
+?>
\ No newline at end of file
diff --git a/html/includes/countries.php b/html/includes/countries.php
new file mode 100755
index 0000000..4de8dde
--- /dev/null
+++ b/html/includes/countries.php
@@ -0,0 +1,244 @@
+ 'Afghanistan',
+ 'al' => 'Albania, People\'s Socialist Republic of',
+ 'dz' => 'Algeria, People\'s Democratic Republic of',
+ 'as' => 'American Samoa',
+ 'ad' => 'Andorra, Principality of',
+ 'ao' => 'Angola, Republic of',
+ 'ai' => 'Anguilla',
+ 'aq' => 'Antarctica (the territory South of 60 deg S)',
+ 'ag' => 'Antigua and Barbuda',
+ 'ar' => 'Argentina, Argentine Republic',
+ 'am' => 'Armenia',
+ 'aw' => 'Aruba',
+ 'au' => 'Australia, Commonwealth of',
+ 'at' => 'Austria, Republic of',
+ 'az' => 'Azerbaijan, Republic of',
+ 'bs' => 'Bahamas, Commonwealth of the',
+ 'bh' => 'Bahrain, Kingdom of',
+ 'bd' => 'Bangladesh, People\'s Republic of',
+ 'bb' => 'Barbados',
+ 'by' => 'Belarus',
+ 'be' => 'Belgium, Kingdom of',
+ 'bz' => 'Belize',
+ 'bj' => 'Benin, People\'s Republic of',
+ 'bm' => 'Bermuda',
+ 'bt' => 'Bhutan, Kingdom of',
+ 'bo' => 'Bolivia, Republic of',
+ 'ba' => 'Bosnia and Herzegovina',
+ 'bw' => 'Botswana, Republic of',
+ 'bv' => 'Bouvet Island (Bouvetoya)',
+ 'br' => 'Brazil, Federative Republic of',
+ 'io' => 'British Indian Ocean Territory (Chagos Archipelago)',
+ 'vg' => 'British Virgin Islands',
+ 'bn' => 'Brunei Darussalam',
+ 'bg' => 'Bulgaria, People\'s Republic of',
+ 'bf' => 'Burkina Faso',
+ 'bi' => 'Burundi, Republic of',
+ 'kh' => 'Cambodia, Kingdom of',
+ 'cm' => 'Cameroon, United Republic of',
+ 'ca' => 'Canada',
+ 'cv' => 'Cape Verde, Republic of',
+ 'ky' => 'Cayman Islands',
+ 'cf' => 'Central African Republic',
+ 'td' => 'Chad, Republic of',
+ 'cl' => 'Chile, Republic of',
+ 'cn' => 'China, People\'s Republic of',
+ 'cx' => 'Christmas Island',
+ 'cc' => 'Cocos (Keeling) Islands',
+ 'co' => 'Colombia, Republic of',
+ 'km' => 'Comoros, Federal and Islamic Republic of',
+ 'cd' => 'Congo, Democratic Republic of',
+ 'cg' => 'Congo, People\'s Republic of',
+ 'ck' => 'Cook Islands',
+ 'cr' => 'Costa Rica, Republic of',
+ 'ci' => 'Cote D\'Ivoire, Ivory Coast, Republic of the',
+ 'cu' => 'Cuba, Republic of',
+ 'cy' => 'Cyprus, Republic of',
+ 'cz' => 'Czech Republic',
+ 'dk' => 'Denmark, Kingdom of',
+ 'dj' => 'Djibouti, Republic of',
+ 'dm' => 'Dominica, Commonwealth of',
+ 'do' => 'Dominican Republic',
+ 'tl' => 'Timor-Leste',
+ 'ec' => 'Ecuador, Republic of',
+ 'eg' => 'Egypt, Arab Republic of',
+ 'sv' => 'El Salvador, Republic of',
+ 'gq' => 'Equatorial Guinea, Republic of',
+ 'er' => 'Eritrea',
+ 'ee' => 'Estonia',
+ 'et' => 'Ethiopia',
+ 'fo' => 'Faeroe Islands',
+ 'fk' => 'Falkland Islands (Malvinas)',
+ 'fj' => 'Fiji, Republic of the Fiji Islands',
+ 'fi' => 'Finland, Republic of',
+ 'fr' => 'France, French Republic',
+ 'gf' => 'French Guiana',
+ 'pf' => 'French Polynesia',
+ 'tf' => 'French Southern Territories',
+ 'ga' => 'Gabon, Gabonese Republic',
+ 'gm' => 'Gambia, Republic of the',
+ 'ge' => 'Georgia',
+ 'de' => 'Germany',
+ 'gh' => 'Ghana, Republic of',
+ 'gi' => 'Gibraltar',
+ 'gr' => 'Greece, Hellenic Republic',
+ 'gl' => 'Greenland',
+ 'gd' => 'Grenada',
+ 'gp' => 'Guadaloupe',
+ 'gu' => 'Guam',
+ 'gt' => 'Guatemala, Republic of',
+ 'gn' => 'Guinea, Revolutionary People\'s Rep\'c of',
+ 'gw' => 'Guinea-Bissau, Republic of',
+ 'gy' => 'Guyana, Republic of',
+ 'ht' => 'Haiti, Republic of',
+ 'hm' => 'Heard and McDonald Islands',
+ 'va' => 'Holy See (Vatican City State)',
+ 'hn' => 'Honduras, Republic of',
+ 'hk' => 'Hong Kong, Special Administrative Region of China',
+ 'hr' => 'Hrvatska (Croatia)',
+ 'hu' => 'Hungary, Hungarian People\'s Republic',
+ 'is' => 'Iceland, Republic of',
+ 'in' => 'India, Republic of',
+ 'id' => 'Indonesia, Republic of',
+ 'ir' => 'Iran, Islamic Republic of',
+ 'iq' => 'Iraq, Republic of',
+ 'ie' => 'Ireland',
+ 'il' => 'Israel, State of',
+ 'it' => 'Italy, Italian Republic',
+ 'jm' => 'Jamaica',
+ 'jp' => 'Japan',
+ 'jo' => 'Jordan, Hashemite Kingdom of',
+ 'kz' => 'Kazakhstan, Republic of',
+ 'ke' => 'Kenya, Republic of',
+ 'ki' => 'Kiribati, Republic of',
+ 'kp' => 'Korea, Democratic People\'s Republic of',
+ 'kr' => 'Korea, Republic of',
+ 'kw' => 'Kuwait, State of',
+ 'kg' => 'Kyrgyz Republic',
+ 'la' => 'Lao People\'s Democratic Republic',
+ 'lv' => 'Latvia',
+ 'lb' => 'Lebanon, Lebanese Republic',
+ 'ls' => 'Lesotho, Kingdom of',
+ 'lr' => 'Liberia, Republic of',
+ 'ly' => 'Libyan Arab Jamahiriya',
+ 'li' => 'Liechtenstein, Principality of',
+ 'lt' => 'Lithuania',
+ 'lu' => 'Luxembourg, Grand Duchy of',
+ 'mo' => 'Macao, Special Administrative Region of China',
+ 'mk' => 'Macedonia, the former Yugoslav Republic of',
+ 'mg' => 'Madagascar, Republic of',
+ 'mw' => 'Malawi, Republic of',
+ 'my' => 'Malaysia',
+ 'mv' => 'Maldives, Republic of',
+ 'ml' => 'Mali, Republic of',
+ 'mt' => 'Malta, Republic of',
+ 'mh' => 'Marshall Islands',
+ 'mq' => 'Martinique',
+ 'mr' => 'Mauritania, Islamic Republic of',
+ 'mu' => 'Mauritius',
+ 'yt' => 'Mayotte',
+ 'mx' => 'Mexico, United Mexican States',
+ 'fm' => 'Micronesia, Federated States of',
+ 'md' => 'Moldova, Republic of',
+ 'mc' => 'Monaco, Principality of',
+ 'mn' => 'Mongolia, Mongolian People\'s Republic',
+ 'ms' => 'Montserrat',
+ 'ma' => 'Morocco, Kingdom of',
+ 'mz' => 'Mozambique, People\'s Republic of',
+ 'mm' => 'Myanmar',
+ 'na' => 'Namibia',
+ 'nr' => 'Nauru, Republic of',
+ 'np' => 'Nepal, Kingdom of',
+ 'an' => 'Netherlands Antilles',
+ 'nl' => 'Netherlands, Kingdom of the',
+ 'nc' => 'New Caledonia',
+ 'nz' => 'New Zealand',
+ 'ni' => 'Nicaragua, Republic of',
+ 'ne' => 'Niger, Republic of the',
+ 'ng' => 'Nigeria, Federal Republic of',
+ 'nu' => 'Niue, Republic of',
+ 'nf' => 'Norfolk Island',
+ 'mp' => 'Northern Mariana Islands',
+ 'no' => 'Norway, Kingdom of',
+ 'om' => 'Oman, Sultanate of',
+ 'pk' => 'Pakistan, Islamic Republic of',
+ 'pw' => 'Palau',
+ 'ps' => 'Palestinian Territory, Occupied',
+ 'pa' => 'Panama, Republic of',
+ 'pg' => 'Papua New Guinea',
+ 'py' => 'Paraguay, Republic of',
+ 'pe' => 'Peru, Republic of',
+ 'ph' => 'Philippines, Republic of the',
+ 'pn' => 'Pitcairn Island',
+ 'pl' => 'Poland, Polish People\'s Republic',
+ 'pt' => 'Portugal, Portuguese Republic',
+ 'pr' => 'Puerto Rico',
+ 'qa' => 'Qatar, State of',
+ 're' => 'Reunion',
+ 'ro' => 'Romania, Socialist Republic of',
+ 'ru' => 'Russian Federation',
+ 'rw' => 'Rwanda, Rwandese Republic',
+ 'sh' => 'St. Helena',
+ 'kn' => 'St. Kitts and Nevis',
+ 'lc' => 'St. Lucia',
+ 'pm' => 'St. Pierre and Miquelon',
+ 'vc' => 'St. Vincent and the Grenadines',
+ 'ws' => 'Samoa, Independent State of',
+ 'sm' => 'San Marino, Republic of',
+ 'st' => 'Sao Tome and Principe, Democratic Republic of',
+ 'sa' => 'Saudi Arabia, Kingdom of',
+ 'sn' => 'Senegal, Republic of',
+ 'sc' => 'Seychelles, Republic of',
+ 'sl' => 'Sierra Leone, Republic of',
+ 'sg' => 'Singapore, Republic of',
+ 'sk' => 'Slovakia (Slovak Republic)',
+ 'si' => 'Slovenia',
+ 'sb' => 'Solomon Islands',
+ 'so' => 'Somalia, Somali Republic',
+ 'za' => 'South Africa, Republic of',
+ 'gs' => 'South Georgia and the South Sandwich Islands',
+ 'es' => 'Spain, Spanish State',
+ 'lk' => 'Sri Lanka, Democratic Socialist Republic of',
+ 'sd' => 'Sudan, Democratic Republic of the',
+ 'sr' => 'Suriname, Republic of',
+ 'sg' => 'Svalbard & Jan Mayen Islands',
+ 'sz' => 'Swaziland, Kingdom of',
+ 'se' => 'Sweden, Kingdom of',
+ 'ch' => 'Switzerland, Swiss Confederation',
+ 'sy' => 'Syrian Arab Republic',
+ 'tw' => 'Taiwan, Province of China',
+ 'tj' => 'Tajikistan',
+ 'tz' => 'Tanzania, United Republic of',
+ 'th' => 'Thailand, Kingdom of',
+ 'tg' => 'Togo, Togolese Republic',
+ 'tk' => 'Tokelau (Tokelau Islands)',
+ 'to' => 'Tonga, Kingdom of',
+ 'tt' => 'Trinidad and Tobago, Republic of',
+ 'tn' => 'Tunisia, Republic of',
+ 'tr' => 'Turkey, Republic of',
+ 'tm' => 'Turkmenistan',
+ 'tc' => 'Turks and Caicos Islands',
+ 'tv' => 'Tuvalu',
+ 'vi' => 'US Virgin Islands',
+ 'ug' => 'Uganda, Republic of',
+ 'ua' => 'Ukraine',
+ 'ae' => 'United Arab Emirates',
+ 'gb' => 'United Kingdom of Great Britain & N. Ireland',
+ 'um' => 'United States Minor Outlying Islands',
+ 'us' => 'United States of America',
+ 'uy' => 'Uruguay, Eastern Republic of',
+ 'uz' => 'Uzbekistan',
+ 'vu' => 'Vanuatu',
+ 've' => 'Venezuela, Bolivarian Republic of',
+ 'vn' => 'Viet Nam, Socialist Republic of',
+ 'wf' => 'Wallis and Futuna Islands',
+ 'eh' => 'Western Sahara',
+ 'ye' => 'Yemen',
+ 'yu' => 'Yugoslavia, Socialist Federal Republic of',
+ 'zm' => 'Zambia, Republic of',
+ 'zw' => 'Zimbabwe',
+ 'xx' => 'Unknown country'
+ );
+?>
\ No newline at end of file
diff --git a/html/includes/footer.php b/html/includes/footer.php
new file mode 100755
index 0000000..0fd4f3f
--- /dev/null
+++ b/html/includes/footer.php
@@ -0,0 +1,16 @@
+
+';
+
+// Please leave this bit in, its the least you can do with all the work we have done :)
+
+ echo'
+
+ UTStats Beta 4.2.8 © 2005 azazel, AnthraX and toa |
+
+
+
+
+