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( '../in
c/header.i
nc.php' );
|
|
21 |
|
require_on
ce( '../in
c/header.i
nc.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 . 'a
dmin_desig
n.inc.php'
);
|
|
24 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'a
dmin_desig
n.inc.php'
);
|
25 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
|
25 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
26 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'i
mages.inc.
php' );
|
|
26 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'i
mages.inc.
php' );
|
27 |
|
|
|
27 |
|
|
28 |
|
//$_page['
header'] =
"Main Log
o";
|
|
28 |
|
//$_page['
header'] =
"Main Log
o";
|
29 |
|
|
|
29 |
|
|
30 |
|
$logged['a
dmin'] = m
ember_auth
( 1, true,
true );
|
|
30 |
|
$logged['a
dmin'] = m
ember_auth
( 1, true,
true );
|
31 |
|
$_page['he
ader'] = '
Basic Sett
ings';
|
|
31 |
|
$_page['he
ader'] = '
Basic Sett
ings';
|
32 |
|
|
|
32 |
|
|
33 |
|
|
|
33 |
|
|
34 |
|
$_page['ex
traCodeInH
ead'] = <<
<EOJ
|
|
34 |
|
$_page['ex
traCodeInH
ead'] = <<
<EOJ
|
35 |
|
<!-- t
inyMCE gz
-->
|
|
35 |
|
<!-- t
inyMCE gz
-->
|
36 |
|
<scrip
t type="te
xt/javascr
ipt" src="
{$site['pl
ugins']}ti
ny_mce/tin
y_mce_gzip
.js"></scr
ipt>
|
|
36 |
|
<scrip
t type="te
xt/javascr
ipt" src="
{$site['pl
ugins']}ti
ny_mce/tin
y_mce_gzip
.js"></scr
ipt>
|
37 |
|
<scrip
t type="te
xt/javascr
ipt">
|
|
37 |
|
<scrip
t type="te
xt/javascr
ipt">
|
38 |
|
ti
nyMCE_GZ.i
nit({
|
|
38 |
|
ti
nyMCE_GZ.i
nit({
|
39 |
|
plugins
: "style,l
ayer,table
,save,advh
r,advimage
,advlink,e
motions,ie
spell,inse
rtdatetime
,preview,m
edia,searc
hreplace,p
rint,conte
xtmenu,pas
te,directi
onality,fu
llscreen,n
oneditable
,visualcha
rs,nonbrea
king,xhtml
xtras",
|
|
39 |
|
plugins
: "style,l
ayer,table
,save,advh
r,advimage
,advlink,e
motions,ie
spell,inse
rtdatetime
,preview,m
edia,searc
hreplace,p
rint,conte
xtmenu,pas
te,directi
onality,fu
llscreen,n
oneditable
,visualcha
rs,nonbrea
king,xhtml
xtras",
|
40 |
|
themes :
"simple,a
dvanced",
|
|
40 |
|
themes :
"simple,a
dvanced",
|
41 |
|
language
s : "en",
|
|
41 |
|
language
s : "en",
|
42 |
|
disk_cac
he : true,
|
|
42 |
|
disk_cac
he : true,
|
43 |
|
debug :
false
|
|
43 |
|
debug :
false
|
44 |
|
})
;
|
|
44 |
|
})
;
|
45 |
|
</scri
pt>
|
|
45 |
|
</scri
pt>
|
46 |
|
|
|
46 |
|
|
47 |
|
<scrip
t language
="javascri
pt" type="
text/javas
cript">
|
|
47 |
|
<scrip
t language
="javascri
pt" type="
text/javas
cript">
|
48 |
|
ti
nyMCE.init
({
|
|
48 |
|
ti
nyMCE.init
({
|
49 |
|
mode : "
textareas"
,
|
|
49 |
|
mode : "
textareas"
,
|
50 |
|
theme :
"advanced"
,
|
|
50 |
|
theme :
"advanced"
,
|
51 |
|
|
|
51 |
|
|
52 |
|
editor_s
elector :
"custom_pr
omo_code",
|
|
52 |
|
editor_s
elector :
"custom_pr
omo_code",
|
53 |
|
content_
css : "{$s
ite['plugi
ns']}tiny_
mce/dolphi
n.css",
|
|
53 |
|
content_
css : "{$s
ite['plugi
ns']}tiny_
mce/dolphi
n.css",
|
54 |
|
|
|
54 |
|
|
55 |
|
plugins
: "style,l
ayer,table
,save,advh
r,advimage
,advlink,e
motions,ie
spell,inse
rtdatetime
,preview,z
oom,media,
searchrepl
ace,print,
contextmen
u,paste,di
rectionali
ty,fullscr
een,visual
chars,nonb
reaking,xh
tmlxtras",
|
|
55 |
|
plugins
: "style,l
ayer,table
,save,advh
r,advimage
,advlink,e
motions,ie
spell,inse
rtdatetime
,preview,z
oom,media,
searchrepl
ace,print,
contextmen
u,paste,di
rectionali
ty,fullscr
een,visual
chars,nonb
reaking,xh
tmlxtras",
|
56 |
|
relative
_urls : fa
lse,
|
|
56 |
|
relative
_urls : fa
lse,
|
57 |
|
|
|
57 |
|
|
58 |
|
theme_ad
vanced_but
tons1 : "b
old,italic
,underline
,strikethr
ough,|,jus
tifyleft,j
ustifycent
er,justify
right,just
ifyfull,|,
fontselect
,fontsizes
elect",
|
|
58 |
|
theme_ad
vanced_but
tons1 : "b
old,italic
,underline
,strikethr
ough,|,jus
tifyleft,j
ustifycent
er,justify
right,just
ifyfull,|,
fontselect
,fontsizes
elect",
|
59 |
|
theme_ad
vanced_but
tons2 : "f
orecolor,b
ackcolor,|
,bullist,n
umlist,|,o
utdent,ind
ent,|,link
,unlink,im
age,hr,|,s
ub,sup,|,i
nsertdate,
inserttime
,|,stylepr
ops",
|
|
59 |
|
theme_ad
vanced_but
tons2 : "f
orecolor,b
ackcolor,|
,bullist,n
umlist,|,o
utdent,ind
ent,|,link
,unlink,im
age,hr,|,s
ub,sup,|,i
nsertdate,
inserttime
,|,stylepr
ops",
|
60 |
|
theme_ad
vanced_but
tons3 : "c
harmap,emo
tions,|,ci
te,abbr,ac
ronym,attr
ibs,|,prev
iew,remove
format,|,c
ode,help",
|
|
60 |
|
theme_ad
vanced_but
tons3 : "c
harmap,emo
tions,|,ci
te,abbr,ac
ronym,attr
ibs,|,prev
iew,remove
format,|,c
ode,help",
|
61 |
|
theme_ad
vanced_but
tons4 : "t
able,row_p
rops,cell_
props,dele
te_col,del
ete_row,de
lete_table
,col_after
,col_befor
e,row_afte
r,row_befo
re,row_aft
er,row_bef
ore,split_
cells,merg
e_cells",
|
|
61 |
|
theme_ad
vanced_but
tons4 : "t
able,row_p
rops,cell_
props,dele
te_col,del
ete_row,de
lete_table
,col_after
,col_befor
e,row_afte
r,row_befo
re,row_aft
er,row_bef
ore,split_
cells,merg
e_cells",
|
62 |
|
theme_ad
vanced_too
lbar_locat
ion : "top
",
|
|
62 |
|
theme_ad
vanced_too
lbar_locat
ion : "top
",
|
63 |
|
theme_ad
vanced_too
lbar_align
: "center
",
|
|
63 |
|
theme_ad
vanced_too
lbar_align
: "center
",
|
64 |
|
valid_el
ements : "
*[*]"
|
|
64 |
|
valid_el
ements : "
*[*]"
|
65 |
|
})
;
|
|
65 |
|
})
;
|
66 |
|
</scri
pt>
|
|
66 |
|
</scri
pt>
|
67 |
|
EOJ;
|
|
67 |
|
EOJ;
|
68 |
|
|
|
68 |
|
|
69 |
|
|
|
69 |
|
|
70 |
|
|
|
70 |
|
|
71 |
|
TopCodeAdm
in();
|
|
71 |
|
TopCodeAdm
in();
|
72 |
|
ContentBlo
ckHead("Ma
in Logo");
|
|
72 |
|
ContentBlo
ckHead("Ma
in Logo");
|
73 |
|
if( $_REQU
EST['do_su
bmit'] )
|
|
73 |
|
if( $_REQU
EST['do_su
bmit'] )
|
74 |
|
{
|
|
74 |
|
{
|
75 |
|
if( !$
_FILES['ne
w_file'] o
r empty( $
_FILES['ne
w_file'] )
)
|
|
75 |
|
if( !$
_FILES['ne
w_file'] o
r empty( $
_FILES['ne
w_file'] )
)
|
76 |
|
ec
ho 'File n
ot uploade
d';
|
|
76 |
|
ec
ho 'File n
ot uploade
d';
|
77 |
|
else
|
|
77 |
|
else
|
78 |
|
{
|
|
78 |
|
{
|
79 |
|
if
( $_FILES[
'new_file'
]['error']
!= 0 )
|
|
79 |
|
if
( $_FILES[
'new_file'
]['error']
!= 0 )
|
80 |
|
echo 'Fi
le upload
error';
|
|
80 |
|
echo 'Fi
le upload
error';
|
81 |
|
el
se
|
|
81 |
|
el
se
|
82 |
|
{
|
|
82 |
|
{
|
83 |
|
$aFileIn
fo = getim
agesize( $
_FILES['ne
w_file']['
tmp_name']
);
|
|
83 |
|
$aFileIn
fo = getim
agesize( $
_FILES['ne
w_file']['
tmp_name']
);
|
84 |
|
if( !$aF
ileInfo )
|
|
84 |
|
if( !$aF
ileInfo )
|
85 |
|
echo
'You uplo
aded not i
mage file'
;
|
|
85 |
|
echo
'You uplo
aded not i
mage file'
;
|
86 |
|
else
|
|
86 |
|
else
|
87 |
|
{
|
|
87 |
|
{
|
88 |
|
$ext
= false;
|
|
88 |
|
$ext
= false;
|
89 |
|
swit
ch( $aFile
Info['mime
'] )
|
|
89 |
|
swit
ch( $aFile
Info['mime
'] )
|
90 |
|
{
|
|
90 |
|
{
|
91 |
|
case 'imag
e/jpeg': $
ext = 'jpg
'; break;
|
|
91 |
|
case 'imag
e/jpeg': $
ext = 'jpg
'; break;
|
92 |
|
case 'imag
e/gif': $
ext = 'gif
'; break;
|
|
92 |
|
case 'imag
e/gif': $
ext = 'gif
'; break;
|
93 |
|
case 'imag
e/png': $
ext = 'png
'; break;
|
|
93 |
|
case 'imag
e/png': $
ext = 'png
'; break;
|
94 |
|
}
|
|
94 |
|
}
|
95 |
|
|
|
95 |
|
|
96 |
|
if(
!$ext )
|
|
96 |
|
if(
!$ext )
|
97 |
|
echo 'You
uploaded n
ot JPEG, G
IF or PNG
file';
|
|
97 |
|
echo 'You
uploaded n
ot JPEG, G
IF or PNG
file';
|
98 |
|
else
|
|
98 |
|
else
|
99 |
|
{
|
|
99 |
|
{
|
100 |
|
echo 'Uplo
ad success
ful. ';
|
|
100 |
|
echo 'Uplo
ad success
ful. ';
|
101 |
|
setNewMain
Logo( $_FI
LES['new_f
ile']['tmp
_name'], $
ext );
|
|
101 |
|
setNewMain
Logo( $_FI
LES['new_f
ile']['tmp
_name'], $
ext );
|
102 |
|
}
|
|
102 |
|
}
|
103 |
|
}
|
|
103 |
|
}
|
104 |
|
}
|
|
104 |
|
}
|
105 |
|
}
|
|
105 |
|
}
|
106 |
|
echo '
<br /> (<a
href="'.$
_SERVER['P
HP_SELF'].
'">Back</a
>)';
|
|
106 |
|
echo '
<br /> (<a
href="'.$
_SERVER['P
HP_SELF'].
'">Back</a
>)';
|
107 |
|
}
|
|
107 |
|
}
|
108 |
|
else
|
|
108 |
|
else
|
109 |
|
{
|
|
109 |
|
{
|
110 |
|
|
|
110 |
|
|
111 |
|
?>
|
|
111 |
|
?>
|
112 |
|
<b
>Current l
ogo:</b><b
r />
|
|
112 |
|
<b
>Current l
ogo:</b><b
r />
|
113 |
|
<?
=getMainLo
go()?>
|
|
113 |
|
<?
=getMainLo
go()?>
|
114 |
|
<?
|
|
114 |
|
<?
|
115 |
|
Conten
tBlockFoot
();
|
|
115 |
|
Conten
tBlockFoot
();
|
116 |
|
Conten
tBlockHead
("Change M
ain Logo")
;
|
|
116 |
|
Conten
tBlockHead
("Change M
ain Logo")
;
|
117 |
|
?>
|
|
117 |
|
?>
|
118 |
|
<scrip
t>
|
|
118 |
|
<scrip
t>
|
119 |
|
fu
nction che
ckLogoForm
()
|
|
119 |
|
fu
nction che
ckLogoForm
()
|
120 |
|
{
|
|
120 |
|
{
|
121 |
|
_form =
document.f
orms.logoF
orm;
|
|
121 |
|
_form =
document.f
orms.logoF
orm;
|
122 |
|
|
|
122 |
|
|
123 |
|
if( _for
m.file.val
ue == '' )
|
|
123 |
|
if( _for
m.file.val
ue == '' )
|
124 |
|
{
|
|
124 |
|
{
|
125 |
|
aler
t( 'Please
select fi
le' );
|
|
125 |
|
aler
t( 'Please
select fi
le' );
|
126 |
|
retu
rn false;
|
|
126 |
|
retu
rn false;
|
127 |
|
}
|
|
127 |
|
}
|
128 |
|
|
|
128 |
|
|
129 |
|
if( _for
m.resize.c
hecked )
|
|
129 |
|
if( _for
m.resize.c
hecked )
|
130 |
|
{
|
|
130 |
|
{
|
131 |
|
widt
h = parse
Int( _form
.new_width
.value );
|
|
131 |
|
widt
h = parse
Int( _form
.new_width
.value );
|
132 |
|
heig
ht = parse
Int( _form
.new_heigh
t.value );
|
|
132 |
|
heig
ht = parse
Int( _form
.new_heigh
t.value );
|
133 |
|
|
|
133 |
|
|
134 |
|
if(
!( width >
0 && heig
ht > 0 ) )
|
|
134 |
|
if(
!( width >
0 && heig
ht > 0 ) )
|
135 |
|
{
|
|
135 |
|
{
|
136 |
|
alert( 'Pl
ease enter
correct s
izes' )
|
|
136 |
|
alert( 'Pl
ease enter
correct s
izes' )
|
137 |
|
return fal
se;
|
|
137 |
|
return fal
se;
|
138 |
|
}
|
|
138 |
|
}
|
139 |
|
}
|
|
139 |
|
}
|
140 |
|
|
|
140 |
|
|
141 |
|
_form.do
_submit.va
lue = 'Wai
t...';
|
|
141 |
|
_form.do
_submit.va
lue = 'Wai
t...';
|
142 |
|
_form.do
_submit.di
sabled = t
rue;
|
|
142 |
|
_form.do
_submit.di
sabled = t
rue;
|
143 |
|
|
|
143 |
|
|
144 |
|
return t
rue;
|
|
144 |
|
return t
rue;
|
145 |
|
|
|
145 |
|
|
146 |
|
}
|
|
146 |
|
}
|
147 |
|
</scri
pt>
|
|
147 |
|
</scri
pt>
|
148 |
|
<div s
tyle="widt
h: 275px;
margin: 0p
x auto;">
|
|
148 |
|
<div s
tyle="widt
h: 275px;
margin: 0p
x auto;">
|
149 |
|
<div s
tyle="bord
er:0px sol
id red;wid
th:275px;"
>
|
|
149 |
|
<div s
tyle="bord
er:0px sol
id red;wid
th:275px;"
>
|
150 |
|
He
re you can
change th
e main log
o of your
site<br />
|
|
150 |
|
He
re you can
change th
e main log
o of your
site<br />
|
151 |
|
<f
orm name="
logoForm"
method="po
st" action
="<?=$_SER
VER['PHP_S
ELF']?>" e
nctype="mu
ltipart/fo
rm-data" o
nsubmit="r
eturn chec
kLogoForm(
);">
|
|
151 |
|
<f
orm name="
logoForm"
method="po
st" action
="<?=$_SER
VER['PHP_S
ELF']?>" e
nctype="mu
ltipart/fo
rm-data" o
nsubmit="r
eturn chec
kLogoForm(
);">
|
152 |
|
Select f
ile:
|
|
152 |
|
Select f
ile:
|
153 |
|
<input t
ype="file"
name="new
_file" /><
br />
|
|
153 |
|
<input t
ype="file"
name="new
_file" /><
br />
|
154 |
|
<b>Note:
</b> File
must be in
JPEG, GIF
or PNG fo
rmat<br />
<br />
|
|
154 |
|
<b>Note:
</b> File
must be in
JPEG, GIF
or PNG fo
rmat<br />
<br />
|
155 |
|
<fieldse
t style="w
idth:200px
;">
|
|
155 |
|
<fieldse
t style="w
idth:200px
;">
|
156 |
|
<leg
end style=
"line-heig
ht:15px;">
|
|
156 |
|
<leg
end style=
"line-heig
ht:15px;">
|
157 |
|
<input typ
e="checkbo
x" name="r
esize" val
ue="yes" c
hecked="ch
ecked" sty
le="vertic
al-align:m
iddle;" />
|
|
157 |
|
<input typ
e="checkbo
x" name="r
esize" val
ue="yes" c
hecked="ch
ecked" sty
le="vertic
al-align:m
iddle;" />
|
158 |
|
Resize
|
|
158 |
|
Resize
|
159 |
|
</le
gend>
|
|
159 |
|
</le
gend>
|
160 |
|
New
size:
|
|
160 |
|
New
size:
|
161 |
|
<inp
ut type="t
ext" value
="64" name
="new_widt
h" style="
width:30px
;" />
|
|
161 |
|
<inp
ut type="t
ext" value
="64" name
="new_widt
h" style="
width:30px
;" />
|
162 |
|
x
|
|
162 |
|
x
|
163 |
|
<inp
ut type="t
ext" value
="64" name
="new_heig
ht" style=
"width:30p
x;" />px<b
r />
|
|
163 |
|
<inp
ut type="t
ext" value
="64" name
="new_heig
ht" style=
"width:30p
x;" />px<b
r />
|
164 |
|
<b>N
ote:</b> R
esize is p
roportiona
l
|
|
164 |
|
<b>N
ote:</b> R
esize is p
roportiona
l
|
165 |
|
</fields
et>
|
|
165 |
|
</fields
et>
|
166 |
|
<div sty
le="text-a
lign:cente
r;margin-t
op:5px;">
|
|
166 |
|
<div sty
le="text-a
lign:cente
r;margin-t
op:5px;">
|
167 |
|
<inp
ut type="s
ubmit" nam
e="do_subm
it" value=
"Upload" /
>
|
|
167 |
|
<inp
ut type="s
ubmit" nam
e="do_subm
it" value=
"Upload" /
>
|
168 |
|
</div>
|
|
168 |
|
</div>
|
169 |
|
</
form>
|
|
169 |
|
</
form>
|
170 |
|
</div>
|
|
170 |
|
</div>
|
171 |
|
</div>
|
|
171 |
|
</div>
|
172 |
|
<?
|
|
172 |
|
<?
|
173 |
|
}
|
|
173 |
|
}
|
174 |
|
ContentBlo
ckFoot();
|
|
174 |
|
ContentBlo
ckFoot();
|
175 |
|
|
|
175 |
|
|
176 |
|
ContentBlo
ckHead("Pr
omo block"
);
|
|
176 |
|
ContentBlo
ckHead("Pr
omo block"
);
|
177 |
|
|
|
177 |
|
|
178 |
|
if( $_GET[
'delete']
and strlen
( $_GET['d
elete'] )
)
|
|
178 |
|
if( $_GET[
'delete']
and strlen
( $_GET['d
elete'] )
)
|
179 |
|
{
|
|
179 |
|
{
|
180 |
|
$file
= process_
pass_data(
$_GET['de
lete'] );
|
|
180 |
|
$file
= process_
pass_data(
$_GET['de
lete'] );
|
181 |
|
|
|
181 |
|
|
182 |
|
//secu
re deletin
g
|
|
182 |
|
//secu
re deletin
g
|
183 |
|
$file
= str_repl
ace( '\\',
'', $file
);
|
|
183 |
|
$file
= str_repl
ace( '\\',
'', $file
);
|
184 |
|
$file
= str_repl
ace( '/',
'', $file
);
|
|
184 |
|
$file
= str_repl
ace( '/',
'', $file
);
|
185 |
|
|
|
185 |
|
|
186 |
|
$res =
@unlink(
$dir['imag
esPromo']
. $file );
|
|
186 |
|
$res =
@unlink(
$dir['imag
esPromo']
. $file );
|
187 |
|
|
|
187 |
|
|
188 |
|
if( !$
res )
|
|
188 |
|
if( !$
res )
|
189 |
|
ec
ho 'Couldn
\'t delete
file. <br
/>';
|
|
189 |
|
ec
ho 'Couldn
\'t delete
file. <br
/>';
|
190 |
|
}
|
|
190 |
|
}
|
191 |
|
|
|
191 |
|
|
192 |
|
if( $_REQU
EST['prDoS
ubmit'] )
|
|
192 |
|
if( $_REQU
EST['prDoS
ubmit'] )
|
193 |
|
{
|
|
193 |
|
{
|
194 |
|
if( !$
_FILES['pr
NewFile']
or empty(
$_FILES['p
rNewFile']
) )
|
|
194 |
|
if( !$
_FILES['pr
NewFile']
or empty(
$_FILES['p
rNewFile']
) )
|
195 |
|
ec
ho 'File n
ot uploade
d';
|
|
195 |
|
ec
ho 'File n
ot uploade
d';
|
196 |
|
else
|
|
196 |
|
else
|
197 |
|
{
|
|
197 |
|
{
|
198 |
|
if
( $_FILES[
'prNewFile
']['error'
] != 0 )
|
|
198 |
|
if
( $_FILES[
'prNewFile
']['error'
] != 0 )
|
199 |
|
echo 'Fi
le upload
error';
|
|
199 |
|
echo 'Fi
le upload
error';
|
200 |
|
el
se
|
|
200 |
|
el
se
|
201 |
|
{
|
|
201 |
|
{
|
202 |
|
$aFileIn
fo = getim
agesize( $
_FILES['pr
NewFile'][
'tmp_name'
] );
|
|
202 |
|
$aFileIn
fo = getim
agesize( $
_FILES['pr
NewFile'][
'tmp_name'
] );
|
203 |
|
if( !$aF
ileInfo )
|
|
203 |
|
if( !$aF
ileInfo )
|
204 |
|
echo
'You uplo
aded not i
mage file'
;
|
|
204 |
|
echo
'You uplo
aded not i
mage file'
;
|
205 |
|
else
|
|
205 |
|
else
|
206 |
|
{
|
|
206 |
|
{
|
207 |
|
$ext
= false;
|
|
207 |
|
$ext
= false;
|
208 |
|
swit
ch( $aFile
Info['mime
'] )
|
|
208 |
|
swit
ch( $aFile
Info['mime
'] )
|
209 |
|
{
|
|
209 |
|
{
|
210 |
|
case 'imag
e/jpeg': $
ext = 'jpg
'; break;
|
|
210 |
|
case 'imag
e/jpeg': $
ext = 'jpg
'; break;
|
211 |
|
case 'imag
e/gif': $
ext = 'gif
'; break;
|
|
211 |
|
case 'imag
e/gif': $
ext = 'gif
'; break;
|
212 |
|
case 'imag
e/png': $
ext = 'png
'; break;
|
|
212 |
|
case 'imag
e/png': $
ext = 'png
'; break;
|
213 |
|
default:
$
ext = fals
e;
|
|
213 |
|
default:
$
ext = fals
e;
|
214 |
|
}
|
|
214 |
|
}
|
215 |
|
|
|
215 |
|
|
216 |
|
if(
!$ext )
|
|
216 |
|
if(
!$ext )
|
217 |
|
echo 'You
uploaded n
ot JPEG, G
IF or PNG
file';
|
|
217 |
|
echo 'You
uploaded n
ot JPEG, G
IF or PNG
file';
|
218 |
|
else
|
|
218 |
|
else
|
219 |
|
{
|
|
219 |
|
{
|
220 |
|
echo 'Uplo
ad success
ful. ';
|
|
220 |
|
echo 'Uplo
ad success
ful. ';
|
221 |
|
|
|
221 |
|
|
222 |
|
$newFileNa
me = $dir[
'imagesPro
mo'] . 'or
iginal/' .
$_FILES['
prNewFile'
]['name'];
|
|
222 |
|
$newFileNa
me = $dir[
'imagesPro
mo'] . 'or
iginal/' .
$_FILES['
prNewFile'
]['name'];
|
223 |
|
|
|
223 |
|
|
224 |
|
if( !move_
uploaded_f
ile( $_FIL
ES['prNewF
ile']['tmp
_name'], $
newFileNam
e ) )
|
|
224 |
|
if( !move_
uploaded_f
ile( $_FIL
ES['prNewF
ile']['tmp
_name'], $
newFileNam
e ) )
|
225 |
|
echo '
Couldn\'t
move file.
';
|
|
225 |
|
echo '
Couldn\'t
move file.
';
|
226 |
|
else
|
|
226 |
|
else
|
227 |
|
{
|
|
227 |
|
{
|
228 |
|
Resize
AnyPromo($
newFileNam
e, $dir['i
magesPromo
'] . $_FIL
ES['prNewF
ile']['nam
e']);
|
|
228 |
|
Resize
AnyPromo($
newFileNam
e, $dir['i
magesPromo
'] . $_FIL
ES['prNewF
ile']['nam
e']);
|
229 |
|
/*if(
$_REQUEST[
'prResize'
] )
|
|
229 |
|
/*if(
$_REQUEST[
'prResize'
] )
|
230 |
|
{
|
|
230 |
|
{
|
231 |
|
$w
idth = (i
nt)$_REQUE
ST['prNewW
idth'];
|
|
231 |
|
$w
idth = (i
nt)$_REQUE
ST['prNewW
idth'];
|
232 |
|
$h
eight = (i
nt)$_REQUE
ST['prNewH
eight'];
|
|
232 |
|
$h
eight = (i
nt)$_REQUE
ST['prNewH
eight'];
|
233 |
|
if
( !( $widt
h > 0 and
$height >
0 ) )
|
|
233 |
|
if
( !( $widt
h > 0 and
$height >
0 ) )
|
234 |
|
echo 'Yo
u entered
incorrect
sizes';
|
|
234 |
|
echo 'Yo
u entered
incorrect
sizes';
|
235 |
|
el
se
|
|
235 |
|
el
se
|
236 |
|
{
|
|
236 |
|
{
|
237 |
|
if( imag
eResize( $
newFileNam
e, $newFil
eName, $wi
dth, $heig
ht ) != IM
AGE_ERROR_
SUCCESS )
|
|
237 |
|
if( imag
eResize( $
newFileNam
e, $newFil
eName, $wi
dth, $heig
ht ) != IM
AGE_ERROR_
SUCCESS )
|
238 |
|
echo
'Resize f
ailed';
|
|
238 |
|
echo
'Resize f
ailed';
|
239 |
|
else
|
|
239 |
|
else
|
240 |
|
echo
'Resize s
uccessful'
;
|
|
240 |
|
echo
'Resize s
uccessful'
;
|
241 |
|
}
|
|
241 |
|
}
|
242 |
|
}*/
|
|
242 |
|
}*/
|
243 |
|
}
|
|
243 |
|
}
|
244 |
|
}
|
|
244 |
|
}
|
245 |
|
}
|
|
245 |
|
}
|
246 |
|
}
|
|
246 |
|
}
|
247 |
|
}
|
|
247 |
|
}
|
248 |
|
echo '
<br /> (<a
href="'.$
_SERVER['P
HP_SELF'].
'">Back</a
>)';
|
|
248 |
|
echo '
<br /> (<a
href="'.$
_SERVER['P
HP_SELF'].
'">Back</a
>)';
|
249 |
|
}
|
|
249 |
|
}
|
250 |
|
else
|
|
250 |
|
else
|
251 |
|
{
|
|
251 |
|
{
|
252 |
|
if( $_
POST['doSa
vePromoSet
t'] )
|
|
252 |
|
if( $_
POST['doSa
vePromoSet
t'] )
|
253 |
|
{
|
|
253 |
|
{
|
254 |
|
se
tParam( 'e
nable_flas
h_promo',
$_POST['en
able_flash
_promo'] )
;
|
|
254 |
|
se
tParam( 'e
nable_flas
h_promo',
$_POST['en
able_flash
_promo'] )
;
|
255 |
|
se
tParam( 'c
ustom_prom
o_code',
$_POST['cu
stom_promo
_code'] );
|
|
255 |
|
se
tParam( 'c
ustom_prom
o_code',
$_POST['cu
stom_promo
_code'] );
|
256 |
|
ec
ho '<div s
tyle="marg
in:5px;tex
t-align:ce
nter;color
:green;">S
ettings sa
ved</div>'
;
|
|
256 |
|
ec
ho '<div s
tyle="marg
in:5px;tex
t-align:ce
nter;color
:green;">S
ettings sa
ved</div>'
;
|
257 |
|
}
|
|
257 |
|
}
|
258 |
|
|
|
258 |
|
|
259 |
|
?>
|
|
259 |
|
?>
|
260 |
|
<scrip
t>
|
|
260 |
|
<scrip
t>
|
261 |
|
fu
nction che
ckPromoFor
m()
|
|
261 |
|
fu
nction che
ckPromoFor
m()
|
262 |
|
{
|
|
262 |
|
{
|
263 |
|
_form =
document.f
orms.promo
Form;
|
|
263 |
|
_form =
document.f
orms.promo
Form;
|
264 |
|
|
|
264 |
|
|
265 |
|
if( _for
m.file.val
ue == '' )
|
|
265 |
|
if( _for
m.file.val
ue == '' )
|
266 |
|
{
|
|
266 |
|
{
|
267 |
|
aler
t( 'Please
select fi
le' );
|
|
267 |
|
aler
t( 'Please
select fi
le' );
|
268 |
|
retu
rn false;
|
|
268 |
|
retu
rn false;
|
269 |
|
}
|
|
269 |
|
}
|
270 |
|
|
|
270 |
|
|
271 |
|
if( _for
m.resize.c
hecked )
|
|
271 |
|
if( _for
m.resize.c
hecked )
|
272 |
|
{
|
|
272 |
|
{
|
273 |
|
widt
h = parse
Int( _form
.new_width
.value );
|
|
273 |
|
widt
h = parse
Int( _form
.new_width
.value );
|
274 |
|
heig
ht = parse
Int( _form
.new_heigh
t.value );
|
|
274 |
|
heig
ht = parse
Int( _form
.new_heigh
t.value );
|
275 |
|
|
|
275 |
|
|
276 |
|
if(
!( width >
0 && heig
ht > 0 ) )
|
|
276 |
|
if(
!( width >
0 && heig
ht > 0 ) )
|
277 |
|
{
|
|
277 |
|
{
|
278 |
|
alert( 'Pl
ease enter
correct s
izes' )
|
|
278 |
|
alert( 'Pl
ease enter
correct s
izes' )
|
279 |
|
return fal
se;
|
|
279 |
|
return fal
se;
|
280 |
|
}
|
|
280 |
|
}
|
281 |
|
}
|
|
281 |
|
}
|
282 |
|
|
|
282 |
|
|
283 |
|
_form.do
_submit.va
lue = 'Wai
t...';
|
|
283 |
|
_form.do
_submit.va
lue = 'Wai
t...';
|
284 |
|
_form.do
_submit.di
sabled = t
rue;
|
|
284 |
|
_form.do
_submit.di
sabled = t
rue;
|
285 |
|
|
|
285 |
|
|
286 |
|
return t
rue;
|
|
286 |
|
return t
rue;
|
287 |
|
|
|
287 |
|
|
288 |
|
}
|
|
288 |
|
}
|
289 |
|
|
|
289 |
|
|
290 |
|
fu
nction ask
()
|
|
290 |
|
fu
nction ask
()
|
291 |
|
{
|
|
291 |
|
{
|
292 |
|
return c
onfirm( 'A
re you sur
e want to
delete thi
s image?'
);
|
|
292 |
|
return c
onfirm( 'A
re you sur
e want to
delete thi
s image?'
);
|
293 |
|
}
|
|
293 |
|
}
|
294 |
|
</scri
pt>
|
|
294 |
|
</scri
pt>
|
295 |
|
<style
>
|
|
295 |
|
<style
>
|
296 |
|
di
v#FloatDes
c
|
|
296 |
|
di
v#FloatDes
c
|
297 |
|
{
|
|
297 |
|
{
|
298 |
|
width:au
to;
|
|
298 |
|
width:au
to;
|
299 |
|
}
|
|
299 |
|
}
|
300 |
|
</styl
e>
|
|
300 |
|
</styl
e>
|
301 |
|
|
|
301 |
|
|
302 |
|
<form
name="prom
oForm" met
hod="post"
action="<
?=$_SERVER
['PHP_SELF
']?>" enct
ype="multi
part/form-
data" onsu
bmit="retu
rn checkPr
omoForm();
">
|
|
302 |
|
<form
name="prom
oForm" met
hod="post"
action="<
?=$_SERVER
['PHP_SELF
']?>" enct
ype="multi
part/form-
data" onsu
bmit="retu
rn checkPr
omoForm();
">
|
303 |
|
<f
ieldset>
|
|
303 |
|
<f
ieldset>
|
304 |
|
<legend
style="lin
e-height:1
5px;">
|
|
304 |
|
<legend
style="lin
e-height:1
5px;">
|
305 |
|
<inp
ut type="r
adio" name
="enable_f
lash_promo
" id="enab
le_flash_p
romo" valu
e="on"
|
|
305 |
|
<inp
ut type="r
adio" name
="enable_f
lash_promo
" id="enab
le_flash_p
romo" valu
e="on"
|
306 |
|
<?
= ( getPar
am( 'enabl
e_flash_pr
omo' ) ==
'on' ) ? '
checked="c
hecked"' :
'' ?>
|
|
306 |
|
<?
= ( getPar
am( 'enabl
e_flash_pr
omo' ) ==
'on' ) ? '
checked="c
hecked"' :
'' ?>
|
307 |
|
/>
|
|
307 |
|
/>
|
308 |
|
<lab
el for="en
able_flash
_promo">Us
e Promo Fl
ash Reload
er</label>
|
|
308 |
|
<lab
el for="en
able_flash
_promo">Us
e Promo Fl
ash Reload
er</label>
|
309 |
|
</legend
>
|
|
309 |
|
</legend
>
|
310 |
|
|
|
310 |
|
|
311 |
|
<b>Curre
nt Images<
/b>
|
|
311 |
|
<b>Curre
nt Images<
/b>
|
312 |
|
<?= getC
urrentProm
oImages()
?>
|
|
312 |
|
<?= getC
urrentProm
oImages()
?>
|
313 |
|
<br />
|
|
313 |
|
<br />
|
314 |
|
|
|
314 |
|
|
315 |
|
<div sty
le="width:
350px;">
|
|
315 |
|
<div sty
le="width:
350px;">
|
316 |
|
<b>H
ere you ca
n upload n
ew images<
/b><br /><
br />
|
|
316 |
|
<b>H
ere you ca
n upload n
ew images<
/b><br /><
br />
|
317 |
|
Select fil
e:
|
|
317 |
|
Select fil
e:
|
318 |
|
<input typ
e="file" n
ame="prNew
File" /><b
r />
|
|
318 |
|
<input typ
e="file" n
ame="prNew
File" /><b
r />
|
319 |
|
<b>Note:</
b> File mu
st be in J
PEG, GIF o
r PNG form
at<br /><b
r />
|
|
319 |
|
<b>Note:</
b> File mu
st be in J
PEG, GIF o
r PNG form
at<br /><b
r />
|
320 |
|
<!-- <fiel
dset style
="width:28
0px;">
|
|
320 |
|
<!-- <fiel
dset style
="width:28
0px;">
|
321 |
|
<legen
d style="l
ine-height
:15px;">
|
|
321 |
|
<legen
d style="l
ine-height
:15px;">
|
322 |
|
<i
nput type=
"checkbox"
name="prR
esize" id=
"prResize"
value="ye
s" checked
="checked"
style="ve
rtical-ali
gn:middle;
" />
|
|
322 |
|
<i
nput type=
"checkbox"
name="prR
esize" id=
"prResize"
value="ye
s" checked
="checked"
style="ve
rtical-ali
gn:middle;
" />
|
323 |
|
<l
abel for="
prResize">
Resize</la
bel>
|
|
323 |
|
<l
abel for="
prResize">
Resize</la
bel>
|
324 |
|
</lege
nd>
|
|
324 |
|
</lege
nd>
|
325 |
|
New si
ze:
|
|
325 |
|
New si
ze:
|
326 |
|
<input
type="tex
t" value="
754" name=
"prNewWidt
h" style="
width:30px
;" />
|
|
326 |
|
<input
type="tex
t" value="
754" name=
"prNewWidt
h" style="
width:30px
;" />
|
327 |
|
x
|
|
327 |
|
x
|
328 |
|
<input
type="tex
t" value="
207" name=
"prNewHeig
ht" style=
"width:30p
x;" />px<b
r />
|
|
328 |
|
<input
type="tex
t" value="
207" name=
"prNewHeig
ht" style=
"width:30p
x;" />px<b
r />
|
329 |
|
<b>Not
e:</b> Res
ize is pro
portional
|
|
329 |
|
<b>Not
e:</b> Res
ize is pro
portional
|
330 |
|
</fieldset
> -->
|
|
330 |
|
</fieldset
> -->
|
331 |
|
<div style
="text-ali
gn:center;
margin-top
:5px;">
|
|
331 |
|
<div style
="text-ali
gn:center;
margin-top
:5px;">
|
332 |
|
<input
type="sub
mit" name=
"prDoSubmi
t" value="
Upload" />
|
|
332 |
|
<input
type="sub
mit" name=
"prDoSubmi
t" value="
Upload" />
|
333 |
|
</div>
|
|
333 |
|
</div>
|
334 |
|
</div>
|
|
334 |
|
</div>
|
335 |
|
</
fieldset>
|
|
335 |
|
</
fieldset>
|
336 |
|
|
|
336 |
|
|
337 |
|
<f
ieldset>
|
|
337 |
|
<f
ieldset>
|
338 |
|
<legend
style="lin
e-height:1
5px;">
|
|
338 |
|
<legend
style="lin
e-height:1
5px;">
|
339 |
|
<inp
ut type="r
adio" name
="enable_f
lash_promo
" id="disa
ble_flash_
promo" val
ue=""
|
|
339 |
|
<inp
ut type="r
adio" name
="enable_f
lash_promo
" id="disa
ble_flash_
promo" val
ue=""
|
340 |
|
<?
= ( getPar
am( 'enabl
e_flash_pr
omo' ) ==
'on' ) ? '
' : 'check
ed="checke
d"' ?>
|
|
340 |
|
<?
= ( getPar
am( 'enabl
e_flash_pr
omo' ) ==
'on' ) ? '
' : 'check
ed="checke
d"' ?>
|
341 |
|
/>
|
|
341 |
|
/>
|
342 |
|
<lab
el for="di
sable_flas
h_promo">U
se custom
HTML block
</label>
|
|
342 |
|
<lab
el for="di
sable_flas
h_promo">U
se custom
HTML block
</label>
|
343 |
|
</legend
>
|
|
343 |
|
</legend
>
|
344 |
|
|
|
344 |
|
|
345 |
|
<textare
a style="w
idth:100%;
height:300
px;" name=
"custom_pr
omo_code"
class="cus
tom_promo_
code"><?=
htmlspecia
lchars_adv
( getParam
( 'custom_
promo_code
' ) ) ?></
textarea>
|
|
345 |
|
<textare
a style="w
idth:100%;
height:300
px;" name=
"custom_pr
omo_code"
class="cus
tom_promo_
code"><?=
htmlspecia
lchars_adv
( getParam
( 'custom_
promo_code
' ) ) ?></
textarea>
|
346 |
|
</
fieldset>
|
|
346 |
|
</
fieldset>
|
347 |
|
|
|
347 |
|
|
348 |
|
<d
iv style="
text-align
:center;ma
rgin-top:1
0px;">
|
|
348 |
|
<d
iv style="
text-align
:center;ma
rgin-top:1
0px;">
|
349 |
|
<input t
ype="submi
t" name="d
oSavePromo
Sett" valu
e="Save" /
>
|
|
349 |
|
<input t
ype="submi
t" name="d
oSavePromo
Sett" valu
e="Save" /
>
|
350 |
|
</
div>
|
|
350 |
|
</
div>
|
351 |
|
</form
>
|
|
351 |
|
</form
>
|
352 |
|
<?
|
|
352 |
|
<?
|
353 |
|
}
|
|
353 |
|
}
|
354 |
|
ContentBlo
ckFoot();
|
|
354 |
|
ContentBlo
ckFoot();
|
355 |
|
|
|
355 |
|
|
356 |
|
$saveSetti
ngs = ('ye
s' == $_PO
ST['save_s
ettings'])
;
|
|
356 |
|
$saveSetti
ngs = ('ye
s' == $_PO
ST['save_s
ettings'])
;
|
357 |
|
|
|
357 |
|
|
358 |
|
if (FALSE
!= $saveSe
ttings)
|
|
358 |
|
if (FALSE
!= $saveSe
ttings)
|
359 |
|
{
|
|
359 |
|
{
|
360 |
|
sa
veIndexPag
eSettings(
);
|
|
360 |
|
sa
veIndexPag
eSettings(
);
|
361 |
|
}
|
|
361 |
|
}
|
362 |
|
|
|
362 |
|
|
363 |
|
ContentBlo
ckHead("In
dex page s
ettings");
|
|
363 |
|
ContentBlo
ckHead("In
dex page s
ettings");
|
364 |
|
displayInd
exPageSett
ings();
|
|
364 |
|
displayInd
exPageSett
ings();
|
365 |
|
ContentBlo
ckFoot();
|
|
365 |
|
ContentBlo
ckFoot();
|
366 |
|
|
|
366 |
|
|
367 |
|
BottomCode
();
|
|
367 |
|
BottomCode
();
|
368 |
|
|
|
368 |
|
|
369 |
|
function s
etNewMainL
ogo( $file
name, $ext
)
|
|
369 |
|
function s
etNewMainL
ogo( $file
name, $ext
)
|
370 |
|
{
|
|
370 |
|
{
|
371 |
|
global
$dir;
|
|
371 |
|
global
$dir;
|
372 |
|
|
|
372 |
|
|
373 |
|
$newFi
leName = "
{$dir['med
iaImages']
}logo_tmp.
$ext";
|
|
373 |
|
$newFi
leName = "
{$dir['med
iaImages']
}logo_tmp.
$ext";
|
374 |
|
$sLogo
Name = "
{$dir['med
iaImages']
}logo.$ext
";
|
|
374 |
|
$sLogo
Name = "
{$dir['med
iaImages']
}logo.$ext
";
|
375 |
|
|
|
375 |
|
|
376 |
|
if( !m
ove_upload
ed_file( $
filename,
$newFileNa
me ) )
|
|
376 |
|
if( !m
ove_upload
ed_file( $
filename,
$newFileNa
me ) )
|
377 |
|
ec
ho 'Couldn
\'t move f
ile.';
|
|
377 |
|
ec
ho 'Couldn
\'t move f
ile.';
|
378 |
|
else
|
|
378 |
|
else
|
379 |
|
{
|
|
379 |
|
{
|
380 |
|
if
( $_REQUES
T['resize'
] )
|
|
380 |
|
if
( $_REQUES
T['resize'
] )
|
381 |
|
{
|
|
381 |
|
{
|
382 |
|
$width
= (int)$_R
EQUEST['ne
w_width'];
|
|
382 |
|
$width
= (int)$_R
EQUEST['ne
w_width'];
|
383 |
|
$height
= (int)$_R
EQUEST['ne
w_height']
;
|
|
383 |
|
$height
= (int)$_R
EQUEST['ne
w_height']
;
|
384 |
|
if( !( $
width > 0
and $heigh
t > 0 ) )
|
|
384 |
|
if( !( $
width > 0
and $heigh
t > 0 ) )
|
385 |
|
echo
'You ente
red incorr
ect sizes'
;
|
|
385 |
|
echo
'You ente
red incorr
ect sizes'
;
|
386 |
|
else
|
|
386 |
|
else
|
387 |
|
{
|
|
387 |
|
{
|
388 |
|
if(
imageResiz
e( $newFil
eName, $ne
wFileName,
$width, $
height ) !
= IMAGE_ER
ROR_SUCCES
S )
|
|
388 |
|
if(
imageResiz
e( $newFil
eName, $ne
wFileName,
$width, $
height ) !
= IMAGE_ER
ROR_SUCCES
S )
|
389 |
|
echo 'Resi
ze failed'
;
|
|
389 |
|
echo 'Resi
ze failed'
;
|
390 |
|
else
|
|
390 |
|
else
|
391 |
|
{
|
|
391 |
|
{
|
392 |
|
echo 'Resi
ze success
ful';
|
|
392 |
|
echo 'Resi
ze success
ful';
|
393 |
|
doReplaceL
ogo( $newF
ileName, $
sLogoName
);
|
|
393 |
|
doReplaceL
ogo( $newF
ileName, $
sLogoName
);
|
394 |
|
}
|
|
394 |
|
}
|
395 |
|
}
|
|
395 |
|
}
|
396 |
|
}
|
|
396 |
|
}
|
397 |
|
el
se
|
|
397 |
|
el
se
|
398 |
|
doReplac
eLogo( $ne
wFileName,
$sLogoNam
e );
|
|
398 |
|
doReplac
eLogo( $ne
wFileName,
$sLogoNam
e );
|
399 |
|
}
|
|
399 |
|
}
|
400 |
|
}
|
|
400 |
|
}
|
401 |
|
|
|
401 |
|
|
402 |
|
function d
oReplaceLo
go( $tmpFi
le, $newFi
le )
|
|
402 |
|
function d
oReplaceLo
go( $tmpFi
le, $newFi
le )
|
403 |
|
{
|
|
403 |
|
{
|
404 |
|
global
$dir;
|
|
404 |
|
global
$dir;
|
405 |
|
|
|
405 |
|
|
406 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
jpg" );
|
|
406 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
jpg" );
|
407 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
png" );
|
|
407 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
png" );
|
408 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
gif" );
|
|
408 |
|
@unlin
k( "{$dir[
'mediaImag
es']}logo.
gif" );
|
409 |
|
|
|
409 |
|
|
410 |
|
rename
( $tmpFile
, $newFile
);
|
|
410 |
|
rename
( $tmpFile
, $newFile
);
|
411 |
|
}
|
|
411 |
|
}
|
412 |
|
|
|
412 |
|
|
413 |
|
function g
etCurrentP
romoImages
()
|
|
413 |
|
function g
etCurrentP
romoImages
()
|
414 |
|
{
|
|
414 |
|
{
|
415 |
|
global
$site;
|
|
415 |
|
global
$site;
|
416 |
|
?>
|
|
416 |
|
?>
|
417 |
|
<div s
tyle="marg
in-left:12
px;">
|
|
417 |
|
<div s
tyle="marg
in-left:12
px;">
|
418 |
|
<?
|
|
418 |
|
<?
|
419 |
|
|
|
419 |
|
|
420 |
|
$aFile
s = getPro
moImagesAr
ray();
|
|
420 |
|
$aFile
s = getPro
moImagesAr
ray();
|
421 |
|
if( $a
Files )
|
|
421 |
|
if( $a
Files )
|
422 |
|
{
|
|
422 |
|
{
|
423 |
|
fo
reach( $aF
iles as $s
File )
|
|
423 |
|
fo
reach( $aF
iles as $s
File )
|
424 |
|
{
|
|
424 |
|
{
|
425 |
|
?>
|
|
425 |
|
?>
|
426 |
|
<a href=
"javascrip
t:void(0);
"
|
|
426 |
|
<a href=
"javascrip
t:void(0);
"
|
427 |
|
onmous
eover="sho
wFloatDesc
('<img src
="<?=
$site['im
agesPromo'
] . $sFile
?>"
/>');"
|
|
427 |
|
onmous
eover="sho
wFloatDesc
('<img src
="<?=
$site['im
agesPromo'
] . $sFile
?>"
/>');"
|
428 |
|
onmous
emove="mov
eFloatDesc
( event);"
|
|
428 |
|
onmous
emove="mov
eFloatDesc
( event);"
|
429 |
|
onmous
eout="hide
FloatDesc(
);"
|
|
429 |
|
onmous
eout="hide
FloatDesc(
);"
|
430 |
|
><?= $
sFile ?></
a>
|
|
430 |
|
><?= $
sFile ?></
a>
|
431 |
|
(<a href
="<?= $_SE
RVER['PHP_
SELF'] ?>?
delete=<?=
urlencode
( $sFile )
?>" style
="color:re
d;" onclic
k="return
ask();">de
lete</a>)
|
|
431 |
|
(<a href
="<?= $_SE
RVER['PHP_
SELF'] ?>?
delete=<?=
urlencode
( $sFile )
?>" style
="color:re
d;" onclic
k="return
ask();">de
lete</a>)
|
432 |
|
<br />
|
|
432 |
|
<br />
|
433 |
|
<?
|
|
433 |
|
<?
|
434 |
|
}
|
|
434 |
|
}
|
435 |
|
}
|
|
435 |
|
}
|
436 |
|
else
|
|
436 |
|
else
|
437 |
|
{
|
|
437 |
|
{
|
438 |
|
ec
ho 'No ima
ges found'
;
|
|
438 |
|
ec
ho 'No ima
ges found'
;
|
439 |
|
}
|
|
439 |
|
}
|
440 |
|
?>
|
|
440 |
|
?>
|
441 |
|
</div>
|
|
441 |
|
</div>
|
442 |
|
<?
|
|
442 |
|
<?
|
443 |
|
}
|
|
443 |
|
}
|
444 |
|
|
|
444 |
|
|
445 |
|
function d
isplayInde
xPageSetti
ngs()
|
|
445 |
|
function d
isplayInde
xPageSetti
ngs()
|
446 |
|
{
|
|
446 |
|
{
|
447 |
|
global
$site;
|
|
447 |
|
global
$site;
|
448 |
|
|
|
448 |
|
|
449 |
|
?>
|
|
449 |
|
?>
|
450 |
|
<cente
r>
|
|
450 |
|
<cente
r>
|
451 |
|
<scrip
t type="te
xt/javascr
ipt">
|
|
451 |
|
<scrip
t type="te
xt/javascr
ipt">
|
452 |
|
<!--
|
|
452 |
|
<!--
|
453 |
|
fu
nction cha
ngeFlag(fl
agISO)
|
|
453 |
|
fu
nction cha
ngeFlag(fl
agISO)
|
454 |
|
{
|
|
454 |
|
{
|
455 |
|
flagImag
e = docume
nt.getElem
entById('f
lagImageId
');
|
|
455 |
|
flagImag
e = docume
nt.getElem
entById('f
lagImageId
');
|
456 |
|
flagImag
e.src = '<
?= $site['
flags'] ?>
' + flagIS
O.toLowerC
ase() + '.
gif';
|
|
456 |
|
flagImag
e.src = '<
?= $site['
flags'] ?>
' + flagIS
O.toLowerC
ase() + '.
gif';
|
457 |
|
}
|
|
457 |
|
}
|
458 |
|
-->
|
|
458 |
|
-->
|
459 |
|
</scri
pt>
|
|
459 |
|
</scri
pt>
|
460 |
|
<form
method="po
st" action
="<? echo
$_SERVER[P
HP_SELF];
?>">
|
|
460 |
|
<form
method="po
st" action
="<? echo
$_SERVER[P
HP_SELF];
?>">
|
461 |
|
<input
type="hid
den" name=
"save_sett
ings" valu
e="yes">
|
|
461 |
|
<input
type="hid
den" name=
"save_sett
ings" valu
e="yes">
|
462 |
|
<table
width="10
0%" cellsp
acing="2"
cellpaddin
g="3" clas
s="text">
|
|
462 |
|
<table
width="10
0%" cellsp
acing="2"
cellpaddin
g="3" clas
s="text">
|
463 |
|
<!
-- <tr cla
ss="panel"
>
|
|
463 |
|
<!
-- <tr cla
ss="panel"
>
|
464 |
|
<td cols
pan="2">&n
bsp;<b>Ind
ex Page</b
></td>
|
|
464 |
|
<td cols
pan="2">&n
bsp;<b>Ind
ex Page</b
></td>
|
465 |
|
</
tr>-->
|
|
465 |
|
</
tr>-->
|
466 |
|
<t
r class="t
able">
|
|
466 |
|
<t
r class="t
able">
|
467 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
default_co
untry") ?>
: </td>
|
|
467 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
default_co
untry") ?>
: </td>
|
468 |
|
<td alig
n="left">
|
|
468 |
|
<td alig
n="left">
|
469 |
|
<sel
ect name="
default_co
untry" onc
hange="jav
ascript: c
hangeFlag(
this.value
);" >
|
|
469 |
|
<sel
ect name="
default_co
untry" onc
hange="jav
ascript: c
hangeFlag(
this.value
);" >
|
470 |
|
<?php
|
|
470 |
|
<?php
|
471 |
|
global $aP
reValues;
|
|
471 |
|
global $aP
reValues;
|
472 |
|
$sCurCount
ry = getPa
ram('defau
lt_country
');
|
|
472 |
|
$sCurCount
ry = getPa
ram('defau
lt_country
');
|
473 |
|
$aCountrie
s = $aPreV
alues['Cou
ntry'];
|
|
473 |
|
$aCountrie
s = $aPreV
alues['Cou
ntry'];
|
474 |
|
|
|
474 |
|
|
475 |
|
foreach ($
aCountries
as $sKey
=> $aCount
ry) {
|
|
475 |
|
foreach ($
aCountries
as $sKey
=> $aCount
ry) {
|
476 |
|
$sSele
cted = ( $
sKey == $s
CurCountry
) ? 'sele
cted="sele
cted"' : '
';
|
|
476 |
|
$sSele
cted = ( $
sKey == $s
CurCountry
) ? 'sele
cted="sele
cted"' : '
';
|
477 |
|
?>
|
|
477 |
|
?>
|
478 |
|
<o
ption valu
e="<?=$sKe
y?>" <?=$s
Selected?>
><?=_t($aC
ountry['LK
ey'])?></o
ption>
|
|
478 |
|
<o
ption valu
e="<?=$sKe
y?>" <?=$s
Selected?>
><?=_t($aC
ountry['LK
ey'])?></o
ption>
|
479 |
|
<?
|
|
479 |
|
<?
|
480 |
|
}
|
|
480 |
|
}
|
481 |
|
?>
|
|
481 |
|
?>
|
482 |
|
</se
lect>
|
|
482 |
|
</se
lect>
|
483 |
|
&nbs
p;<img id=
"flagImage
Id" src="<
?= $site['
flags'].st
rtolower($
sCurCountr
y) ?>.gif"
alt="flag
" />
|
|
483 |
|
&nbs
p;<img id=
"flagImage
Id" src="<
?= $site['
flags'].st
rtolower($
sCurCountr
y) ?>.gif"
alt="flag
" />
|
484 |
|
</td>
|
|
484 |
|
</td>
|
485 |
|
</
tr>
|
|
485 |
|
</
tr>
|
486 |
|
<t
r>
|
|
486 |
|
<t
r>
|
487 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
top_member
s_mode") ?
>: </td>
|
|
487 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
top_member
s_mode") ?
>: </td>
|
488 |
|
<td alig
n="left">
|
|
488 |
|
<td alig
n="left">
|
489 |
|
<sel
ect name="
top_member
s_mode">
|
|
489 |
|
<sel
ect name="
top_member
s_mode">
|
490 |
|
<?php
|
|
490 |
|
<?php
|
491 |
|
$old_val =
getParam(
'top_membe
rs_mode');
|
|
491 |
|
$old_val =
getParam(
'top_membe
rs_mode');
|
492 |
|
$mode_choi
ces = arra
y(
|
|
492 |
|
$mode_choi
ces = arra
y(
|
493 |
|
'onlin
e' => 'Onl
ine member
s',
|
|
493 |
|
'onlin
e' => 'Onl
ine member
s',
|
494 |
|
'rand'
=> 'Rando
m members'
,
|
|
494 |
|
'rand'
=> 'Rando
m members'
,
|
495 |
|
'last'
=> 'Lates
t members'
,
|
|
495 |
|
'last'
=> 'Lates
t members'
,
|
496 |
|
'top'
=> 'Top me
mbers');
|
|
496 |
|
'top'
=> 'Top me
mbers');
|
497 |
|
foreach ($
mode_choic
es as $key
=> $value
)
|
|
497 |
|
foreach ($
mode_choic
es as $key
=> $value
)
|
498 |
|
{
|
|
498 |
|
{
|
499 |
|
if ($o
ld_val ==
$key)
|
|
499 |
|
if ($o
ld_val ==
$key)
|
500 |
|
{
|
|
500 |
|
{
|
501 |
|
ec
ho "<optio
n value=\"
$key\" sel
ected>$val
ue</option
>\n";
|
|
501 |
|
ec
ho "<optio
n value=\"
$key\" sel
ected>$val
ue</option
>\n";
|
502 |
|
}
|
|
502 |
|
}
|
503 |
|
else
|
|
503 |
|
else
|
504 |
|
{
|
|
504 |
|
{
|
505 |
|
ec
ho "<optio
n value=\"
$key\">$va
lue</optio
n>\n";
|
|
505 |
|
ec
ho "<optio
n value=\"
$key\">$va
lue</optio
n>\n";
|
506 |
|
}
|
|
506 |
|
}
|
507 |
|
}
|
|
507 |
|
}
|
508 |
|
?>
|
|
508 |
|
?>
|
509 |
|
</se
lect>
|
|
509 |
|
</se
lect>
|
510 |
|
</td>
|
|
510 |
|
</td>
|
511 |
|
</
tr>
|
|
511 |
|
</
tr>
|
512 |
|
<t
r>
|
|
512 |
|
<t
r>
|
513 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
featured_m
ode") ?>:
</td>
|
|
513 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
featured_m
ode") ?>:
</td>
|
514 |
|
<td alig
n="left">
|
|
514 |
|
<td alig
n="left">
|
515 |
|
<sel
ect name="
featured_m
ode">
|
|
515 |
|
<sel
ect name="
featured_m
ode">
|
516 |
|
<?php
|
|
516 |
|
<?php
|
517 |
|
$old_val =
getParam(
'featured_
mode');
|
|
517 |
|
$old_val =
getParam(
'featured_
mode');
|
518 |
|
$mode_choi
ces = arra
y(
|
|
518 |
|
$mode_choi
ces = arra
y(
|
519 |
|
'verti
cal' => 'V
ertical',
|
|
519 |
|
'verti
cal' => 'V
ertical',
|
520 |
|
'horiz
ontal' =>
'Horizonta
l');
|
|
520 |
|
'horiz
ontal' =>
'Horizonta
l');
|
521 |
|
foreach ($
mode_choic
es as $key
=> $value
)
|
|
521 |
|
foreach ($
mode_choic
es as $key
=> $value
)
|
522 |
|
{
|
|
522 |
|
{
|
523 |
|
if ($o
ld_val ==
$key)
|
|
523 |
|
if ($o
ld_val ==
$key)
|
524 |
|
{
|
|
524 |
|
{
|
525 |
|
ec
ho "<optio
n value=\"
$key\" sel
ected>$val
ue</option
>\n";
|
|
525 |
|
ec
ho "<optio
n value=\"
$key\" sel
ected>$val
ue</option
>\n";
|
526 |
|
}
|
|
526 |
|
}
|
527 |
|
else
|
|
527 |
|
else
|
528 |
|
{
|
|
528 |
|
{
|
529 |
|
ec
ho "<optio
n value=\"
$key\">$va
lue</optio
n>\n";
|
|
529 |
|
ec
ho "<optio
n value=\"
$key\">$va
lue</optio
n>\n";
|
530 |
|
}
|
|
530 |
|
}
|
531 |
|
}
|
|
531 |
|
}
|
532 |
|
?>
|
|
532 |
|
?>
|
533 |
|
</se
lect>
|
|
533 |
|
</se
lect>
|
534 |
|
</td>
|
|
534 |
|
</td>
|
535 |
|
</
tr>
|
|
535 |
|
</
tr>
|
536 |
|
<t
r>
|
|
536 |
|
<t
r>
|
537 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
featured_n
um") ?>: <
/td>
|
|
537 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
featured_n
um") ?>: <
/td>
|
538 |
|
<td alig
n="left">
|
|
538 |
|
<td alig
n="left">
|
539 |
|
<inp
ut type="t
ext" class
="no" name
="featured
_num" size
="15" valu
e="<?= htm
lspecialch
ars(getPar
am('featur
ed_num'))
?>" />
|
|
539 |
|
<inp
ut type="t
ext" class
="no" name
="featured
_num" size
="15" valu
e="<?= htm
lspecialch
ars(getPar
am('featur
ed_num'))
?>" />
|
540 |
|
</td>
|
|
540 |
|
</td>
|
541 |
|
</
tr>
|
|
541 |
|
</
tr>
|
542 |
|
<t
r>
|
|
542 |
|
<t
r>
|
543 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
top_member
s_max_num"
) ?>: </td
>
|
|
543 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
top_member
s_max_num"
) ?>: </td
>
|
544 |
|
<td alig
n="left">
|
|
544 |
|
<td alig
n="left">
|
545 |
|
<inp
ut type="t
ext" class
="no" name
="top_memb
ers_max_nu
m" size="1
5" value="
<?= htmlsp
ecialchars
(getParam(
'top_membe
rs_max_num
')) ?>" />
|
|
545 |
|
<inp
ut type="t
ext" class
="no" name
="top_memb
ers_max_nu
m" size="1
5" value="
<?= htmlsp
ecialchars
(getParam(
'top_membe
rs_max_num
')) ?>" />
|
546 |
|
</td>
|
|
546 |
|
</td>
|
547 |
|
</
tr>
|
|
547 |
|
</
tr>
|
|
|
548 |
|
<t
r>
|
|
|
549 |
|
<td alig
n="right"
width="40%
"> <?=getP
aramDesc("
top_photos
_max_num")
?>: </td>
|
|
|
550 |
|
<td alig
n="left">
|
|
|
551 |
|
<inp
ut type="t
ext" class
="no" name
="top_phot
os_max_num
" size="15
" value="<
?= htmlspe
cialchars(
getParam('
top_photos
_max_num')
) ?>" />
|
|
|
552 |
|
</td>
|
|
|
553 |
|
</
tr>
|
548 |
|
</tabl
e>
|
|
554 |
|
</tabl
e>
|
549 |
|
<br>
|
|
555 |
|
<br>
|
550 |
|
<input
class="no
" type="su
bmit" valu
e="Save ch
anges">
|
|
556 |
|
<input
class="no
" type="su
bmit" valu
e="Save ch
anges">
|
551 |
|
</form
>
|
|
557 |
|
</form
>
|
552 |
|
</cent
er>
|
|
558 |
|
</cent
er>
|
553 |
|
<?php
|
|
559 |
|
<?php
|
554 |
|
|
|
560 |
|
|
555 |
|
return
'Index Pa
ge';
|
|
561 |
|
return
'Index Pa
ge';
|
556 |
|
}
|
|
562 |
|
}
|
557 |
|
|
|
563 |
|
|
558 |
|
function s
aveIndexPa
geSettings
()
|
|
564 |
|
function s
aveIndexPa
geSettings
()
|
559 |
|
{
|
|
565 |
|
{
|
560 |
|
setPar
am('defaul
t_country'
, $_POST['
default_co
untry']);
|
|
566 |
|
setPar
am('defaul
t_country'
, $_POST['
default_co
untry']);
|
561 |
|
setPar
am('top_me
mbers_mode
', $_POST[
'top_membe
rs_mode'])
;
|
|
567 |
|
setPar
am('top_me
mbers_mode
', $_POST[
'top_membe
rs_mode'])
;
|
562 |
|
setPar
am('featur
ed_mode',
$_POST['fe
atured_mod
e']);
|
|
568 |
|
setPar
am('featur
ed_mode',
$_POST['fe
atured_mod
e']);
|
563 |
|
setPar
am('featur
ed_num', $
_POST['fea
tured_num'
]);
|
|
569 |
|
setPar
am('featur
ed_num', $
_POST['fea
tured_num'
]);
|
564 |
|
setPar
am('top_me
mbers_max_
num', $_PO
ST['top_me
mbers_max_
num']);
|
|
570 |
|
setPar
am('top_me
mbers_max_
num', $_PO
ST['top_me
mbers_max_
num']);
|
|
|
571 |
|
setPar
am('top_ph
otos_max_n
um', $_POS
T['top_pho
tos_max_nu
m']);
|
565 |
|
?>
|
|
572 |
|
?>
|
566 |
|
<div c
lass="succ
">Index pa
ge paramet
ers succes
sfully cha
nged.</div
><br />
|
|
573 |
|
<div c
lass="succ
">Index pa
ge paramet
ers succes
sfully cha
nged.</div
><br />
|
567 |
|
<?php
|
|
574 |
|
<?php
|
568 |
|
}
|
|
575 |
|
}
|
569 |
|
|
|
576 |
|
|
570 |
|
?>
|
|
577 |
|
?>
|
571 |
|
</div>
|
|
578 |
|
</div>
|
572 |
|
<?
|
|
579 |
|
<?
|
573 |
|
?>
|
|
580 |
|
?>
|