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 . 'c
heckout.in
c.php' );
|
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'c
heckout.in
c.php' );
|
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']
= 10;
|
|
28 |
|
$_page['na
me_index']
= 10;
|
29 |
|
$_page['cs
s_name'] =
'membersh
ip.css';
|
|
29 |
|
$_page['cs
s_name'] =
'membersh
ip.css';
|
30 |
|
|
|
30 |
|
|
31 |
|
$logged['m
ember'] =
member_aut
h( 0 );
|
|
31 |
|
$logged['m
ember'] =
member_aut
h( 0 );
|
32 |
|
|
|
32 |
|
|
33 |
|
$_page['he
ader'] = _
t( "_MEMBE
RSHIP_H" )
;
|
|
33 |
|
$_page['he
ader'] = _
t( "_MEMBE
RSHIP_H" )
;
|
34 |
|
$_page['he
ader_text'
] = _t( "_
MEMBERSHIP
_H1" );
|
|
34 |
|
$_page['he
ader_text'
] = _t( "_
MEMBERSHIP
_H1" );
|
35 |
|
|
|
35 |
|
|
36 |
|
// free mo
de enabled
then don'
t show any
thing
|
|
36 |
|
// free mo
de enabled
then don'
t show any
thing
|
37 |
|
if ( getPa
ram('free_
mode') ==
'on' )
|
|
37 |
|
if ( getPa
ram('free_
mode') ==
'on' )
|
38 |
|
{
|
|
38 |
|
{
|
39 |
|
$_page
['name_ind
ex'] = 0;
|
|
39 |
|
$_page
['name_ind
ex'] = 0;
|
40 |
|
$_page
_cont[0]['
page_main_
code'] = '
';
|
|
40 |
|
$_page
_cont[0]['
page_main_
code'] = '
';
|
41 |
|
PageCo
de();
|
|
41 |
|
PageCo
de();
|
42 |
|
exit()
;
|
|
42 |
|
exit()
;
|
43 |
|
}
|
|
43 |
|
}
|
44 |
|
|
|
44 |
|
|
45 |
|
$en_credit
s = (getPa
ram('en_cr
edits') ==
'on');
|
|
|
46 |
|
|
|
|
47 |
|
// -------
-------- G
ET/POST ac
tions
|
|
45 |
|
// -------
-------- G
ET/POST ac
tions
|
48 |
|
|
|
46 |
|
|
49 |
|
$subscript
ionStatus
= '';
|
|
47 |
|
$subscript
ionStatus
= '';
|
50 |
|
if ( isset
($_REQUEST
['action']
) )
|
|
48 |
|
if ( isset
($_REQUEST
['action']
) )
|
51 |
|
{
|
|
49 |
|
{
|
52 |
|
switch
( $_REQUE
ST['action
'] )
|
|
50 |
|
switch
( $_REQUE
ST['action
'] )
|
53 |
|
{
|
|
51 |
|
{
|
54 |
|
ca
se 'cancel
_subscript
ion':
|
|
52 |
|
ca
se 'cancel
_subscript
ion':
|
55 |
|
$transac
tionID = (
int)$_REQU
EST['tran_
id'];
|
|
53 |
|
$transac
tionID = (
int)$_REQU
EST['tran_
id'];
|
56 |
|
$subscri
ptionArr =
db_arr( "
SELECT `Pa
ymentSubsc
riptions`.
`Transacti
onID`, DAT
E_FORMAT(`
PaymentSub
scriptions
`.`StartDa
te`, '$da
te_format'
) AS Star
tDate, `Pa
ymentSubsc
riptions`.
`Period`,
`Transacti
ons`.`Desc
ription`,
`PaymentPr
oviders`.`
Caption` A
S `Provide
rCaption`
FROM `Paym
entSubscri
ptions`
|
|
54 |
|
$subscri
ptionArr =
db_arr( "
SELECT `Pa
ymentSubsc
riptions`.
`Transacti
onID`, DAT
E_FORMAT(`
PaymentSub
scriptions
`.`StartDa
te`, '$da
te_format'
) AS Star
tDate, `Pa
ymentSubsc
riptions`.
`Period`,
`Transacti
ons`.`Desc
ription`,
`PaymentPr
oviders`.`
Caption` A
S `Provide
rCaption`
FROM `Paym
entSubscri
ptions`
|
57 |
|
LEFT J
OIN `Trans
actions` O
N `Payment
Subscripti
ons`.`Tran
sactionID`
= `Transa
ctions`.`I
D`
|
|
55 |
|
LEFT J
OIN `Trans
actions` O
N `Payment
Subscripti
ons`.`Tran
sactionID`
= `Transa
ctions`.`I
D`
|
58 |
|
LEFT J
OIN `Payme
ntProvider
s` ON `Tra
nsactions`
.`IDProvid
er` = `Pay
mentProvid
ers`.`ID`
|
|
56 |
|
LEFT J
OIN `Payme
ntProvider
s` ON `Tra
nsactions`
.`IDProvid
er` = `Pay
mentProvid
ers`.`ID`
|
59 |
|
WHERE
`PaymentSu
bscription
s`.`Transa
ctionID` =
{$transac
tionID}" )
;
|
|
57 |
|
WHERE
`PaymentSu
bscription
s`.`Transa
ctionID` =
{$transac
tionID}" )
;
|
60 |
|
|
|
58 |
|
|
61 |
|
if ( $su
bscription
Arr )
|
|
59 |
|
if ( $su
bscription
Arr )
|
62 |
|
{
|
|
60 |
|
{
|
63 |
|
$rec
ipient = $
site['emai
l'];
|
|
61 |
|
$rec
ipient = $
site['emai
l'];
|
64 |
|
$sub
ject = 'Un
subscripti
on request
';
|
|
62 |
|
$sub
ject = 'Un
subscripti
on request
';
|
65 |
|
|
|
63 |
|
|
66 |
|
$mes
sage = <<<
EOM
|
|
64 |
|
$mes
sage = <<<
EOM
|
67 |
|
Dear Admin
, please u
nsubscribe
me from r
ecurring p
ayments.
|
|
65 |
|
Dear Admin
, please u
nsubscribe
me from r
ecurring p
ayments.
|
68 |
|
Below my s
ubscriptio
n informat
ion:
|
|
66 |
|
Below my s
ubscriptio
n informat
ion:
|
69 |
|
Subscr
iption dat
e: {$subsc
riptionArr
['StartDat
e']}
|
|
67 |
|
Subscr
iption dat
e: {$subsc
riptionArr
['StartDat
e']}
|
70 |
|
Paymen
t provider
: {$subscr
iptionArr[
'ProviderC
aption']}
|
|
68 |
|
Paymen
t provider
: {$subscr
iptionArr[
'ProviderC
aption']}
|
71 |
|
Subscr
iption per
iod: {$sub
scriptionA
rr['Period
']}
|
|
69 |
|
Subscr
iption per
iod: {$sub
scriptionA
rr['Period
']}
|
72 |
|
Paymen
t descript
ion: {$sub
scriptionA
rr['Descri
ption']}
|
|
70 |
|
Paymen
t descript
ion: {$sub
scriptionA
rr['Descri
ption']}
|
73 |
|
EOM;
|
|
71 |
|
EOM;
|
74 |
|
$res
= sendMai
l( $recipi
ent, $subj
ect, $mess
age );
|
|
72 |
|
$res
= sendMai
l( $recipi
ent, $subj
ect, $mess
age );
|
75 |
|
}
|
|
73 |
|
}
|
76 |
|
else
|
|
74 |
|
else
|
77 |
|
{
|
|
75 |
|
{
|
78 |
|
$res
= false;
|
|
76 |
|
$res
= false;
|
79 |
|
}
|
|
77 |
|
}
|
80 |
|
|
|
78 |
|
|
81 |
|
$subscri
ptionStatu
s = $res ?
_t('_Subs
cription c
ancellatio
n request
was succes
sfully sen
t') : _t('
_Fail to s
ent subscr
iption can
cellation
request');
|
|
79 |
|
$subscri
ptionStatu
s = $res ?
_t('_Subs
cription c
ancellatio
n request
was succes
sfully sen
t') : _t('
_Fail to s
ent subscr
iption can
cellation
request');
|
82 |
|
break;
|
|
80 |
|
break;
|
83 |
|
}
|
|
81 |
|
}
|
84 |
|
}
|
|
82 |
|
}
|
85 |
|
|
|
83 |
|
|
86 |
|
// -------
-------- [
END ] GET
/POST acti
ons
|
|
84 |
|
// -------
-------- [
END ] GET
/POST acti
ons
|
87 |
|
|
|
85 |
|
|
88 |
|
// -------
-------- p
age compon
ents
|
|
86 |
|
// -------
-------- p
age compon
ents
|
89 |
|
|
|
87 |
|
|
90 |
|
$_ni = $_p
age['name_
index'];
|
|
88 |
|
$_ni = $_p
age['name_
index'];
|
91 |
|
|
|
89 |
|
|
92 |
|
// NOTE: $
memberID i
s defined
in checkou
t.inc.php
file
|
|
90 |
|
// NOTE: $
memberID i
s defined
in checkou
t.inc.php
file
|
93 |
|
$_page_con
t[$_ni]['s
tatus'] =
PageCompSt
atus( $mem
berID );
|
|
91 |
|
$_page_con
t[$_ni]['s
tatus'] =
PageCompSt
atus( $mem
berID );
|
94 |
|
$_page_con
t[$_ni]['s
ubscriptio
ns'] = (
$enable_re
curring ?
PageCompSu
bscription
s( $member
ID, $subsc
riptionSta
tus ) : ''
);
|
|
92 |
|
$_page_con
t[$_ni]['s
ubscriptio
ns'] = (
$enable_re
curring ?
PageCompSu
bscription
s( $member
ID, $subsc
riptionSta
tus ) : ''
);
|
95 |
|
$_page_con
t[$_ni]['c
redits'] =
( $en_cr
edits ? Pa
geCompCred
its() : ''
);
|
|
|
96 |
|
$_page_con
t[$_ni]['m
emberships
'] = PageC
ompMembers
hips();
|
|
93 |
|
$_page_con
t[$_ni]['m
emberships
'] = PageC
ompMembers
hips();
|
97 |
|
|
|
94 |
|
|
98 |
|
// -------
-------- [
END] page
components
|
|
95 |
|
// -------
-------- [
END] page
components
|
99 |
|
|
|
96 |
|
|
100 |
|
PageCode()
;
|
|
97 |
|
PageCode()
;
|
101 |
|
|
|
98 |
|
|
102 |
|
// -------
-------- p
age compon
ents funct
ions
|
|
99 |
|
// -------
-------- p
age compon
ents funct
ions
|
103 |
|
|
|
100 |
|
|
104 |
|
/**
|
|
101 |
|
/**
|
105 |
|
* members
hip status
|
|
102 |
|
* members
hip status
|
106 |
|
*/
|
|
103 |
|
*/
|
107 |
|
function P
ageCompSta
tus( $memb
erID )
|
|
104 |
|
function P
ageCompSta
tus( $memb
erID )
|
108 |
|
{
|
|
105 |
|
{
|
109 |
|
global
$site;
|
|
106 |
|
global
$site;
|
110 |
|
global
$en_credi
ts;
|
|
|
111 |
|
global
$oTemplCo
nfig;
|
|
107 |
|
global
$oTemplCo
nfig;
|
112 |
|
|
|
108 |
|
|
113 |
|
$ret =
'';
|
|
109 |
|
$ret =
'';
|
114 |
|
|
|
110 |
|
|
115 |
|
if ( i
sset( $_RE
QUEST['res
ult'] ) )
|
|
111 |
|
if ( i
sset( $_RE
QUEST['res
ult'] ) )
|
116 |
|
{
|
|
112 |
|
{
|
117 |
|
$r
esultMessa
ge = '';
|
|
113 |
|
$r
esultMessa
ge = '';
|
118 |
|
sw
itch( $_RE
QUEST['res
ult'] )
|
|
114 |
|
sw
itch( $_RE
QUEST['res
ult'] )
|
119 |
|
{
|
|
115 |
|
{
|
120 |
|
case '10
00':
|
|
116 |
|
case '10
00':
|
121 |
|
$res
ultMessage
= _t( '_R
ESULT1000'
);
|
|
117 |
|
$res
ultMessage
= _t( '_R
ESULT1000'
);
|
122 |
|
brea
k;
|
|
118 |
|
brea
k;
|
123 |
|
case '0'
:
|
|
119 |
|
case '0'
:
|
124 |
|
$res
ultMessage
= _t( '_R
ESULT0' );
|
|
120 |
|
$res
ultMessage
= _t( '_R
ESULT0' );
|
125 |
|
brea
k;
|
|
121 |
|
brea
k;
|
126 |
|
case '-1
':
|
|
122 |
|
case '-1
':
|
127 |
|
$res
ultMessage
= _t( '_R
ESULT-1' )
;
|
|
123 |
|
$res
ultMessage
= _t( '_R
ESULT-1' )
;
|
128 |
|
brea
k;
|
|
124 |
|
brea
k;
|
129 |
|
case '1'
:
|
|
125 |
|
case '1'
:
|
130 |
|
$res
ultMessage
= _t( '_R
ESULT1_THA
NK', $site
['title']
);
|
|
126 |
|
$res
ultMessage
= _t( '_R
ESULT1_THA
NK', $site
['title']
);
|
131 |
|
brea
k;
|
|
127 |
|
brea
k;
|
132 |
|
}
|
|
128 |
|
}
|
133 |
|
if
( strlen(
$resultMes
sage) )
|
|
129 |
|
if
( strlen(
$resultMes
sage) )
|
134 |
|
$ret .=
"<div clas
s=\"result
_message\"
>{$resultM
essage}</d
iv>\n";
|
|
130 |
|
$ret .=
"<div clas
s=\"result
_message\"
>{$resultM
essage}</d
iv>\n";
|
135 |
|
}
|
|
131 |
|
}
|
136 |
|
|
|
132 |
|
|
137 |
|
$ret
.=
GetMembers
hipStatus(
$memberID,
false
,
$en_credit
s
);
|
|
133 |
|
$ret
.=
GetMembers
hipStatus(
$memberID,
false
);
|
138 |
|
|
|
134 |
|
|
139 |
|
$ret =
"<div cla
ss=\"statu
s_box\">\n
{$ret}\n</
div>\n";
|
|
135 |
|
$ret =
"<div cla
ss=\"statu
s_box\">\n
{$ret}\n</
div>\n";
|
140 |
|
|
|
136 |
|
|
141 |
|
return
DesignBox
Content( _
t("_Member
ship Statu
s"), $ret,
$oTemplCo
nfig -> Pa
geCompStat
us_db_num
);
|
|
137 |
|
return
DesignBox
Content( _
t("_Member
ship Statu
s"), $ret,
$oTemplCo
nfig -> Pa
geCompStat
us_db_num
);
|
142 |
|
}
|
|
138 |
|
}
|
143 |
|
|
|
139 |
|
|
144 |
|
/**
|
|
140 |
|
/**
|
145 |
|
* payment
subscript
ions
|
|
141 |
|
* payment
subscript
ions
|
146 |
|
*/
|
|
142 |
|
*/
|
147 |
|
function P
ageCompSub
scriptions
( $memberI
D, $status
Message )
|
|
143 |
|
function P
ageCompSub
scriptions
( $memberI
D, $status
Message )
|
148 |
|
{
|
|
144 |
|
{
|
149 |
|
global
$oTemplCo
nfig;
|
|
145 |
|
global
$oTemplCo
nfig;
|
150 |
|
global
$date_for
mat;
|
|
146 |
|
global
$date_for
mat;
|
151 |
|
ob_sta
rt();
|
|
147 |
|
ob_sta
rt();
|
152 |
|
|
|
148 |
|
|
153 |
|
$subsc
riptionsRe
s = db_res
( "SELECT
`PaymentSu
bscription
s`.`Transa
ctionID`,
DATE_FORMA
T(`Payment
Subscripti
ons`.`Star
tDate`, '$
date_forma
t' ) AS St
artDate, `
PaymentSub
scriptions
`.`Period`
, `Payment
Subscripti
ons`.`Char
gesNumber`
, `Transac
tions`.`De
scription`
FROM `Pay
mentSubscr
iptions`
|
|
149 |
|
$subsc
riptionsRe
s = db_res
( "SELECT
`PaymentSu
bscription
s`.`Transa
ctionID`,
DATE_FORMA
T(`Payment
Subscripti
ons`.`Star
tDate`, '$
date_forma
t' ) AS St
artDate, `
PaymentSub
scriptions
`.`Period`
, `Payment
Subscripti
ons`.`Char
gesNumber`
, `Transac
tions`.`De
scription`
FROM `Pay
mentSubscr
iptions`
|
154 |
|
LEFT
JOIN `Tra
nsactions`
ON `Payme
ntSubscrip
tions`.`Tr
ansactionI
D` = `Tran
sactions`.
`ID`
|
|
150 |
|
LEFT
JOIN `Tra
nsactions`
ON `Payme
ntSubscrip
tions`.`Tr
ansactionI
D` = `Tran
sactions`.
`ID`
|
155 |
|
WHER
E `Transac
tions`.`ID
Member` =
{$memberID
}
|
|
151 |
|
WHER
E `Transac
tions`.`ID
Member` =
{$memberID
}
|
156 |
|
AND `Trans
actions`.`
Status` =
'declined'
" );
|
|
152 |
|
AND `Trans
actions`.`
Status` =
'declined'
" );
|
157 |
|
$daysL
angString
= _t('_day
s');
|
|
153 |
|
$daysL
angString
= _t('_day
s');
|
158 |
|
$cance
lLangStrin
g = _t('_C
ancel');
|
|
154 |
|
$cance
lLangStrin
g = _t('_C
ancel');
|
159 |
|
?>
|
|
155 |
|
?>
|
160 |
|
<div class
="subscrip
tions_box"
>
|
|
156 |
|
<div class
="subscrip
tions_box"
>
|
161 |
|
<?
|
|
157 |
|
<?
|
162 |
|
if ( s
trlen($sta
tusMessage
) )
|
|
158 |
|
if ( s
trlen($sta
tusMessage
) )
|
163 |
|
ec
ho "<div c
lass=\"res
ult_messag
e\">{$stat
usMessage}
</div>\n";
|
|
159 |
|
ec
ho "<div c
lass=\"res
ult_messag
e\">{$stat
usMessage}
</div>\n";
|
164 |
|
?>
|
|
160 |
|
?>
|
165 |
|
<form id="
cancelSubs
criptionFo
rm" action
="<?= $_SE
RVER['PHP_
SELF'] ?>"
method="p
ost" style
="margin:
0px;">
|
|
161 |
|
<form id="
cancelSubs
criptionFo
rm" action
="<?= $_SE
RVER['PHP_
SELF'] ?>"
method="p
ost" style
="margin:
0px;">
|
166 |
|
<input
type="hid
den" name=
"action" v
alue="canc
el_subscri
ption" />
|
|
162 |
|
<input
type="hid
den" name=
"action" v
alue="canc
el_subscri
ption" />
|
167 |
|
<input
type="hid
den" name=
"tran_id"
id="cancel
_transacti
on_id" val
ue="0" />
|
|
163 |
|
<input
type="hid
den" name=
"tran_id"
id="cancel
_transacti
on_id" val
ue="0" />
|
168 |
|
</form>
|
|
164 |
|
</form>
|
169 |
|
<script ty
pe="text/j
avascript"
>
|
|
165 |
|
<script ty
pe="text/j
avascript"
>
|
170 |
|
<!--
|
|
166 |
|
<!--
|
171 |
|
functi
on sendCan
celForm( t
ranID )
|
|
167 |
|
functi
on sendCan
celForm( t
ranID )
|
172 |
|
{
|
|
168 |
|
{
|
173 |
|
do
cument.get
ElementByI
d('cancel_
transactio
n_id').val
ue = tranI
D;
|
|
169 |
|
do
cument.get
ElementByI
d('cancel_
transactio
n_id').val
ue = tranI
D;
|
174 |
|
do
cument.for
ms['cancel
Subscripti
onForm'].s
ubmit();
|
|
170 |
|
do
cument.for
ms['cancel
Subscripti
onForm'].s
ubmit();
|
175 |
|
}
|
|
171 |
|
}
|
176 |
|
-->
|
|
172 |
|
-->
|
177 |
|
</script>
|
|
173 |
|
</script>
|
178 |
|
<table cel
lpadding="
4" cellspa
cing="0" b
order="0"
width="100
%">
|
|
174 |
|
<table cel
lpadding="
4" cellspa
cing="0" b
order="0"
width="100
%">
|
179 |
|
<tr cl
ass="subsc
riptions_r
ow_header"
>
|
|
175 |
|
<tr cl
ass="subsc
riptions_r
ow_header"
>
|
180 |
|
<t
d align="l
eft" width
="110"><?=
_t('_Star
t date') ?
></td>
|
|
176 |
|
<t
d align="l
eft" width
="110"><?=
_t('_Star
t date') ?
></td>
|
181 |
|
<t
d align="l
eft"><?= _
t('_Paymen
t descript
ion') ?></
td>
|
|
177 |
|
<t
d align="l
eft"><?= _
t('_Paymen
t descript
ion') ?></
td>
|
182 |
|
<t
d align="r
ight" widt
h="40"><?=
_t('_Peri
od') ?></t
d>
|
|
178 |
|
<t
d align="r
ight" widt
h="40"><?=
_t('_Peri
od') ?></t
d>
|
183 |
|
<t
d align="r
ight" widt
h="95"><?=
_t('_Char
ges number
') ?></td>
|
|
179 |
|
<t
d align="r
ight" widt
h="95"><?=
_t('_Char
ges number
') ?></td>
|
184 |
|
<t
d align="r
ight" widt
h="40">&nb
sp;</td>
|
|
180 |
|
<t
d align="r
ight" widt
h="40">&nb
sp;</td>
|
185 |
|
</tr>
|
|
181 |
|
</tr>
|
186 |
|
<?
|
|
182 |
|
<?
|
187 |
|
while
( $subscri
ptionArr =
mysql_fet
ch_assoc($
subscripti
onsRes) )
|
|
183 |
|
while
( $subscri
ptionArr =
mysql_fet
ch_assoc($
subscripti
onsRes) )
|
188 |
|
{
|
|
184 |
|
{
|
189 |
|
?>
|
|
185 |
|
?>
|
190 |
|
<tr cl
ass="subsc
riptions_r
ow">
|
|
186 |
|
<tr cl
ass="subsc
riptions_r
ow">
|
191 |
|
<t
d align="l
eft" width
="110"><?=
$subscrip
tionArr['S
tartDate']
?></td>
|
|
187 |
|
<t
d align="l
eft" width
="110"><?=
$subscrip
tionArr['S
tartDate']
?></td>
|
192 |
|
<t
d align="l
eft"><?= p
rocess_lin
e_output($
subscripti
onArr['Des
cription']
) ?></td>
|
|
188 |
|
<t
d align="l
eft"><?= p
rocess_lin
e_output($
subscripti
onArr['Des
cription']
) ?></td>
|
193 |
|
<t
d align="r
ight"><?=
$subscript
ionArr['Pe
riod'] . $
daysLangSt
ring ?></t
d>
|
|
189 |
|
<t
d align="r
ight"><?=
$subscript
ionArr['Pe
riod'] . $
daysLangSt
ring ?></t
d>
|
194 |
|
<t
d align="r
ight"><?=
$subscript
ionArr['Ch
argesNumbe
r'] ?></td
>
|
|
190 |
|
<t
d align="r
ight"><?=
$subscript
ionArr['Ch
argesNumbe
r'] ?></td
>
|
195 |
|
<t
d align="r
ight" widt
h="40"><a
href="java
script:voi
d(0);" onc
lick="java
script: se
ndCancelFo
rm(<?= $su
bscription
Arr['Trans
actionID']
?>); retu
rn false;"
><?= $canc
elLangStri
ng ?></a><
/td>
|
|
191 |
|
<t
d align="r
ight" widt
h="40"><a
href="java
script:voi
d(0);" onc
lick="java
script: se
ndCancelFo
rm(<?= $su
bscription
Arr['Trans
actionID']
?>); retu
rn false;"
><?= $canc
elLangStri
ng ?></a><
/td>
|
196 |
|
</tr>
|
|
192 |
|
</tr>
|
197 |
|
<?
|
|
193 |
|
<?
|
198 |
|
}
|
|
194 |
|
}
|
199 |
|
?>
|
|
195 |
|
?>
|
200 |
|
</table>
|
|
196 |
|
</table>
|
201 |
|
</div>
|
|
197 |
|
</div>
|
202 |
|
<?
|
|
198 |
|
<?
|
203 |
|
|
|
199 |
|
|
204 |
|
$ret =
ob_get_co
ntents();
|
|
200 |
|
$ret =
ob_get_co
ntents();
|
205 |
|
ob_end
_clean();
|
|
201 |
|
ob_end
_clean();
|
206 |
|
|
|
202 |
|
|
207 |
|
return
DesignBox
Content( _
t('_Subscr
iptions'),
$ret, $oT
emplConfig
-> PageCo
mpSubscrip
tions_db_n
um );
|
|
203 |
|
return
DesignBox
Content( _
t('_Subscr
iptions'),
$ret, $oT
emplConfig
-> PageCo
mpSubscrip
tions_db_n
um );
|
208 |
|
}
|
|
204 |
|
}
|
209 |
|
|
|
205 |
|
|
210 |
|
/**
|
|
206 |
|
/**
|
211 |
|
* credits
|
|
|
212 |
|
*/
|
|
|
213 |
|
function P
ageCompCre
dits()
|
|
|
214 |
|
{
|
|
|
215 |
|
global
$site;
|
|
|
216 |
|
global
$doll;
|
|
|
217 |
|
global
$oTemplCo
nfig;
|
|
|
218 |
|
|
|
|
219 |
|
|
|
|
220 |
|
|
|
|
221 |
|
$minCr
edits = (f
loat)getPa
ram( 'min_
credit_a'
);
|
|
|
222 |
|
$maxCr
edits = (f
loat)getPa
ram( 'max_
credit_a'
);
|
|
|
223 |
|
$credi
tStep = (f
loat)getPa
ram( 'cred
it_step' )
;
|
|
|
224 |
|
$credi
t2money =
(float)get
Param( 'cr
edit2money
' ); // ho
w many cre
dits for o
ne money u
nit
|
|
|
225 |
|
$credi
tDiscountS
tep = (flo
at)getPara
m( 'credit
_discount_
step' );
|
|
|
226 |
|
|
|
|
227 |
|
ob_sta
rt();
|
|
|
228 |
|
?>
|
|
|
229 |
|
<div class
="credits_
box">
|
|
|
230 |
|
<form
id="buyCre
ditsForm"
action="<?
= $site['u
rl'] . 'ch
eckout.php
' ?>" meth
od="post"
style="mar
gin: 2px">
|
|
|
231 |
|
<input
type="hid
den" name=
"action" v
alue="calc
ulate" />
|
|
|
232 |
|
<input
type="hid
den" name=
"checkout_
action" va
lue="credi
ts" />
|
|
|
233 |
|
<input
type="hid
den" name=
"allow_sub
scribe" va
lue="on" /
>
|
|
|
234 |
|
<table
cellpaddi
ng="4" cel
lspacing="
0" border=
"0" width=
"100%">
|
|
|
235 |
|
<t
r>
|
|
|
236 |
|
<td alig
n="left">
|
|
|
237 |
|
<sel
ect class=
"no" name=
"data" sty
le="vertic
al-align:
middle;">
|
|
|
238 |
|
<?
|
|
|
239 |
|
$maxIn
dex = ($ma
xCredits -
$minCredi
ts) / $cre
ditStep;
|
|
|
240 |
|
for (
$credIndex
= 0; $cre
dIndex <=
$maxIndex;
$credInde
x++ )
|
|
|
241 |
|
{
|
|
|
242 |
|
$c
reditsAmou
nt = $minC
redits + $
credIndex
* $creditS
tep;
|
|
|
243 |
|
$c
reditsPric
e = $credi
tsAmount /
$credit2m
oney - $cr
edIndex *
$creditDis
countStep;
|
|
|
244 |
|
ec
ho "<optio
n value=\"
{$credInde
x}\">{$cre
ditsAmount
} ". _t('_
credits')
." - {$dol
l}{$credit
sPrice}</o
ption>\n";
|
|
|
245 |
|
}
|
|
|
246 |
|
?>
|
|
|
247 |
|
</se
lect>
|
|
|
248 |
|
</td>
|
|
|
249 |
|
<td alig
n="right"
width="110
">
|
|
|
250 |
|
<inp
ut type="s
ubmit" cla
ss="no" va
lue="<?= _
t( "_Check
Out" ) ?>
" style="w
idth: 100p
x; vertica
l-align: m
iddle;" />
|
|
|
251 |
|
</td>
|
|
|
252 |
|
<td alig
n="right"
width="60"
>
|
|
|
253 |
|
<a h
ref="javas
cript:void
(0);" onCl
ick=" java
script:win
dow.open('
explanatio
n.php?expl
ain=credit
s', '', 'w
idth=<?= $
oTemplConf
ig -> popU
pWindowWid
th ?>,heig
ht=<?= $oT
emplConfig
-> popUpW
indowHeigh
t ?>,menub
ar=no,stat
us=no,resi
zable=no,s
crollbars=
yes,toolba
r=no, loca
tion=no' )
;"><?= _t(
"_Explanat
ion") ?></
a>
|
|
|
254 |
|
</td>
|
|
|
255 |
|
</
tr>
|
|
|
256 |
|
</tabl
e>
|
|
|
257 |
|
</form
>
|
|
|
258 |
|
</div>
|
|
|
259 |
|
<?
|
|
|
260 |
|
|
|
|
261 |
|
$ret =
ob_get_co
ntents();
|
|
|
262 |
|
ob_end
_clean();
|
|
|
263 |
|
|
|
|
264 |
|
return
DesignBox
Content( _
t("_Member
ship Credi
ts"), $ret
, $oTemplC
onfig -> P
ageCompCre
dits_db_nu
m );
|
|
|
265 |
|
}
|
|
|
266 |
|
|
|
|
267 |
|
/**
|
|
|
268 |
|
* purchas
e membersh
ips
|
|
207 |
|
* purchas
e membersh
ips
|
269 |
|
*/
|
|
208 |
|
*/
|
270 |
|
function P
ageCompMem
berships()
|
|
209 |
|
function P
ageCompMem
berships()
|
271 |
|
{
|
|
210 |
|
{
|
272 |
|
global
$site;
|
|
211 |
|
global
$site;
|
273 |
|
global
$en_credi
ts;
|
|
|
274 |
|
global
$doll;
|
|
212 |
|
global
$doll;
|
275 |
|
global
$oTemplCo
nfig;
|
|
213 |
|
global
$oTemplCo
nfig;
|
276 |
|
|
|
214 |
|
|
277 |
|
$expl_
win_h = 40
0; //not g
lobal
|
|
215 |
|
$expl_
win_h = 40
0; //not g
lobal
|
278 |
|
|
|
216 |
|
|
279 |
|
$purch
asableOnly
= true;
|
|
217 |
|
$purch
asableOnly
= true;
|
280 |
|
$purch
asableMemb
erships =
getMembers
hips($purc
hasableOnl
y);
|
|
218 |
|
$purch
asableMemb
erships =
getMembers
hips($purc
hasableOnl
y);
|
281 |
|
|
|
219 |
|
|
282 |
|
$credi
t2money =
(float)get
Param( 'cr
edit2money
' ); // ho
w many cre
dits for o
ne money u
nit
|
|
|
283 |
|
$ret =
'';
|
|
220 |
|
$ret =
'';
|
284 |
|
|
|
221 |
|
|
285 |
|
foreac
h ($purcha
sableMembe
rships as
$ID => $na
me)
|
|
222 |
|
foreac
h ($purcha
sableMembe
rships as
$ID => $na
me)
|
286 |
|
{
|
|
223 |
|
{
|
287 |
|
ob
_start();
|
|
224 |
|
ob
_start();
|
288 |
|
?>
|
|
225 |
|
?>
|
289 |
|
<div class
="membersh
ip_line">
|
|
226 |
|
<div class
="membersh
ip_line">
|
290 |
|
<form
id="member
ship<?= $I
D ?>Form"
action="<?
= $site['u
rl'] . 'ch
eckout.php
' ?>" meth
od="post"
style="mar
gin: 2px">
|
|
227 |
|
<form
id="member
ship<?= $I
D ?>Form"
action="<?
= $site['u
rl'] . 'ch
eckout.php
' ?>" meth
od="post"
style="mar
gin: 2px">
|
291 |
|
<input
type="hid
den" name=
"action" v
alue="calc
ulate" />
|
|
228 |
|
<input
type="hid
den" name=
"action" v
alue="calc
ulate" />
|
292 |
|
<input
type="hid
den" name=
"checkout_
action" va
lue="membe
rship" />
|
|
229 |
|
<input
type="hid
den" name=
"checkout_
action" va
lue="membe
rship" />
|
293 |
|
<input
type="hid
den" name=
"allow_sub
scribe" va
lue="on" /
>
|
|
230 |
|
<input
type="hid
den" name=
"allow_sub
scribe" va
lue="on" /
>
|
294 |
|
<input
type="hid
den" name=
"data" val
ue="<?= $I
D ?>" />
|
|
231 |
|
<input
type="hid
den" name=
"data" val
ue="<?= $I
D ?>" />
|
295 |
|
<table
cellpaddi
ng="4" cel
lspacing="
0" border=
"0" width=
"100%">
|
|
232 |
|
<table
cellpaddi
ng="4" cel
lspacing="
0" border=
"0" width=
"100%">
|
296 |
|
<t
r>
|
|
233 |
|
<t
r>
|
297 |
|
<td alig
n="left"><
?= htmlspe
cialchars(
$name) ?><
/td>
|
|
234 |
|
<td alig
n="left"><
?= htmlspe
cialchars(
$name) ?><
/td>
|
298 |
|
<td alig
n="right">
|
|
235 |
|
<td alig
n="right">
|
299 |
|
<sel
ect class=
"no" name=
"amount" s
tyle="vert
ical-align
: middle;"
>
|
|
236 |
|
<sel
ect class=
"no" name=
"amount" s
tyle="vert
ical-align
: middle;"
>
|
300 |
|
<?
|
|
237 |
|
<?
|
301 |
|
$p
rices = ge
tMembershi
pPrices($I
D);
|
|
238 |
|
$p
rices = ge
tMembershi
pPrices($I
D);
|
302 |
|
fo
reach ($pr
ices as $d
ays => $pr
ice)
|
|
239 |
|
fo
reach ($pr
ices as $d
ays => $pr
ice)
|
303 |
|
{
|
|
240 |
|
{
|
304 |
|
$optionT
ext = $day
s ? $days
. ' '._t('
_days') :
_t('_Lifet
ime');
|
|
241 |
|
$optionT
ext = $day
s ? $days
. ' '._t('
_days') :
_t('_Lifet
ime');
|
305 |
|
$optionT
ext .= ' -
' . $doll
. $price;
|
|
242 |
|
$optionT
ext .= ' -
' . $doll
. $price;
|
306 |
|
if ( $en
_credits )
|
|
|
307 |
|
$opt
ionText .=
' (' . sp
rintf('%.2
f', $price
*$credit2m
oney) . '
' . _t('_c
redits') .
')';
|
|
|
308 |
|
echo "<o
ption valu
e=\"{$pric
e}\">{$opt
ionText}</
option>\n"
;
|
|
243 |
|
echo "<o
ption valu
e=\"{$pric
e}\">{$opt
ionText}</
option>\n"
;
|
309 |
|
}
|
|
244 |
|
}
|
310 |
|
?>
|
|
245 |
|
?>
|
311 |
|
</se
lect>
|
|
246 |
|
</se
lect>
|
312 |
|
</td>
|
|
247 |
|
</td>
|
313 |
|
<td alig
n="right"
width="110
">
|
|
248 |
|
<td alig
n="right"
width="110
">
|
314 |
|
<inp
ut type="s
ubmit" cla
ss="no" va
lue="<?= _
t( "_Check
Out" ) ?>
" style="w
idth: 100p
x; vertica
l-align: m
iddle;" />
|
|
249 |
|
<inp
ut type="s
ubmit" cla
ss="no" va
lue="<?= _
t( "_Check
Out" ) ?>
" style="w
idth: 100p
x; vertica
l-align: m
iddle;" />
|
315 |
|
</td>
|
|
250 |
|
</td>
|
316 |
|
<td alig
n="right"
width="60"
>
|
|
251 |
|
<td alig
n="right"
width="60"
>
|
317 |
|
<a h
ref="javas
cript:void
(0);" onCl
ick="javas
cript: win
dow.open('
explanatio
n.php?expl
ain=member
ship&type=
<?= $ID ?>
', '', 'wi
dth=<?= $o
TemplConfi
g -> popUp
WindowWidt
h ?>,heigh
t=<?= $exp
l_win_h ?>
,menubar=n
o,status=n
o,resizabl
e=no,scrol
lbars=yes,
toolbar=no
, location
=no' );"><
?= _t("_Ex
planation"
); ?></a>
|
|
252 |
|
<a h
ref="javas
cript:void
(0);" onCl
ick="javas
cript: win
dow.open('
explanatio
n.php?expl
ain=member
ship&type=
<?= $ID ?>
', '', 'wi
dth=<?= $o
TemplConfi
g -> popUp
WindowWidt
h ?>,heigh
t=<?= $exp
l_win_h ?>
,menubar=n
o,status=n
o,resizabl
e=no,scrol
lbars=yes,
toolbar=no
, location
=no' );"><
?= _t("_Ex
planation"
); ?></a>
|
318 |
|
</td>
|
|
253 |
|
</td>
|
319 |
|
</
tr>
|
|
254 |
|
</
tr>
|
320 |
|
</tabl
e>
|
|
255 |
|
</tabl
e>
|
321 |
|
</form
>
|
|
256 |
|
</form
>
|
322 |
|
</div>
|
|
257 |
|
</div>
|
323 |
|
<?
|
|
258 |
|
<?
|
324 |
|
$r
et .= ob_g
et_content
s();
|
|
259 |
|
$r
et .= ob_g
et_content
s();
|
325 |
|
ob
_end_clean
();
|
|
260 |
|
ob
_end_clean
();
|
326 |
|
}
|
|
261 |
|
}
|
327 |
|
|
|
262 |
|
|
328 |
|
$ret =
"<div cla
ss=\"membe
rships_box
\">\n{$ret
}\n</div>\
n";
|
|
263 |
|
$ret =
"<div cla
ss=\"membe
rships_box
\">\n{$ret
}\n</div>\
n";
|
329 |
|
|
|
264 |
|
|
330 |
|
return
DesignBox
Content( _
t("_Member
ship NEW")
, $ret, $o
TemplConfi
g -> PageC
ompMembers
hips_db_nu
m );
|
|
265 |
|
return
DesignBox
Content( _
t("_Member
ship NEW")
, $ret, $o
TemplConfi
g -> PageC
ompMembers
hips_db_nu
m );
|
331 |
|
}
|
|
266 |
|
}
|
332 |
|
|
|
267 |
|
|
333 |
|
?>
|
|
268 |
|
?>
|