root/dev/common/includes/globals.php @ 323

Revision 323, 1.7 KB (checked in by ralle030583, 13 years ago)

- DB Update004 wasn't active
- pageslitter was missing in kills / losses page
- parser fix for german killmails (Allianz : Nichts)
- Update from history.xml for history mod...

Line 
1<?php
2// current subversion revision
3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 323 $', $match);
4define('SVN_REV', $match[1]);
5
6// current version: major.minor.sub
7// unpair numbers for minor = development version
8define('KB_VERSION', '1.4.0');
9define('KB_RELEASE', '(Trinity)');
10
11// set the running-server for id-syncs here
12define('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
19function 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
30function slashfix($fix)
31{
32    return addslashes(stripslashes($fix));
33}
34
35function 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
45function 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
59function 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?>
Note: See TracBrowser for help on using the browser.