-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_include.php
More file actions
54 lines (43 loc) · 1.8 KB
/
_include.php
File metadata and controls
54 lines (43 loc) · 1.8 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
<?php
/****************************************************************************\
* TZN CMS *
******************************************************************************
* Version: 4.0 *
* Authors: Stan Ozier <stan@tirzen.com> *
* License: http://www.gnu.org/licenses/gpl.txt (GPL) *
\****************************************************************************/
/* --- Search config file ------------------------------------------------- */
include 'include/config.php';
$GLOBALS['langPlugin'] = array();
$GLOBALS['langModule'] = array();
/* --- import classes ----------------------------------------------------- */
include CMS_CLASS_PATH.'tzn_generic.php';
include CMS_CLASS_PATH.TZN_DB_CLASS;
include CMS_CLASS_PATH.'tzn_outline.php';
include CMS_CLASS_PATH.'tzn_user.php';
include CMS_CLASS_PATH.'tzn_document.php';
include CMS_CLASS_PATH.'pkg_cms.php';
include CMS_CLASS_PATH.'pkg_content.php';
include CMS_CLASS_PATH.'pkg_member.php';
/* --- missing PHP4 functions ---------------------------------------------- */
if (!function_exists('file_put_contents')) {
define('FILE_APPEND', 1);
function file_put_contents($n, $d, $flag = false) {
$mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? 'a' : 'w';
$f = @fopen($n, $mode);
if ($f === false) {
return 0;
} else {
if (is_array($d)) $d = implode($d);
$bytes_written = fwrite($f, $d);
fclose($f);
return $bytes_written;
}
}
}
$pMaxSize = ini_get('upload_max_filesize');
if (intval(ini_get('post_max_size')) < intval($pMaxSize)) {
$pMaxSize = ini_get('post_max_size');
}
define('CMS_UPLOAD_MAX_SIZE', $pMaxSize);
unset($pMaxSize);