No regular expressions were active.
1 |
|
<?php
|
|
1 |
|
<?php
|
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( BX_DIR
ECTORY_PAT
H_CLASSES
. 'BxDolMe
dia.php');
|
|
21 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_CLASSES
. 'BxDolMe
dia.php');
|
22 |
|
|
|
22 |
|
|
23 |
|
|
|
23 |
|
|
24 |
|
class Uplo
adPhoto ex
tends BxDo
lMedia
|
|
24 |
|
class Uplo
adPhoto ex
tends BxDo
lMedia
|
25 |
|
{
|
|
25 |
|
{
|
26 |
|
functi
on UploadP
hoto( $iPr
ofileID )
|
|
26 |
|
functi
on UploadP
hoto( $iPr
ofileID )
|
27 |
|
{
|
|
27 |
|
{
|
28 |
|
$t
his -> sMe
diaType =
'photo';
|
|
28 |
|
$t
his -> sMe
diaType =
'photo';
|
29 |
|
$t
his -> iPr
ofileID =
$iProfileI
D;
|
|
29 |
|
$t
his -> iPr
ofileID =
$iProfileI
D;
|
30 |
|
pa
rent::BxDo
lMedia();
|
|
30 |
|
pa
rent::BxDo
lMedia();
|
31 |
|
|
|
31 |
|
|
32 |
|
$a
Member = g
etProfileI
nfo( $this
-> iProfi
leID );
|
|
32 |
|
$a
Member = g
etProfileI
nfo( $this
-> iProfi
leID );
|
33 |
|
$s
Sex = $aMe
mber['Sex'
];
|
|
33 |
|
$s
Sex = $aMe
mber['Sex'
];
|
34 |
|
|
|
34 |
|
|
35 |
|
//
$sSex = db
_value( "S
ELECT `Sex
` FROM `Pr
ofiles` WH
ERE `ID` =
'{$this -
> iProfile
ID}'" );
|
|
35 |
|
//
$sSex = db
_value( "S
ELECT `Sex
` FROM `Pr
ofiles` WH
ERE `ID` =
'{$this -
> iProfile
ID}'" );
|
36 |
|
|
|
36 |
|
|
37 |
|
if
( $sSex ==
'male' or
$sSex ==
'Male' )
|
|
37 |
|
if
( $sSex ==
'male' or
$sSex ==
'Male' )
|
38 |
|
{
|
|
38 |
|
{
|
39 |
|
$this ->
sSexIcon
= 'man_sma
ll.gif';
|
|
39 |
|
$this ->
sSexIcon
= 'man_sma
ll.gif';
|
40 |
|
$this ->
sSexPic =
'man_big.
gif';
|
|
40 |
|
$this ->
sSexPic =
'man_big.
gif';
|
41 |
|
}
|
|
41 |
|
}
|
42 |
|
el
seif( $sSe
x == 'fema
le' or $sS
ex == 'Fem
ale' )
|
|
42 |
|
el
seif( $sSe
x == 'fema
le' or $sS
ex == 'Fem
ale' )
|
43 |
|
{
|
|
43 |
|
{
|
44 |
|
$this ->
sSexIcon
= 'woman_s
mall.gif';
|
|
44 |
|
$this ->
sSexIcon
= 'woman_s
mall.gif';
|
45 |
|
$this ->
sSexPic =
'woman_bi
g.gif';
|
|
45 |
|
$this ->
sSexPic =
'woman_bi
g.gif';
|
46 |
|
}
|
|
46 |
|
}
|
47 |
|
el
se
|
|
47 |
|
el
se
|
48 |
|
{
|
|
48 |
|
{
|
49 |
|
$this ->
sSexIcon
= 'visitor
_small.gif
';
|
|
49 |
|
$this ->
sSexIcon
= 'visitor
_small.gif
';
|
50 |
|
$this ->
sSexPic =
'visitor_
big.gif';
|
|
50 |
|
$this ->
sSexPic =
'visitor_
big.gif';
|
51 |
|
}
|
|
51 |
|
}
|
52 |
|
}
|
|
52 |
|
}
|
53 |
|
|
|
53 |
|
|
54 |
|
|
|
54 |
|
|
55 |
|
functi
on getMedi
aPage( $iM
ediaID = '
' )
|
|
55 |
|
functi
on getMedi
aPage( $iM
ediaID = '
' )
|
56 |
|
{
|
|
56 |
|
{
|
57 |
|
|
|
57 |
|
|
58 |
|
|
|
58 |
|
|
59 |
|
//
print_r( $
this -> aM
edia);
|
|
59 |
|
//
print_r( $
this -> aM
edia);
|
60 |
|
|
|
60 |
|
|
61 |
|
$r
et = '';
|
|
61 |
|
$r
et = '';
|
62 |
|
//
$ret .= pr
int_r($_PO
ST, true);
|
|
62 |
|
//
$ret .= pr
int_r($_PO
ST, true);
|
63 |
|
|
|
63 |
|
|
64 |
|
$b
ShowMenu =
false;
|
|
64 |
|
$b
ShowMenu =
false;
|
65 |
|
$b
WithoutJS
= false;
|
|
65 |
|
$b
WithoutJS
= false;
|
66 |
|
|
|
66 |
|
|
67 |
|
|
|
67 |
|
|
68 |
|
if
( 0 < $thi
s -> iMedi
aCount )
|
|
68 |
|
if
( 0 < $thi
s -> iMedi
aCount )
|
69 |
|
{
|
|
69 |
|
{
|
70 |
|
$iMediaI
D = ( 0 <
$iMediaID
) ? $iMedi
aID : $thi
s -> aMedi
a['0']['Pr
imPhoto'];
|
|
70 |
|
$iMediaI
D = ( 0 <
$iMediaID
) ? $iMedi
aID : $thi
s -> aMedi
a['0']['Pr
imPhoto'];
|
71 |
|
|
|
71 |
|
|
72 |
|
$aCurPho
to = $this
-> getEle
mentArrayB
yID($iMedi
aID);
|
|
72 |
|
$aCurPho
to = $this
-> getEle
mentArrayB
yID($iMedi
aID);
|
73 |
|
if( empt
y( $aCurPh
oto ) )
|
|
73 |
|
if( empt
y( $aCurPh
oto ) )
|
74 |
|
{
|
|
74 |
|
{
|
75 |
|
$sPh
otoUrl = g
etTemplate
Icon( $thi
s -> sSexP
ic );
|
|
75 |
|
$sPh
otoUrl = g
etTemplate
Icon( $thi
s -> sSexP
ic );
|
76 |
|
$bSh
owMenu = f
alse;
|
|
76 |
|
$bSh
owMenu = f
alse;
|
77 |
|
$bWi
thoutJS =
true;
|
|
77 |
|
$bWi
thoutJS =
true;
|
78 |
|
}
|
|
78 |
|
}
|
79 |
|
else
|
|
79 |
|
else
|
80 |
|
{
|
|
80 |
|
{
|
81 |
|
$ret
.= '<div
class="med
iaTitle" i
d="sTitleD
iv">';
|
|
81 |
|
$ret
.= '<div
class="med
iaTitle" i
d="sTitleD
iv">';
|
82 |
|
$ret .= pr
ocess_line
_output( $
aCurPhoto[
'med_title
'] );
|
|
82 |
|
$ret .= pr
ocess_line
_output( $
aCurPhoto[
'med_title
'] );
|
83 |
|
$ret
.= '</div
>';
|
|
83 |
|
$ret
.= '</div
>';
|
84 |
|
$sPh
otoUrl = $
this -> sM
ediaUrl .
'photo_' .
$aCurPhot
o['med_fil
e'];
|
|
84 |
|
$sPh
otoUrl = $
this -> sM
ediaUrl .
'photo_' .
$aCurPhot
o['med_fil
e'];
|
85 |
|
$iPh
otoRating
= $this ->
getRating
( $aCurPho
to['med_ra
ting_sum']
, $aCurPho
to['med_ra
ting_count
'] );
|
|
85 |
|
$iPh
otoRating
= $this ->
getRating
( $aCurPho
to['med_ra
ting_sum']
, $aCurPho
to['med_ra
ting_count
'] );
|
86 |
|
$bSh
owMenu = t
rue;
|
|
86 |
|
$bSh
owMenu = t
rue;
|
87 |
|
}
|
|
87 |
|
}
|
88 |
|
|
|
88 |
|
|
89 |
|
}
|
|
89 |
|
}
|
90 |
|
el
se
|
|
90 |
|
el
se
|
91 |
|
{
|
|
91 |
|
{
|
92 |
|
$sPhotoU
rl = getTe
mplateIcon
( $this ->
sSexPic )
;
|
|
92 |
|
$sPhotoU
rl = getTe
mplateIcon
( $this ->
sSexPic )
;
|
93 |
|
$bShowMe
nu = false
;
|
|
93 |
|
$bShowMe
nu = false
;
|
94 |
|
}
|
|
94 |
|
}
|
95 |
|
|
|
95 |
|
|
96 |
|
$r
et .= $thi
s -> getJS
Code( $aCu
rPhoto );
|
|
96 |
|
$r
et .= $thi
s -> getJS
Code( $aCu
rPhoto );
|
97 |
|
|
|
97 |
|
|
98 |
|
$r
et .= '<di
v class="r
atingParen
tBlock">';
|
|
98 |
|
$r
et .= '<di
v class="r
atingParen
tBlock">';
|
99 |
|
$ret .=
'<div clas
s="ratingB
lock" styl
e="height:
' . $this
-> aMediaC
onfig['siz
e']['photo
Height'] .
'px; widt
h:10px;">'
;
|
|
99 |
|
$ret .=
'<div clas
s="ratingB
lock" styl
e="height:
' . $this
-> aMediaC
onfig['siz
e']['photo
Height'] .
'px; widt
h:10px;">'
;
|
100 |
|
$ret
.= '<div
class="rat
ingInner"
id="sPhoto
RatingDiv"
style="he
ight:' . $
iPhotoRati
ng . '%;">
';
|
|
100 |
|
$ret
.= '<div
class="rat
ingInner"
id="sPhoto
RatingDiv"
style="he
ight:' . $
iPhotoRati
ng . '%;">
';
|
101 |
|
$ret .= '<
div class=
"ratingTex
tBlock">';
|
|
101 |
|
$ret .= '<
div class=
"ratingTex
tBlock">';
|
102 |
|
$ret .
= '<div id
="sRatingT
extDiv" st
yle="heigh
t:0%;">';
|
|
102 |
|
$ret .
= '<div id
="sRatingT
extDiv" st
yle="heigh
t:0%;">';
|
103 |
|
$i
PhotoRatin
gSum = ( 0
< $aCurPh
oto['med_r
ating_sum'
] ) ? $aCu
rPhoto['me
d_rating_s
um'] : 0 ;
|
|
103 |
|
$i
PhotoRatin
gSum = ( 0
< $aCurPh
oto['med_r
ating_sum'
] ) ? $aCu
rPhoto['me
d_rating_s
um'] : 0 ;
|
104 |
|
$i
PhotoRatin
gCount = (
0 < $aCur
Photo['med
_rating_co
unt'] ) ?
$aCurPhoto
['med_rati
ng_count']
: 0;
|
|
104 |
|
$i
PhotoRatin
gCount = (
0 < $aCur
Photo['med
_rating_co
unt'] ) ?
$aCurPhoto
['med_rati
ng_count']
: 0;
|
105 |
|
$r
et .= _t('
_votes') .
' '
. $iPhotoR
atingCount
. '<br>';
|
|
105 |
|
$r
et .= _t('
_votes') .
' '
. $iPhotoR
atingCount
. '<br>';
|
106 |
|
$r
et .= _t('
_ratio') .
' '
. $iPhotoR
atingSum;
|
|
106 |
|
$r
et .= _t('
_ratio') .
' '
. $iPhotoR
atingSum;
|
107 |
|
$ret .
= '</div>'
. "\n";
|
|
107 |
|
$ret .
= '</div>'
. "\n";
|
108 |
|
$ret .= '<
/div>' . "
\n";
|
|
108 |
|
$ret .= '<
/div>' . "
\n";
|
109 |
|
$ret
.= '</div
>' . "\n";
|
|
109 |
|
$ret
.= '</div
>' . "\n";
|
110 |
|
$ret .=
'</div>' .
"\n";
|
|
110 |
|
$ret .=
'</div>' .
"\n";
|
111 |
|
$r
et .= '</d
iv>' . "\n
";
|
|
111 |
|
$r
et .= '</d
iv>' . "\n
";
|
112 |
|
|
|
112 |
|
|
113 |
|
$r
et .= '<di
v class="p
hotoBlock"
id="photo
Keeper">';
|
|
113 |
|
$r
et .= '<di
v class="p
hotoBlock"
id="photo
Keeper">';
|
114 |
|
$ret .=
'<img src=
"' . getTe
mplateIcon
('spacer.g
if') . '"
style="wid
th:' . $th
is -> aMed
iaConfig['
size']['ph
otoWidth']
. 'px; he
ight:' . $
this -> aM
ediaConfig
['size']['
photoHeigh
t'] . 'px;
backgroun
d-image:ur
l(' . $sPh
otoUrl . '
);" class=
"photo" id
="temPhoto
ID" alt=""
/>';
|
|
114 |
|
$ret .=
'<img src=
"' . getTe
mplateIcon
('spacer.g
if') . '"
style="wid
th:' . $th
is -> aMed
iaConfig['
size']['ph
otoWidth']
. 'px; he
ight:' . $
this -> aM
ediaConfig
['size']['
photoHeigh
t'] . 'px;
backgroun
d-image:ur
l(' . $sPh
otoUrl . '
);" class=
"photo" id
="temPhoto
ID" alt=""
/>';
|
115 |
|
$r
et .= '</d
iv>';
|
|
115 |
|
$r
et .= '</d
iv>';
|
116 |
|
|
|
116 |
|
|
117 |
|
if
( $bShowMe
nu )
|
|
117 |
|
if
( $bShowMe
nu )
|
118 |
|
{
|
|
118 |
|
{
|
119 |
|
$ret .=
'<div clas
s="photoMe
nu">';
|
|
119 |
|
$ret .=
'<div clas
s="photoMe
nu">';
|
120 |
|
$ret
.= '<form
action="'
. $_SERVE
R['PHP_SEL
F'] . '" m
ethod="pos
t" name="a
ctionForm"
>';
|
|
120 |
|
$ret
.= '<form
action="'
. $_SERVE
R['PHP_SEL
F'] . '" m
ethod="pos
t" name="a
ctionForm"
>';
|
121 |
|
|
|
121 |
|
|
122 |
|
$ret .= '<
input type
="submit"
name="dele
tePhoto" v
alue="' .
_t( '_Dele
te' ) . '"
onclick="
return con
firm(\'' .
_t('_are
you sure?'
) . '\');"
/>';
|
|
122 |
|
$ret .= '<
input type
="submit"
name="dele
tePhoto" v
alue="' .
_t( '_Dele
te' ) . '"
onclick="
return con
firm(\'' .
_t('_are
you sure?'
) . '\');"
/>';
|
123 |
|
$ret .= '<
input type
="submit"
name="make
Prim" valu
e="' . _t(
'_Make Pri
mary') . '
" />';
|
|
123 |
|
$ret .= '<
input type
="submit"
name="make
Prim" valu
e="' . _t(
'_Make Pri
mary') . '
" />';
|
124 |
|
|
|
124 |
|
$aMember =
getProfil
eInfo( $th
is -> iPro
fileID );
|
|
|
125 |
|
$ret .= ($
aMember['C
ouple']>0)
? '<input
type="sub
mit" name=
"makePrimC
ouple" val
ue="' . _t
('_Make Pr
imary') .
' to Coupl
e" />' : '
';
|
125 |
|
$ret .= '<
input type
="hidden"
id="photoI
D" name="p
hotoID" va
lue="' . $
aCurPhoto[
'med_id']
. '" />';
|
|
126 |
|
$ret .= '<
input type
="hidden"
id="photoI
D" name="p
hotoID" va
lue="' . $
aCurPhoto[
'med_id']
. '" />';
|
126 |
|
|
|
127 |
|
|
|
|
128 |
|
$sRatable
= ($aCurPh
oto['rate_
able']=='1
') ? _t('_
disable ab
le to rate
') : _t('_
enable abl
e to rate'
);
|
|
|
129 |
|
$ret .= '<
input type
="submit"
id="makeRa
ble" name=
"makeRable
" value="'
. $sRatab
le . '" />
';
|
|
|
130 |
|
|
127 |
|
$ret
.= '</for
m>';
|
|
131 |
|
$ret
.= '</for
m>';
|
128 |
|
$ret .=
'</div>';
|
|
132 |
|
$ret .=
'</div>';
|
129 |
|
}
|
|
133 |
|
}
|
130 |
|
$r
et .= '<di
v class="c
lear_both"
></div>';
|
|
134 |
|
$r
et .= '<di
v class="c
lear_both"
></div>';
|
131 |
|
$r
et .= '<di
v class="i
conBlock">
';
|
|
135 |
|
$r
et .= '<di
v class="i
conBlock">
';
|
132 |
|
if( $bWi
thoutJS )
|
|
136 |
|
if( $bWi
thoutJS )
|
133 |
|
{
|
|
137 |
|
{
|
134 |
|
$ret
.= $this
-> getIcon
sList();
|
|
138 |
|
$ret
.= $this
-> getIcon
sList();
|
135 |
|
}
|
|
139 |
|
}
|
136 |
|
else
|
|
140 |
|
else
|
137 |
|
{
|
|
141 |
|
{
|
138 |
|
$ret
.= $this
-> _getIco
nsList();
|
|
142 |
|
$ret
.= $this
-> _getIco
nsList();
|
139 |
|
}
|
|
143 |
|
}
|
140 |
|
$r
et .= '</d
iv>';
|
|
144 |
|
$r
et .= '</d
iv>';
|
141 |
|
|
|
145 |
|
|
142 |
|
re
turn $ret;
|
|
146 |
|
re
turn $ret;
|
143 |
|
}
|
|
147 |
|
}
|
144 |
|
|
|
148 |
|
|
145 |
|
functi
on getJSCo
de( $aCurP
hoto )
|
|
149 |
|
functi
on getJSCo
de( $aCurP
hoto )
|
146 |
|
{
|
|
150 |
|
{
|
147 |
|
$r
et = '';
|
|
151 |
|
$r
et = '';
|
148 |
|
|
|
152 |
|
|
149 |
|
$r
et .= '<sc
ript type=
"text/java
script">
|
|
153 |
|
$r
et .= '<sc
ript type=
"text/java
script">
|
150 |
|
function
setImage(
)
|
|
154 |
|
function
setImage(
)
|
151 |
|
{
|
|
155 |
|
{
|
152 |
|
var
imgCode;
|
|
156 |
|
var
imgCode;
|
153 |
|
var
oOldImg =
document.g
etElementB
yId("temPh
otoID");
|
|
157 |
|
var
oOldImg =
document.g
etElementB
yId("temPh
otoID");
|
154 |
|
oOld
Img.style.
background
Image = "u
rl(' . $th
is -> sMed
iaUrl . 'p
hoto_' . $
aCurPhoto[
'med_file'
] . ')";
|
|
158 |
|
oOld
Img.style.
background
Image = "u
rl(' . $th
is -> sMed
iaUrl . 'p
hoto_' . $
aCurPhoto[
'med_file'
] . ')";
|
155 |
|
retu
rn false;
|
|
159 |
|
retu
rn false;
|
156 |
|
}
|
|
160 |
|
}
|
157 |
|
|
|
161 |
|
|
158 |
|
function
changePhot
o(
sFile,
iMediaID,
sTitle,
iRate,
rateSum,
rateCount
)
|
|
162 |
|
function
changePhot
o(
sFile,
iMediaID,
sTitle,
iRate,
rateSum,
rateCount
,
bRable
)
|
159 |
|
{
|
|
163 |
|
{
|
160 |
|
var
oOldImg =
document.g
etElementB
yId("temPh
otoID");
|
|
164 |
|
var
oOldImg =
document.g
etElementB
yId("temPh
otoID");
|
161 |
|
oOld
Img.style.
background
Image = "u
rl(' . $th
is -> sMed
iaUrl . 'p
hoto_"+sFi
le+")";
|
|
165 |
|
oOld
Img.style.
background
Image = "u
rl(' . $th
is -> sMed
iaUrl . 'p
hoto_"+sFi
le+")";
|
162 |
|
chan
geTitle( s
Title );
|
|
166 |
|
chan
geTitle( s
Title );
|
163 |
|
chan
geRate( iR
ate, rateS
um, rateCo
unt );
|
|
167 |
|
chan
geRate( iR
ate, rateS
um, rateCo
unt );
|
164 |
|
chan
geMediaID(
iMediaID
);
|
|
168 |
|
chan
geMediaID(
iMediaID
);
|
|
|
169 |
|
chan
geRable( b
Rable );
|
165 |
|
retu
rn false;
|
|
170 |
|
retu
rn false;
|
166 |
|
}
|
|
171 |
|
}
|
167 |
|
|
|
172 |
|
|
168 |
|
function
changeTit
le( sTitle
)
|
|
173 |
|
function
changeTit
le( sTitle
)
|
169 |
|
{
|
|
174 |
|
{
|
170 |
|
var
oTitleDiv
= document
.getElemen
tById("sTi
tleDiv");
|
|
175 |
|
var
oTitleDiv
= document
.getElemen
tById("sTi
tleDiv");
|
171 |
|
oTit
leDiv.inne
rHTML = st
ripSlashes
(sTitle);
|
|
176 |
|
oTit
leDiv.inne
rHTML = st
ripSlashes
(sTitle);
|
172 |
|
}
|
|
177 |
|
}
|
173 |
|
|
|
178 |
|
|
174 |
|
function
changeRat
e( iRate,
rateSum, r
ateCount )
|
|
179 |
|
function
changeRat
e( iRate,
rateSum, r
ateCount )
|
175 |
|
{
|
|
180 |
|
{
|
176 |
|
var
oRateDiv =
document.
getElement
ById("sPho
toRatingDi
v");
|
|
181 |
|
var
oRateDiv =
document.
getElement
ById("sPho
toRatingDi
v");
|
177 |
|
var
oRateTextD
iv = docum
ent.getEle
mentById("
sRatingTex
tDiv");
|
|
182 |
|
var
oRateTextD
iv = docum
ent.getEle
mentById("
sRatingTex
tDiv");
|
178 |
|
|
|
183 |
|
|
179 |
|
oRat
eDiv.style
.position
= "relativ
e";
|
|
184 |
|
oRat
eDiv.style
.position
= "relativ
e";
|
180 |
|
oRat
eDiv.style
.height =
iRate + "%
";
|
|
185 |
|
oRat
eDiv.style
.height =
iRate + "%
";
|
181 |
|
oRat
eDiv.style
.top = 10
0 - iRate
+ "%";
|
|
186 |
|
oRat
eDiv.style
.top = 10
0 - iRate
+ "%";
|
182 |
|
|
|
187 |
|
|
183 |
|
oRat
eTextDiv.i
nnerHTML =
"' . _t('
_votes') .
' "+rateC
ount+"<br>
' . _t('_r
atio') . '
"+rateSum
;
|
|
188 |
|
oRat
eTextDiv.i
nnerHTML =
"' . _t('
_votes') .
' "+rateC
ount+"<br>
' . _t('_r
atio') . '
"+rateSum
;
|
184 |
|
}
|
|
189 |
|
}
|
185 |
|
|
|
190 |
|
|
186 |
|
function
changeMed
iaID( iMed
iaID )
|
|
191 |
|
function
changeMed
iaID( iMed
iaID )
|
187 |
|
{
|
|
192 |
|
{
|
188 |
|
var
oPhotoID =
document.
getElement
ById("phot
oID");
|
|
193 |
|
var
oPhotoID =
document.
getElement
ById("phot
oID");
|
189 |
|
oPho
toID.value
= iMediaI
D;
|
|
194 |
|
oPho
toID.value
= iMediaI
D;
|
190 |
|
}
|
|
195 |
|
}
|
191 |
|
|
|
196 |
|
|
|
|
197 |
|
function
changeRab
le( iCheck
ed )
|
|
|
198 |
|
{
|
|
|
199 |
|
var
oRable = d
ocument.ge
tElementBy
Id("makeRa
ble");
|
|
|
200 |
|
var
sRableCapt
= (iCheck
ed == 1) ?
"'._t('_d
isable abl
e to rate'
).'" : "'.
_t('_enabl
e able to
rate').'";
|
|
|
201 |
|
oRab
le.value =
sRableCap
t;
|
|
|
202 |
|
}
|
|
|
203 |
|
|
192 |
|
</
script>';
|
|
204 |
|
</
script>';
|
193 |
|
|
|
205 |
|
|
194 |
|
re
turn $ret;
|
|
206 |
|
re
turn $ret;
|
195 |
|
}
|
|
207 |
|
}
|
196 |
|
|
|
208 |
|
|
197 |
|
|
|
209 |
|
|
198 |
|
functi
on _getIco
nsList()
|
|
210 |
|
functi
on _getIco
nsList()
|
199 |
|
{
|
|
211 |
|
{
|
200 |
|
fo
r( $i = 0;
$i < $thi
s -> aMedi
aConfig['m
ax']['phot
o']; $i++
)
|
|
212 |
|
fo
r( $i = 0;
$i < $thi
s -> aMedi
aConfig['m
ax']['phot
o']; $i++
)
|
201 |
|
{
|
|
213 |
|
{
|
202 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $this
-> aMedia
[$i]['med_
file'];
|
|
214 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $this
-> aMedia
[$i]['med_
file'];
|
203 |
|
if( extF
ileExists(
$sIconSrc
) )
|
|
215 |
|
if( extF
ileExists(
$sIconSrc
) )
|
204 |
|
{
|
|
216 |
|
{
|
205 |
|
$iPh
otoRatingS
um = ( 0 <
$this ->
aMedia[$i]
['med_rati
ng_sum'] )
? $this -
> aMedia[$
i]['med_ra
ting_sum']
: 0 ;
|
|
217 |
|
$iPh
otoRatingS
um = ( 0 <
$this ->
aMedia[$i]
['med_rati
ng_sum'] )
? $this -
> aMedia[$
i]['med_ra
ting_sum']
: 0 ;
|
206 |
|
$iPh
otoRatingC
ount = ( 0
< $this -
> aMedia[$
i]['med_ra
ting_count
'] ) ? $th
is -> aMed
ia[$i]['me
d_rating_c
ount'] : 0
;
|
|
218 |
|
$iPh
otoRatingC
ount = ( 0
< $this -
> aMedia[$
i]['med_ra
ting_count
'] ) ? $th
is -> aMed
ia[$i]['me
d_rating_c
ount'] : 0
;
|
207 |
|
$iPh
otoRating
= $this ->
getRating
( $iPhotoR
atingSum,
$iPhotoRat
ingCount )
;
|
|
219 |
|
$iPh
otoRating
= $this ->
getRating
( $iPhotoR
atingSum,
$iPhotoRat
ingCount )
;
|
|
|
220 |
|
$sIc
onUrl = $t
his -> sMe
diaUrl . '
icon_' . $
this -> aM
edia[$i]['
med_file']
;
|
|
|
221 |
|
|
|
|
222 |
|
//fu
nction cha
ngePhoto(
sFile, img
Div, sTitl
e, titleDi
v, iRate,
rateDiv)
|
|
|
223 |
|
$sRa
bleVal = (
$this -> a
Media[$i][
'rate_able
']=='1') ?
'1' : '0'
;
|
208 |
|
|
|
224 |
|
|
209 |
|
$sIc
onUrl = $t
his -> sMe
diaUrl . '
icon_' . $
this -> aM
edia[$i]['
med_file']
;
//fu
nction cha
ngePhoto(
sFile, img
Div, sTitl
e, titleDi
v, iRate,
rateDiv)
|
|
|
210 |
|
$atr
ib = '
|
|
225 |
|
$atr
ib = '
|
211 |
|
\'' . $thi
s -> aMedi
a[$i]['med
_file'] .
'\',
|
|
226 |
|
\'' . $thi
s -> aMedi
a[$i]['med
_file'] .
'\',
|
212 |
|
' . $this
-> aMedia[
$i]['med_i
d'] . ',
|
|
227 |
|
' . $this
-> aMedia[
$i]['med_i
d'] . ',
|
213 |
|
\'' . proc
ess_line_o
utput( add
slashes($t
his -> aMe
dia[$i]['m
ed_title']
) ) . '\'
,
|
|
228 |
|
\'' . proc
ess_line_o
utput( add
slashes($t
his -> aMe
dia[$i]['m
ed_title']
) ) . '\'
,
|
214 |
|
' . $iPhot
oRating .
',
|
|
229 |
|
' . $iPhot
oRating .
',
|
215 |
|
' . $iPhot
oRatingSum
. ',
|
|
230 |
|
' . $iPhot
oRatingSum
. ',
|
216 |
|
'
.
$iPhotoRat
ingCount
.
'
|
|
231 |
|
'
.
$iPhotoRat
ingCount
.
'
,
|
|
|
232 |
|
\'' . $sR
ableVal .
'\'
|
217 |
|
';
|
|
233 |
|
';
|
218 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
'); cursor
:pointer;"
alt="" c
lass="icon
s" onmouse
over="this
.className
=\'iconsHo
ver\'" onm
ouseout="t
his.classN
ame=\'icon
s\'" oncli
ck="return
changePho
to(' . $at
rib . ');"
/>';
|
|
234 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
'); cursor
:pointer;"
alt="" c
lass="icon
s" onmouse
over="this
.className
=\'iconsHo
ver\'" onm
ouseout="t
his.classN
ame=\'icon
s\'" oncli
ck="return
changePho
to(' . $at
rib . ');"
/>';
|
219 |
|
}
|
|
235 |
|
}
|
220 |
|
else
|
|
236 |
|
else
|
221 |
|
{
|
|
237 |
|
{
|
222 |
|
$sIc
onUrl = ge
tTemplateI
con( $this
-> sSexIc
on );
|
|
238 |
|
$sIc
onUrl = ge
tTemplateI
con( $this
-> sSexIc
on );
|
223 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
');" alt="
" class="i
cons" />';
|
|
239 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
');" alt="
" class="i
cons" />';
|
224 |
|
}
|
|
240 |
|
}
|
225 |
|
}
|
|
241 |
|
}
|
226 |
|
re
turn $ret;
|
|
242 |
|
re
turn $ret;
|
227 |
|
}
|
|
243 |
|
}
|
228 |
|
|
|
244 |
|
|
229 |
|
functi
on getIcon
sList()
|
|
245 |
|
functi
on getIcon
sList()
|
230 |
|
{
|
|
246 |
|
{
|
231 |
|
$r
et = '';
|
|
247 |
|
$r
et = '';
|
232 |
|
|
|
248 |
|
|
233 |
|
fo
r( $i = 0;
$i < $thi
s -> aMedi
aConfig['m
ax']['phot
o']; $i++
)
|
|
249 |
|
fo
r( $i = 0;
$i < $thi
s -> aMedi
aConfig['m
ax']['phot
o']; $i++
)
|
234 |
|
{
|
|
250 |
|
{
|
235 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $this
-> aMedia
[$i]['med_
file'];
|
|
251 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $this
-> aMedia
[$i]['med_
file'];
|
236 |
|
if( extF
ileExists(
$sIconSrc
) )
|
|
252 |
|
if( extF
ileExists(
$sIconSrc
) )
|
237 |
|
{
|
|
253 |
|
{
|
238 |
|
$sIc
onUrl = $t
his -> sMe
diaUrl . '
icon_' . $
this -> aM
edia[$i]['
med_file']
;
|
|
254 |
|
$sIc
onUrl = $t
his -> sMe
diaUrl . '
icon_' . $
this -> aM
edia[$i]['
med_file']
;
|
239 |
|
$ret
.= '<a hr
ef="' . $t
his -> aMe
diaConfig[
'url']['me
dia'] . '?
photoID='
. $this ->
aMedia[$i
]['med_id'
] . '">';
|
|
255 |
|
$ret
.= '<a hr
ef="' . $t
his -> aMe
diaConfig[
'url']['me
dia'] . '?
photoID='
. $this ->
aMedia[$i
]['med_id'
] . '">';
|
240 |
|
$ret .= '<
img src="'
. getTemp
lateIcon('
spacer.gif
') . '" st
yle="width
:' . $this
-> aMedia
Config['si
ze']['icon
Width'] .
'px; heigh
t:' . $thi
s -> aMedi
aConfig['s
ize']['ico
nHeight']
. 'px; bac
kground-im
age:url('
. $sIconUr
l . '); cu
rsor:point
er;" alt=
"" class="
icons" onm
ouseover="
this.class
Name=\'ico
nsHover\'"
onmouseou
t="this.cl
assName=\'
icons\'" /
>';
|
|
256 |
|
$ret .= '<
img src="'
. getTemp
lateIcon('
spacer.gif
') . '" st
yle="width
:' . $this
-> aMedia
Config['si
ze']['icon
Width'] .
'px; heigh
t:' . $thi
s -> aMedi
aConfig['s
ize']['ico
nHeight']
. 'px; bac
kground-im
age:url('
. $sIconUr
l . '); cu
rsor:point
er;" alt=
"" class="
icons" onm
ouseover="
this.class
Name=\'ico
nsHover\'"
onmouseou
t="this.cl
assName=\'
icons\'" /
>';
|
241 |
|
$ret
.= '</a>'
;
|
|
257 |
|
$ret
.= '</a>'
;
|
242 |
|
}
|
|
258 |
|
}
|
243 |
|
else
|
|
259 |
|
else
|
244 |
|
{
|
|
260 |
|
{
|
245 |
|
$sIc
onUrl = ge
tTemplateI
con( $this
-> sSexIc
on );
|
|
261 |
|
$sIc
onUrl = ge
tTemplateI
con( $this
-> sSexIc
on );
|
246 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
');" alt="
" class="i
cons" />';
|
|
262 |
|
$ret
.= '<img
src="' . g
etTemplate
Icon('spac
er.gif') .
'" style=
"width:' .
$this ->
aMediaConf
ig['size']
['iconWidt
h'] . 'px;
height:'
. $this ->
aMediaCon
fig['size'
]['iconHei
ght'] . 'p
x; backgro
und-image:
url(' . $s
IconUrl .
');" alt="
" class="i
cons" />';
|
247 |
|
}
|
|
263 |
|
}
|
248 |
|
}
|
|
264 |
|
}
|
249 |
|
re
turn $ret;
|
|
265 |
|
re
turn $ret;
|
250 |
|
}
|
|
266 |
|
}
|
251 |
|
|
|
267 |
|
|
252 |
|
functi
on validat
eMediaArra
y( $aMedia
)
|
|
268 |
|
functi
on validat
eMediaArra
y( $aMedia
)
|
253 |
|
{
|
|
269 |
|
{
|
254 |
|
fo
reach( $aM
edia as $i
Key => $aV
alue )
|
|
270 |
|
fo
reach( $aM
edia as $i
Key => $aV
alue )
|
255 |
|
{
|
|
271 |
|
{
|
256 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $aVal
ue['med_fi
le'];
|
|
272 |
|
$sIconSr
c = $this
-> sMediaD
ir . 'icon
_' . $aVal
ue['med_fi
le'];
|
257 |
|
$sThumbS
rc = $this
-> sMedia
Dir . 'thu
mb_' . $aV
alue['med_
file'];
|
|
273 |
|
$sThumbS
rc = $this
-> sMedia
Dir . 'thu
mb_' . $aV
alue['med_
file'];
|
258 |
|
$sPhotoS
rc = $this
-> sMedia
Dir . 'pho
to_' . $aV
alue['med_
file'];
|
|
274 |
|
$sPhotoS
rc = $this
-> sMedia
Dir . 'pho
to_' . $aV
alue['med_
file'];
|
259 |
|
|
|
275 |
|
|
260 |
|
if( !ext
FileExists
( $sIconSr
c ) || !ex
tFileExist
s( $sThumb
Src ) || !
extFileExi
sts( $sPho
toSrc ) )
|
|
276 |
|
if( !ext
FileExists
( $sIconSr
c ) || !ex
tFileExist
s( $sThumb
Src ) || !
extFileExi
sts( $sPho
toSrc ) )
|
261 |
|
{
|
|
277 |
|
{
|
262 |
|
if(
$aValue['m
ed_id'] ==
$aValue['
PrimPhoto'
] )
|
|
278 |
|
if(
$aValue['m
ed_id'] ==
$aValue['
PrimPhoto'
] )
|
263 |
|
{
|
|
279 |
|
{
|
264 |
|
$this -> o
MediaQuery
-> resetP
rimPhoto(
$this -> i
ProfileID
);
|
|
280 |
|
$this -> o
MediaQuery
-> resetP
rimPhoto(
$this -> i
ProfileID
);
|
265 |
|
}
|
|
281 |
|
}
|
266 |
|
unse
t( $aMedia
[$iKey]);
|
|
282 |
|
unse
t( $aMedia
[$iKey]);
|
267 |
|
}
|
|
283 |
|
}
|
268 |
|
|
|
284 |
|
|
269 |
|
}
|
|
285 |
|
}
|
270 |
|
|
|
286 |
|
|
271 |
|
re
turn array
_values( $
aMedia );
|
|
287 |
|
re
turn array
_values( $
aMedia );
|
272 |
|
}
|
|
288 |
|
}
|
273 |
|
|
|
289 |
|
|
274 |
|
functi
on uploadM
edia()
|
|
290 |
|
functi
on uploadM
edia()
|
275 |
|
{
|
|
291 |
|
{
|
276 |
|
gl
obal $dir;
|
|
292 |
|
gl
obal $dir;
|
277 |
|
$s
MediaDir =
$this ->
getProfile
MediaDir()
;
|
|
293 |
|
$s
MediaDir =
$this ->
getProfile
MediaDir()
;
|
278 |
|
|
|
294 |
|
|
279 |
|
if
( !$sMedia
Dir )
|
|
295 |
|
if
( !$sMedia
Dir )
|
280 |
|
{
|
|
296 |
|
{
|
281 |
|
return f
alse;
|
|
297 |
|
return f
alse;
|
282 |
|
}
|
|
298 |
|
}
|
283 |
|
$s
FileName =
time();
|
|
299 |
|
$s
FileName =
time();
|
284 |
|
|
|
300 |
|
|
285 |
|
$e
xt = moveU
ploadedIma
ge( $_FILE
S, 'photo'
, $sMediaD
ir . $sFil
eName, $th
is -> aMed
iaConfig['
max']['pho
toFile'],
false );
|
|
301 |
|
$e
xt = moveU
ploadedIma
ge( $_FILE
S, 'photo'
, $sMediaD
ir . $sFil
eName, $th
is -> aMed
iaConfig['
max']['pho
toFile'],
false );
|
286 |
|
|
|
302 |
|
|
287 |
|
if
( ( 0 == $
_FILES[$th
is -> sMed
iaType]['e
rror'] ) )
|
|
303 |
|
if
( ( 0 == $
_FILES[$th
is -> sMed
iaType]['e
rror'] ) )
|
288 |
|
{
|
|
304 |
|
{
|
289 |
|
if ( get
Param( 'en
able_water
mark' ) ==
'on' )
|
|
305 |
|
if ( get
Param( 'en
able_water
mark' ) ==
'on' )
|
290 |
|
{
|
|
306 |
|
{
|
291 |
|
$iTr
ansparent
= getParam
( 'transpa
rent1' );
|
|
307 |
|
$iTr
ansparent
= getParam
( 'transpa
rent1' );
|
292 |
|
$sWa
terMark =
$dir['prof
ileImage']
. getPara
m( 'Water_
Mark' );
|
|
308 |
|
$sWa
terMark =
$dir['prof
ileImage']
. getPara
m( 'Water_
Mark' );
|
293 |
|
|
|
309 |
|
|
294 |
|
if (
strlen(g
etParam( '
Water_Mark
' )) && fi
le_exists(
$sWaterMar
k) )
|
|
310 |
|
if (
strlen(g
etParam( '
Water_Mark
' )) && fi
le_exists(
$sWaterMar
k) )
|
295 |
|
{
|
|
311 |
|
{
|
296 |
|
$sFile = $
sMediaDir
. $sFileNa
me . $ext;
|
|
312 |
|
$sFile = $
sMediaDir
. $sFileNa
me . $ext;
|
297 |
|
applyWater
mark( $sFi
le, $sFile
, $sWaterM
ark, $iTra
nsparent )
;
|
|
313 |
|
applyWater
mark( $sFi
le, $sFile
, $sWaterM
ark, $iTra
nsparent )
;
|
298 |
|
}
|
|
314 |
|
}
|
299 |
|
}
|
|
315 |
|
}
|
300 |
|
|
|
316 |
|
|
301 |
|
if( strl
en( $ext )
&& !(int)
$ext )
|
|
317 |
|
if( strl
en( $ext )
&& !(int)
$ext )
|
302 |
|
{
|
|
318 |
|
{
|
303 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'icon_
' . $sFile
Name . $ex
t, $this -
> aMediaCo
nfig['size
']['iconWi
dth'], $th
is -> aMed
iaConfig['
size']['ic
onHeight']
, true );
|
|
319 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'icon_
' . $sFile
Name . $ex
t, $this -
> aMediaCo
nfig['size
']['iconWi
dth'], $th
is -> aMed
iaConfig['
size']['ic
onHeight']
, true );
|
304 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'thumb
_' . $sFil
eName . $e
xt, $this
-> aMediaC
onfig['siz
e']['thumb
Width'], $
this -> aM
ediaConfig
['size']['
thumbHeigh
t'], true
);
|
|
320 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'thumb
_' . $sFil
eName . $e
xt, $this
-> aMediaC
onfig['siz
e']['thumb
Width'], $
this -> aM
ediaConfig
['size']['
thumbHeigh
t'], true
);
|
305 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'photo
_' . $sFil
eName . $e
xt, $this
-> aMediaC
onfig['siz
e']['photo
Width'], $
this -> aM
ediaConfig
['size']['
photoHeigh
t'], true
);
|
|
321 |
|
imag
eResize( $
sMediaDir
. $sFileNa
me . $ext,
$sMediaDi
r . 'photo
_' . $sFil
eName . $e
xt, $this
-> aMediaC
onfig['siz
e']['photo
Width'], $
this -> aM
ediaConfig
['size']['
photoHeigh
t'], true
);
|
306 |
|
|
|
322 |
|
|
|
|
323 |
|
chmo
d( $sMedia
Dir . 'ico
n_' . $sF
ileName .
$ext, 0644
);
|
|
|
324 |
|
chmo
d( $sMedia
Dir . 'thu
mb_' . $sF
ileName .
$ext, 0644
);
|
|
|
325 |
|
chmo
d( $sMedia
Dir . 'pho
to_' . $sF
ileName .
$ext, 0644
);
|
|
|
326 |
|
|
307 |
|
$thi
s -> inser
tMediaToDb
( $sFileNa
me . $ext
);
|
|
327 |
|
$thi
s -> inser
tMediaToDb
( $sFileNa
me . $ext
);
|
308 |
|
if(
0 == $this
-> iMedia
Count || $
this -> aM
edia['0'][
'PrimPhoto
'] == 0 )
|
|
328 |
|
if(
0 == $this
-> iMedia
Count || $
this -> aM
edia['0'][
'PrimPhoto
'] == 0 )
|
309 |
|
{
|
|
329 |
|
{
|
310 |
|
$iLastID =
mysql_ins
ert_id();
|
|
330 |
|
$iLastID =
mysql_ins
ert_id();
|
311 |
|
$this -> o
MediaQuery
-> setPri
maryPhoto(
$this ->
iProfileID
, $iLastID
);
|
|
331 |
|
$this -> o
MediaQuery
-> setPri
maryPhoto(
$this ->
iProfileID
, $iLastID
);
|
312 |
|
}
|
|
332 |
|
}
|
313 |
|
|
|
333 |
|
|
314 |
|
|
|
334 |
|
|
315 |
|
@unl
ink( $sMed
iaDir . $s
FileName .
$ext );
|
|
335 |
|
@unl
ink( $sMed
iaDir . $s
FileName .
$ext );
|
316 |
|
}
|
|
336 |
|
}
|
317 |
|
}
|
|
337 |
|
}
|
318 |
|
}
|
|
338 |
|
}
|
319 |
|
|
|
339 |
|
|
320 |
|
functi
on deleteM
edia( $iPh
otoID )
|
|
340 |
|
functi
on deleteM
edia( $iPh
otoID )
|
321 |
|
{
|
|
341 |
|
{
|
322 |
|
$a
Photos = $
this -> ge
tElementAr
rayByID( $
iPhotoID )
;
|
|
342 |
|
$a
Photos = $
this -> ge
tElementAr
rayByID( $
iPhotoID )
;
|
323 |
|
$s
IconSrc =
$this -> s
MediaDir .
'icon_' .
$aPhotos[
'med_file'
];
|
|
343 |
|
$s
IconSrc =
$this -> s
MediaDir .
'icon_' .
$aPhotos[
'med_file'
];
|
324 |
|
$s
ThumbSrc =
$this ->
sMediaDir
. 'thumb_'
. $aPhoto
s['med_fil
e'];
|
|
344 |
|
$s
ThumbSrc =
$this ->
sMediaDir
. 'thumb_'
. $aPhoto
s['med_fil
e'];
|
325 |
|
$s
PhotoSrc =
$this ->
sMediaDir
. 'photo_'
. $aPhoto
s['med_fil
e'];
|
|
345 |
|
$s
PhotoSrc =
$this ->
sMediaDir
. 'photo_'
. $aPhoto
s['med_fil
e'];
|
326 |
|
|
|
346 |
|
|
327 |
|
$t
his -> oMe
diaQuery -
> deleteMe
dia( $this
-> iProfi
leID, $iPh
otoID, $th
is -> sMed
iaType );
|
|
347 |
|
$t
his -> oMe
diaQuery -
> deleteMe
dia( $this
-> iProfi
leID, $iPh
otoID, $th
is -> sMed
iaType );
|
328 |
|
if
( $aPhotos
['med_id']
== $aPhot
os['PrimPh
oto'] )
|
|
348 |
|
if
( $aPhotos
['med_id']
== $aPhot
os['PrimPh
oto'] )
|
329 |
|
{
|
|
349 |
|
{
|
330 |
|
$this ->
oMediaQue
ry -> rese
tPrimPhoto
( $this ->
iProfileI
D );
|
|
350 |
|
$this ->
oMediaQue
ry -> rese
tPrimPhoto
( $this ->
iProfileI
D );
|
331 |
|
}
|
|
351 |
|
}
|
332 |
|
|
|
352 |
|
|
333 |
|
@u
nlink( $sI
conSrc );
|
|
353 |
|
@u
nlink( $sI
conSrc );
|
334 |
|
@u
nlink( $sT
humbSrc );
|
|
354 |
|
@u
nlink( $sT
humbSrc );
|
335 |
|
@u
nlink( $sP
hotoSrc );
|
|
355 |
|
@u
nlink( $sP
hotoSrc );
|
336 |
|
}
|
|
356 |
|
}
|
337 |
|
|
|
357 |
|
|
338 |
|
function
makePrimPh
oto(
$iPhotoID
)
|
|
358 |
|
function
makePrimPh
oto(
$iPhotoID
,
$bCouple
=
false
)
|
339 |
|
{
|
|
359 |
|
{
|
340 |
|
$
thi
s
->
oMediaQu
e
ry
->
s
etPrimaryP
ho
t
o(
$this
->
iProfileID
,
$iPhotoID
)
;
|
|
360 |
|
if
($bCouple
>0) {
|
|
|
361 |
|
$aMember
= getProf
ileInfo( $
this -> iP
rofileID )
;
|
|
|
362 |
|
$sDestID
= $aMembe
r['Couple'
];
|
|
|
363 |
|
}
else {
|
|
|
364 |
|
$
s
D
e
s
t
ID
=
$this->iPr
ofileID
;
|
|
|
365 |
|
}
|
|
|
366 |
|
if
($sDestID
>0)
|
|
|
367 |
|
$this ->
oMediaQue
ry -> setP
rimaryPhot
o( $sDestI
D, $iPhoto
ID );
|
|
|
368 |
|
cr
eateUserDa
taFile( $s
DestID );
|
341 |
|
}
|
|
369 |
|
}
|
342 |
|
|
|
370 |
|
|
|
|
371 |
|
functi
on makeRab
lePhoto( $
iPhotoID )
{
|
|
|
372 |
|
$t
his->oMedi
aQuery->se
tRablePhot
o($iPhotoI
D);
|
343 |
|
}
|
|
373 |
|
}
|
344 |
|
|
|
374 |
|
|
|
|
375 |
|
}
|
345 |
|
|
|
376 |
|
|
346 |
|
?>
|
|
377 |
|
?>
|