forked from arcestiaishere/klasemate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.php
57 lines (50 loc) · 1.75 KB
/
init.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
## -------------------------------------------------------
# Klasemate
## -------------------------------------------------------
# Created by Laurensius Jeffrey Chandra
# http://klasemate.arcestia.id
#
# File: init.php
# License: GPLv2
# Copyright: (c) 2016 - Klasemate
## -------------------------------------------------------
// Show all kind of errors
ini_set('display_errors', 'On');
error_reporting(E_ALL);
// Set default timezone to UTC (timezones are defined by user)
date_default_timezone_set("UTC");
// Set default charset for PHP as UTF-8
// In case of an action returning JSON encoded objects
header('Content-Type: text/html; charset=utf-8');
/**
* --------------------------------------------------------------------
* Klasemate VERSION
* --------------------------------------------------------------------
*/
define("VERSION", "v0.1.0");
define("CHANNEL", "Beta"); // e.g.: Alpha, Beta, Release Candidate, Final
/**
* --------------------------------------------------------------------
* TIME DEFINITION CONSTANTS
* --------------------------------------------------------------------
*/
define("SECONDS", 1);
define("MINUTE", 60);
define("HOUR", 3600);
define("DAY", 86400);
define("WEEK", 604800);
define("MONTH", 2592000);
define("YEAR", 31536000);
/**
* --------------------------------------------------------------------
* The awesome internationalization function!
* Translation INDEX is provided in $string to locate the corresponding
* translated string. If the INDEX does not exists, the value in
* $string is treated simply as string (shortcut for "echo"). ;)
* --------------------------------------------------------------------
*/
function __($string, $variables = array())
{
echo i18n::Translate($string, $variables);
}