No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
2 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
2 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
3 |
|
*
O
rca Intera
ctive Foru
m Script
|
|
3 |
|
*
O
rca Intera
ctive Foru
m Script
|
4 |
|
*
----------
-----
|
|
4 |
|
*
----------
-----
--
|
5 |
|
*
Start
e
d
:
Fr
Nov
10
2006
|
|
5 |
|
*
b
e
gin
:
Fr
Nov
10
2006
|
6 |
|
*
C
opyright
:
(C)
200
7
BoonEx
Group
|
|
6 |
|
*
c
opyright
:
(C)
200
6
BoonEx
Group
|
7 |
|
*
W
ebsite
:
http://www
.boonex.co
m
|
|
7 |
|
*
w
ebsite
:
http://www
.boonex.co
m
/
|
8 |
|
* This fil
e is part
of Orca -
Interactiv
e Forum Sc
ript
|
|
8 |
|
* This fil
e is part
of Orca -
Interactiv
e Forum Sc
ript
|
9 |
|
*
|
|
9 |
|
*
|
10 |
|
*
Orca
is
free
software
;
y
o
u
c
a
n
r
ed
i
s
tribut
e
i
t
and/
o
r
modify
i
t
u
n
d
e
r
|
|
10 |
|
*
Orca
is
free
software
.
This
w
o
rk
is
li
c
e
n
s
ed
under
a
Creat
i
ve
Common
s
At
tribut
i
o
n
3.0
L
i
ce
n
s
e
.
|
11 |
|
* the term
s of the G
NU General
Public Li
cense as p
ublished b
y the
|
|
11 |
|
* http://c
reativecom
mons.org/l
icenses/by
/3.0/
|
12 |
|
* Free Sof
tware Foun
dation; ei
ther versi
on 2 of th
e
|
|
|
13 |
|
* License,
or any la
ter versio
n.
|
|
|
14 |
|
*
|
|
12 |
|
*
|
15 |
|
* Orca is
distribute
d in the h
ope that i
t will be
useful, bu
t WITHOUT
ANY WARRAN
TY;
|
|
13 |
|
* Orca is
distribute
d in the h
ope that i
t will be
useful, bu
t WITHOUT
ANY WARRAN
TY;
|
16 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
|
14 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
17 |
|
*
See
the
GNU
G
e
n
e
r
al
Pu
b
l
i
c
License
for
more
details.
|
|
15 |
|
*
See
the
Cr
e
ativ
e
Commons
Att
r
i
b
ut
i
on
3.0
License
for
more
details.
|
18 |
|
*
You
should
have
received
a
copy
of
the
GNU
G
e
n
e
r
al
Pu
b
l
i
c
License
along
with
Orca,
|
|
16 |
|
*
You
should
have
received
a
copy
of
the
Cr
e
ativ
e
Commons
Att
r
i
b
ut
i
on
3.0
License
along
with
Orca,
|
19 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
|
17 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
20 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
|
18 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
21 |
|
|
|
19 |
|
|
22 |
|
|
|
20 |
|
|
23 |
|
// parent
object for
all pages
classes
|
|
21 |
|
// parent
object for
all pages
classes
|
24 |
|
|
|
22 |
|
|
25 |
|
class Thin
gPage exte
nds Thing
|
|
23 |
|
class Thin
gPage exte
nds Thing
|
26 |
|
{
|
|
24 |
|
{
|
27 |
|
|
|
25 |
|
|
28 |
|
|
|
26 |
|
|
29 |
|
// public
functions
|
|
27 |
|
// public
functions
|
30 |
|
|
|
28 |
|
|
31 |
|
/**
|
|
29 |
|
/**
|
32 |
|
* con
structor
|
|
30 |
|
* con
structor
|
33 |
|
*/
|
|
31 |
|
*/
|
34 |
|
functi
on ThingPa
ge ()
|
|
32 |
|
functi
on ThingPa
ge ()
|
35 |
|
{
|
|
33 |
|
{
|
36 |
|
}
|
|
34 |
|
}
|
37 |
|
|
|
35 |
|
|
38 |
|
function
get
Smile
s
()
|
|
36 |
|
function
get
Lang
s
()
|
39 |
|
{
|
|
37 |
|
{
|
40 |
|
gl
obal $gCon
f;
|
|
38 |
|
gl
obal $gCon
f;
|
41 |
|
|
|
39 |
|
|
42 |
|
$i
cons = '';
|
|
40 |
|
$a
= array (
);
|
43 |
|
|
|
41 |
|
if
(
i
sset
($gConf['d
ir']['
l
angs
']))
|
44 |
|
if
(
$handle
=
opend
i
r
($gConf['d
ir']['
smi
l
e
']))
|
|
|
45 |
|
{
|
|
42 |
|
{
|
46 |
|
while
(
false
!==
($
fil
e
=
read
dir
(
$handle
)))
|
|
43 |
|
$d = dir
($gConf['d
ir']['lang
s']);
|
|
|
44 |
|
while
(
FALSE
!==
($
e
ntry
=
$d->
read
(
)))
|
47 |
|
{
|
|
45 |
|
{
|
48 |
|
if (!preg_
match ("/\
.gif$/", $
file))
continue;
|
|
46 |
|
if (
$entry ==
'.' || $en
try == '..
')
|
49 |
|
$ico
ns .= "<sm
icon>{$gCo
nf['url'][
'smile']}$
file</smic
on>";
|
|
47 |
|
continue;
|
|
|
48 |
|
$a[]
= substr(
$entry, 0,
2);
|
50 |
|
}
|
|
49 |
|
}
|
51 |
|
|
|
50 |
|
}
|
52 |
|
closedir
($handle);
|
|
51 |
|
re
turn $a;
|
53 |
|
}
|
|
52 |
|
}
|
54 |
|
|
|
53 |
|
|
55 |
|
re
turn "<smi
les>$icons
</smiles>"
;
|
|
54 |
|
functi
on getLang
sXml ()
|
|
|
55 |
|
{
|
|
|
56 |
|
re
turn '<lan
gs>' . arr
ay2xml($th
is->getLan
gs(), 'lan
g') . '</l
angs>';
|
56 |
|
}
|
|
57 |
|
}
|
57 |
|
|
|
58 |
|
|
58 |
|
functi
on getUrls
Xml ()
|
|
59 |
|
functi
on getUrls
Xml ()
|
59 |
|
{
|
|
60 |
|
{
|
60 |
|
gl
obal $gCon
f;
|
|
61 |
|
gl
obal $gCon
f;
|
61 |
|
|
|
62 |
|
|
62 |
|
$r
et = '';
|
|
63 |
|
$r
et = '';
|
63 |
|
|
|
64 |
|
|
64 |
|
$r
et .= "<ur
ls>";
|
|
65 |
|
$r
et .= "<ur
ls>";
|
65 |
|
$r
et .= "<xs
l_mode>{$g
Conf['xsl_
mode']}</x
sl_mode>";
|
|
66 |
|
$r
et .= "<xs
l_mode>{$g
Conf['xsl_
mode']}</x
sl_mode>";
|
66 |
|
$r
et .= "<ic
on>{$gConf
['url']['i
con']}</ic
on>";
|
|
67 |
|
$r
et .= "<ic
on>{$gConf
['url']['i
con']}</ic
on>";
|
67 |
|
$r
et .= "<im
g>{$gConf[
'url']['im
g']}</img>
";
|
|
68 |
|
$r
et .= "<im
g>{$gConf[
'url']['im
g']}</img>
";
|
68 |
|
$r
et .= "<cs
s>{$gConf[
'url']['cs
s']}</css>
";
|
|
69 |
|
$r
et .= "<cs
s>{$gConf[
'url']['cs
s']}</css>
";
|
69 |
|
$r
et .= "<sm
ile>{$gCon
f['url']['
smile']}</
smile>";
|
|
|
70 |
|
$r
et .= "<xs
l>{$gConf[
'url']['xs
l']}</xsl>
";
|
|
70 |
|
$r
et .= "<xs
l>{$gConf[
'url']['xs
l']}</xsl>
";
|
71 |
|
$r
et .= $thi
s->getSmil
es ();
|
|
71 |
|
$r
et .= "<js
>{$gConf['
url']['js'
]}</js>";
|
|
|
72 |
|
$r
et .= "<ed
itor>{$gCo
nf['url'][
'editor']}
</editor>"
;
|
72 |
|
$r
et .= "</u
rls>\n";
|
|
73 |
|
$r
et .= "</u
rls>\n";
|
73 |
|
|
|
74 |
|
|
74 |
|
re
turn $ret;
|
|
75 |
|
re
turn $ret;
|
75 |
|
}
|
|
76 |
|
}
|
76 |
|
|
|
77 |
|
|
77 |
|
functi
on addHead
erFooter (
&$li, $con
tent)
|
|
78 |
|
functi
on addHead
erFooter (
&$li, $con
tent)
|
78 |
|
{
|
|
79 |
|
{
|
79 |
|
gl
obal $gCon
f;
|
|
80 |
|
gl
obal $gCon
f;
|
80 |
|
|
|
81 |
|
gl
obal $glHe
ader;
|
|
|
82 |
|
global
$glFooter
;
|
81 |
|
|
|
83 |
|
|
82 |
|
$r
et = '';
|
|
84 |
|
$r
et = '';
|
83 |
|
|
|
85 |
|
|
84 |
|
$r
et .= "<ro
ot>\n";
|
|
86 |
|
$r
et .= "<ro
ot>\n";
|
85 |
|
|
|
87 |
|
|
86 |
|
ev
al($GLOBAL
S['l']('JH
JldCAuPSAn
PGRpc2FibG
VfYm9vbmV4
X2Zvb3Rlcn
M+JyAuIChp
bnQpZ2V0Q2
9uZmlnUGFy
YW0oJ2Rpc2
FibGVfYm9v
bmV4X2Zvb3
RlcnMnKSAu
ICc8L2Rpc2
FibGVfYm9v
bmV4X2Zvb3
RlcnM+Jzs=
'));
|
|
88 |
|
$r
et .= '<di
sable_boon
ex_footers
>' . (int)
getConfigP
aram('disa
ble_boonex
_footers')
. '</disa
ble_boonex
_footers>'
;
|
|
|
89 |
|
|
|
|
90 |
|
$r
et .= '<he
ader><![CD
ATA['.$glH
eader.']]>
</header>'
;
|
|
|
91 |
|
$r
et .= '<fo
oter><![CD
ATA['.$glF
ooter.']]>
</footer>'
;
|
87 |
|
|
|
92 |
|
|
88 |
|
$r
et .= "<mi
n_point>{$
gConf['min
_point']}<
/min_point
>\n";
|
|
93 |
|
$r
et .= "<mi
n_point>{$
gConf['min
_point']}<
/min_point
>\n";
|
89 |
|
|
|
94 |
|
|
90 |
|
$r
et .= "<ba
se>{$gConf
['url']['b
ase']}</ba
se>\n";
|
|
95 |
|
$r
et .= "<ba
se>{$gConf
['url']['b
ase']}</ba
se>\n";
|
91 |
|
|
|
96 |
|
|
92 |
|
$r
et .= "<ti
tle>{$gCon
f['def_tit
le']}</tit
le>\n";
|
|
97 |
|
$r
et .= "<ti
tle>{$gCon
f['def_tit
le']}</tit
le>\n";
|
93 |
|
|
|
98 |
|
|
94 |
|
$i
ntegration
_xml = '';
|
|
99 |
|
$i
ntegration
_xml = '';
|
95 |
|
@i
nclude ($g
Conf['dir'
]['base']
. 'xml/xml
.php');
|
|
100 |
|
@i
nclude ($g
Conf['dir'
]['base']
. 'xml/xml
.php');
|
96 |
|
$r
et .= $int
egration_x
ml;
|
|
101 |
|
$r
et .= $int
egration_x
ml;
|
97 |
|
|
|
102 |
|
|
98 |
|
$r
et .= $thi
s->getUrls
Xml ();
|
|
103 |
|
$r
et .= $thi
s->getUrls
Xml ();
|
99 |
|
|
|
104 |
|
|
100 |
|
|
|
|
101 |
|
if
(is_array
($li))
|
|
105 |
|
if
(is_array
($li))
|
102 |
|
{
|
|
106 |
|
{
|
103 |
|
$ret .=
"<logininf
o>";
|
|
107 |
|
$ret .=
"<logininf
o>";
|
104 |
|
reset ($
li);
|
|
108 |
|
reset ($
li);
|
105 |
|
while (l
ist($k,$v)
= each($l
i))
|
|
109 |
|
while (l
ist($k,$v)
= each($l
i))
|
106 |
|
{
|
|
110 |
|
{
|
107 |
|
$ret
.= "<$k>$
v</$k>";
|
|
111 |
|
$ret
.= "<$k>$
v</$k>";
|
108 |
|
}
|
|
112 |
|
}
|
109 |
|
$ret .=
"</loginin
fo>";
|
|
113 |
|
$ret .=
"</loginin
fo>";
|
|
|
114 |
|
|
|
|
115 |
|
if (1 ==
$li['admi
n'])
|
|
|
116 |
|
{
|
|
|
117 |
|
$ret
.= $this-
>getLangsX
ml();
|
110 |
|
}
|
|
118 |
|
}
|
|
|
119 |
|
}
|
|
|
120 |
|
|
|
|
121 |
|
|
111 |
|
|
|
122 |
|
|
112 |
|
$r
et .= "<pa
ge>\n";
|
|
123 |
|
$r
et .= "<pa
ge>\n";
|
113 |
|
|
|
124 |
|
|
114 |
|
$r
et .= $con
tent;
|
|
125 |
|
$r
et .= $con
tent;
|
115 |
|
|
|
126 |
|
|
116 |
|
$r
et .= "</p
age>\n";
|
|
127 |
|
$r
et .= "</p
age>\n";
|
117 |
|
|
|
128 |
|
|
118 |
|
$r
et .= "</r
oot>\n";
|
|
129 |
|
$r
et .= "</r
oot>\n";
|
119 |
|
|
|
130 |
|
|
120 |
|
re
turn $ret;
|
|
131 |
|
re
turn $ret;
|
121 |
|
}
|
|
132 |
|
}
|
122 |
|
|
|
133 |
|
|
123 |
|
/**
|
|
134 |
|
/**
|
124 |
|
* ret
urns page
XML
|
|
135 |
|
* ret
urns page
XML
|
125 |
|
*/
|
|
136 |
|
*/
|
126 |
|
functi
on getPage
XML (&$li)
|
|
137 |
|
functi
on getPage
XML (&$li)
|
127 |
|
{
|
|
138 |
|
{
|
128 |
|
re
turn $this
->addHeade
rFooter ($
li, $this-
>content);
|
|
139 |
|
re
turn $this
->addHeade
rFooter ($
li, $this-
>content);
|
129 |
|
}
|
|
140 |
|
}
|
130 |
|
|
|
141 |
|
|
131 |
|
|
|
142 |
|
|
132 |
|
/**
|
|
143 |
|
/**
|
133 |
|
* wri
te cache t
o a file
|
|
144 |
|
* wri
te cache t
o a file
|
134 |
|
* @p
aram $fn
filename t
o write to
\x001C
|
|
145 |
|
* @p
aram $fn
filename t
o write to
\x001C
|
135 |
|
* @p
aram $s
string to
write
|
|
146 |
|
* @p
aram $s
string to
write
|
136 |
|
*/
|
|
147 |
|
*/
|
137 |
|
functi
on cacheWr
ite ($fn,
$s)
|
|
148 |
|
functi
on cacheWr
ite ($fn,
$s)
|
138 |
|
{
|
|
149 |
|
{
|
139 |
|
gl
obal $gCon
f;
|
|
150 |
|
gl
obal $gCon
f;
|
140 |
|
|
|
151 |
|
|
141 |
|
if
(!$gConf[
'cache']['
on']) retu
rn;
|
|
152 |
|
if
(!$gConf[
'cache']['
on']) retu
rn;
|
142 |
|
|
|
153 |
|
|
143 |
|
$f
= fopen (
$gConf['di
r']['xmlca
che'] . $f
n, "w");
|
|
154 |
|
$f
= fopen (
$gConf['di
r']['xmlca
che'] . $f
n, "w");
|
144 |
|
|
|
155 |
|
|
145 |
|
if
(!$f)
|
|
156 |
|
if
(!$f)
|
146 |
|
{
|
|
157 |
|
{
|
147 |
|
$mk = ne
w Mistake
();
|
|
158 |
|
$mk = ne
w Mistake
();
|
148 |
|
$mk->log
("ThingPa
ge::readCa
che - can
not open f
ile({$gCon
f['dir']['
xmlcache']
}$fn) for
writing");
|
|
159 |
|
$mk->log
("ThingPa
ge::readCa
che - can
not open f
ile({$gCon
f['dir']['
xmlcache']
}$fn) for
writing");
|
149 |
|
$mk->displ
ayError
("
S
orry,
s
ite
is
unavailabl
e
now,
please
try
again
later.
");
|
|
160 |
|
$mk->displ
ayError
("
[L[
S
ite
is
unavailabl
e
]]
");
|
150 |
|
}
|
|
161 |
|
}
|
151 |
|
|
|
162 |
|
|
152 |
|
fw
rite ($f,
$s);
|
|
163 |
|
fw
rite ($f,
$s);
|
153 |
|
|
|
164 |
|
|
154 |
|
fc
lose ($f);
|
|
165 |
|
fc
lose ($f);
|
155 |
|
}
|
|
166 |
|
}
|
156 |
|
|
|
167 |
|
|
157 |
|
/**
|
|
168 |
|
/**
|
158 |
|
* rea
d cache fr
om a file
|
|
169 |
|
* rea
d cache fr
om a file
|
159 |
|
* @p
aram $fn
filena
me to read
from
|
|
170 |
|
* @p
aram $fn
filena
me to read
from
|
160 |
|
* @p
aram retur
n string
from a fi
le
|
|
171 |
|
* @p
aram retur
n string
from a fi
le
|
161 |
|
*/
|
|
172 |
|
*/
|
162 |
|
functi
on cacheRe
ad ($fn)
|
|
173 |
|
functi
on cacheRe
ad ($fn)
|
163 |
|
{
|
|
174 |
|
{
|
164 |
|
gl
obal $gCon
f;
|
|
175 |
|
gl
obal $gCon
f;
|
165 |
|
|
|
176 |
|
|
166 |
|
$f
= fopen (
$gConf['di
r']['xmlca
che'] . $f
n, "r");
|
|
177 |
|
$f
= fopen (
$gConf['di
r']['xmlca
che'] . $f
n, "r");
|
167 |
|
|
|
178 |
|
|
168 |
|
if
(!$f)
|
|
179 |
|
if
(!$f)
|
169 |
|
{
|
|
180 |
|
{
|
170 |
|
$mk = ne
w Mistake
();
|
|
181 |
|
$mk = ne
w Mistake
();
|
171 |
|
$mk->log
("ThingPa
ge::readCa
che - can
not open f
ile({$gCon
f['dir']['
xmlcache']
}$fn) for
reading");
|
|
182 |
|
$mk->log
("ThingPa
ge::readCa
che - can
not open f
ile({$gCon
f['dir']['
xmlcache']
}$fn) for
reading");
|
172 |
|
$mk->displ
ayError
("
S
orry,
s
ite
is
unavailabl
e
now,
please
try
again
later.
");
|
|
183 |
|
$mk->displ
ayError
("
[L[
S
ite
is
unavailabl
e
]]
");
|
173 |
|
}
|
|
184 |
|
}
|
174 |
|
|
|
185 |
|
|
175 |
|
$s
= '';
|
|
186 |
|
$s
= '';
|
176 |
|
wh
ile ($st =
fread ($f
, 1024)) $
s .= $st;
|
|
187 |
|
wh
ile ($st =
fread ($f
, 1024)) $
s .= $st;
|
177 |
|
|
|
188 |
|
|
178 |
|
fc
lose ($f);
|
|
189 |
|
fc
lose ($f);
|
179 |
|
|
|
190 |
|
|
180 |
|
re
turn $s;
|
|
191 |
|
re
turn $s;
|
181 |
|
}
|
|
192 |
|
}
|
182 |
|
|
|
193 |
|
|
183 |
|
/**
|
|
194 |
|
/**
|
184 |
|
* che
ck if cach
e is avail
able
|
|
195 |
|
* che
ck if cach
e is avail
able
|
185 |
|
* @p
aram $fn
filena
me to chec
k
|
|
196 |
|
* @p
aram $fn
filena
me to chec
k
|
186 |
|
* @p
aram retur
n true i
f cache is
available
|
|
197 |
|
* @p
aram retur
n true i
f cache is
available
|
187 |
|
*/
|
|
198 |
|
*/
|
188 |
|
functi
on cacheEx
ists ($fn)
|
|
199 |
|
functi
on cacheEx
ists ($fn)
|
189 |
|
{
|
|
200 |
|
{
|
190 |
|
gl
obal $gCon
f;
|
|
201 |
|
gl
obal $gCon
f;
|
191 |
|
re
turn file_
exists ($g
Conf['dir'
]['xmlcach
e'] . $fn)
;
|
|
202 |
|
re
turn file_
exists ($g
Conf['dir'
]['xmlcach
e'] . $fn)
;
|
192 |
|
}
|
|
203 |
|
}
|
193 |
|
|
|
204 |
|
|
194 |
|
/**
|
|
205 |
|
/**
|
195 |
|
* che
ck if cach
e is enabl
ed
|
|
206 |
|
* che
ck if cach
e is enabl
ed
|
196 |
|
*/
|
|
207 |
|
*/
|
197 |
|
functi
on cacheEn
abled ()
|
|
208 |
|
functi
on cacheEn
abled ()
|
198 |
|
{
|
|
209 |
|
{
|
199 |
|
gl
obal $gCon
f;
|
|
210 |
|
gl
obal $gCon
f;
|
200 |
|
re
turn $gCon
f['cache']
['on'];
|
|
211 |
|
re
turn $gCon
f['cache']
['on'];
|
201 |
|
}
|
|
212 |
|
}
|
202 |
|
|
|
213 |
|
|
203 |
|
// private
functions
|
|
214 |
|
// private
functions
|
204 |
|
|
|
215 |
|
|
205 |
|
}
|
|
216 |
|
}
|
206 |
|
|
|
217 |
|
|
207 |
|
|
|
218 |
|
|
208 |
|
|
|
219 |
|
|
209 |
|
|
|
220 |
|
|
210 |
|
|
|
221 |
|
|
211 |
|
?>
|
|
222 |
|
?>
|