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 |
|
|
|
21 |
|
|
22 |
|
/*
|
|
22 |
|
/*
|
23 |
|
This file
displays p
age for ma
naging mod
erator acc
ounts.
|
|
23 |
|
This file
displays p
age for ma
naging mod
erator acc
ounts.
|
24 |
|
*/
|
|
24 |
|
*/
|
25 |
|
require_on
ce( '../in
c/header.i
nc.php' );
|
|
25 |
|
require_on
ce( '../in
c/header.i
nc.php' );
|
26 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
|
26 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'd
esign.inc.
php' );
|
27 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
rofiles.in
c.php' );
|
|
27 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
rofiles.in
c.php' );
|
28 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'p
rofile_dis
p.inc.php'
);
|
|
|
29 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'a
dmin_desig
n.inc.php'
);
|
|
28 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'a
dmin_desig
n.inc.php'
);
|
30 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
|
29 |
|
require_on
ce( BX_DIR
ECTORY_PAT
H_INC . 'u
tils.inc.p
hp' );
|
31 |
|
|
|
30 |
|
|
32 |
|
// Check i
f admin is
logged in
and save
this info
into $logg
ed var.
|
|
31 |
|
// Check i
f admin is
logged in
and save
this info
into $logg
ed var.
|
33 |
|
$logged['a
dmin']
=
member_aut
h(
1
);
|
|
32 |
|
$logged['a
dmin']
=
member_aut
h(
1
,
true,
true
);
|
34 |
|
// Local v
ariable fo
r brevity
only.
|
|
33 |
|
// Local v
ariable fo
r brevity
only.
|
35 |
|
$admin = $
logged['ad
min'];
|
|
34 |
|
$admin = $
logged['ad
min'];
|
36 |
|
|
|
35 |
|
|
37 |
|
// 'Delete
' transact
ion.
|
|
36 |
|
// 'Delete
' transact
ion.
|
38 |
|
if (!$demo
_mode && (
'Delete' =
= $_POST['
prf_form_s
ubmit']))
|
|
37 |
|
if (!$demo
_mode && (
'Delete' =
= $_POST['
prf_form_s
ubmit']))
|
39 |
|
{
|
|
38 |
|
{
|
40 |
|
foreac
h ($_POST
as $key =>
$value)
|
|
39 |
|
foreac
h ($_POST
as $key =>
$value)
|
41 |
|
{
|
|
40 |
|
{
|
42 |
|
$e
rr = false
;
|
|
41 |
|
$e
rr = false
;
|
43 |
|
if
((int)$ke
y && 'on'
== $value)
|
|
42 |
|
if
((int)$ke
y && 'on'
== $value)
|
44 |
|
{
|
|
43 |
|
{
|
45 |
|
// Set q
uery strin
g.
|
|
44 |
|
// Set q
uery strin
g.
|
46 |
|
$q_str =
"DELETE F
ROM `moder
ators` WHE
RE `id` =
$key;";
|
|
45 |
|
$q_str =
"DELETE F
ROM `moder
ators` WHE
RE `id` =
$key;";
|
47 |
|
// Delet
e moderato
r via quer
y.
|
|
46 |
|
// Delet
e moderato
r via quer
y.
|
48 |
|
$res = d
b_res($q_s
tr);
|
|
47 |
|
$res = d
b_res($q_s
tr);
|
49 |
|
if (!res
)
|
|
48 |
|
if (!res
)
|
50 |
|
{
|
|
49 |
|
{
|
51 |
|
$err
= true;
|
|
50 |
|
$err
= true;
|
52 |
|
brea
k;
|
|
51 |
|
brea
k;
|
53 |
|
}
|
|
52 |
|
}
|
54 |
|
}
|
|
53 |
|
}
|
55 |
|
//
Set statu
s string.
|
|
54 |
|
//
Set statu
s string.
|
56 |
|
if
(!$err)
|
|
55 |
|
if
(!$err)
|
57 |
|
{
|
|
56 |
|
{
|
58 |
|
$status_
text = 'De
leted succ
essfully';
|
|
57 |
|
$status_
text = 'De
leted succ
essfully';
|
59 |
|
}
|
|
58 |
|
}
|
60 |
|
el
se
|
|
59 |
|
el
se
|
61 |
|
{
|
|
60 |
|
{
|
62 |
|
$status_
text = 'Fa
iled to de
lete';
|
|
61 |
|
$status_
text = 'Fa
iled to de
lete';
|
63 |
|
}
|
|
62 |
|
}
|
64 |
|
}
|
|
63 |
|
}
|
65 |
|
}
|
|
64 |
|
}
|
66 |
|
|
|
65 |
|
|
67 |
|
// 'Add' t
ransaction
.
|
|
66 |
|
// 'Add' t
ransaction
.
|
68 |
|
if (!$demo
_mode && $
_POST['add
_moderator
'])
|
|
67 |
|
if (!$demo
_mode && $
_POST['add
_moderator
'])
|
69 |
|
{
|
|
68 |
|
{
|
70 |
|
// Add
new moder
ator to da
tabase.
|
|
69 |
|
// Add
new moder
ator to da
tabase.
|
71 |
|
$mod_n
ame = proc
ess_db_inp
ut( $_POST
['name'] )
;
|
|
70 |
|
$mod_n
ame = proc
ess_db_inp
ut( $_POST
['name'] )
;
|
72 |
|
$mod_e
mail = pro
cess_db_in
put( $_POS
T['email']
);
|
|
71 |
|
$mod_e
mail = pro
cess_db_in
put( $_POS
T['email']
);
|
73 |
|
$mod_p
assword =
md5( $_POS
T['passwor
d'] );
|
|
72 |
|
$mod_p
assword =
md5( $_POS
T['passwor
d'] );
|
74 |
|
$mod_s
tatus = pr
ocess_db_i
nput( $_PO
ST['status
'] );
|
|
73 |
|
$mod_s
tatus = pr
ocess_db_i
nput( $_PO
ST['status
'] );
|
75 |
|
// Set
query str
ing -- get
moderator
prop valu
es via $_P
OST variab
le.
|
|
74 |
|
// Set
query str
ing -- get
moderator
prop valu
es via $_P
OST variab
le.
|
76 |
|
$q_str
= <<<EOD
|
|
75 |
|
$q_str
= <<<EOD
|
77 |
|
IN
SERT INTO
`moderator
s`
|
|
76 |
|
IN
SERT INTO
`moderator
s`
|
78 |
|
(`name`,
`email`,
`Password`
, `status`
)
|
|
77 |
|
(`name`,
`email`,
`Password`
, `status`
)
|
79 |
|
VA
LUES
|
|
78 |
|
VA
LUES
|
80 |
|
('$mod_n
ame', '$mo
d_email',
'$mod_pass
word', '$m
od_status'
);
|
|
79 |
|
('$mod_n
ame', '$mo
d_email',
'$mod_pass
word', '$m
od_status'
);
|
81 |
|
EOD;
|
|
80 |
|
EOD;
|
82 |
|
// Add
moderator
via query
.
|
|
81 |
|
// Add
moderator
via query
.
|
83 |
|
$res =
db_res($q
_str);
|
|
82 |
|
$res =
db_res($q
_str);
|
84 |
|
if ($r
es)
|
|
83 |
|
if ($r
es)
|
85 |
|
{
|
|
84 |
|
{
|
86 |
|
$s
tatus_text
= 'Added
moderator
successful
ly.';
|
|
85 |
|
$s
tatus_text
= 'Added
moderator
successful
ly.';
|
87 |
|
}
|
|
86 |
|
}
|
88 |
|
else
|
|
87 |
|
else
|
89 |
|
{
|
|
88 |
|
{
|
90 |
|
$s
tatus_text
= 'Failed
to add mo
derator.';
|
|
89 |
|
$s
tatus_text
= 'Failed
to add mo
derator.';
|
91 |
|
}
|
|
90 |
|
}
|
92 |
|
}
|
|
91 |
|
}
|
93 |
|
|
|
92 |
|
|
94 |
|
// 'Update
' transact
ion.
|
|
93 |
|
// 'Update
' transact
ion.
|
95 |
|
if (!$demo
_mode && (
int)$_GET[
'editdis']
)
|
|
94 |
|
if (!$demo
_mode && (
int)$_GET[
'editdis']
)
|
96 |
|
{
|
|
95 |
|
{
|
97 |
|
// Ini
t moderato
r properti
es array.
|
|
96 |
|
// Ini
t moderato
r properti
es array.
|
98 |
|
$q_str
= "
|
|
97 |
|
$q_str
= "
|
99 |
|
SE
LECT
|
|
98 |
|
SE
LECT
|
100 |
|
`id`
,
|
|
99 |
|
`id`
,
|
101 |
|
`nam
e`,
|
|
100 |
|
`nam
e`,
|
102 |
|
`ema
il`,
|
|
101 |
|
`ema
il`,
|
103 |
|
`Pas
sword`,
|
|
102 |
|
`Pas
sword`,
|
104 |
|
`sta
tus`,
|
|
103 |
|
`sta
tus`,
|
105 |
|
DATE
_FORMAT(`r
eg_date`,
'$date_for
mat' ) AS
reg_date
|
|
104 |
|
DATE
_FORMAT(`r
eg_date`,
'$date_for
mat' ) AS
reg_date
|
106 |
|
FR
OM
|
|
105 |
|
FR
OM
|
107 |
|
`mod
erators`
|
|
106 |
|
`mod
erators`
|
108 |
|
WH
ERE
|
|
107 |
|
WH
ERE
|
109 |
|
`id`
= '{$_GET
['editdis'
]}';";
|
|
108 |
|
`id`
= '{$_GET
['editdis'
]}';";
|
110 |
|
$editd
is_arr = d
b_arr($q_s
tr);
|
|
109 |
|
$editd
is_arr = d
b_arr($q_s
tr);
|
111 |
|
}
|
|
110 |
|
}
|
112 |
|
if ($_POST
['update_m
oderator']
)
|
|
111 |
|
if ($_POST
['update_m
oderator']
)
|
113 |
|
{
|
|
112 |
|
{
|
114 |
|
// Upd
ate modera
tor.
|
|
113 |
|
// Upd
ate modera
tor.
|
115 |
|
$mod_i
d = (int)$
_POST['id'
];
|
|
114 |
|
$mod_i
d = (int)$
_POST['id'
];
|
116 |
|
$mod_n
ame = proc
ess_db_inp
ut( $_POST
['name'] )
;
|
|
115 |
|
$mod_n
ame = proc
ess_db_inp
ut( $_POST
['name'] )
;
|
117 |
|
$mod_e
mail = pro
cess_db_in
put( $_POS
T['email']
);
|
|
116 |
|
$mod_e
mail = pro
cess_db_in
put( $_POS
T['email']
);
|
118 |
|
$mod_p
assword =
strlen( $_
POST['pass
word'] ) ?
( "'" . m
d5( $_POST
['password
'] ) . "'"
) : '`Pas
sword`';
|
|
117 |
|
$mod_p
assword =
strlen( $_
POST['pass
word'] ) ?
( "'" . m
d5( $_POST
['password
'] ) . "'"
) : '`Pas
sword`';
|
119 |
|
$mod_s
tatus = pr
ocess_db_i
nput( $_PO
ST['status
'] );
|
|
118 |
|
$mod_s
tatus = pr
ocess_db_i
nput( $_PO
ST['status
'] );
|
120 |
|
// Set
query str
ing -- get
moderator
prop valu
es via $_P
OST variab
le.
|
|
119 |
|
// Set
query str
ing -- get
moderator
prop valu
es via $_P
OST variab
le.
|
121 |
|
$q_str
= <<<EOD
|
|
120 |
|
$q_str
= <<<EOD
|
122 |
|
UP
DATE `mode
rators` SE
T
|
|
121 |
|
UP
DATE `mode
rators` SE
T
|
123 |
|
`name` =
'$mod_nam
e',
|
|
122 |
|
`name` =
'$mod_nam
e',
|
124 |
|
`email`
= '$mod_em
ail',
|
|
123 |
|
`email`
= '$mod_em
ail',
|
125 |
|
`Passwor
d` = $mod_
password,
|
|
124 |
|
`Passwor
d` = $mod_
password,
|
126 |
|
`status`
= '$mod_s
tatus'
|
|
125 |
|
`status`
= '$mod_s
tatus'
|
127 |
|
WH
ERE `id` =
$mod_id;
|
|
126 |
|
WH
ERE `id` =
$mod_id;
|
128 |
|
EOD;
|
|
127 |
|
EOD;
|
129 |
|
// Upd
ate modera
tor via qu
ery.
|
|
128 |
|
// Upd
ate modera
tor via qu
ery.
|
130 |
|
$res =
db_res($q
_str);
|
|
129 |
|
$res =
db_res($q
_str);
|
131 |
|
if ($r
es)
|
|
130 |
|
if ($r
es)
|
132 |
|
{
|
|
131 |
|
{
|
133 |
|
$s
tatus_text
= 'Modera
tor was su
ccessfully
updated.'
;
|
|
132 |
|
$s
tatus_text
= 'Modera
tor was su
ccessfully
updated.'
;
|
134 |
|
}
|
|
133 |
|
}
|
135 |
|
else
|
|
134 |
|
else
|
136 |
|
{
|
|
135 |
|
{
|
137 |
|
$s
tatus_text
= 'Failed
to update
moderator
.';
|
|
136 |
|
$s
tatus_text
= 'Failed
to update
moderator
.';
|
138 |
|
}
|
|
137 |
|
}
|
139 |
|
}
|
|
138 |
|
}
|
140 |
|
|
|
139 |
|
|
141 |
|
// Init gl
obal varia
bles from
GET array.
|
|
140 |
|
// Init gl
obal varia
bles from
GET array.
|
142 |
|
// Init cu
rrent page
.
|
|
141 |
|
// Init cu
rrent page
.
|
143 |
|
$page = (i
nt)$_GET['
page'];
|
|
142 |
|
$page = (i
nt)$_GET['
page'];
|
144 |
|
if (!$page
)
|
|
143 |
|
if (!$page
)
|
145 |
|
{
|
|
144 |
|
{
|
146 |
|
$page
= 1;
|
|
145 |
|
$page
= 1;
|
147 |
|
}
|
|
146 |
|
}
|
148 |
|
// Init nu
mber of re
cords per
page.
|
|
147 |
|
// Init nu
mber of re
cords per
page.
|
149 |
|
$p_per_pag
e = (int)$
_GET['p_pe
r_page'];
|
|
148 |
|
$p_per_pag
e = (int)$
_GET['p_pe
r_page'];
|
150 |
|
if (!$p_pe
r_page)
|
|
149 |
|
if (!$p_pe
r_page)
|
151 |
|
{
|
|
150 |
|
{
|
152 |
|
$p_per
_page = 30
;
|
|
151 |
|
$p_per
_page = 30
;
|
153 |
|
}
|
|
152 |
|
}
|
154 |
|
// Init to
tal number
of record
s to displ
ay.
|
|
153 |
|
// Init to
tal number
of record
s to displ
ay.
|
155 |
|
$p_num = d
b_arr('SEL
ECT COUNT(
*) FROM `m
oderators`
;');
|
|
154 |
|
$p_num = d
b_arr('SEL
ECT COUNT(
*) FROM `m
oderators`
;');
|
156 |
|
$p_num = $
p_num[0];
|
|
155 |
|
$p_num = $
p_num[0];
|
157 |
|
// Init pa
ge number.
|
|
156 |
|
// Init pa
ge number.
|
158 |
|
$pages_num
= ceil($p
_num / $p_
per_page);
|
|
157 |
|
$pages_num
= ceil($p
_num / $p_
per_page);
|
159 |
|
|
|
158 |
|
|
160 |
|
$real_firs
t_p = (int
)($page -
1) * $p_pe
r_page;
|
|
159 |
|
$real_firs
t_p = (int
)($page -
1) * $p_pe
r_page;
|
161 |
|
$page_firs
t_p = $rea
l_first_p
+ 1;
|
|
160 |
|
$page_firs
t_p = $rea
l_first_p
+ 1;
|
162 |
|
|
|
161 |
|
|
163 |
|
|
|
162 |
|
|
164 |
|
$sQuery =
"
|
|
163 |
|
$sQuery =
"
|
165 |
|
SELECT
|
|
164 |
|
SELECT
|
166 |
|
`id`,
|
|
165 |
|
`id`,
|
167 |
|
`name`,
|
|
166 |
|
`name`,
|
168 |
|
`email`,
|
|
167 |
|
`email`,
|
169 |
|
`status`
,
|
|
168 |
|
`status`
,
|
170 |
|
DATE_FOR
MAT(`reg_d
ate`, '$da
te_format'
) AS reg_
date
|
|
169 |
|
DATE_FOR
MAT(`reg_d
ate`, '$da
te_format'
) AS reg_
date
|
171 |
|
FROM
|
|
170 |
|
FROM
|
172 |
|
`moderat
ors`
|
|
171 |
|
`moderat
ors`
|
173 |
|
LIMIT
$real_firs
t_p, $p_pe
r_page;";
|
|
172 |
|
LIMIT
$real_firs
t_p, $p_pe
r_page;";
|
174 |
|
$result =
db_res( "$
sQuery" );
|
|
173 |
|
$result =
db_res( "$
sQuery" );
|
175 |
|
$page_p_nu
m = mysql_
num_rows($
result);
|
|
174 |
|
$page_p_nu
m = mysql_
num_rows($
result);
|
176 |
|
|
|
175 |
|
|
177 |
|
$_page['he
ader'] = '
Manage Mod
erators';
// Set pag
e title.
|
|
176 |
|
$_page['he
ader'] = '
Manage Mod
erators';
// Set pag
e title.
|
178 |
|
|
|
177 |
|
|
179 |
|
TopCodeAdm
in();
|
|
178 |
|
TopCodeAdm
in();
|
180 |
|
// Display
left nav
menu and r
ight pane
(empty).
|
|
|
181 |
|
|
|
179 |
|
|
182 |
|
ContentBlo
ckHead('')
;
|
|
180 |
|
ContentBlo
ckHead('')
;
|
183 |
|
?>
|
|
181 |
|
?>
|
184 |
|
|
|
182 |
|
|
185 |
|
<?
|
|
183 |
|
<?
|
186 |
|
if ( strle
n($status_
text) )
|
|
184 |
|
if ( strle
n($status_
text) )
|
187 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$status_t
ext</div><
/center><b
r>\n";
|
|
185 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$status_t
ext</div><
/center><b
r>\n";
|
188 |
|
?>
|
|
186 |
|
?>
|
189 |
|
<SCRIPT la
nguage="Ja
vaScript">
|
|
187 |
|
<SCRIPT la
nguage="Ja
vaScript">
|
190 |
|
function s
etCheckbox
ess(the_fo
rm, do_che
ck)
|
|
188 |
|
function s
etCheckbox
ess(the_fo
rm, do_che
ck)
|
191 |
|
{
|
|
189 |
|
{
|
192 |
|
var el
ts = docum
ent.forms[
the_form].
elements;
|
|
190 |
|
var el
ts = docum
ent.forms[
the_form].
elements;
|
193 |
|
var el
ts_cnt =
elts.lengt
h;
|
|
191 |
|
var el
ts_cnt =
elts.lengt
h;
|
194 |
|
|
|
192 |
|
|
195 |
|
for (v
ar i = 0;
i < elts_c
nt; i++) {
|
|
193 |
|
for (v
ar i = 0;
i < elts_c
nt; i++) {
|
196 |
|
el
ts[i].chec
ked = do_c
heck;
|
|
194 |
|
el
ts[i].chec
ked = do_c
heck;
|
197 |
|
} // e
nd for
|
|
195 |
|
} // e
nd for
|
198 |
|
|
|
196 |
|
|
199 |
|
return
true;
|
|
197 |
|
return
true;
|
200 |
|
} // end o
f the 'set
Checkboxes
()' functi
on
|
|
198 |
|
} // end o
f the 'set
Checkboxes
()' functi
on
|
201 |
|
</SCRIPT>
|
|
199 |
|
</SCRIPT>
|
202 |
|
|
|
200 |
|
|
203 |
|
<center>
|
|
201 |
|
<center>
|
204 |
|
<!-- Pag
e navigati
on control
s -->
|
|
202 |
|
<!-- Pag
e navigati
on control
s -->
|
205 |
|
<?php ec
ho ResNavi
gationRet(
'Moderato
rsUpper',
0 ); ?>
|
|
203 |
|
<?php ec
ho ResNavi
gationRet(
'Moderato
rsUpper',
0 ); ?>
|
206 |
|
</center>
|
|
204 |
|
</center>
|
207 |
|
|
|
205 |
|
|
208 |
|
<form acti
on="<?php
echo $_SER
VER[PHP_SE
LF]; ?>" m
ethod="pos
t" name="m
oderator_f
rm">
|
|
206 |
|
<form acti
on="<?php
echo $_SER
VER[PHP_SE
LF]; ?>" m
ethod="pos
t" name="m
oderator_f
rm">
|
209 |
|
<table ali
gn="center
" cellspac
ing=2 cell
padding=0
class=smal
l width=90
%>
|
|
207 |
|
<table ali
gn="center
" cellspac
ing=2 cell
padding=0
class=smal
l width=90
%>
|
210 |
|
<?php
|
|
208 |
|
<?php
|
211 |
|
|
|
209 |
|
|
212 |
|
if (!$p_nu
m)
|
|
210 |
|
if (!$p_nu
m)
|
213 |
|
{
|
|
211 |
|
{
|
214 |
|
echo '
<td class=
"panel">No
moderator
s</td>';
|
|
212 |
|
echo '
<td class=
"panel">No
moderator
s</td>';
|
215 |
|
}
|
|
213 |
|
}
|
216 |
|
else
|
|
214 |
|
else
|
217 |
|
{
|
|
215 |
|
{
|
218 |
|
?>
|
|
216 |
|
?>
|
219 |
|
<tr class=
"panel">
|
|
217 |
|
<tr class=
"panel">
|
220 |
|
<td align=
"center">&
nbsp;ID&nb
sp;</td>
|
|
218 |
|
<td align=
"center">&
nbsp;ID&nb
sp;</td>
|
221 |
|
<td align=
"center">&
nbsp;Name&
nbsp;</td>
|
|
219 |
|
<td align=
"center">&
nbsp;Name&
nbsp;</td>
|
222 |
|
<td align=
"center">&
nbsp;E-Mai
l </t
d>
|
|
220 |
|
<td align=
"center">&
nbsp;E-Mai
l </t
d>
|
223 |
|
<td align=
"center">&
nbsp;Statu
s </t
d>
|
|
221 |
|
<td align=
"center">&
nbsp;Statu
s </t
d>
|
224 |
|
<td align=
"center">&
nbsp; 
;</td>
|
|
222 |
|
<td align=
"center">&
nbsp; 
;</td>
|
225 |
|
</tr>
|
|
223 |
|
</tr>
|
226 |
|
<?php
|
|
224 |
|
<?php
|
227 |
|
// Ite
rate thru
moderators
in the re
sult recor
dset.
|
|
225 |
|
// Ite
rate thru
moderators
in the re
sult recor
dset.
|
228 |
|
while
($p_arr =
mysql_fetc
h_array($r
esult))
|
|
226 |
|
while
($p_arr =
mysql_fetc
h_array($r
esult))
|
229 |
|
{
|
|
227 |
|
{
|
230 |
|
?>
|
|
228 |
|
?>
|
231 |
|
<tr class=
"table">
|
|
229 |
|
<tr class=
"table">
|
232 |
|
|
|
230 |
|
|
233 |
|
<td align=
"center">
|
|
231 |
|
<td align=
"center">
|
234 |
|
<a href=
"moderator
s.php?edit
dis=<?=$p_
arr[id];?>
"><?=$p_ar
r['id'];?>
|
|
232 |
|
<a href=
"moderator
s.php?edit
dis=<?=$p_
arr[id];?>
"><?=$p_ar
r['id'];?>
|
235 |
|
</td>
|
|
233 |
|
</td>
|
236 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
name'])?><
/td>
|
|
234 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
name'])?><
/td>
|
237 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
email'])?>
</td>
|
|
235 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
email'])?>
</td>
|
238 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
status'])?
></td>
|
|
236 |
|
<td align=
"center"><
?=process_
line_outpu
t($p_arr['
status'])?
></td>
|
239 |
|
<td align=
"center"><
input type
="checkbox
" name="<?
=$p_arr[id
];?>"></td
>
|
|
237 |
|
<td align=
"center"><
input type
="checkbox
" name="<?
=$p_arr[id
];?>"></td
>
|
240 |
|
</tr>
|
|
238 |
|
</tr>
|
241 |
|
<?php
|
|
239 |
|
<?php
|
242 |
|
}
|
|
240 |
|
}
|
243 |
|
}
|
|
241 |
|
}
|
244 |
|
?>
|
|
242 |
|
?>
|
245 |
|
</table>
|
|
243 |
|
</table>
|
246 |
|
|
|
244 |
|
|
247 |
|
<!-- Check
all/Unche
ck all con
trols -->
|
|
245 |
|
<!-- Check
all/Unche
ck all con
trols -->
|
248 |
|
<center>
|
|
246 |
|
<center>
|
249 |
|
<table cla
ss=text>
|
|
247 |
|
<table cla
ss=text>
|
250 |
|
<tr>
|
|
248 |
|
<tr>
|
251 |
|
<td>&nbs
p;<a href=
"javascrip
t: void(0)
;"
|
|
249 |
|
<td>&nbs
p;<a href=
"javascrip
t: void(0)
;"
|
252 |
|
onclic
k="setChec
kboxess('m
oderator_f
rm', true
); return
false;">Ch
eck all</a
> /
|
|
250 |
|
onclic
k="setChec
kboxess('m
oderator_f
rm', true
); return
false;">Ch
eck all</a
> /
|
253 |
|
<a hre
f="javascr
ipt: void(
0);"
|
|
251 |
|
<a hre
f="javascr
ipt: void(
0);"
|
254 |
|
onclic
k="setChec
kboxess( '
moderator_
frm', fals
e ); retur
n false;">
Uncheck al
l</a> 
;</td>
|
|
252 |
|
onclic
k="setChec
kboxess( '
moderator_
frm', fals
e ); retur
n false;">
Uncheck al
l</a> 
;</td>
|
255 |
|
<td>Sele
cted partn
ers:</td>
|
|
253 |
|
<td>Sele
cted partn
ers:</td>
|
256 |
|
<td><inp
ut class="
no" type="
submit" na
me="prf_fo
rm_submit"
value="De
lete"></td
>
|
|
254 |
|
<td><inp
ut class="
no" type="
submit" na
me="prf_fo
rm_submit"
value="De
lete"></td
>
|
257 |
|
</tr>
|
|
255 |
|
</tr>
|
258 |
|
</table>
|
|
256 |
|
</table>
|
259 |
|
</form>
|
|
257 |
|
</form>
|
260 |
|
</center>
|
|
258 |
|
</center>
|
261 |
|
|
|
259 |
|
|
262 |
|
<center>
|
|
260 |
|
<center>
|
263 |
|
<?php echo
ResNaviga
tionRet( '
Moderators
Lower', 0
); ?>
|
|
261 |
|
<?php echo
ResNaviga
tionRet( '
Moderators
Lower', 0
); ?>
|
264 |
|
</center>
|
|
262 |
|
</center>
|
265 |
|
|
|
263 |
|
|
266 |
|
<?php
|
|
264 |
|
<?php
|
267 |
|
// Check i
f user sel
ected to u
pdate some
moderator
propertie
s.
|
|
265 |
|
// Check i
f user sel
ected to u
pdate some
moderator
propertie
s.
|
268 |
|
if ((int)$
_GET['edit
dis'])
|
|
266 |
|
if ((int)$
_GET['edit
dis'])
|
269 |
|
{
|
|
267 |
|
{
|
270 |
|
?>
|
|
268 |
|
?>
|
271 |
|
<form meth
od="post"
action="<?
=$_SERVER[
PHP_SELF]?
>">
|
|
269 |
|
<form meth
od="post"
action="<?
=$_SERVER[
PHP_SELF]?
>">
|
272 |
|
<table ali
gn="center
" cellspac
ing="1" ce
llpadding=
"2" class=
"small" wi
dth="90%">
|
|
270 |
|
<table ali
gn="center
" cellspac
ing="1" ce
llpadding=
"2" class=
"small" wi
dth="90%">
|
273 |
|
<tr class=
"panel">
|
|
271 |
|
<tr class=
"panel">
|
274 |
|
<td align=
"center" w
idth="10%"
> ID&
nbsp;</td>
|
|
272 |
|
<td align=
"center" w
idth="10%"
> ID&
nbsp;</td>
|
275 |
|
<td align=
"center" w
idth="30%"
> Nam
e </t
d>
|
|
273 |
|
<td align=
"center" w
idth="30%"
> Nam
e </t
d>
|
276 |
|
<td align=
"center" w
idth="30%"
> E-M
ail <
/td>
|
|
274 |
|
<td align=
"center" w
idth="30%"
> E-M
ail <
/td>
|
277 |
|
<td align=
"center" w
idth="10%"
> Pas
sword 
;</td>
|
|
275 |
|
<td align=
"center" w
idth="10%"
> Pas
sword 
;</td>
|
278 |
|
<td align=
"center" w
idth="10%"
> Sta
tus <
/td>
|
|
276 |
|
<td align=
"center" w
idth="10%"
> Sta
tus <
/td>
|
279 |
|
</tr>
|
|
277 |
|
</tr>
|
280 |
|
<tr class=
"panel">
|
|
278 |
|
<tr class=
"panel">
|
281 |
|
<input typ
e="hidden"
name="id"
value="<?
=$editdis_
arr['id']?
>">
|
|
279 |
|
<input typ
e="hidden"
name="id"
value="<?
=$editdis_
arr['id']?
>">
|
282 |
|
<td align=
"center" w
idth="10%"
><?=$editd
is_arr['id
']?></td>
|
|
280 |
|
<td align=
"center" w
idth="10%"
><?=$editd
is_arr['id
']?></td>
|
283 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="10" n
ame="name"
value="<?
=htmlspeci
alchars($e
ditdis_arr
['name'])?
>"></td>
|
|
281 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="10" n
ame="name"
value="<?
=htmlspeci
alchars($e
ditdis_arr
['name'])?
>"></td>
|
284 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="20" n
ame="email
" value="<
?=htmlspec
ialchars($
editdis_ar
r['email']
)?>"></td>
|
|
282 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="20" n
ame="email
" value="<
?=htmlspec
ialchars($
editdis_ar
r['email']
)?>"></td>
|
285 |
|
<td align=
"center" w
idth="10%"
><input cl
ass="no" s
ize="8" na
me="passwo
rd" value=
""></td>
|
|
283 |
|
<td align=
"center" w
idth="10%"
><input cl
ass="no" s
ize="8" na
me="passwo
rd" value=
""></td>
|
286 |
|
<td align=
"center" w
idth="10%"
>
|
|
284 |
|
<td align=
"center" w
idth="10%"
>
|
287 |
|
|
|
285 |
|
|
288 |
|
<select cl
ass="no" n
ame="statu
s">
|
|
286 |
|
<select cl
ass="no" n
ame="statu
s">
|
289 |
|
<optio
n value="a
pproval"
<?=$editdi
s_arr['sta
tus'] == '
approval'
? 'select
ed' : '' ?
>>approval
</option>
|
|
287 |
|
<optio
n value="a
pproval"
<?=$editdi
s_arr['sta
tus'] == '
approval'
? 'select
ed' : '' ?
>>approval
</option>
|
290 |
|
<optio
n value="a
ctive"
<?=$editdi
s_arr['sta
tus'] == '
active'
? 'select
ed' : ''?>
>active</o
ption>
|
|
288 |
|
<optio
n value="a
ctive"
<?=$editdi
s_arr['sta
tus'] == '
active'
? 'select
ed' : ''?>
>active</o
ption>
|
291 |
|
<optio
n value="s
uspended"
<?=$editdi
s_arr['sta
tus'] == '
suspended'
? 'select
ed' : ''?>
>suspended
</option>
|
|
289 |
|
<optio
n value="s
uspended"
<?=$editdi
s_arr['sta
tus'] == '
suspended'
? 'select
ed' : ''?>
>suspended
</option>
|
292 |
|
</select>
|
|
290 |
|
</select>
|
293 |
|
|
|
291 |
|
|
294 |
|
</td>
|
|
292 |
|
</td>
|
295 |
|
</tr>
|
|
293 |
|
</tr>
|
296 |
|
</table>
|
|
294 |
|
</table>
|
297 |
|
<br>
|
|
295 |
|
<br>
|
298 |
|
<center><i
nput class
="no" type
="submit"
name="upda
te_moderat
or" value=
"Update"><
/center>
|
|
296 |
|
<center><i
nput class
="no" type
="submit"
name="upda
te_moderat
or" value=
"Update"><
/center>
|
299 |
|
</form>
|
|
297 |
|
</form>
|
300 |
|
<?php
|
|
298 |
|
<?php
|
301 |
|
}
|
|
299 |
|
}
|
302 |
|
else
|
|
300 |
|
else
|
303 |
|
{
|
|
301 |
|
{
|
304 |
|
?>
|
|
302 |
|
?>
|
305 |
|
<!-- New m
oderator f
orm -->
|
|
303 |
|
<!-- New m
oderator f
orm -->
|
306 |
|
<form meth
od="post"
action="<?
php echo $
_SERVER[PH
P_SELF]; ?
>">
|
|
304 |
|
<form meth
od="post"
action="<?
php echo $
_SERVER[PH
P_SELF]; ?
>">
|
307 |
|
<table ali
gn="center
" cellspac
ing=1 cell
padding=2
class=smal
l width=90
%>
|
|
305 |
|
<table ali
gn="center
" cellspac
ing=1 cell
padding=2
class=smal
l width=90
%>
|
308 |
|
<tr class=
"panel">
|
|
306 |
|
<tr class=
"panel">
|
309 |
|
<td align=
"center" w
idth="30%"
> Nam
e </t
d>
|
|
307 |
|
<td align=
"center" w
idth="30%"
> Nam
e </t
d>
|
310 |
|
<td align=
"center" w
idth="30%"
> E-M
ail <
/td>
|
|
308 |
|
<td align=
"center" w
idth="30%"
> E-M
ail <
/td>
|
311 |
|
<td align=
"center" w
idth="10%"
> Pas
sword 
;</td>
|
|
309 |
|
<td align=
"center" w
idth="10%"
> Pas
sword 
;</td>
|
312 |
|
<td align=
"center" w
idth="10%"
> Sta
tus <
/td>
|
|
310 |
|
<td align=
"center" w
idth="10%"
> Sta
tus <
/td>
|
313 |
|
|
|
311 |
|
|
314 |
|
</tr>
|
|
312 |
|
</tr>
|
315 |
|
<tr class=
"panel">
|
|
313 |
|
<tr class=
"panel">
|
316 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="10" n
ame="name"
></td>
|
|
314 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="10" n
ame="name"
></td>
|
317 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="20" n
ame="email
"></td>
|
|
315 |
|
<td align=
"center" w
idth="30%"
><input cl
ass="no" s
ize="20" n
ame="email
"></td>
|
318 |
|
<td align=
"center" w
idth="10%"
><input cl
ass="no" s
ize="8" na
me="passwo
rd"></td>
|
|
316 |
|
<td align=
"center" w
idth="10%"
><input cl
ass="no" s
ize="8" na
me="passwo
rd"></td>
|
319 |
|
<td align=
"center" w
idth="10%"
>
|
|
317 |
|
<td align=
"center" w
idth="10%"
>
|
320 |
|
|
|
318 |
|
|
321 |
|
<select cl
ass="no" n
ame="statu
s">
|
|
319 |
|
<select cl
ass="no" n
ame="statu
s">
|
322 |
|
<o
ption valu
e="approva
l">approva
l</option>
|
|
320 |
|
<o
ption valu
e="approva
l">approva
l</option>
|
323 |
|
<o
ption valu
e="active"
>active</o
ption>
|
|
321 |
|
<o
ption valu
e="active"
>active</o
ption>
|
324 |
|
<o
ption valu
e="suspend
ed">suspen
ded</optio
n>
|
|
322 |
|
<o
ption valu
e="suspend
ed">suspen
ded</optio
n>
|
325 |
|
</select>
|
|
323 |
|
</select>
|
326 |
|
|
|
324 |
|
|
327 |
|
</td>
|
|
325 |
|
</td>
|
328 |
|
</tr>
|
|
326 |
|
</tr>
|
329 |
|
</table>
|
|
327 |
|
</table>
|
330 |
|
<br>
|
|
328 |
|
<br>
|
331 |
|
<center><i
nput class
="no" type
="submit"
name="add_
moderator"
value="Ad
d"></cente
r>
|
|
329 |
|
<center><i
nput class
="no" type
="submit"
name="add_
moderator"
value="Ad
d"></cente
r>
|
332 |
|
</form>
|
|
330 |
|
</form>
|
333 |
|
|
|
331 |
|
|
334 |
|
<?php
|
|
332 |
|
<?php
|
335 |
|
}
|
|
333 |
|
}
|
336 |
|
ContentBlo
ckFoot();
|
|
334 |
|
ContentBlo
ckFoot();
|
337 |
|
?>
|
|
335 |
|
?>
|
338 |
|
|
|
336 |
|
|
339 |
|
</table>
|
|
337 |
|
</table>
|
340 |
|
</form>
|
|
338 |
|
</form>
|
341 |
|
<?php
|
|
339 |
|
<?php
|
342 |
|
BottomCode
();
|
|
340 |
|
BottomCode
();
|
343 |
|
?>
|
|
341 |
|
?>
|