Completed
Push — master ( 02f2d8...e7d60a )
by Michael
02:40
created

conf.php ➔ siteURL()   A

Complexity

Conditions 4
Paths 6

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
nc 6
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* =============================================
4
Paths definitions for libraries (css & js files)
5
6
You can use :
7
    -   absolute                                     example : http://www.domain.comassets/
8
    -   relative absolute                            example : /assets/
9
    -   relative from tinymce/plugins/bootstrap/     example : ../../../assets/
10
============================================= */
11
12
define('JQUERY_JS', 'js/jquery-2.1.1.min.js');
13
define('BOOTSTRAP_JS', 'js/bootstrap.min.js');
14
15
// prism is required for all plugins
16
// codemirror is required for snippets tool, for syntax highlighting in textarea (cannot be done with prism unfortunately)
17
define('CODEMIRROR_FOLDER', 'codemirror/');
18
define('PRISM_CSS', 'prism/prism.min.css');
19
define('PRISM_JS', 'prism/prism.min.js');
20
21
$bootstrap_css_path = addslashes($_GET['bootstrap_css_path']);
22
function siteURL()
23
{
24
    $protocol = (!empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS'] || 443 == $_SERVER['SERVER_PORT']) ? 'https://' : 'http://';
25
    $domainName = $_SERVER['HTTP_HOST'];
26
27
    return $protocol.$domainName;
28
}
29
define('SITE_URL', siteURL());
30
31
/* language */
32
33
if (file_exists('langs/' . $_GET['language'] . '.php')) {
34
    require_once 'langs/' . $_GET['language'] . '.php';
35
} else { // default
36
    require_once 'langs/en_EN.php';
37
}
38