No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
2 |
|
|
|
2 |
|
|
3 |
|
/**
|
|
3 |
|
/**
|
4 |
|
*
|
|
4 |
|
*
|
5 |
|
* Overwri
te necessa
ry variabl
es or add
new in thi
s file
|
|
5 |
|
* Overwri
te necessa
ry variabl
es or add
new in thi
s file
|
6 |
|
*
|
|
6 |
|
*
|
7 |
|
*********
**********
**********
**********
**********
**********
**********
**********
/
|
|
7 |
|
*********
**********
**********
**********
**********
**********
**********
**********
/
|
8 |
|
|
|
8 |
|
|
9 |
|
$dir = arr
ay ();
|
|
9 |
|
$dir = arr
ay ();
|
10 |
|
|
|
10 |
|
|
11 |
|
require_on
ce ('./../
inc/header
.inc.php')
;
|
|
11 |
|
require_on
ce ('./../
inc/header
.inc.php')
;
|
12 |
|
|
|
12 |
|
|
13 |
|
$path
=
$dir['root
']
.
'orca/';
//
path
to
orca
files
|
|
13 |
|
$path
=
BX_DIRECTO
RY_PATH_RO
OT
.
'orca/';
//
path
to
orca
files
|
14 |
|
|
|
14 |
|
|
15 |
|
/**
|
|
15 |
|
/**
|
16 |
|
* directo
ries confi
guration
|
|
16 |
|
* directo
ries confi
guration
|
17 |
|
*/
|
|
17 |
|
*/
|
18 |
|
$gConf['di
r']['error
_log'] = $
path . 'lo
g/orca.err
or.log'; /
/ error lo
g file pat
h
|
|
18 |
|
$gConf['di
r']['error
_log'] = $
path . 'lo
g/orca.err
or.log'; /
/ error lo
g file pat
h
|
19 |
|
$gConf['di
r']['class
es'] = $pa
th . 'clas
ses/'; //
classes di
rectiry pa
th
|
|
19 |
|
$gConf['di
r']['class
es'] = $pa
th . 'clas
ses/'; //
classes di
rectiry pa
th
|
20 |
|
$gConf['di
r']['js']
= $path .
'js/'; //
js directi
ry path
|
|
20 |
|
$gConf['di
r']['js']
= $path .
'js/'; //
js directi
ry path
|
21 |
|
$gConf['di
r']['inc']
= $path .
'inc/';
// include
files pat
h
|
|
21 |
|
$gConf['di
r']['inc']
= $path .
'inc/';
// include
files pat
h
|
22 |
|
$gConf['di
r']['xmlca
che'] = $p
ath . 'xml
/'; // not
used
|
|
22 |
|
$gConf['di
r']['xmlca
che'] = $p
ath . 'xml
/'; // not
used
|
23 |
|
$gConf['di
r']['xml']
= $path .
'xml/'; /
/ path to
integratio
m director
y
|
|
23 |
|
$gConf['di
r']['xml']
= $path .
'xml/'; /
/ path to
integratio
m director
y
|
24 |
|
$gConf['di
r']['base'
] = $path;
// base
dir
|
|
24 |
|
$gConf['di
r']['base'
] = $path;
// base
dir
|
25 |
|
$gConf['di
r']['cache
'] = $path
. 'cachej
s/'; // js
files cac
he
|
|
25 |
|
$gConf['di
r']['cache
'] = $path
. 'cachej
s/'; // js
files cac
he
|
26 |
|
$gConf['di
r']['confi
g'] = $pat
h . 'conf/
params.con
f'; // con
fig
|
|
26 |
|
$gConf['di
r']['confi
g'] = $pat
h . 'conf/
params.con
f'; // con
fig
|
27 |
|
$gConf['di
r']['layou
ts'] = $pa
th . 'layo
ut/'; // l
ayouts dir
|
|
27 |
|
$gConf['di
r']['layou
ts'] = $pa
th . 'layo
ut/'; // l
ayouts dir
|
28 |
|
$gConf['di
r']['integ
ration'] =
$path . '
xml/orca.p
hp'; // xm
l integrat
ion file p
ath
|
|
28 |
|
$gConf['di
r']['integ
ration'] =
$path . '
xml/orca.p
hp'; // xm
l integrat
ion file p
ath
|
29 |
|
$gConf['di
r']['edito
r']
=
$dir['plug
ins']
.
'tiny_mce/
';
//
path
to
javascript
editor
|
|
29 |
|
$gConf['di
r']['edito
r']
=
BX_DIRECTO
RY_PATH_PL
UGINS
.
'tiny_mce/
';
//
path
to
javascript
editor
|
30 |
|
$gConf['di
r']['langs
'] = $path
. 'xml/la
ngs/'; //
lang files
locaiton
|
|
30 |
|
$gConf['di
r']['langs
'] = $path
. 'xml/la
ngs/'; //
lang files
locaiton
|
31 |
|
|
|
31 |
|
|
32 |
|
|
|
32 |
|
|
33 |
|
/**
|
|
33 |
|
/**
|
34 |
|
* skin co
nfiguratio
n
|
|
34 |
|
* skin co
nfiguratio
n
|
35 |
|
*/
|
|
35 |
|
*/
|
36 |
|
$skin = is
set($_GET[
'skin']) &
& $_GET['s
kin'] ? $_
GET['skin'
] : (isset
($_COOKIE[
'skin']) ?
$_COOKIE[
'skin'] :
'');
|
|
36 |
|
$skin = is
set($_GET[
'skin']) &
& $_GET['s
kin'] ? $_
GET['skin'
] : (isset
($_COOKIE[
'skin']) ?
$_COOKIE[
'skin'] :
'');
|
37 |
|
if (preg_m
atch("/^\w
+$/",$skin
) && file_
exists($pa
th . 'layo
ut/' . $sk
in))
|
|
37 |
|
if (preg_m
atch("/^\w
+$/",$skin
) && file_
exists($pa
th . 'layo
ut/' . $sk
in))
|
38 |
|
{
|
|
38 |
|
{
|
39 |
|
$gConf
['skin'] =
$skin;
|
|
39 |
|
$gConf
['skin'] =
$skin;
|
40 |
|
setcoo
kie ('skin
', $skin);
|
|
40 |
|
setcoo
kie ('skin
', $skin);
|
41 |
|
}
|
|
41 |
|
}
|
42 |
|
else
|
|
42 |
|
else
|
43 |
|
{
|
|
43 |
|
{
|
44 |
|
$gConf
['skin'] =
'uni';
|
|
44 |
|
$gConf
['skin'] =
'uni';
|
45 |
|
}
|
|
45 |
|
}
|
46 |
|
|
|
46 |
|
|
47 |
|
/**
|
|
47 |
|
/**
|
48 |
|
* languag
e configur
ation
|
|
48 |
|
* languag
e configur
ation
|
49 |
|
*/
|
|
49 |
|
*/
|
50 |
|
$gConf['la
ng'] = iss
et($_GET['
lang']) &&
$_GET['la
ng'] ? $_G
ET['lang']
: (isset(
$_COOKIE['
lang']) ?
$_COOKIE['
lang'] : '
');
|
|
50 |
|
$gConf['la
ng'] = iss
et($_GET['
lang']) &&
$_GET['la
ng'] ? $_G
ET['lang']
: (isset(
$_COOKIE['
lang']) ?
$_COOKIE['
lang'] : '
');
|
51 |
|
if (!preg_
match("/^[
a-z]{2}$/"
,$gConf['l
ang']))
|
|
51 |
|
if (!preg_
match("/^[
a-z]{2}$/"
,$gConf['l
ang']))
|
52 |
|
{
|
|
52 |
|
{
|
53 |
|
$gConf
['lang'] =
'en';
|
|
53 |
|
$gConf
['lang'] =
'en';
|
54 |
|
}
|
|
54 |
|
}
|
55 |
|
|
|
55 |
|
|
56 |
|
if (file_e
xists($pat
h . 'layou
t/base_' .
$gConf['l
ang']))
|
|
56 |
|
if (file_e
xists($pat
h . 'layou
t/base_' .
$gConf['l
ang']))
|
57 |
|
{
|
|
57 |
|
{
|
58 |
|
setcoo
kie ('lang
', $gConf[
'lang']);
|
|
58 |
|
setcoo
kie ('lang
', $gConf[
'lang']);
|
59 |
|
}
|
|
59 |
|
}
|
60 |
|
else
|
|
60 |
|
else
|
61 |
|
{
|
|
61 |
|
{
|
62 |
|
$gConf
['lang'] =
'en';
|
|
62 |
|
$gConf
['lang'] =
'en';
|
63 |
|
}
|
|
63 |
|
}
|
64 |
|
|
|
64 |
|
|
65 |
|
|
|
65 |
|
|
66 |
|
/**
|
|
66 |
|
/**
|
67 |
|
* urls co
nfiguratio
n
|
|
67 |
|
* urls co
nfiguratio
n
|
68 |
|
*/
|
|
68 |
|
*/
|
69 |
|
$gConf['ur
l']['base'
] = $site[
'url'] . '
orca/'; //
base url
|
|
69 |
|
$gConf['ur
l']['base'
] = $site[
'url'] . '
orca/'; //
base url
|
70 |
|
$gConf['ur
l']['layou
ts'] = $gC
onf['url']
['base'] .
'layout/'
; // layou
ts url
|
|
70 |
|
$gConf['ur
l']['layou
ts'] = $gC
onf['url']
['base'] .
'layout/'
; // layou
ts url
|
71 |
|
$gConf['ur
l']['integ
ration'] =
$gConf['u
rl']['base
'] . 'xml/
orca.php';
// xml in
tegration
file url
|
|
71 |
|
$gConf['ur
l']['integ
ration'] =
$gConf['u
rl']['base
'] . 'xml/
orca.php';
// xml in
tegration
file url
|
72 |
|
$gConf['ur
l']['js']
= $gConf['
url']['bas
e'] . 'js/
'; // layo
uts url
|
|
72 |
|
$gConf['ur
l']['js']
= $gConf['
url']['bas
e'] . 'js/
'; // layo
uts url
|
73 |
|
$gConf['ur
l']['edito
r'] = $sit
e['plugins
'] . 'tiny
_mce/'; //
url to ja
vascript e
ditor
|
|
73 |
|
$gConf['ur
l']['edito
r'] = $sit
e['plugins
'] . 'tiny
_mce/'; //
url to ja
vascript e
ditor
|
74 |
|
|
|
74 |
|
|
75 |
|
/**
|
|
75 |
|
/**
|
76 |
|
* langs p
athes conf
iguration
|
|
76 |
|
* langs p
athes conf
iguration
|
77 |
|
*/
|
|
77 |
|
*/
|
78 |
|
if ($gConf
['lang'] &
& file_exi
sts($path
. 'layout/
base_' . $
gConf['lan
g']))
|
|
78 |
|
if ($gConf
['lang'] &
& file_exi
sts($path
. 'layout/
base_' . $
gConf['lan
g']))
|
79 |
|
{
|
|
79 |
|
{
|
80 |
|
$gConf
['dir']['c
lasses'] =
$gConf['d
ir']['clas
ses'] . $g
Conf['lang
'] . '/';
|
|
80 |
|
$gConf
['dir']['c
lasses'] =
$gConf['d
ir']['clas
ses'] . $g
Conf['lang
'] . '/';
|
81 |
|
$gConf
['dir']['j
s'] = $gCo
nf['dir'][
'js'] . $g
Conf['lang
'] . '/';
|
|
81 |
|
$gConf
['dir']['j
s'] = $gCo
nf['dir'][
'js'] . $g
Conf['lang
'] . '/';
|
82 |
|
$gConf
['url']['j
s'] = $gCo
nf['url'][
'js'] . $g
Conf['lang
'] . '/';
|
|
82 |
|
$gConf
['url']['j
s'] = $gCo
nf['url'][
'js'] . $g
Conf['lang
'] . '/';
|
83 |
|
$gConf
['skin'] =
$gConf['s
kin'] . '_
' . $gConf
['lang'];
|
|
83 |
|
$gConf
['skin'] =
$gConf['s
kin'] . '_
' . $gConf
['lang'];
|
84 |
|
}
|
|
84 |
|
}
|
85 |
|
|
|
85 |
|
|
86 |
|
/**
|
|
86 |
|
/**
|
87 |
|
* include
custom te
mplate pat
ches
|
|
87 |
|
* include
custom te
mplate pat
ches
|
88 |
|
*/
|
|
88 |
|
*/
|
89 |
|
require_on
ce ($gConf
['dir']['l
ayouts'] .
$gConf['s
kin'] . '/
params.php
');
|
|
89 |
|
require_on
ce ($gConf
['dir']['l
ayouts'] .
$gConf['s
kin'] . '/
params.php
');
|
90 |
|
|
|
90 |
|
|
91 |
|
|
|
91 |
|
|
92 |
|
/**
|
|
92 |
|
/**
|
93 |
|
* databas
e configur
ation
|
|
93 |
|
* databas
e configur
ation
|
94 |
|
*/
|
|
94 |
|
*/
|
95 |
|
$gConf['db
']['host']
= DATABAS
E_HOST;
// hostnam
e
|
|
95 |
|
$gConf['db
']['host']
= DATABAS
E_HOST;
// hostnam
e
|
96 |
|
$gConf['db
']['db'] =
DATABASE_
NAME;
// databas
e name
|
|
96 |
|
$gConf['db
']['db'] =
DATABASE_
NAME;
// databas
e name
|
97 |
|
$gConf['db
']['user']
= DATABAS
E_USER;
// databas
e username
|
|
97 |
|
$gConf['db
']['user']
= DATABAS
E_USER;
// databas
e username
|
98 |
|
$gConf['db
']['pwd']
= DATABASE
_PASS;
// databas
e password
|
|
98 |
|
$gConf['db
']['pwd']
= DATABASE
_PASS;
// databas
e password
|
99 |
|
$gConf['db
']['port']
= DATABAS
E_PORT;
// databa
se port
|
|
99 |
|
$gConf['db
']['port']
= DATABAS
E_PORT;
// databa
se port
|
100 |
|
$gConf['db
']['sock']
= DATABAS
E_SOCK;
// databa
se socket
|
|
100 |
|
$gConf['db
']['sock']
= DATABAS
E_SOCK;
// databa
se socket
|
101 |
|
$gConf['db
']['prefix
'] = 'pre_
'; /
/ tables n
ames prefi
x
|
|
101 |
|
$gConf['db
']['prefix
'] = 'pre_
'; /
/ tables n
ames prefi
x
|
102 |
|
|
|
102 |
|
|
103 |
|
|
|
103 |
|
|
104 |
|
|
|
104 |
|
|
105 |
|
function i
sXsltEnabl
ed ()
|
|
105 |
|
function i
sXsltEnabl
ed ()
|
106 |
|
{
|
|
106 |
|
{
|
107 |
|
if (((
int)phpver
sion()) >=
5)
|
|
107 |
|
if (((
int)phpver
sion()) >=
5)
|
108 |
|
{
|
|
108 |
|
{
|
109 |
|
|
|
109 |
|
|
110 |
|
if
(class_ex
ists ('DOM
Document')
&& class_
exists ('X
sltProcess
or'))
|
|
110 |
|
if
(class_ex
ists ('DOM
Document')
&& class_
exists ('X
sltProcess
or'))
|
111 |
|
return t
rue;
|
|
111 |
|
return t
rue;
|
112 |
|
}
|
|
112 |
|
}
|
113 |
|
else
|
|
113 |
|
else
|
114 |
|
{
|
|
114 |
|
{
|
115 |
|
|
|
115 |
|
|
116 |
|
if
(function
_exists('d
omxml_xslt
_styleshee
t_file'))
|
|
116 |
|
if
(function
_exists('d
omxml_xslt
_styleshee
t_file'))
|
117 |
|
return t
rue;
|
|
117 |
|
return t
rue;
|
118 |
|
el
seif (func
tion_exist
s ('xslt_c
reate'))
|
|
118 |
|
el
seif (func
tion_exist
s ('xslt_c
reate'))
|
119 |
|
return t
rue;
|
|
119 |
|
return t
rue;
|
120 |
|
}
|
|
120 |
|
}
|
121 |
|
return
false;
|
|
121 |
|
return
false;
|
122 |
|
}
|
|
122 |
|
}
|
123 |
|
|
|
123 |
|
|
124 |
|
if ('auto'
== $gConf
['xsl_mode
'])
|
|
124 |
|
if ('auto'
== $gConf
['xsl_mode
'])
|
125 |
|
{
|
|
125 |
|
{
|
126 |
|
$gConf
['xsl_mode
'] = isXsl
tEnabled()
? 'server
' : 'clien
t';
|
|
126 |
|
$gConf
['xsl_mode
'] = isXsl
tEnabled()
? 'server
' : 'clien
t';
|
127 |
|
}
|
|
127 |
|
}
|
128 |
|
|
|
128 |
|
|
129 |
|
|
|
129 |
|
|
130 |
|
$gConf['in
tegration'
] = 'file'
; // url -
read inte
gration se
tting from
url, file
- read in
tegration
settings f
rom file
|
|
130 |
|
$gConf['in
tegration'
] = 'file'
; // url -
read inte
gration se
tting from
url, file
- read in
tegration
settings f
rom file
|
131 |
|
|
|
131 |
|
|
132 |
|
?>
|
|
132 |
|
?>
|