/
core_API.php
55 lines (50 loc) · 1.83 KB
/
core_API.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
55
<?php
# Mantis - a php based bugtracking system
# Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
# This program is distributed under the terms and conditions of the GPL
# See the files README and LICENSE for details
###########################################################################
# INCLUDES
###########################################################################
require( "constant_inc.php" );
require( "./default/config_inc1.php" );
if ( file_exists( "config_inc.php" ) ) {
include( "config_inc.php" );
}
# Load file globals # @@@ ugly hack for ugly problem. Find better solution soon
require( "./default/config_inc2.php" );
require( "core_database_API.php" );
# Nasty code to select the proper language file
if ( !empty( $g_string_cookie_val ) ) {
$t_language = "";
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );
$query = "SELECT language
FROM $g_mantis_user_pref_table pref, $g_mantis_user_table user
WHERE user.cookie_string='$g_string_cookie_val' AND
user.id=pref.user_id";
$result = db_query( $query );
$t_language = db_result( $result, 0 , 0 );
if (!empty( $t_language )) {
include( "lang/strings_".$t_language.".txt" );
} else {
include( "lang/strings_".$g_default_language.".txt" );
}
db_close();
} else {
include( "lang/strings_".$g_default_language.".txt" );
}
require( "core_html_API.php" );
require( "core_print_API.php" );
require( "core_helper_API.php" );
require( "core_summary_API.php" );
require( "core_date_API.php" );
require( "core_user_API.php" );
require( "core_email_API.php" );
require( "core_news_API.php" );
require( "core_icon_API.php" );
require( "core_ldap_API.php" );
#require( "core_history_API.php" );
require( "core_proj_user_API.php" );
require( "core_category_API.php" );
# --------------------
?>