No regular expressions were active.
1 |
|
<?
|
|
1 |
|
<?
|
2 |
|
|
|
2 |
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
|
3 |
|
/*********
**********
**********
**********
**********
**********
**********
******
|
4 |
|
*
D
olphin Sma
rt Communi
ty Builder
|
|
4 |
|
*
D
olphin Sma
rt Communi
ty Builder
|
5 |
|
*
---------
--------
|
|
5 |
|
*
---------
--------
|
6 |
|
* begi
n
: M
on Mar 23
2006
|
|
6 |
|
* begi
n
: M
on Mar 23
2006
|
7 |
|
* copy
right
: (
C) 2006 Bo
onEx Group
|
|
7 |
|
* copy
right
: (
C) 2006 Bo
onEx Group
|
8 |
|
* webs
ite
: h
ttp://www.
boonex.com
/
|
|
8 |
|
* webs
ite
: h
ttp://www.
boonex.com
/
|
9 |
|
* This fil
e is part
of Dolphin
- Smart C
ommunity B
uilder
|
|
9 |
|
* This fil
e is part
of Dolphin
- Smart C
ommunity B
uilder
|
10 |
|
*
|
|
10 |
|
*
|
11 |
|
* Dolphin
is free so
ftware. Th
is work is
licensed
under a Cr
eative Com
mons Attri
bution 3.0
License.
|
|
11 |
|
* Dolphin
is free so
ftware. Th
is work is
licensed
under a Cr
eative Com
mons Attri
bution 3.0
License.
|
12 |
|
* http://c
reativecom
mons.org/l
icenses/by
/3.0/
|
|
12 |
|
* http://c
reativecom
mons.org/l
icenses/by
/3.0/
|
13 |
|
*
|
|
13 |
|
*
|
14 |
|
* Dolphin
is distrib
uted in th
e hope tha
t it will
be useful,
but WITHO
UT ANY WAR
RANTY;
|
|
14 |
|
* Dolphin
is distrib
uted in th
e hope tha
t it will
be useful,
but WITHO
UT ANY WAR
RANTY;
|
15 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
|
15 |
|
* without
even the i
mplied war
ranty of
MERCHANTAB
ILITY or F
ITNESS FOR
A PARTICU
LAR PURPOS
E.
|
16 |
|
* See the
Creative C
ommons Att
ribution 3
.0 License
for more
details.
|
|
16 |
|
* See the
Creative C
ommons Att
ribution 3
.0 License
for more
details.
|
17 |
|
* You shou
ld have re
ceived a c
opy of the
Creative
Commons At
tribution
3.0 Licens
e along wi
th Dolphin
,
|
|
17 |
|
* You shou
ld have re
ceived a c
opy of the
Creative
Commons At
tribution
3.0 Licens
e along wi
th Dolphin
,
|
18 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
|
18 |
|
* see lice
nse.txt fi
le; if not
, write to
marketing
@boonex.co
m
|
19 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
|
19 |
|
**********
**********
**********
**********
**********
**********
**********
*****/
|
20 |
|
|
|
20 |
|
|
21 |
|
require_on
ce( 'inc/h
eader.inc.
php' );
|
|
21 |
|
require_on
ce( 'inc/h
eader.inc.
php' );
|
22 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
|
22 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
23 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
rofiles.in
c.php' );
|
|
23 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
rofiles.in
c.php' );
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
25 |
|
|
|
25 |
|
|
26 |
|
// -------
-------- p
age variab
les and lo
gin
|
|
26 |
|
// -------
-------- p
age variab
les and lo
gin
|
27 |
|
|
|
27 |
|
|
28 |
|
$_page['na
me_index']
= 130;
|
|
28 |
|
$_page['na
me_index']
= 130;
|
29 |
|
$_page['cs
s_name'] =
'mail.css
';
|
|
29 |
|
$_page['cs
s_name'] =
'mail.css
';
|
30 |
|
|
|
30 |
|
|
31 |
|
$logged['m
ember'] =
member_aut
h(0);
|
|
31 |
|
$logged['m
ember'] =
member_aut
h(0);
|
32 |
|
$memberID
= (int)$_C
OOKIE['mem
berID'];
|
|
32 |
|
$memberID
= (int)$_C
OOKIE['mem
berID'];
|
33 |
|
|
|
33 |
|
|
34 |
|
$_page['ex
tra_js'] =
$oTemplCo
nfig -> sM
ailBoxSort
ingInit;
|
|
34 |
|
$_page['ex
tra_js'] =
$oTemplCo
nfig -> sM
ailBoxSort
ingInit;
|
35 |
|
$_page['js
_name'] =
'sort_tabl
e.js';
|
|
35 |
|
$_page['js
_name'] =
'sort_tabl
e.js';
|
36 |
|
|
|
36 |
|
|
37 |
|
// this is
dynamic p
age - sen
d headers
to do not
cache this
page
|
|
37 |
|
// this is
dynamic p
age - sen
d headers
to do not
cache this
page
|
38 |
|
send_heade
rs_page_ch
anged();
|
|
38 |
|
send_heade
rs_page_ch
anged();
|
39 |
|
|
|
39 |
|
|
40 |
|
$_ni = $_p
age['name_
index'];
|
|
40 |
|
$_ni = $_p
age['name_
index'];
|
41 |
|
|
|
41 |
|
|
42 |
|
$mode = $_
REQUEST['m
ode'];
|
|
42 |
|
$mode = $_
REQUEST['m
ode'];
|
43 |
|
switch( $m
ode )
|
|
43 |
|
switch( $m
ode )
|
44 |
|
{
|
|
44 |
|
{
|
45 |
|
case '
outbox':
|
|
45 |
|
case '
outbox':
|
46 |
|
$_
page['head
er'] = _t(
"_OUTBOX_
H" );
|
|
46 |
|
$_
page['head
er'] = _t(
"_OUTBOX_
H" );
|
47 |
|
$_
page['head
er_text']
= _t( "_OU
TBOX_H1" )
;
|
|
47 |
|
$_
page['head
er_text']
= _t( "_OU
TBOX_H1" )
;
|
48 |
|
$_
page_cont[
$_ni]['pag
e_main_cod
e'] = Page
CodeOutbox
();
|
|
48 |
|
$_
page_cont[
$_ni]['pag
e_main_cod
e'] = Page
CodeOutbox
();
|
49 |
|
break;
|
|
49 |
|
break;
|
50 |
|
case '
inbox':
|
|
50 |
|
case '
inbox':
|
51 |
|
defaul
t:
|
|
51 |
|
defaul
t:
|
52 |
|
$m
ode = 'inb
ox';
|
|
52 |
|
$m
ode = 'inb
ox';
|
53 |
|
$_
page['head
er'] = _t(
"_INBOX_H
" );
|
|
53 |
|
$_
page['head
er'] = _t(
"_INBOX_H
" );
|
54 |
|
$_
page['head
er_text']
= _t( "_IN
BOX_H1" );
|
|
54 |
|
$_
page['head
er_text']
= _t( "_IN
BOX_H1" );
|
55 |
|
$_
page_cont[
$_ni]['pag
e_main_cod
e'] = Page
CodeInbox(
);
|
|
55 |
|
$_
page_cont[
$_ni]['pag
e_main_cod
e'] = Page
CodeInbox(
);
|
56 |
|
}
|
|
56 |
|
}
|
57 |
|
|
|
57 |
|
|
58 |
|
PageCode()
;
|
|
58 |
|
PageCode()
;
|
59 |
|
|
|
59 |
|
|
60 |
|
|
|
60 |
|
|
61 |
|
|
|
61 |
|
|
62 |
|
function P
ageCodeInb
ox()
|
|
62 |
|
function P
ageCodeInb
ox()
|
63 |
|
{
|
|
63 |
|
{
|
64 |
|
global
$memberID
;
|
|
64 |
|
global
$memberID
;
|
65 |
|
global
$dir;
|
|
65 |
|
global
$dir;
|
66 |
|
global
$site;
|
|
66 |
|
global
$site;
|
67 |
|
global
$tmpl;
|
|
67 |
|
global
$tmpl;
|
68 |
|
global
$date_for
mat;
|
|
68 |
|
global
$date_for
mat;
|
69 |
|
|
|
69 |
|
|
70 |
|
if( $_
REQUEST['d
o_delete']
or $_REQU
EST['do_ma
rk_new'] o
r $_REQUES
T['do_mark
_old'] )
|
|
70 |
|
if( $_
REQUEST['d
o_delete']
or $_REQU
EST['do_ma
rk_new'] o
r $_REQUES
T['do_mark
_old'] )
|
71 |
|
{
|
|
71 |
|
{
|
72 |
|
if
( $_REQUES
T['do_dele
te'] )
|
|
72 |
|
if
( $_REQUES
T['do_dele
te'] )
|
73 |
|
$sqlDoQu
ery = "DEL
ETE FROM `
Messages`
WHERE";
|
|
73 |
|
$sqlDoQu
ery = "DEL
ETE FROM `
Messages`
WHERE";
|
74 |
|
|
|
74 |
|
|
75 |
|
if
( $_REQUES
T['do_mark
_new'] )
|
|
75 |
|
if
( $_REQUES
T['do_mark
_new'] )
|
76 |
|
$sqlDoQu
ery = "UPD
ATE `Messa
ges` SET `
New`='1' W
HERE";
|
|
76 |
|
$sqlDoQu
ery = "UPD
ATE `Messa
ges` SET `
New`='1' W
HERE";
|
77 |
|
|
|
77 |
|
|
78 |
|
if
( $_REQUES
T['do_mark
_old'] )
|
|
78 |
|
if
( $_REQUES
T['do_mark
_old'] )
|
79 |
|
$sqlDoQu
ery = "UPD
ATE `Messa
ges` SET `
New`='0' W
HERE";
|
|
79 |
|
$sqlDoQu
ery = "UPD
ATE `Messa
ges` SET `
New`='0' W
HERE";
|
80 |
|
|
|
80 |
|
|
81 |
|
if
( $aMsgs =
$_POST['m
'] and is_
array( $aM
sgs ) and
!empty( $a
Msgs ) )
|
|
81 |
|
if
( $aMsgs =
$_POST['m
'] and is_
array( $aM
sgs ) and
!empty( $a
Msgs ) )
|
82 |
|
{
|
|
82 |
|
{
|
83 |
|
foreach(
$aMsgs as
$msgID =>
$on )
|
|
83 |
|
foreach(
$aMsgs as
$msgID =>
$on )
|
84 |
|
{
|
|
84 |
|
{
|
85 |
|
$msg
ID = (int)
$msgID;
|
|
85 |
|
$msg
ID = (int)
$msgID;
|
86 |
|
if(
!$msgID or
$on != 'o
n' )
|
|
86 |
|
if(
!$msgID or
$on != 'o
n' )
|
87 |
|
continue;
|
|
87 |
|
continue;
|
88 |
|
|
|
88 |
|
|
89 |
|
db_r
es( "$sqlD
oQuery `ID
`=$msgID A
ND `Recipi
ent` = $me
mberID" );
|
|
89 |
|
db_r
es( "$sqlD
oQuery `ID
`=$msgID A
ND `Recipi
ent` = $me
mberID" );
|
90 |
|
}
|
|
90 |
|
}
|
91 |
|
}
|
|
91 |
|
}
|
92 |
|
}
|
|
92 |
|
}
|
93 |
|
//echo
Dbg( $_POS
T );
|
|
93 |
|
//echo
Dbg( $_POS
T );
|
94 |
|
|
|
94 |
|
|
95 |
|
|
|
95 |
|
|
96 |
|
|
|
96 |
|
|
97 |
|
$query
= "
|
|
97 |
|
$query
= "
|
98 |
|
SE
LECT
|
|
98 |
|
SE
LECT
|
99 |
|
`Message
s`.`ID`,
|
|
99 |
|
`Message
s`.`ID`,
|
100 |
|
UNIX_TIM
ESTAMP( `D
ate` ) AS
`timestamp
`,
|
|
100 |
|
UNIX_TIM
ESTAMP( `D
ate` ) AS
`timestamp
`,
|
101 |
|
DATE_FOR
MAT(`Date`
, '$date_f
ormat') AS
`Date`,
|
|
101 |
|
DATE_FOR
MAT(`Date`
, '$date_f
ormat') AS
`Date`,
|
102 |
|
`Sender`
,
|
|
102 |
|
`Sender`
,
|
103 |
|
`Profile
s`.`NickNa
me` AS `Se
nderNickNa
me`,
|
|
103 |
|
`Profile
s`.`NickNa
me` AS `Se
nderNickNa
me`,
|
104 |
|
`Subject
`,
|
|
104 |
|
`Subject
`,
|
105 |
|
`New`
|
|
105 |
|
`New`
|
106 |
|
FR
OM `Messag
es`
|
|
106 |
|
FR
OM `Messag
es`
|
107 |
|
LE
FT JOIN `P
rofiles` O
N
|
|
107 |
|
LE
FT JOIN `P
rofiles` O
N
|
108 |
|
`Profile
s`.`ID` =
`Sender`
|
|
108 |
|
`Profile
s`.`ID` =
`Sender`
|
109 |
|
WH
ERE `Recip
ient` = $m
emberID
|
|
109 |
|
WH
ERE `Recip
ient` = $m
emberID
|
110 |
|
OR
DER BY `Da
te` DESC
|
|
110 |
|
OR
DER BY `Da
te` DESC
|
111 |
|
";
|
|
111 |
|
";
|
112 |
|
|
|
112 |
|
|
113 |
|
$rMsgs
= db_res(
$query );
|
|
113 |
|
$rMsgs
= db_res(
$query );
|
114 |
|
|
|
114 |
|
|
115 |
|
if( !m
ysql_num_r
ows( $rMsg
s ) )
|
|
115 |
|
if( !m
ysql_num_r
ows( $rMsg
s ) )
|
116 |
|
re
turn '<div
class="no
_result"><
div>'._t(
"_No messa
ges in Inb
ox" ).'</d
iv></div>'
;
|
|
116 |
|
re
turn '<div
class="no
_result"><
div>'._t(
"_No messa
ges in Inb
ox" ).'</d
iv></div>'
;
|
117 |
|
|
|
117 |
|
|
118 |
|
|
|
118 |
|
|
119 |
|
// ---
get templ
ate and re
place head
ers ---
|
|
119 |
|
// ---
get templ
ate and re
place head
ers ---
|
120 |
|
$aRepl
ace = arra
y();
|
|
120 |
|
$aRepl
ace = arra
y();
|
121 |
|
|
|
121 |
|
|
122 |
|
$aRepl
ace['mailb
ox_header_
img'] = '<
img src="'
.getTempla
teIcon( 'i
nbox.gif'
) .'" clas
s="mailbox
_header_im
g" />';
|
|
122 |
|
$aRepl
ace['mailb
ox_header_
img'] = '<
img src="'
.getTempla
teIcon( 'i
nbox.gif'
) .'" clas
s="mailbox
_header_im
g" />';
|
123 |
|
//$aRe
place['sum
mary'] = _
t(
|
|
123 |
|
//$aRe
place['sum
mary'] = _
t(
|
124 |
|
$aRepl
ace['flag'
] = _t(
'_Flag' )
;
|
|
124 |
|
$aRepl
ace['flag'
] = _t(
'_Flag' )
;
|
125 |
|
$aRepl
ace['from'
] = _t(
'_From' )
;
|
|
125 |
|
$aRepl
ace['from'
] = _t(
'_From' )
;
|
126 |
|
$aRepl
ace['date'
] = _t(
'_Date' )
;
|
|
126 |
|
$aRepl
ace['date'
] = _t(
'_Date' )
;
|
127 |
|
$aRepl
ace['subje
ct'] = _t(
'_Subject
' );
|
|
127 |
|
$aRepl
ace['subje
ct'] = _t(
'_Subject
' );
|
128 |
|
$aRepl
ace['click
_to_sort']
= _t( '_C
lick to so
rt' );
|
|
128 |
|
$aRepl
ace['click
_to_sort']
= _t( '_C
lick to so
rt' );
|
129 |
|
|
|
129 |
|
|
130 |
|
$aRepl
ace['actio
ns_l'] = _
t( "_Selec
ted messag
es" ) .':'
;
|
|
130 |
|
$aRepl
ace['actio
ns_l'] = _
t( "_Selec
ted messag
es" ) .':'
;
|
131 |
|
$aRepl
ace['actio
ns'] = '
|
|
131 |
|
$aRepl
ace['actio
ns'] = '
|
132 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_delete"
value="'.
_t('_Delet
e').'" onc
lick="retu
rn confirm
(\''._t('_
are you su
re?').'\')
;" />
|
|
132 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_delete"
value="'.
_t('_Delet
e').'" onc
lick="retu
rn confirm
(\''._t('_
are you su
re?').'\')
;" />
|
133 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_mark_new"
value="'.
_t( "_Mark
as New" )
.'" />
|
|
133 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_mark_new"
value="'.
_t( "_Mark
as New" )
.'" />
|
134 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_mark_old"
value="'.
_t( "_Mark
as old" )
.'" />
|
|
134 |
|
<i
nput type=
"submit" c
lass="mail
box_submit
" name="do
_mark_old"
value="'.
_t( "_Mark
as old" )
.'" />
|
135 |
|
';
|
|
135 |
|
';
|
136 |
|
|
|
136 |
|
|
137 |
|
$ret =
file_get_
contents("
{$dir['roo
t']}templa
tes/tmpl_{
$tmpl}/mai
l_box.html
");
|
|
137 |
|
$ret =
file_get_
contents("
{$dir['roo
t']}templa
tes/tmpl_{
$tmpl}/mai
l_box.html
");
|
138 |
|
foreac
h( $aRepla
ce as $key
=> $val )
|
|
138 |
|
foreac
h( $aRepla
ce as $key
=> $val )
|
139 |
|
$r
et = str_r
eplace( "_
_{$key}__"
, $val, $r
et );
|
|
139 |
|
$r
et = str_r
eplace( "_
_{$key}__"
, $val, $r
et );
|
140 |
|
|
|
140 |
|
|
141 |
|
$aMyTm
pl = preg_
split( "/\
{\/?Insert
Rows\}/",
$ret );
|
|
141 |
|
$aMyTm
pl = preg_
split( "/\
{\/?Insert
Rows\}/",
$ret );
|
142 |
|
$tmplR
ow = $aMyT
mpl[1];
|
|
142 |
|
$tmplR
ow = $aMyT
mpl[1];
|
143 |
|
$ret
= "{$aMyTm
pl[0]}{Ins
ertRows /}
{$aMyTmpl[
2]}";
|
|
143 |
|
$ret
= "{$aMyTm
pl[0]}{Ins
ertRows /}
{$aMyTmpl[
2]}";
|
144 |
|
|
|
144 |
|
|
145 |
|
$Inser
tRows = ''
;
|
|
145 |
|
$Inser
tRows = ''
;
|
146 |
|
$tr_cl
ass = 'odd
';
|
|
146 |
|
$tr_cl
ass = 'odd
';
|
147 |
|
while(
$aMsg = m
ysql_fetch
_assoc( $r
Msgs ) )
|
|
147 |
|
while(
$aMsg = m
ysql_fetch
_assoc( $r
Msgs ) )
|
148 |
|
{
|
|
148 |
|
{
|
149 |
|
$s
Subject =
process_li
ne_output(
html2txt(
$aMsg['Su
bject'] ))
;
|
|
149 |
|
$s
Subject =
process_li
ne_output(
html2txt(
$aMsg['Su
bject'] ))
;
|
150 |
|
|
|
150 |
|
|
151 |
|
$a
Replace =
array();
|
|
151 |
|
$a
Replace =
array();
|
152 |
|
|
|
152 |
|
|
153 |
|
$a
Replace['t
r_class']
= $tr_clas
s;
|
|
153 |
|
$a
Replace['t
r_class']
= $tr_clas
s;
|
154 |
|
$a
Replace['n
ew_add']
= $aMsg['N
ew'] ? 'ne
w' : '';
|
|
154 |
|
$a
Replace['n
ew_add']
= $aMsg['N
ew'] ? 'ne
w' : '';
|
155 |
|
|
|
155 |
|
|
156 |
|
$a
Replace['I
D']
= $aMsg['I
D'];
|
|
156 |
|
$a
Replace['I
D']
= $aMsg['I
D'];
|
157 |
|
$a
Replace['C
heckBox']
= '<input
type="chec
kbox" clas
s="td_mail
box_checkb
ox" id="se
l_msg_'.$a
Msg['ID'].
'" name="m
['.$aMsg['
ID'].']" v
alue="on"
/>';
|
|
157 |
|
$a
Replace['C
heckBox']
= '<input
type="chec
kbox" clas
s="td_mail
box_checkb
ox" id="se
l_msg_'.$a
Msg['ID'].
'" name="m
['.$aMsg['
ID'].']" v
alue="on"
/>';
|
158 |
|
$a
Replace['F
lag']
= '<img cl
ass="mailb
ox_flag_im
g" src="'.
getTemplat
eIcon( $aM
sg['New']
? 'not_rea
ded.gif' :
'readed.g
if' ).'" t
itle="'._t
( $aMsg['N
ew'] ? '_N
ew Message
' : '_Read
ed' ).'" /
>';
|
|
158 |
|
$a
Replace['F
lag']
= '<img cl
ass="mailb
ox_flag_im
g" src="'.
getTemplat
eIcon( $aM
sg['New']
? 'not_rea
ded.gif' :
'readed.g
if' ).'" t
itle="'._t
( $aMsg['N
ew'] ? '_N
ew Message
' : '_Read
ed' ).'" /
>';
|
159 |
|
$aReplace[
'From']
=
"<
!--{$aMsg[
'SenderNic
kName']}--
>
<a
href=\"".g
etProfileL
ink($aMsg[
'Sender'])
."\">{$aMs
g['SenderN
ickName']}
</a>"
;
|
|
159 |
|
$aReplace[
'From']
=
'<center><
div
style="wid
th:45px;">
'
.
get_member
_icon($aMs
g['Sender'
])
.
"<
div
class=\"cl
ear_both\"
></div><
!--{$aMsg[
'SenderNic
kName']}--
>
<a
href=\"".g
etProfileL
ink($aMsg[
'Sender'])
."\">{$aMs
g['SenderN
ickName']}
</a>"
.
'</center>
'
;
|
160 |
|
$a
Replace['D
ate']
= "<!--{$a
Msg['times
tamp']}-->
{$aMsg['D
ate']}";
|
|
160 |
|
$a
Replace['D
ate']
= "<!--{$a
Msg['times
tamp']}-->
{$aMsg['D
ate']}";
|
161 |
|
$a
Replace['S
ubject']
= "<!--$sS
ubject-->
<a href=\"
{$site['ur
l']}messag
es_inbox.p
hp?message
={$aMsg['I
D']}\">$sS
ubject</a>
";
|
|
161 |
|
$a
Replace['S
ubject']
= "<!--$sS
ubject-->
<a href=\"
{$site['ur
l']}messag
es_inbox.p
hp?message
={$aMsg['I
D']}\">$sS
ubject</a>
";
|
162 |
|
|
|
162 |
|
|
163 |
|
|
|
163 |
|
|
164 |
|
$s
InsertRow
= $tmplRow
;
|
|
164 |
|
$s
InsertRow
= $tmplRow
;
|
165 |
|
fo
reach( $aR
eplace as
$key => $v
al )
|
|
165 |
|
fo
reach( $aR
eplace as
$key => $v
al )
|
166 |
|
$sInsert
Row = str_
replace( "
{{$key}}",
$val, $sI
nsertRow )
;
|
|
166 |
|
$sInsert
Row = str_
replace( "
{{$key}}",
$val, $sI
nsertRow )
;
|
167 |
|
|
|
167 |
|
|
168 |
|
$s
InsertRows
.= $sInse
rtRow;
|
|
168 |
|
$s
InsertRows
.= $sInse
rtRow;
|
169 |
|
$t
r_class =
( $tr_clas
s == 'odd'
? 'even'
: 'odd' );
|
|
169 |
|
$t
r_class =
( $tr_clas
s == 'odd'
? 'even'
: 'odd' );
|
170 |
|
}
|
|
170 |
|
}
|
171 |
|
|
|
171 |
|
|
172 |
|
$ret =
str_repla
ce( "{Inse
rtRows /}"
, $sInsert
Rows, $ret
);
|
|
172 |
|
$ret =
str_repla
ce( "{Inse
rtRows /}"
, $sInsert
Rows, $ret
);
|
173 |
|
|
|
173 |
|
|
174 |
|
$ret =
|
|
174 |
|
$ret =
|
175 |
|
'<
form name=
"mailbox_f
orm" actio
n="'.$_SER
VER['PHP_S
ELF'].'?mo
de=inbox"
method="po
st">'.$ret
.'</form>'
;
|
|
175 |
|
'<
form name=
"mailbox_f
orm" actio
n="'.$_SER
VER['PHP_S
ELF'].'?mo
de=inbox"
method="po
st">'.$ret
.'</form>'
;
|
176 |
|
|
|
176 |
|
|
177 |
|
return
$ret;
|
|
177 |
|
return
$ret;
|
178 |
|
}
|
|
178 |
|
}
|
179 |
|
|
|
179 |
|
|
180 |
|
|
|
180 |
|
|
181 |
|
function P
ageCodeOut
box()
|
|
181 |
|
function P
ageCodeOut
box()
|
182 |
|
{
|
|
182 |
|
{
|
183 |
|
global
$memberID
;
|
|
183 |
|
global
$memberID
;
|
184 |
|
global
$dir;
|
|
184 |
|
global
$dir;
|
185 |
|
global
$site;
|
|
185 |
|
global
$site;
|
186 |
|
global
$tmpl;
|
|
186 |
|
global
$tmpl;
|
187 |
|
global
$date_for
mat;
|
|
187 |
|
global
$date_for
mat;
|
188 |
|
|
|
188 |
|
|
189 |
|
|
|
189 |
|
|
190 |
|
$query
= "
|
|
190 |
|
$query
= "
|
191 |
|
SE
LECT
|
|
191 |
|
SE
LECT
|
192 |
|
`Message
s`.`ID`,
|
|
192 |
|
`Message
s`.`ID`,
|
193 |
|
UNIX_TIM
ESTAMP( `D
ate` ) AS
`timestamp
`,
|
|
193 |
|
UNIX_TIM
ESTAMP( `D
ate` ) AS
`timestamp
`,
|
194 |
|
DATE_FOR
MAT(`Date`
, '$date_f
ormat') AS
`Date`,
|
|
194 |
|
DATE_FOR
MAT(`Date`
, '$date_f
ormat') AS
`Date`,
|
195 |
|
`Recipie
nt`,
|
|
195 |
|
`Recipie
nt`,
|
196 |
|
`Profile
s`.`NickNa
me` AS `Re
cipientNic
kName`,
|
|
196 |
|
`Profile
s`.`NickNa
me` AS `Re
cipientNic
kName`,
|
197 |
|
`Subject
`,
|
|
197 |
|
`Subject
`,
|
198 |
|
`New`
|
|
198 |
|
`New`
|
199 |
|
FR
OM `Messag
es`
|
|
199 |
|
FR
OM `Messag
es`
|
200 |
|
LE
FT JOIN `P
rofiles` O
N
|
|
200 |
|
LE
FT JOIN `P
rofiles` O
N
|
201 |
|
`Profile
s`.`ID` =
`Recipient
`
|
|
201 |
|
`Profile
s`.`ID` =
`Recipient
`
|
202 |
|
WH
ERE `Sende
r` = $memb
erID
|
|
202 |
|
WH
ERE `Sende
r` = $memb
erID
|
203 |
|
OR
DER BY `Da
te` DESC
|
|
203 |
|
OR
DER BY `Da
te` DESC
|
204 |
|
";
|
|
204 |
|
";
|
205 |
|
|
|
205 |
|
|
206 |
|
$rMsgs
= db_res(
$query );
|
|
206 |
|
$rMsgs
= db_res(
$query );
|
207 |
|
|
|
207 |
|
|
208 |
|
if( !m
ysql_num_r
ows( $rMsg
s ) )
|
|
208 |
|
if( !m
ysql_num_r
ows( $rMsg
s ) )
|
209 |
|
re
turn '<div
class="no
_result"><
div>'._t(
"_No messa
ges in Out
box" ).'</
div></div>
';
|
|
209 |
|
re
turn '<div
class="no
_result"><
div>'._t(
"_No messa
ges in Out
box" ).'</
div></div>
';
|
210 |
|
|
|
210 |
|
|
211 |
|
|
|
211 |
|
|
212 |
|
// ---
get templ
ate and re
place head
ers ---
|
|
212 |
|
// ---
get templ
ate and re
place head
ers ---
|
213 |
|
$aRepl
ace = arra
y();
|
|
213 |
|
$aRepl
ace = arra
y();
|
214 |
|
|
|
214 |
|
|
215 |
|
$aRepl
ace['mailb
ox_header_
img'] = '<
img src="'
.getTempla
teIcon( 'o
utbox.gif'
) .'" cla
ss="mailbo
x_header_i
mg" />';
|
|
215 |
|
$aRepl
ace['mailb
ox_header_
img'] = '<
img src="'
.getTempla
teIcon( 'o
utbox.gif'
) .'" cla
ss="mailbo
x_header_i
mg" />';
|
216 |
|
//$aRe
place['sum
mary'] = _
t(
|
|
216 |
|
//$aRe
place['sum
mary'] = _
t(
|
217 |
|
$aRepl
ace['flag'
] = _t(
'_Flag' )
;
|
|
217 |
|
$aRepl
ace['flag'
] = _t(
'_Flag' )
;
|
218 |
|
$aRepl
ace['from'
] = _t(
'_Recipie
nt' );
|
|
218 |
|
$aRepl
ace['from'
] = _t(
'_Recipie
nt' );
|
219 |
|
$aRepl
ace['date'
] = _t(
'_Date' )
;
|
|
219 |
|
$aRepl
ace['date'
] = _t(
'_Date' )
;
|
220 |
|
$aRepl
ace['subje
ct'] = _t(
'_Subject
' );
|
|
220 |
|
$aRepl
ace['subje
ct'] = _t(
'_Subject
' );
|
221 |
|
$aRepl
ace['click
_to_sort']
= _t( '_C
lick to so
rt' );
|
|
221 |
|
$aRepl
ace['click
_to_sort']
= _t( '_C
lick to so
rt' );
|
222 |
|
|
|
222 |
|
|
223 |
|
$aRepl
ace['actio
ns_l'] = '
';
|
|
223 |
|
$aRepl
ace['actio
ns_l'] = '
';
|
224 |
|
$aRepl
ace['actio
ns'] = '
';
|
|
224 |
|
$aRepl
ace['actio
ns'] = '
';
|
225 |
|
|
|
225 |
|
|
226 |
|
$ret =
file_get_
contents("
{$dir['roo
t']}templa
tes/tmpl_{
$tmpl}/mai
l_box.html
");
|
|
226 |
|
$ret =
file_get_
contents("
{$dir['roo
t']}templa
tes/tmpl_{
$tmpl}/mai
l_box.html
");
|
227 |
|
foreac
h( $aRepla
ce as $key
=> $val )
|
|
227 |
|
foreac
h( $aRepla
ce as $key
=> $val )
|
228 |
|
$r
et = str_r
eplace( "_
_{$key}__"
, $val, $r
et );
|
|
228 |
|
$r
et = str_r
eplace( "_
_{$key}__"
, $val, $r
et );
|
229 |
|
|
|
229 |
|
|
230 |
|
$aMyTm
pl = preg_
split( "/\
{\/?Insert
Rows\}/",
$ret );
|
|
230 |
|
$aMyTm
pl = preg_
split( "/\
{\/?Insert
Rows\}/",
$ret );
|
231 |
|
$tmplR
ow = $aMyT
mpl[1];
|
|
231 |
|
$tmplR
ow = $aMyT
mpl[1];
|
232 |
|
$ret
= "{$aMyTm
pl[0]}{Ins
ertRows /}
{$aMyTmpl[
2]}";
|
|
232 |
|
$ret
= "{$aMyTm
pl[0]}{Ins
ertRows /}
{$aMyTmpl[
2]}";
|
233 |
|
|
|
233 |
|
|
234 |
|
$Inser
tRows = ''
;
|
|
234 |
|
$Inser
tRows = ''
;
|
235 |
|
$tr_cl
ass = 'odd
';
|
|
235 |
|
$tr_cl
ass = 'odd
';
|
236 |
|
while(
$aMsg = m
ysql_fetch
_assoc( $r
Msgs ) )
|
|
236 |
|
while(
$aMsg = m
ysql_fetch
_assoc( $r
Msgs ) )
|
237 |
|
{
|
|
237 |
|
{
|
238 |
|
$s
Subject =
process_li
ne_output(
html2txt(
$aMsg['Su
bject'] ))
;
|
|
238 |
|
$s
Subject =
process_li
ne_output(
html2txt(
$aMsg['Su
bject'] ))
;
|
239 |
|
|
|
239 |
|
|
240 |
|
$a
Replace =
array();
|
|
240 |
|
$a
Replace =
array();
|
241 |
|
|
|
241 |
|
|
242 |
|
$a
Replace['t
r_class']
= $tr_clas
s;
|
|
242 |
|
$a
Replace['t
r_class']
= $tr_clas
s;
|
243 |
|
$a
Replace['n
ew_add']
= $aMsg['N
ew'] ? 'ne
w' : '';
|
|
243 |
|
$a
Replace['n
ew_add']
= $aMsg['N
ew'] ? 'ne
w' : '';
|
244 |
|
|
|
244 |
|
|
245 |
|
$a
Replace['I
D']
= $aMsg['I
D'];
|
|
245 |
|
$a
Replace['I
D']
= $aMsg['I
D'];
|
246 |
|
$a
Replace['C
heckBox']
= '';
|
|
246 |
|
$a
Replace['C
heckBox']
= '';
|
247 |
|
$a
Replace['F
lag']
= '<img cl
ass="mailb
ox_flag_im
g" src="'.
getTemplat
eIcon( $aM
sg['New']
? 'not_rea
ded.gif' :
'readed.g
if' ).'" t
itle="'._t
( $aMsg['N
ew'] ? '_N
ot Readed'
: '_Reade
d' ).'" />
';
|
|
247 |
|
$a
Replace['F
lag']
= '<img cl
ass="mailb
ox_flag_im
g" src="'.
getTemplat
eIcon( $aM
sg['New']
? 'not_rea
ded.gif' :
'readed.g
if' ).'" t
itle="'._t
( $aMsg['N
ew'] ? '_N
ot Readed'
: '_Reade
d' ).'" />
';
|
248 |
|
$aReplace[
'From']
=
"
<!--{$aMsg
['Recipien
tNickName'
]}-->
<a
href=\"
{$sit
e
['u
r
l
']}{
$aMsg['Rec
ipient
NickName
']
}
\">{$aMsg[
'Recipient
NickName']
}</a>"
;
|
|
248 |
|
$aReplace[
'From']
=
'<center><
div
style="wid
th:45px;">
'
.
get_member
_icon($aMs
g['Recipie
nt'])
.
"<div
class=\"cl
ear_both\
"
></div>
<!--{$aMsg
['Recipien
tNickName'
]}-->
<a
href=\"
".g
e
tP
r
ofi
l
eLink(
$aMsg['Rec
ipient
']
)."
\">{$aMsg[
'Recipient
NickName']
}</a>"
.
'</center>
'
;
|
249 |
|
$a
Replace['D
ate']
= "<!--{$a
Msg['times
tamp']}-->
{$aMsg['D
ate']}";
|
|
249 |
|
$a
Replace['D
ate']
= "<!--{$a
Msg['times
tamp']}-->
{$aMsg['D
ate']}";
|
250 |
|
$a
Replace['S
ubject']
= "<!--$sS
ubject-->
<a href=\"
{$site['ur
l']}messag
es_outbox.
php?messag
e={$aMsg['
ID']}\">$s
Subject</a
>";
|
|
250 |
|
$a
Replace['S
ubject']
= "<!--$sS
ubject-->
<a href=\"
{$site['ur
l']}messag
es_outbox.
php?messag
e={$aMsg['
ID']}\">$s
Subject</a
>";
|
251 |
|
|
|
251 |
|
|
252 |
|
|
|
252 |
|
|
253 |
|
$s
InsertRow
= $tmplRow
;
|
|
253 |
|
$s
InsertRow
= $tmplRow
;
|
254 |
|
fo
reach( $aR
eplace as
$key => $v
al )
|
|
254 |
|
fo
reach( $aR
eplace as
$key => $v
al )
|
255 |
|
$sInsert
Row = str_
replace( "
{{$key}}",
$val, $sI
nsertRow )
;
|
|
255 |
|
$sInsert
Row = str_
replace( "
{{$key}}",
$val, $sI
nsertRow )
;
|
256 |
|
|
|
256 |
|
|
257 |
|
$s
InsertRows
.= $sInse
rtRow;
|
|
257 |
|
$s
InsertRows
.= $sInse
rtRow;
|
258 |
|
$t
r_class =
( $tr_clas
s == 'odd'
? 'even'
: 'odd' );
|
|
258 |
|
$t
r_class =
( $tr_clas
s == 'odd'
? 'even'
: 'odd' );
|
259 |
|
}
|
|
259 |
|
}
|
260 |
|
|
|
260 |
|
|
261 |
|
$ret =
str_repla
ce( "{Inse
rtRows /}"
, $sInsert
Rows, $ret
);
|
|
261 |
|
$ret =
str_repla
ce( "{Inse
rtRows /}"
, $sInsert
Rows, $ret
);
|
262 |
|
|
|
262 |
|
|
263 |
|
return
$ret;
|
|
263 |
|
return
$ret;
|
264 |
|
}
|
|
264 |
|
}
|
265 |
|
|
|
265 |
|
|
266 |
|
|
|
266 |
|
|
267 |
|
?>
|
|
267 |
|
?>
|