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 . 'p
rofile_dis
p.inc.php'
);
|
|
|
25 |
|
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'
);
|
26 |
|
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' );
|
27 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
arams.inc.
php' );
|
|
26 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
arams.inc.
php' );
|
28 |
|
|
|
27 |
|
|
29 |
|
$logged[
admin
]
=
member_aut
h(
1
);
|
|
28 |
|
$logged[
'
admin
'
]
=
member_aut
h(
1
,
true,
true
);
|
30 |
|
$ADMIN = $
logged[adm
in];
|
|
29 |
|
$ADMIN = $
logged[adm
in];
|
31 |
|
|
|
30 |
|
|
32 |
|
$_page['cs
s_name'] =
'post_mod
_polls.css
';
|
|
31 |
|
$_page['cs
s_name'] =
'post_mod
_polls.css
';
|
33 |
|
|
|
32 |
|
|
34 |
|
// =======
==========
==========
==========
==========
==========
==========
|
|
33 |
|
// =======
==========
==========
==========
==========
==========
==========
|
35 |
|
// =======
==========
==========
==========
==========
==========
==========
|
|
34 |
|
// =======
==========
==========
==========
==========
==========
==========
|
36 |
|
|
|
35 |
|
|
37 |
|
if ( $_POS
T['confirm
'] )
|
|
36 |
|
if ( $_POS
T['confirm
'] )
|
38 |
|
{
|
|
37 |
|
{
|
39 |
|
$query
= '';
|
|
38 |
|
$query
= '';
|
40 |
|
foreac
h ( $_POST
as $key =
> $value )
|
|
39 |
|
foreac
h ( $_POST
as $key =
> $value )
|
41 |
|
{
|
|
40 |
|
{
|
42 |
|
|
|
41 |
|
|
43 |
|
if ( '
poll' == $
value )
|
|
42 |
|
if ( '
poll' == $
value )
|
44 |
|
$q
uery .= "
`id_poll`
= '$key' o
r ";
|
|
43 |
|
$q
uery .= "
`id_poll`
= '$key' o
r ";
|
45 |
|
}
|
|
44 |
|
}
|
46 |
|
|
|
45 |
|
|
47 |
|
$query
= "UPDATE
ProfilesP
olls SET `
poll_appro
val` = 1 W
HERE " . $
query . "
1 = 0 ";
|
|
46 |
|
$query
= "UPDATE
ProfilesP
olls SET `
poll_appro
val` = 1 W
HERE " . $
query . "
1 = 0 ";
|
48 |
|
|
|
47 |
|
|
49 |
|
db_res
( $query )
;
|
|
48 |
|
db_res
( $query )
;
|
50 |
|
|
|
49 |
|
|
51 |
|
}
|
|
50 |
|
}
|
52 |
|
elseif ( $
_POST['del
ete'] )
|
|
51 |
|
elseif ( $
_POST['del
ete'] )
|
53 |
|
{
|
|
52 |
|
{
|
54 |
|
|
|
53 |
|
|
55 |
|
$query
= '';
|
|
54 |
|
$query
= '';
|
56 |
|
foreac
h ( $_POST
as $key =
> $value )
|
|
55 |
|
foreac
h ( $_POST
as $key =
> $value )
|
57 |
|
{
|
|
56 |
|
{
|
58 |
|
|
|
57 |
|
|
59 |
|
if ( '
poll' == $
value )
|
|
58 |
|
if ( '
poll' == $
value )
|
60 |
|
$q
uery .= "
id_poll =
'$key' or
";
|
|
59 |
|
$q
uery .= "
id_poll =
'$key' or
";
|
61 |
|
}
|
|
60 |
|
}
|
62 |
|
|
|
61 |
|
|
63 |
|
$query
= "DELETE
FROM Prof
ilesPolls
WHERE " .
$query . "
1 = 0 ";
|
|
62 |
|
$query
= "DELETE
FROM Prof
ilesPolls
WHERE " .
$query . "
1 = 0 ";
|
64 |
|
|
|
63 |
|
|
65 |
|
db_res
( $query )
;
|
|
64 |
|
db_res
( $query )
;
|
66 |
|
|
|
65 |
|
|
67 |
|
}
|
|
66 |
|
}
|
68 |
|
|
|
67 |
|
|
69 |
|
// =======
==========
==========
==========
==========
==========
==========
|
|
68 |
|
// =======
==========
==========
==========
==========
==========
==========
|
70 |
|
// - GET v
ariables -
----------
---
|
|
69 |
|
// - GET v
ariables -
----------
---
|
71 |
|
// =======
==========
==========
==========
==========
==========
==========
|
|
70 |
|
// =======
==========
==========
==========
==========
==========
==========
|
72 |
|
|
|
71 |
|
|
73 |
|
$page
= (int)$
_GET[page]
;
|
|
72 |
|
$page
= (int)$
_GET[page]
;
|
74 |
|
$p_per_pag
e = (int)$
_GET[p_per
_page];
|
|
73 |
|
$p_per_pag
e = (int)$
_GET[p_per
_page];
|
75 |
|
|
|
74 |
|
|
76 |
|
//$real_fi
rst_p = (i
nt)($page
- 1) * $p_
per_page;
|
|
75 |
|
//$real_fi
rst_p = (i
nt)($page
- 1) * $p_
per_page;
|
77 |
|
//$page_fi
rst_p = $r
eal_first_
p + 1;
|
|
76 |
|
//$page_fi
rst_p = $r
eal_first_
p + 1;
|
78 |
|
|
|
77 |
|
|
79 |
|
$max_photo
_height
= $max_pho
to_height
+ 2;
|
|
78 |
|
$max_photo
_height
= $max_pho
to_height
+ 2;
|
80 |
|
$max_photo
_width
= $max_pho
to_width +
2;
|
|
79 |
|
$max_photo
_width
= $max_pho
to_width +
2;
|
81 |
|
|
|
80 |
|
|
82 |
|
if ( !$pag
e )
|
|
81 |
|
if ( !$pag
e )
|
83 |
|
$page
= 1;
|
|
82 |
|
$page
= 1;
|
84 |
|
|
|
83 |
|
|
85 |
|
if ( !$p_p
er_page )
|
|
84 |
|
if ( !$p_p
er_page )
|
86 |
|
$p_per
_page = 10
;
|
|
85 |
|
$p_per
_page = 10
;
|
87 |
|
|
|
86 |
|
|
88 |
|
// -------
----------
----------
---
|
|
87 |
|
// -------
----------
----------
---
|
89 |
|
|
|
88 |
|
|
90 |
|
|
|
89 |
|
|
91 |
|
$sql = "SE
LECT COUNT
(*) FROM P
rofilesPol
ls WHERE `
poll_appro
val` = '0'
";
|
|
90 |
|
$sql = "SE
LECT COUNT
(*) FROM P
rofilesPol
ls WHERE `
poll_appro
val` = '0'
";
|
92 |
|
|
|
91 |
|
|
93 |
|
$p_num = d
b_arr( $sq
l );
|
|
92 |
|
$p_num = d
b_arr( $sq
l );
|
94 |
|
$p_num = $
p_num[0];
|
|
93 |
|
$p_num = $
p_num[0];
|
95 |
|
$pages_num
= ceil( $
p_num / $p
_per_page
);
|
|
94 |
|
$pages_num
= ceil( $
p_num / $p
_per_page
);
|
96 |
|
|
|
95 |
|
|
97 |
|
$real_firs
t_p = (int
)($page -
1) * $p_pe
r_page;
|
|
96 |
|
$real_firs
t_p = (int
)($page -
1) * $p_pe
r_page;
|
98 |
|
$page_firs
t_p = $rea
l_first_p
+ 1;
|
|
97 |
|
$page_firs
t_p = $rea
l_first_p
+ 1;
|
99 |
|
|
|
98 |
|
|
100 |
|
$result =
db_res( "S
ELECT `id_
profile`,
`id_poll`
FROM Profi
lesPolls W
HERE `poll
_approval`
= 0 LIMIT
$real_fir
st_p, $p_p
er_page;"
);
|
|
99 |
|
$result =
db_res( "S
ELECT `id_
profile`,
`id_poll`
FROM Profi
lesPolls W
HERE `poll
_approval`
= 0 LIMIT
$real_fir
st_p, $p_p
er_page;"
);
|
101 |
|
|
|
100 |
|
|
102 |
|
$_page['he
ader'] = "
Polls Post
Moderation
";
|
|
101 |
|
$_page['he
ader'] = "
Polls Post
Moderation
";
|
103 |
|
$_page['he
ader_text'
] = "Polls
that need
to be che
cked by ad
min";
|
|
102 |
|
$_page['he
ader_text'
] = "Polls
that need
to be che
cked by ad
min";
|
104 |
|
|
|
103 |
|
|
105 |
|
$_page['js
'] = 1;
|
|
104 |
|
$_page['js
'] = 1;
|
106 |
|
|
|
105 |
|
|
107 |
|
$_page['js
_name'] =
'profile_p
oll.js';
|
|
106 |
|
$_page['js
_name'] =
'profile_p
oll.js';
|
108 |
|
|
|
107 |
|
|
109 |
|
TopCodeAdm
in();
|
|
108 |
|
TopCodeAdm
in();
|
110 |
|
|
|
109 |
|
|
111 |
|
ContentBlo
ckHead("Cr
eated
(and
yet
not
approved)
profile
polls:");
|
|
110 |
|
ContentBlo
ckHead("Cr
eated
(and
not
yet
approved)
profile
polls:");
|
112 |
|
|
|
111 |
|
|
113 |
|
?>
|
|
112 |
|
?>
|
114 |
|
|
|
113 |
|
|
115 |
|
<center>
|
|
114 |
|
<center>
|
116 |
|
<?= ResNav
igationRet
( 'PollsUp
per', 0 );
?>
|
|
115 |
|
<?= ResNav
igationRet
( 'PollsUp
per', 0 );
?>
|
117 |
|
</center>
|
|
116 |
|
</center>
|
118 |
|
|
|
117 |
|
|
119 |
|
<form name
="prf_form
" method="
post" acti
on="post_m
od_ppolls.
php<? $get
_vars = ge
t_vars();
echo subst
r($get_var
s, 0, strl
en($get_va
rs) - 1);
?>">
|
|
118 |
|
<form name
="prf_form
" method="
post" acti
on="post_m
od_ppolls.
php<? $get
_vars = ge
t_vars();
echo subst
r($get_var
s, 0, strl
en($get_va
rs) - 1);
?>">
|
120 |
|
|
|
119 |
|
|
121 |
|
<?
|
|
120 |
|
<?
|
122 |
|
//"
|
|
121 |
|
//"
|
123 |
|
|
|
122 |
|
|
124 |
|
?>
|
|
123 |
|
?>
|
125 |
|
<d
iv style="
border: so
lid 0px #0
00000;">
|
|
124 |
|
<d
iv style="
border: so
lid 0px #0
00000;">
|
126 |
|
<?
|
|
125 |
|
<?
|
127 |
|
|
|
126 |
|
|
128 |
|
|
|
127 |
|
|
129 |
|
if( 0
< mysql_nu
m_rows($re
sult) )
|
|
128 |
|
if( 0
< mysql_nu
m_rows($re
sult) )
|
130 |
|
{
|
|
129 |
|
{
|
131 |
|
wh
ile ( $arr
= mysql_f
etch_array
( $result
) )
|
|
130 |
|
wh
ile ( $arr
= mysql_f
etch_array
( $result
) )
|
132 |
|
{
|
|
131 |
|
{
|
133 |
|
?>
|
|
132 |
|
?>
|
134 |
|
<div sty
le="float:
left;margi
n-right:5p
x;margin-t
op:5px;bor
der: solid
1px #cccc
cc;backgro
und-color:
#f6f6ff;"
>
|
|
133 |
|
<div sty
le="float:
left;margi
n-right:5p
x;margin-t
op:5px;bor
der: solid
1px #cccc
cc;backgro
und-color:
#f6f6ff;"
>
|
135 |
|
<div
style="po
sition:rel
ative; pad
ding-top:2
5px;width:
260px; hei
ght:160px;
">
|
|
134 |
|
<div
style="po
sition:rel
ative; pad
ding-top:2
5px;width:
260px; hei
ght:160px;
">
|
136 |
|
<div style
="position
:absolute;
top:4px;
left:4px;"
>
|
|
135 |
|
<div style
="position
:absolute;
top:4px;
left:4px;"
>
|
137 |
|
<input
type="che
ckbox" id=
"<?=$arr['
id_poll']?
>" value="
poll" name
="<?=$arr[
'id_poll']
?>">
|
|
136 |
|
<input
type="che
ckbox" id=
"<?=$arr['
id_poll']?
>" value="
poll" name
="<?=$arr[
'id_poll']
?>">
|
138 |
|
</div>
|
|
137 |
|
</div>
|
139 |
|
<label for
="<?=$arr[
'id_profil
e']?>"><?=
ShowPoll($
arr['id_po
ll'])?></l
abel>
|
|
138 |
|
<label for
="<?=$arr[
'id_profil
e']?>"><?=
ShowPoll($
arr['id_po
ll'])?></l
abel>
|
140 |
|
</di
v>
|
|
139 |
|
</di
v>
|
141 |
|
<div
style="te
xt-align:c
enter; bac
kground-co
lor:#FFFFF
F;padding:
3px;">
|
|
140 |
|
<div
style="te
xt-align:c
enter; bac
kground-co
lor:#FFFFF
F;padding:
3px;">
|
142 |
|
<a href="<
?=$site['u
rl']?>prof
ile.php?ID
=<?=$arr['
id_profile
']?>" targ
et="_blank
">View Pro
file</a> |
|
|
141 |
|
<a href="<
?=$site['u
rl']?>prof
ile.php?ID
=<?=$arr['
id_profile
']?>" targ
et="_blank
">View Pro
file</a> |
|
143 |
|
<a
href="<?=$
site['url'
]?>p
rofile_
edit.php?I
D=<?=$arr[
'id_profil
e']?>"
target="_b
lank">Edit
Profile<a>
|
|
142 |
|
<a
href="<?=$
site['url'
]?>p
edit.php?I
D=<?=$arr[
'id_profil
e']?>"
target="_b
lank">Edit
Profile<a>
|
144 |
|
</di
v>
|
|
143 |
|
</di
v>
|
145 |
|
</div>
|
|
144 |
|
</div>
|
146 |
|
<?
|
|
145 |
|
<?
|
147 |
|
}
|
|
146 |
|
}
|
148 |
|
}
|
|
147 |
|
}
|
149 |
|
else
|
|
148 |
|
else
|
150 |
|
{
|
|
149 |
|
{
|
151 |
|
?>
|
|
150 |
|
?>
|
152 |
|
<div sty
le="text-a
lign:cente
r; line-he
ight:25px;
vertical-
align:midd
le; backgr
ound-color
:#c2daeb;
font-weigh
t:bold;">T
here is no
thing to a
pprove </d
iv>
|
|
151 |
|
<div sty
le="text-a
lign:cente
r; line-he
ight:25px;
vertical-
align:midd
le; backgr
ound-color
:#c2daeb;
font-weigh
t:bold;">T
here is no
thing to a
pprove </d
iv>
|
153 |
|
<?
|
|
152 |
|
<?
|
154 |
|
}
|
|
153 |
|
}
|
155 |
|
?>
|
|
154 |
|
?>
|
156 |
|
</div>
|
|
155 |
|
</div>
|
157 |
|
<?
|
|
156 |
|
<?
|
158 |
|
|
|
157 |
|
|
159 |
|
if ( $
p_num )
|
|
158 |
|
if ( $
p_num )
|
160 |
|
{
|
|
159 |
|
{
|
161 |
|
?>
|
|
160 |
|
?>
|
162 |
|
<div class
="clear_bo
th"></div>
|
|
161 |
|
<div class
="clear_bo
th"></div>
|
163 |
|
<div style
="">
|
|
162 |
|
<div style
="">
|
164 |
|
<table cla
ss=text bo
rder=0 wid
th=590 ali
gn=center>
|
|
163 |
|
<table cla
ss=text bo
rder=0 wid
th=590 ali
gn=center>
|
165 |
|
<tr>
|
|
164 |
|
<tr>
|
166 |
|
<td wi
dth="65">&
nbsp;<a hr
ef="javasc
ript: void
(0);" oncl
ick="setCh
eckboxes(
'prf_form'
, true );
return fal
se;">Check
all</a>/<
/td>
|
|
165 |
|
<td wi
dth="65">&
nbsp;<a hr
ef="javasc
ript: void
(0);" oncl
ick="setCh
eckboxes(
'prf_form'
, true );
return fal
se;">Check
all</a>/<
/td>
|
167 |
|
<td al
ign="left"
width="70
"> <a href
="javascri
pt: void(0
);" onclic
k="setChec
kboxes( 'p
rf_form',
false ); r
eturn fals
e;">Unchec
k all</a>&
nbsp;</td>
|
|
166 |
|
<td al
ign="left"
width="70
"> <a href
="javascri
pt: void(0
);" onclic
k="setChec
kboxes( 'p
rf_form',
false ); r
eturn fals
e;">Unchec
k all</a>&
nbsp;</td>
|
168 |
|
<td wi
dth="100">
Selected p
olls:</td>
|
|
167 |
|
<td wi
dth="100">
Selected p
olls:</td>
|
169 |
|
<td wi
dth="55"><
input clas
s=text typ
e=submit n
ame="delet
e" value="
Delete"></
td>
|
|
168 |
|
<td wi
dth="55"><
input clas
s=text typ
e=submit n
ame="delet
e" value="
Delete"></
td>
|
170 |
|
<td wi
dth="1">|<
/td>
|
|
169 |
|
<td wi
dth="1">|<
/td>
|
171 |
|
<td wi
dth="110">
<input cla
ss=text ty
pe=submit
name="conf
irm" value
="Confirm"
></td>
|
|
170 |
|
<td wi
dth="110">
<input cla
ss=text ty
pe=submit
name="conf
irm" value
="Confirm"
></td>
|
172 |
|
<td>&n
bsp;</td>
|
|
171 |
|
<td>&n
bsp;</td>
|
173 |
|
</tr>
|
|
172 |
|
</tr>
|
174 |
|
</table>
|
|
173 |
|
</table>
|
175 |
|
</div>
|
|
174 |
|
</div>
|
176 |
|
<?
|
|
175 |
|
<?
|
177 |
|
}
|
|
176 |
|
}
|
178 |
|
?>
|
|
177 |
|
?>
|
179 |
|
|
|
178 |
|
|
180 |
|
</form>
|
|
179 |
|
</form>
|
181 |
|
|
|
180 |
|
|
182 |
|
<center>
|
|
181 |
|
<center>
|
183 |
|
<?= ResNav
igationRet
( 'PollsLo
wer', 0 );
?>
|
|
182 |
|
<?= ResNav
igationRet
( 'PollsLo
wer', 0 );
?>
|
184 |
|
</center>
|
|
183 |
|
</center>
|
185 |
|
|
|
184 |
|
|
186 |
|
<?
|
|
185 |
|
<?
|
187 |
|
ContentBlo
ckFoot();
|
|
186 |
|
ContentBlo
ckFoot();
|
188 |
|
|
|
187 |
|
|
189 |
|
BottomCode
();
|
|
188 |
|
BottomCode
();
|
190 |
|
?>
|
|
189 |
|
?>
|