-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.php
54 lines (40 loc) · 1.7 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
<?php
define( 'YX_SITE_ROOT', getcwd() . '/' );
if ( file_exists( YX_SITE_ROOT . 'include/config.inc.php') ) {
require_once( YX_SITE_ROOT . 'include/config.inc.php' );
} else { die("Err"); }
if ( file_exists( YX_SITE_ROOT . 'include/settings.php') ) {
require_once( YX_SITE_ROOT . 'include/settings.php' );
} else { die("Err"); }
//include SITE_ROOT . 'inc/settings.php';
if ( file_exists( YX_SITE_ROOT . 'include/functions.php') ) {
require_once( YX_SITE_ROOT . 'include/functions.php' );
} else { die("Err"); }
if ( file_exists( YX_SITE_ROOT . 'include/database.php') ) {
require_once( YX_SITE_ROOT . 'include/database.php' );
} else { die("Err"); }
if ( file_exists( YX_SITE_ROOT . 'include/elements.php') ) {
require_once( YX_SITE_ROOT . 'include/elements.php' );
} else { die("Err"); }
if ( file_exists( YX_SITE_ROOT . 'include/module.php') ) {
require_once( YX_SITE_ROOT . 'include/module.php' );
} else { die("Err"); }
include("include/session.php");
//$dblink = mysql_connect(YX_DB_HOST, YX_DB_USER, YX_DB_PASS) or die("Could not connect: " . mysql_error());
//mysql_selectdb(YX_DB_NAME, $dblink) or die ("Can\'t use dbmapserver : " . mysql_error());
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Content-Type: text/html; charset=utf-8");
setlocale(LC_ALL, 'UTF8');
if (function_exists('mysql_set_charset'))
mysql_set_charset('utf8');
else
mysql_query("SET NAMES 'utf8'", $GLOBALS['yx_database']);
foreach ($_POST as $key => $val) {
$_POST[$key] = yx_clean_str($_POST[$key]);
}
foreach ($_GET as $key => $val) {
$_GET[$key] = yx_clean_str($_GET[$key]);
}
?>