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

Revision 200, 1.6 KB (checked in by ralle030583, 16 years ago)

bug in toplist.class ... made a stupid error which killed the loose page and some awards... fixed now

Line 
1<?php
2// current subversion revision
3preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 200 $', $match);
4define('SVN_REV', $match[1]);
5
6// current version: major.minor.sub
7// unpair numbers for minor = development version
8define('KB_VERSION', '1.3.0 (Tigerduck Memorial Edition)');
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');
16
17function shorten($shorten, $by = 22)
18{
19    if (strlen($shorten) > $by)
20    {
21        $s = substr($shorten, 0, $by) . "...";
22    }
23    else $s = $shorten;
24
25    return $s;
26}
27
28function slashfix($fix)
29{
30    return addslashes(stripslashes($fix));
31}
32
33function roundsec($sec)
34{
35    if ($sec <= 0)
36        $s = 0.0;
37    else
38        $s = $sec;
39
40    return number_format(round($s, 1), 1);
41}
42
43function get_tpl($name)
44{
45    if (IS_IGB)
46    {
47        if (file_exists('./templates/igb_'.$name.'.tpl'))
48        {
49            return 'igb_'.$name.'.tpl';
50        }
51    }
52    return $name.'.tpl';
53}
54
55// this is currently only a wrapper but might get
56// timestamp adjustment options in the future
57function kbdate($format, $timestamp = null)
58{
59    if ($timestamp === null)
60    {
61        $timestamp = time();
62    }
63
64    if (config::get('date_gmtime'))
65    {
66        return gmdate($format, $timestamp);
67    }
68    return date($format, $timestamp);
69}
70?>
Note: See TracBrowser for help on using the browser.