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 |
|
|
|
26 |
|
|
27 |
|
$_page['na
me_index']
= 28;
|
|
27 |
|
$_page['na
me_index']
= 28;
|
28 |
|
|
|
28 |
|
|
29 |
|
$def_new_p
olls = 6;
|
|
29 |
|
$def_new_p
olls = 6;
|
30 |
|
|
|
30 |
|
|
31 |
|
$logged['a
dmin']
=
member_aut
h(
1
);
|
|
31 |
|
$logged['a
dmin']
=
member_aut
h(
1
,
true,
true
);
|
32 |
|
|
|
32 |
|
|
33 |
|
function M
emberPrint
Polls()
|
|
33 |
|
function M
emberPrint
Polls()
|
34 |
|
{
|
|
34 |
|
{
|
35 |
|
global
$site;
|
|
35 |
|
global
$site;
|
36 |
|
|
|
36 |
|
|
37 |
|
$res =
db_res( "
SELECT `ID
`, `Questi
on`, `Acti
ve` FROM `
polls_q` O
RDER BY `A
ctive`, `Q
uestion` D
ESC" );
|
|
37 |
|
$res =
db_res( "
SELECT `ID
`, `Questi
on`, `Acti
ve` FROM `
polls_q` O
RDER BY `A
ctive`, `Q
uestion` D
ESC" );
|
38 |
|
|
|
38 |
|
|
39 |
|
if ( !
$res )
|
|
39 |
|
if ( !
$res )
|
40 |
|
re
turn;
|
|
40 |
|
re
turn;
|
41 |
|
|
|
41 |
|
|
42 |
|
echo "
<table cel
lspacing=1
cellpaddi
ng=2 class
=small wid
th='100%'>
\n";
|
|
42 |
|
echo "
<table cel
lspacing=1
cellpaddi
ng=2 class
=small wid
th='100%'>
\n";
|
43 |
|
|
|
43 |
|
|
44 |
|
if ( !
mysql_num_
rows($res)
)
|
|
44 |
|
if ( !
mysql_num_
rows($res)
)
|
45 |
|
{
|
|
45 |
|
{
|
46 |
|
ec
ho "<tr cl
ass=panel>
<td align=
center>No
polls avai
lable.</td
></tr>\n";
|
|
46 |
|
ec
ho "<tr cl
ass=panel>
<td align=
center>No
polls avai
lable.</td
></tr>\n";
|
47 |
|
}
|
|
47 |
|
}
|
48 |
|
|
|
48 |
|
|
49 |
|
while
( $poll_ar
r = mysql_
fetch_arra
y($res) )
|
|
49 |
|
while
( $poll_ar
r = mysql_
fetch_arra
y($res) )
|
50 |
|
{
|
|
50 |
|
{
|
51 |
|
if
( $poll_a
rr['Active
'] == 'on'
)
|
|
51 |
|
if
( $poll_a
rr['Active
'] == 'on'
)
|
52 |
|
$active
= "<td wid
th=15 bgco
lor=green>
</td
>";
|
|
52 |
|
$active
= "<td wid
th=15 bgco
lor=green>
</td
>";
|
53 |
|
el
se
|
|
53 |
|
el
se
|
54 |
|
$active
= "<td wid
th=15 bgco
lor=red>&n
bsp;</td>"
;
|
|
54 |
|
$active
= "<td wid
th=15 bgco
lor=red>&n
bsp;</td>"
;
|
55 |
|
$p
oll_questi
on = proce
ss_line_ou
tput( $pol
l_arr['Que
stion'] );
|
|
55 |
|
$p
oll_questi
on = proce
ss_line_ou
tput( $pol
l_arr['Que
stion'] );
|
56 |
|
|
|
56 |
|
|
57 |
|
ec
ho "
|
|
57 |
|
ec
ho "
|
58 |
|
<tr clas
s=panel>
|
|
58 |
|
<tr clas
s=panel>
|
59 |
|
$act
ive
|
|
59 |
|
$act
ive
|
60 |
|
<td
align=cent
er width=1
5%>
|
|
60 |
|
<td
align=cent
er width=1
5%>
|
61 |
|
<a href=\"
polls.php?
edit_id={$
poll_arr['
ID']}\">Ed
it</a> |
|
|
61 |
|
<a href=\"
polls.php?
edit_id={$
poll_arr['
ID']}\">Ed
it</a> |
|
62 |
|
<a href=\"
polls.php?
action=del
ete&delete
_id={$poll
_arr['ID']
}\">Delete
</a>
|
|
62 |
|
<a href=\"
polls.php?
action=del
ete&delete
_id={$poll
_arr['ID']
}\">Delete
</a>
|
63 |
|
</td
>
|
|
63 |
|
</td
>
|
64 |
|
<td
aling=left
> <a
target='_b
lank' href
='{$site['
url']}poll
.php?ID={$
poll_arr['
ID']}'>{$p
oll_questi
on}</a></t
d>
|
|
64 |
|
<td
aling=left
> <a
target='_b
lank' href
='{$site['
url']}poll
.php?ID={$
poll_arr['
ID']}'>{$p
oll_questi
on}</a></t
d>
|
65 |
|
</tr>\n"
;
|
|
65 |
|
</tr>\n"
;
|
66 |
|
|
|
66 |
|
|
67 |
|
}
|
|
67 |
|
}
|
68 |
|
echo "
</table>\n
";
|
|
68 |
|
echo "
</table>\n
";
|
69 |
|
}
|
|
69 |
|
}
|
70 |
|
|
|
70 |
|
|
71 |
|
|
|
71 |
|
|
72 |
|
function M
emberDelet
ePoll()
|
|
72 |
|
function M
emberDelet
ePoll()
|
73 |
|
{
|
|
73 |
|
{
|
74 |
|
$res =
db_res( "
DELETE FRO
M `polls_q
` WHERE ID
= ". (int
)$_GET['de
lete_id']
);
|
|
74 |
|
$res =
db_res( "
DELETE FRO
M `polls_q
` WHERE ID
= ". (int
)$_GET['de
lete_id']
);
|
75 |
|
if ( $
res )
|
|
75 |
|
if ( $
res )
|
76 |
|
$r
es = db_re
s( "DELETE
FROM `pol
ls_a` WHER
E ID = ".
(int)$_GET
['delete_i
d'] );
|
|
76 |
|
$r
es = db_re
s( "DELETE
FROM `pol
ls_a` WHER
E ID = ".
(int)$_GET
['delete_i
d'] );
|
77 |
|
|
|
77 |
|
|
78 |
|
return
$res;
|
|
78 |
|
return
$res;
|
79 |
|
}
|
|
79 |
|
}
|
80 |
|
|
|
80 |
|
|
81 |
|
function M
emberAddPo
ll()
|
|
81 |
|
function M
emberAddPo
ll()
|
82 |
|
{
|
|
82 |
|
{
|
83 |
|
global
$def_new_
polls;
|
|
83 |
|
global
$def_new_
polls;
|
84 |
|
global
$MySQL;
|
|
84 |
|
global
$MySQL;
|
85 |
|
|
|
85 |
|
|
86 |
|
$poll_
question =
process_d
b_input( $
_POST['Que
stion'] );
|
|
86 |
|
$poll_
question =
process_d
b_input( $
_POST['Que
stion'] );
|
87 |
|
|
|
87 |
|
|
88 |
|
$res =
db_res( "
INSERT INT
O `polls_q
` SET `Que
stion` = '
$poll_ques
tion'" );
|
|
88 |
|
$res =
db_res( "
INSERT INT
O `polls_q
` SET `Que
stion` = '
$poll_ques
tion'" );
|
89 |
|
$poll_
id = mysql
_insert_id
( $MySQL->
link );
|
|
89 |
|
$poll_
id = mysql
_insert_id
( $MySQL->
link );
|
90 |
|
|
|
90 |
|
|
91 |
|
if ( $
res )
|
|
91 |
|
if ( $
res )
|
92 |
|
{
|
|
92 |
|
{
|
93 |
|
fo
r ( $i=0 ;
$i < $def
_new_polls
; ++$i )
|
|
93 |
|
fo
r ( $i=0 ;
$i < $def
_new_polls
; ++$i )
|
94 |
|
{
|
|
94 |
|
{
|
95 |
|
$poll_an
swer = pro
cess_db_in
put( trim(
$_POST["An
swer{$i}"]
) );
|
|
95 |
|
$poll_an
swer = pro
cess_db_in
put( trim(
$_POST["An
swer{$i}"]
) );
|
96 |
|
if ( str
len($poll_
answer) ==
0 )
|
|
96 |
|
if ( str
len($poll_
answer) ==
0 )
|
97 |
|
cont
inue;
|
|
97 |
|
cont
inue;
|
98 |
|
$res = d
b_res( "IN
SERT INTO
`polls_a`
(`ID`, `An
swer`) VAL
UES ($poll
_id, '$pol
l_answer')
" );
|
|
98 |
|
$res = d
b_res( "IN
SERT INTO
`polls_a`
(`ID`, `An
swer`) VAL
UES ($poll
_id, '$pol
l_answer')
" );
|
99 |
|
}
|
|
99 |
|
}
|
100 |
|
}
|
|
100 |
|
}
|
101 |
|
|
|
101 |
|
|
102 |
|
return
$res;
|
|
102 |
|
return
$res;
|
103 |
|
}
|
|
103 |
|
}
|
104 |
|
|
|
104 |
|
|
105 |
|
function M
emberEditP
oll()
|
|
105 |
|
function M
emberEditP
oll()
|
106 |
|
{
|
|
106 |
|
{
|
107 |
|
$poll_
id = (int)
$_POST['ed
it_id'];
|
|
107 |
|
$poll_
id = (int)
$_POST['ed
it_id'];
|
108 |
|
$poll_
question =
process_d
b_input( $
_POST['Que
stion'] );
|
|
108 |
|
$poll_
question =
process_d
b_input( $
_POST['Que
stion'] );
|
109 |
|
$poll_
active = (
$_POST['Ac
tive'] ? "
on" : "" )
;
|
|
109 |
|
$poll_
active = (
$_POST['Ac
tive'] ? "
on" : "" )
;
|
110 |
|
|
|
110 |
|
|
111 |
|
$res =
db_res( "
UPDATE `po
lls_q` SET
`Question
` = '$poll
_question'
, `Active`
= '$poll_
active' WH
ERE ID = $
poll_id" )
;
|
|
111 |
|
$res =
db_res( "
UPDATE `po
lls_q` SET
`Question
` = '$poll
_question'
, `Active`
= '$poll_
active' WH
ERE ID = $
poll_id" )
;
|
112 |
|
|
|
112 |
|
|
113 |
|
$res =
db_res( "
SELECT `ID
answer` FR
OM `polls_
a` WHERE `
ID` = $pol
l_id" );
|
|
113 |
|
$res =
db_res( "
SELECT `ID
answer` FR
OM `polls_
a` WHERE `
ID` = $pol
l_id" );
|
114 |
|
while
( $answ_ar
r = mysql_
fetch_arra
y($res) )
|
|
114 |
|
while
( $answ_ar
r = mysql_
fetch_arra
y($res) )
|
115 |
|
{
|
|
115 |
|
{
|
116 |
|
$p
oll_answer
= process
_db_input(
trim($_PO
ST[$answ_a
rr['IDansw
er']]) );
|
|
116 |
|
$p
oll_answer
= process
_db_input(
trim($_PO
ST[$answ_a
rr['IDansw
er']]) );
|
117 |
|
if
( strlen(
$poll_answ
er) > 0 )
|
|
117 |
|
if
( strlen(
$poll_answ
er) > 0 )
|
118 |
|
db_res(
"UPDATE `p
olls_a` SE
T `Answer`
= '$poll_
answer' WH
ERE `IDans
wer` = {$a
nsw_arr['I
Danswer']}
" );
|
|
118 |
|
db_res(
"UPDATE `p
olls_a` SE
T `Answer`
= '$poll_
answer' WH
ERE `IDans
wer` = {$a
nsw_arr['I
Danswer']}
" );
|
119 |
|
el
se
|
|
119 |
|
el
se
|
120 |
|
db_res(
"DELETE FR
OM `polls_
a` WHERE `
IDanswer`
= {$answ_a
rr['IDansw
er']} " );
|
|
120 |
|
db_res(
"DELETE FR
OM `polls_
a` WHERE `
IDanswer`
= {$answ_a
rr['IDansw
er']} " );
|
121 |
|
}
|
|
121 |
|
}
|
122 |
|
|
|
122 |
|
|
123 |
|
$poll_
answer = p
rocess_db_
input( tri
m($_POST['
NewAnswer'
]) );
|
|
123 |
|
$poll_
answer = p
rocess_db_
input( tri
m($_POST['
NewAnswer'
]) );
|
124 |
|
if ( s
trlen($pol
l_answer)
> 0 )
|
|
124 |
|
if ( s
trlen($pol
l_answer)
> 0 )
|
125 |
|
{
|
|
125 |
|
{
|
126 |
|
$r
es = db_re
s( "INSERT
INTO `pol
ls_a` (`ID
`, `Answer
`) VALUES
($poll_id,
'$poll_an
swer')" );
|
|
126 |
|
$r
es = db_re
s( "INSERT
INTO `pol
ls_a` (`ID
`, `Answer
`) VALUES
($poll_id,
'$poll_an
swer')" );
|
127 |
|
}
|
|
127 |
|
}
|
128 |
|
|
|
128 |
|
|
129 |
|
return
$res;
|
|
129 |
|
return
$res;
|
130 |
|
}
|
|
130 |
|
}
|
131 |
|
|
|
131 |
|
|
132 |
|
$action_re
sult = "";
|
|
132 |
|
$action_re
sult = "";
|
133 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'new' && s
trlen($_PO
ST['Questi
on']) )
|
|
133 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'new' && s
trlen($_PO
ST['Questi
on']) )
|
134 |
|
{
|
|
134 |
|
{
|
135 |
|
if ( M
emberAddPo
ll() )
|
|
135 |
|
if ( M
emberAddPo
ll() )
|
136 |
|
$a
ction_resu
lt .= "Pol
l was adde
d";
|
|
136 |
|
$a
ction_resu
lt .= "Pol
l was adde
d";
|
137 |
|
else
|
|
137 |
|
else
|
138 |
|
$a
ction_resu
lt .= "Pol
l adding f
ailed";
|
|
138 |
|
$a
ction_resu
lt .= "Pol
l adding f
ailed";
|
139 |
|
}
|
|
139 |
|
}
|
140 |
|
|
|
140 |
|
|
141 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'edit' &&
((int)$_PO
ST['edit_i
d'] != 0)
&& strlen(
$_POST['Qu
estion'])
)
|
|
141 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'edit' &&
((int)$_PO
ST['edit_i
d'] != 0)
&& strlen(
$_POST['Qu
estion'])
)
|
142 |
|
{
|
|
142 |
|
{
|
143 |
|
if ( M
emberEditP
oll() )
|
|
143 |
|
if ( M
emberEditP
oll() )
|
144 |
|
$a
ction_resu
lt .= ( "P
oll was up
dated" );
|
|
144 |
|
$a
ction_resu
lt .= ( "P
oll was up
dated" );
|
145 |
|
else
|
|
145 |
|
else
|
146 |
|
$a
ction_resu
lt .= ( "P
oll updati
ng failed"
);
|
|
146 |
|
$a
ction_resu
lt .= ( "P
oll updati
ng failed"
);
|
147 |
|
}
|
|
147 |
|
}
|
148 |
|
|
|
148 |
|
|
149 |
|
if ( !$dem
o_mode &&
(int)$_GET
['delete_i
d'] != 0 &
& $_GET['a
ction'] ==
"delete"
)
|
|
149 |
|
if ( !$dem
o_mode &&
(int)$_GET
['delete_i
d'] != 0 &
& $_GET['a
ction'] ==
"delete"
)
|
150 |
|
{
|
|
150 |
|
{
|
151 |
|
if ( M
emberDelet
ePoll() )
|
|
151 |
|
if ( M
emberDelet
ePoll() )
|
152 |
|
$a
ction_resu
lt .= ( "P
oll was de
leted" );
|
|
152 |
|
$a
ction_resu
lt .= ( "P
oll was de
leted" );
|
153 |
|
else
|
|
153 |
|
else
|
154 |
|
$a
ction_resu
lt .= ( "P
oll deleti
ng failed"
);
|
|
154 |
|
$a
ction_resu
lt .= ( "P
oll deleti
ng failed"
);
|
155 |
|
}
|
|
155 |
|
}
|
156 |
|
|
|
156 |
|
|
157 |
|
$_page['he
ader'] = (
"Polls ad
ministrati
on" );
|
|
157 |
|
$_page['he
ader'] = (
"Polls ad
ministrati
on" );
|
158 |
|
$_page['he
ader_text'
] = ( "" )
;
|
|
158 |
|
$_page['he
ader_text'
] = ( "" )
;
|
159 |
|
|
|
159 |
|
|
160 |
|
TopCodeAdm
in();
|
|
160 |
|
TopCodeAdm
in();
|
161 |
|
ContentBlo
ckHead("Po
lls admini
stration")
;
|
|
161 |
|
ContentBlo
ckHead("Po
lls admini
stration")
;
|
162 |
|
|
|
162 |
|
|
163 |
|
if ( strle
n($action_
result) )
|
|
163 |
|
if ( strle
n($action_
result) )
|
164 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$action_r
esult</div
></center>
<br>\n";
|
|
164 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$action_r
esult</div
></center>
<br>\n";
|
165 |
|
|
|
165 |
|
|
166 |
|
MemberPrin
tPolls();
|
|
166 |
|
MemberPrin
tPolls();
|
167 |
|
|
|
167 |
|
|
168 |
|
$m_per_row
= 1;
|
|
168 |
|
$m_per_row
= 1;
|
169 |
|
if ( (int)
$_GET['edi
t_id'] !=
0 )
|
|
169 |
|
if ( (int)
$_GET['edi
t_id'] !=
0 )
|
170 |
|
{
|
|
170 |
|
{
|
171 |
|
$poll_
arr = db_a
rr( "SELEC
T * FROM `
polls_q` W
HERE `ID`
= ". (int)
$_GET['edi
t_id'] );
|
|
171 |
|
$poll_
arr = db_a
rr( "SELEC
T * FROM `
polls_q` W
HERE `ID`
= ". (int)
$_GET['edi
t_id'] );
|
172 |
|
$res_a
nswers = d
b_res( "SE
LECT `IDan
swer`, `ID
`, `Answer
`, `Votes`
FROM `pol
ls_a` WHER
E `ID` = "
. (int)$_G
ET['edit_i
d'] ." ORD
ER BY `IDa
nswer` ASC
" );
|
|
172 |
|
$res_a
nswers = d
b_res( "SE
LECT `IDan
swer`, `ID
`, `Answer
`, `Votes`
FROM `pol
ls_a` WHER
E `ID` = "
. (int)$_G
ET['edit_i
d'] ." ORD
ER BY `IDa
nswer` ASC
" );
|
173 |
|
}
|
|
173 |
|
}
|
174 |
|
|
|
174 |
|
|
175 |
|
ContentBlo
ckFoot();
|
|
175 |
|
ContentBlo
ckFoot();
|
176 |
|
ContentBlo
ckHead("Po
lls");
|
|
176 |
|
ContentBlo
ckHead("Po
lls");
|
177 |
|
?>
|
|
177 |
|
?>
|
178 |
|
|
|
178 |
|
|
179 |
|
<form meth
od=post ac
tion="poll
s.php">
|
|
179 |
|
<form meth
od=post ac
tion="poll
s.php">
|
180 |
|
|
|
180 |
|
|
181 |
|
<table bor
der=0 cell
spacing=1
cellpaddin
g=0 width=
100% class
="text">
|
|
181 |
|
<table bor
der=0 cell
spacing=1
cellpaddin
g=0 width=
100% class
="text">
|
182 |
|
<tr>
|
|
182 |
|
<tr>
|
183 |
|
<t
d colspan=
<? echo $m
_per_row;
?>>
|
|
183 |
|
<t
d colspan=
<? echo $m
_per_row;
?>>
|
184 |
|
<table c
ellspacing
=0 class=t
ext width=
100%>
|
|
184 |
|
<table c
ellspacing
=0 class=t
ext width=
100%>
|
185 |
|
<td
class=pane
l><img src
="<? echo
$site['ico
ns']; ?>ar
tic_papr.g
if"></td>
|
|
185 |
|
<td
class=pane
l><img src
="<? echo
$site['ico
ns']; ?>ar
tic_papr.g
if"></td>
|
186 |
|
<td
class=pane
l> Qu
estion&nbs
p;</td>
|
|
186 |
|
<td
class=pane
l> Qu
estion&nbs
p;</td>
|
187 |
|
<td
width=100%
class=pan
el><input
class=no n
ame=Questi
on size=55
value="<?
= htmlspec
ialchars($
poll_arr['
Question']
) ?>"></td
>
|
|
187 |
|
<td
width=100%
class=pan
el><input
class=no n
ame=Questi
on size=55
value="<?
= htmlspec
ialchars($
poll_arr['
Question']
) ?>"></td
>
|
188 |
|
</table>
|
|
188 |
|
</table>
|
189 |
|
</
td>
|
|
189 |
|
</
td>
|
190 |
|
</tr>
|
|
190 |
|
</tr>
|
191 |
|
|
|
191 |
|
|
192 |
|
<tr cl
ass=panel>
|
|
192 |
|
<tr cl
ass=panel>
|
193 |
|
<t
d colspan=
<? echo $m
_per_row;
?>><br>
|
|
193 |
|
<t
d colspan=
<? echo $m
_per_row;
?>><br>
|
194 |
|
<table c
ellspacing
=0 cellpad
ding=2 cla
ss=small>
|
|
194 |
|
<table c
ellspacing
=0 cellpad
ding=2 cla
ss=small>
|
195 |
|
<?php
|
|
195 |
|
<?php
|
196 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
|
196 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
197 |
|
{
|
|
197 |
|
{
|
198 |
|
fo
r ( $i=0 ;
$i < $def
_new_polls
; ++$i )
|
|
198 |
|
fo
r ( $i=0 ;
$i < $def
_new_polls
; ++$i )
|
199 |
|
{
|
|
199 |
|
{
|
200 |
|
echo "
|
|
200 |
|
echo "
|
201 |
|
<tr>
|
|
201 |
|
<tr>
|
202 |
|
<td>Answer
". ($i +
1) ." : &n
bsp;</td>
|
|
202 |
|
<td>Answer
". ($i +
1) ." : &n
bsp;</td>
|
203 |
|
<td><input
class=no
name=Answe
r$i size=6
5></td>
|
|
203 |
|
<td><input
class=no
name=Answe
r$i size=6
5></td>
|
204 |
|
</tr
>
|
|
204 |
|
</tr
>
|
205 |
|
";
|
|
205 |
|
";
|
206 |
|
}
|
|
206 |
|
}
|
207 |
|
}
|
|
207 |
|
}
|
208 |
|
else
|
|
208 |
|
else
|
209 |
|
{
|
|
209 |
|
{
|
210 |
|
$i
= 0;
|
|
210 |
|
$i
= 0;
|
211 |
|
wh
ile ( $arr
_answers =
mysql_fet
ch_array($
res_answer
s) )
|
|
211 |
|
wh
ile ( $arr
_answers =
mysql_fet
ch_array($
res_answer
s) )
|
212 |
|
{
|
|
212 |
|
{
|
213 |
|
echo "
|
|
213 |
|
echo "
|
214 |
|
<tr>
|
|
214 |
|
<tr>
|
215 |
|
<td>Answer
". ($i +
1) ." : &n
bsp;</td>
|
|
215 |
|
<td>Answer
". ($i +
1) ." : &n
bsp;</td>
|
216 |
|
<td><input
class=no
name=\"{$a
rr_answers
['IDanswer
']}\" valu
e=\"". htm
lspecialch
ars($arr_a
nswers['An
swer']) ."
\" size=65
></td>
|
|
216 |
|
<td><input
class=no
name=\"{$a
rr_answers
['IDanswer
']}\" valu
e=\"". htm
lspecialch
ars($arr_a
nswers['An
swer']) ."
\" size=65
></td>
|
217 |
|
</tr
>
|
|
217 |
|
</tr
>
|
218 |
|
";
|
|
218 |
|
";
|
219 |
|
++$i;
|
|
219 |
|
++$i;
|
220 |
|
}
|
|
220 |
|
}
|
221 |
|
ec
ho "
|
|
221 |
|
ec
ho "
|
222 |
|
<tr>
|
|
222 |
|
<tr>
|
223 |
|
<td>New An
swer : &nb
sp;</td>
|
|
223 |
|
<td>New An
swer : &nb
sp;</td>
|
224 |
|
<td><input
class=no
name=NewAn
swer size=
65></td>
|
|
224 |
|
<td><input
class=no
name=NewAn
swer size=
65></td>
|
225 |
|
</tr
>
|
|
225 |
|
</tr
>
|
226 |
|
";
|
|
226 |
|
";
|
227 |
|
}
|
|
227 |
|
}
|
228 |
|
?>
|
|
228 |
|
?>
|
229 |
|
</table>
|
|
229 |
|
</table>
|
230 |
|
<br>
|
|
230 |
|
<br>
|
231 |
|
</
td>
|
|
231 |
|
</
td>
|
232 |
|
</tr>
|
|
232 |
|
</tr>
|
233 |
|
<tr cl
ass=panel>
|
|
233 |
|
<tr cl
ass=panel>
|
234 |
|
<t
d align=ce
nter>
|
|
234 |
|
<t
d align=ce
nter>
|
235 |
|
<?php
|
|
235 |
|
<?php
|
236 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
|
236 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
237 |
|
{
|
|
237 |
|
{
|
238 |
|
ec
ho "<input
type=hidd
en name=ac
tion value
=new>\n";
|
|
238 |
|
ec
ho "<input
type=hidd
en name=ac
tion value
=new>\n";
|
239 |
|
ec
ho "<input
class=no
type=submi
t value=\"
Add poll\"
></td>\n";
|
|
239 |
|
ec
ho "<input
class=no
type=submi
t value=\"
Add poll\"
></td>\n";
|
240 |
|
}
|
|
240 |
|
}
|
241 |
|
else
|
|
241 |
|
else
|
242 |
|
{
|
|
242 |
|
{
|
243 |
|
$c
hecked = (
$poll_arr[
'Active']
== 'on' ?
'checked'
: '');
|
|
243 |
|
$c
hecked = (
$poll_arr[
'Active']
== 'on' ?
'checked'
: '');
|
244 |
|
ec
ho "Active
Poll <inp
ut type=ch
eckbox nam
e=Active $
checked> &
nbsp; &nbs
p;
\n";
|
|
244 |
|
ec
ho "Active
Poll <inp
ut type=ch
eckbox nam
e=Active $
checked> &
nbsp; &nbs
p;
\n";
|
245 |
|
ec
ho "<input
type=hidd
en name=ed
it_id valu
e=". ( (in
t)$_GET['e
dit_id'] )
.">\n";
|
|
245 |
|
ec
ho "<input
type=hidd
en name=ed
it_id valu
e=". ( (in
t)$_GET['e
dit_id'] )
.">\n";
|
246 |
|
ec
ho "<input
type=hidd
en name=ac
tion value
=edit>\n";
|
|
246 |
|
ec
ho "<input
type=hidd
en name=ac
tion value
=edit>\n";
|
247 |
|
ec
ho "<input
class=no
type=submi
t value=\"
Update pol
l\"></td>\
n";
|
|
247 |
|
ec
ho "<input
class=no
type=submi
t value=\"
Update pol
l\"></td>\
n";
|
248 |
|
}
|
|
248 |
|
}
|
249 |
|
?>
|
|
249 |
|
?>
|
250 |
|
</
td>
|
|
250 |
|
</
td>
|
251 |
|
</tr>
|
|
251 |
|
</tr>
|
252 |
|
</table>
|
|
252 |
|
</table>
|
253 |
|
</form>
|
|
253 |
|
</form>
|
254 |
|
<?
|
|
254 |
|
<?
|
255 |
|
|
|
255 |
|
|
256 |
|
ContentBlo
ckFoot();
|
|
256 |
|
ContentBlo
ckFoot();
|
257 |
|
BottomCode
();
|
|
257 |
|
BottomCode
();
|
258 |
|
?>
|
|
258 |
|
?>
|