File: common.php

package info (click to toggle)
postfixadmin 3.3.15%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,816 kB
  • sloc: php: 10,120; perl: 1,069; sh: 643; python: 169; xml: 62; sql: 3; makefile: 2
file content (52 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (2)
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
<?php

// vim:ts=4:sw=4:et
ini_set('include_path', get_include_path() . ':' . dirname(__FILE__));

@include_once('Zend/Version.php');
if (!class_exists('Zend_Version', false)) {
    die("Zend Framework not found. Please check the INSTALL File.");
}
chdir("..");


if (!defined('SM_PATH')) {
    define('SM_PATH', '../');
}

$config_file = dirname(__FILE__ ) . '/config.php';
$validate_file = dirname(__FILE__) . '/../include/validate.php';

if (!file_exists($config_file)) {
    die("$config_file is missing");
}

include_once($config_file);
include_once(dirname(__FILE__) . '/functions.inc.php');

if (file_exists($validate_file)) {
    include_once($validate_file);
} else {
    $validate_file = SM_PATH . '/src/validate.php';
    if (file_exists($validate_file)) {
        include_once($validate_file);
    }
}


include_once(SM_PATH . 'functions/page_header.php');
include_once(SM_PATH . 'functions/display_messages.php');
include_once(SM_PATH . 'functions/imap.php');
include_if_exists(SM_PATH . 'functions/array.php');
if (file_exists(SM_PATH . 'src/load_prefs.php')) {
    include_once(SM_PATH . 'src/load_prefs.php');
} else {
    include_if_exists(SM_PATH . 'include/load_prefs.php');
}
// overwrite squirrelmail's content type to utf8...
header("Content-Type: text/html; charset=utf8");


//global $VACCONFMESSAGE;
bindtextdomain('postfixadmin', dirname(__FILE__) . '/postfixadmin/locale');
textdomain('postfixadmin');