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 |
|
define ('T
F_FORUM_US
ER', '`
'.$gConf['
db']['pref
ix'].'foru
m_user`');
|
|
21 |
|
define ('T
F_FORUM_US
ER', '`
'.$gConf['
db']['pref
ix'].'foru
m_user`');
|
24 |
|
|
|
22 |
|
|
25 |
|
// join/lo
gin operat
ions with
database
|
|
23 |
|
// join/lo
gin operat
ions with
database
|
26 |
|
|
|
24 |
|
|
27 |
|
class DbLo
gin extend
s BxDb
|
|
25 |
|
class DbLo
gin extend
s BxDb
|
28 |
|
{
|
|
26 |
|
{
|
29 |
|
|
|
27 |
|
|
30 |
|
/**
|
|
28 |
|
/**
|
31 |
|
* con
structor
|
|
29 |
|
* con
structor
|
32 |
|
*/
|
|
30 |
|
*/
|
33 |
|
functi
on DbLogin
()
|
|
31 |
|
functi
on DbLogin
()
|
34 |
|
{
|
|
32 |
|
{
|
35 |
|
gl
obal $gCon
f;
|
|
33 |
|
gl
obal $gCon
f;
|
36 |
|
pa
rent::BxDb
($gConf['
db']['db']
, $gConf['
db']['user
'], $gConf
['db']['pw
d'], $gCon
f['db']['h
ost'], $gC
onf['db'][
'port'], $
gConf['db'
]['sock'])
;
|
|
34 |
|
pa
rent::BxDb
($gConf['
db']['db']
, $gConf['
db']['user
'], $gConf
['db']['pw
d'], $gCon
f['db']['h
ost'], $gC
onf['db'][
'port'], $
gConf['db'
]['sock'])
;
|
37 |
|
}
|
|
35 |
|
}
|
38 |
|
|
|
36 |
|
|
39 |
|
functi
on getUser
ByName ($s
)
|
|
37 |
|
functi
on getUser
ByName ($s
)
|
40 |
|
{
|
|
38 |
|
{
|
41 |
|
$s
ql = "SELE
CT `user_n
ame` FROM
" . TF_FOR
UM_USER .
" WHERE `u
ser_name`
= '$s' LIM
IT 1";
|
|
39 |
|
$s
ql = "SELE
CT `user_n
ame` FROM
" . TF_FOR
UM_USER .
" WHERE `u
ser_name`
= '$s' LIM
IT 1";
|
42 |
|
re
turn $this
->getOne (
$sql);
|
|
40 |
|
re
turn $this
->getOne (
$sql);
|
43 |
|
}
|
|
41 |
|
}
|
44 |
|
|
|
42 |
|
|
45 |
|
functi
on getUser
ByEmail ($
s)
|
|
43 |
|
functi
on getUser
ByEmail ($
s)
|
46 |
|
{
|
|
44 |
|
{
|
47 |
|
$s
ql = "SELE
CT `user_e
mail` FROM
" . TF_FO
RUM_USER .
" WHERE `
user_email
` = '$s' L
IMIT 1";
|
|
45 |
|
$s
ql = "SELE
CT `user_e
mail` FROM
" . TF_FO
RUM_USER .
" WHERE `
user_email
` = '$s' L
IMIT 1";
|
48 |
|
re
turn $this
->getOne (
$sql);
|
|
46 |
|
re
turn $this
->getOne (
$sql);
|
49 |
|
}
|
|
47 |
|
}
|
50 |
|
|
|
48 |
|
|
51 |
|
functi
on insertU
ser ($p)
|
|
49 |
|
functi
on insertU
ser ($p)
|
52 |
|
{
|
|
50 |
|
{
|
53 |
|
$s
ql = "INSE
RT INTO "
. TF_FORUM
_USER . "
SET `user_
name` = '{
$p['userna
me']}', `u
ser_email`
= '{$p['e
mail']}',
`user_pwd`
= MD5('{$
p['pwd']}'
), `user_j
oin_date`
= UNIX_TIM
ESTAMP()";
|
|
51 |
|
$s
ql = "INSE
RT INTO "
. TF_FORUM
_USER . "
SET `user_
name` = '{
$p['userna
me']}', `u
ser_email`
= '{$p['e
mail']}',
`user_pwd`
= MD5('{$
p['pwd']}'
), `user_j
oin_date`
= UNIX_TIM
ESTAMP()";
|
54 |
|
re
turn $this
->query($s
ql);
|
|
52 |
|
re
turn $this
->query($s
ql);
|
55 |
|
}
|
|
53 |
|
}
|
56 |
|
|
|
54 |
|
|
57 |
|
functi
on checkLo
gin ($p)
|
|
55 |
|
functi
on checkLo
gin ($p)
|
58 |
|
{
|
|
56 |
|
{
|
59 |
|
$s
ql = "SELE
CT `user_n
ame` FROM
" . TF_FOR
UM_USER .
" WHERE `u
ser_name`
= '{$p['us
ername']}'
AND `user
_pwd` = '{
$p['pwd']}
' LIMIT 1"
;
|
|
57 |
|
$s
ql = "SELE
CT `user_n
ame` FROM
" . TF_FOR
UM_USER .
" WHERE `u
ser_name`
= '{$p['us
ername']}'
AND `user
_pwd` = '{
$p['pwd']}
' LIMIT 1"
;
|
60 |
|
re
turn $this
->getRow (
$sql);
|
|
58 |
|
re
turn $this
->getRow (
$sql);
|
61 |
|
}
|
|
59 |
|
}
|
62 |
|
|
|
60 |
|
|
63 |
|
functi
on getUser
JoinDate (
$u)
|
|
61 |
|
functi
on getUser
JoinDate (
$u)
|
64 |
|
{
|
|
62 |
|
{
|
65 |
|
gl
obal $gCon
f;
|
|
63 |
|
gl
obal $gCon
f;
|
66 |
|
re
turn $this
->getOne (
"SELECT DA
TE_FORMAT(
FROM_UNIXT
IME(`user_
join_date`
),'{$gConf
['date_for
mat']}') A
S `user_jo
in_date` F
ROM " . TF
_FORUM_USE
R . " WHER
E `user_na
me` = '$u'
LIMIT 1")
;
|
|
64 |
|
re
turn $this
->getOne (
"SELECT DA
TE_FORMAT(
FROM_UNIXT
IME(`user_
join_date`
),'{$gConf
['date_for
mat']}') A
S `user_jo
in_date` F
ROM " . TF
_FORUM_USE
R . " WHER
E `user_na
me` = '$u'
LIMIT 1")
;
|
67 |
|
}
|
|
65 |
|
}
|
68 |
|
|
|
66 |
|
|
69 |
|
// private
functions
|
|
67 |
|
// private
functions
|
70 |
|
|
|
68 |
|
|
71 |
|
}
|
|
69 |
|
}
|
72 |
|
|
|
70 |
|
|
73 |
|
|
|
71 |
|
|
74 |
|
|
|
72 |
|
|
75 |
|
|
|
73 |
|
|
76 |
|
|
|
74 |
|
|
77 |
|
?>
|
|
75 |
|
?>
|