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