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

Revision 278, 1.6 KB (checked in by ralle030583, 13 years ago)

proccessRequest() must be called before any output in order for xajax to function
(commited for Coni)

Line 
1<?php
2// current subversion revision
3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 278 $', $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 (Trinity)');
9
10// set the running-server for id-syncs here
11define('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
18function 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
29function slashfix($fix)
30{
31    return addslashes(stripslashes($fix));
32}
33
34function 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
44function 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
58function 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?>
Note: See TracBrowser for help on using the browser.