-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInit.php
More file actions
56 lines (41 loc) · 1.18 KB
/
Init.php
File metadata and controls
56 lines (41 loc) · 1.18 KB
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
<?php
error_reporting(E_ALL);
ini_set("error_log", __DIR__."/logs/error-log.log");
if (array_key_exists('DEV_SERVER', $_SERVER)){
define('DEV_SERVER', true);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
}else{
define('DEV_SERVER', false);
}
function __autoload($class){
$path = $class . ".php";
$path = str_replace ( "\\", "/" , $path);
include_once $path;
}
function mediaExist($file){
$path = __DIR__ . '/www' .$file;
if (file_exists($path)){
return true;
}
return false;
}
//user configuration
define("SITE_NAME", "S.ENGINE");
define("BIG_IMAGE", 1200);
define("MEDIUM_IMAGE", 800);
define("PREVIEW_IMAGE", 320);
define("SHORT_NEW_LENGTH", 200);
if (DEV_SERVER){
define("SQL_SERVER", "localhost");
define("SQL_USER", "root");
define("SQL_PASSWORD", "");
define("SQL_DB", "sengine");
define("SQL_CHARSET", "utf8");
}else{
}
define("PASS_SALT", "RAkyEnA&Zd9F3VQ@Tc%aMm&1NuKiW_um#DanW2mgg1LWZJHZ^fn%#8Yb95h#oR#%");
define("GALLERY_DIR", str_replace('\\', '/', __DIR__ . '/www/media/gallery'));
define("GALLERY_LINK", "/media/gallery");
date_default_timezone_set('Europe/Moscow');
session_start();