1 | <?php |
---|
2 | // current subversion revision |
---|
3 | preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 342 $', $match); |
---|
4 | define('SVN_REV', $match[1]); |
---|
5 | |
---|
6 | // current version: major.minor.sub |
---|
7 | // unpair numbers for minor = development version |
---|
8 | define('KB_VERSION', '1.4.0'); |
---|
9 | define('KB_RELEASE', '(Trinity)'); |
---|
10 | |
---|
11 | // set the running-server for id-syncs here |
---|
12 | define('KB_SYNCURL', 'http://sync.eve-dev.net/?a=sync_server'); |
---|
13 | #define('KB_SYNCURL', 'http://exi.ath.cx/eve_sync/?a=sync_server'); |
---|
14 | |
---|
15 | // add new corporations here once you've added the logo to img/corps/ |
---|
16 | $corp_npc = array('Guristas', 'Serpentis Corporation', 'Sansha\'s Nation', 'CONCORD', |
---|
17 | 'Mordus Legion', 'Blood Raider', 'Archangels', 'Guardian Angels'); |
---|
18 | |
---|
19 | function shorten($shorten, $by = 22) |
---|
20 | { |
---|
21 | if (strlen($shorten) > $by) |
---|
22 | { |
---|
23 | $s = substr($shorten, 0, $by) . "..."; |
---|
24 | } |
---|
25 | else $s = $shorten; |
---|
26 | |
---|
27 | return $s; |
---|
28 | } |
---|
29 | |
---|
30 | function slashfix($fix) |
---|
31 | { |
---|
32 | return addslashes(stripslashes($fix)); |
---|
33 | } |
---|
34 | |
---|
35 | function roundsec($sec) |
---|
36 | { |
---|
37 | if ($sec <= 0) |
---|
38 | $s = 0.0; |
---|
39 | else |
---|
40 | $s = $sec; |
---|
41 | |
---|
42 | return number_format(round($s, 1), 1); |
---|
43 | } |
---|
44 | |
---|
45 | function get_tpl($name) |
---|
46 | { |
---|
47 | if (IS_IGB) |
---|
48 | { |
---|
49 | if (file_exists('./templates/igb_'.$name.'.tpl')) |
---|
50 | { |
---|
51 | return 'igb_'.$name.'.tpl'; |
---|
52 | } |
---|
53 | } |
---|
54 | return $name.'.tpl'; |
---|
55 | } |
---|
56 | |
---|
57 | // this is currently only a wrapper but might get |
---|
58 | // timestamp adjustment options in the future |
---|
59 | function kbdate($format, $timestamp = null) |
---|
60 | { |
---|
61 | if ($timestamp === null) |
---|
62 | { |
---|
63 | $timestamp = time(); |
---|
64 | } |
---|
65 | |
---|
66 | if (config::get('date_gmtime')) |
---|
67 | { |
---|
68 | return gmdate($format, $timestamp); |
---|
69 | } |
---|
70 | return date($format, $timestamp); |
---|
71 | } |
---|
72 | ?> |
---|