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 . 'n
ews.inc.ph
p' );
|
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 . 'u
tils.inc.p
hp' );
|
26 |
|
|
|
27 |
|
|
27 |
|
//$_page['
name_index
'] = 20;
|
|
28 |
|
$logged['a
dmin']
=
member_aut
h(
1
,
true,
true
);
|
28 |
|
|
|
|
29 |
|
$logged['a
dmin']
=
member_aut
h(
1
);
|
|
|
30 |
|
|
|
29 |
|
|
31 |
|
$_page['cs
s_name'] =
'news.css
';
|
|
30 |
|
$_page['cs
s_name'] =
'news.css
';
|
32 |
|
|
|
31 |
|
|
|
|
32 |
|
$_page['ex
traCodeInH
ead'] = '
|
|
|
33 |
|
<!-- t
inyMCE -->
|
|
|
34 |
|
<scrip
t language
="javascri
pt" type="
text/javas
cript" src
="' . $sit
e['plugins
'] . 'tiny
_mce/tiny_
mce.js"></
script>
|
|
|
35 |
|
<scrip
t language
="javascri
pt" type="
text/javas
cript">
|
|
|
36 |
|
// Not
ice: The s
imple them
e does not
use all o
ptions som
e of them
are limite
d to the a
dvanced th
eme
|
|
|
37 |
|
tinyMC
E.init({
|
|
|
38 |
|
mo
de : "text
areas",
|
|
|
39 |
|
th
eme : "adv
anced",
|
|
|
40 |
|
co
ntent_css
: "' . $si
te['base']
. 'css/ti
ny_mce.css
",
|
|
|
41 |
|
ed
itor_selec
tor : "art
icl",
|
|
|
42 |
|
pl
ugins : "t
able,save,
advhr,advi
mage,advli
nk,emotion
s,iespell,
insertdate
time,previ
ew,zoom,me
dia,search
replace,pr
int,contex
tmenu,past
e,directio
nality,ful
lscreen",
|
|
|
43 |
|
th
eme_advanc
ed_buttons
1_add : "f
ontselect,
fontsizese
lect",
|
|
|
44 |
|
th
eme_advanc
ed_buttons
2_add_befo
re: "cut,c
opy,paste,
pastetext,
pasteword,
separator,
search,rep
lace,separ
ator",
|
|
|
45 |
|
th
eme_advanc
ed_buttons
2_add : "s
eparator,i
nsertdate,
inserttime
,separator
,forecolor
,backcolor
",
|
|
|
46 |
|
th
eme_advanc
ed_buttons
3_add_befo
re : "tabl
econtrols,
separator"
,
|
|
|
47 |
|
th
eme_advanc
ed_buttons
3_add : "e
motions",
|
|
|
48 |
|
th
eme_advanc
ed_toolbar
_location
: "top",
|
|
|
49 |
|
th
eme_advanc
ed_toolbar
_align : "
left",
|
|
|
50 |
|
th
eme_advanc
ed_statusb
ar_locatio
n : "botto
m",
|
|
|
51 |
|
th
eme_advanc
ed_disable
: "link,u
nlink,inse
rtanchor,i
mage,subsc
ript,super
script,hel
p,anchor,s
tyleselect
",
|
|
|
52 |
|
pl
ugi2n_inse
rtdate_dat
eFormat :
"%Y-%m-%d"
,
|
|
|
53 |
|
pl
ugi2n_inse
rtdate_tim
eFormat :
"%H:%M:%S"
,
|
|
|
54 |
|
pa
ste_use_di
alog : fal
se,
|
|
|
55 |
|
th
eme_advanc
ed_resizin
g : false,
|
|
|
56 |
|
th
eme_advanc
ed_resize_
horizontal
: false,
|
|
|
57 |
|
th
eme_advanc
ed_link_ta
rgets : "_
something=
My somthin
g;_somethi
ng2=My som
thing2;_so
mething3=M
y somthing
3;",
|
|
|
58 |
|
pa
ste_auto_c
leanup_on_
paste : tr
ue,
|
|
|
59 |
|
pa
ste_conver
t_headers_
to_strong
: false,
|
|
|
60 |
|
pa
ste_strip_
class_attr
ibutes : "
all",
|
|
|
61 |
|
pa
ste_remove
_spans : f
alse,
|
|
|
62 |
|
pa
ste_remove
_styles :
false
|
|
|
63 |
|
|
|
|
64 |
|
})
;
|
|
|
65 |
|
</scri
pt>
|
|
|
66 |
|
<!-- /
tinyMCE --
>
|
|
|
67 |
|
|
|
|
68 |
|
';
|
|
|
69 |
|
|
33 |
|
function M
emberPrint
News()
|
|
70 |
|
function M
emberPrint
News()
|
34 |
|
{
|
|
71 |
|
{
|
35 |
|
global
$site;
|
|
72 |
|
global
$site;
|
36 |
|
global
$short_da
te_format;
|
|
73 |
|
global
$short_da
te_format;
|
37 |
|
|
|
74 |
|
|
38 |
|
$res =
db_res( "
SELECT `ID
`, DATE_FO
RMAT(`Date
`, '$short
_date_form
at' ) AS '
Date', `He
ader`, `Te
xt` FROM `
News` ORDE
R BY `Date
` DESC" );
|
|
75 |
|
$bNews
Friendly =
getParam(
'permalink
s_news') =
= 'on' ? t
rue : fals
e;
|
|
|
76 |
|
|
|
|
77 |
|
$res =
getNewsLi
st();
|
39 |
|
if ( !
$res )
|
|
78 |
|
if ( !
$res )
|
40 |
|
re
turn;
|
|
79 |
|
re
turn;
|
41 |
|
|
|
80 |
|
|
42 |
|
echo "
<table cel
lspacing=1
cellpaddi
ng=2 class
=small wid
th='100%'>
\n";
|
|
81 |
|
echo "
<table cel
lspacing=1
cellpaddi
ng=2 class
=small wid
th='100%'>
\n";
|
43 |
|
|
|
82 |
|
|
44 |
|
if ( !
mysql_num_
rows($res)
)
|
|
83 |
|
if ( !
mysql_num_
rows($res)
)
|
45 |
|
{
|
|
84 |
|
{
|
46 |
|
ec
ho "<tr cl
ass=panel>
<td align=
center>No
news avail
able.</td>
</tr>\n";
|
|
85 |
|
ec
ho "<tr cl
ass=panel>
<td align=
center>No
news avail
able.</td>
</tr>\n";
|
47 |
|
}
|
|
86 |
|
}
|
48 |
|
|
|
87 |
|
|
49 |
|
while
( $news_ar
r = mysql_
fetch_arra
y($res) )
|
|
88 |
|
while
( $news_ar
r = mysql_
fetch_arra
y($res) )
|
50 |
|
{
|
|
89 |
|
{
|
51 |
|
$n
ews_header
= process
_line_outp
ut( $news_
arr['Heade
r'] );
|
|
90 |
|
$n
ews_header
= process
_line_outp
ut( $news_
arr['Heade
r'] );
|
|
|
91 |
|
$s
NewsUrl =
getNewsUrl
($news_arr
['newsID']
, $news_ar
r['NewsUri
'], $bNews
Friendly);
|
52 |
|
ec
ho "
|
|
92 |
|
ec
ho "
|
53 |
|
<tr >
|
|
93 |
|
<tr >
|
54 |
|
<td
align=cent
er width=1
5%>
|
|
94 |
|
<td
align=cent
er width=1
5%>
|
55 |
|
<a
href=\"new
s.php?edit
_id={$news
_arr['
ID']}\">Ed
it</a>
|
|
|
95 |
|
<a
href=\"new
s.php?edit
_id={$news
_arr['
news
ID']}\">Ed
it</a>
|
|
56 |
|
<a
href=\"new
s.php?acti
on=delete&
delete_id=
{$news_arr
['
ID']}\">De
lete</a>
|
|
96 |
|
<a
href=\"new
s.php?acti
on=delete&
delete_id=
{$news_arr
['
news
ID']}\">De
lete</a>
|
57 |
|
</td
>
|
|
97 |
|
</td
>
|
58 |
|
<td
align=cent
er
width=15%>
{
$news_arr[
'Date']
}
</td>
|
|
98 |
|
<td
align=cent
er
width=15%>
".date(
str_replac
e('%','',$
short_date
_format),
$news_arr[
'Date']
)."
</td>
|
59 |
|
<td
aling=left
> <a
target='_b
lank'
href='{$s
ite['url']
}news_view
.php?ID={$
n
ews
_ar
r
['ID']
}'>{$news_
header}</a
></td>
|
|
99 |
|
<td
aling=left
> <a
target='_b
lank'
href='{$s
N
ews
U
r
l
}'>{$news_
header}</a
></td>
|
60 |
|
</tr>\n"
;
|
|
100 |
|
</tr>\n"
;
|
61 |
|
|
|
101 |
|
|
62 |
|
}
|
|
102 |
|
}
|
63 |
|
echo "
</table>\n
";
|
|
103 |
|
echo "
</table>\n
";
|
64 |
|
|
|
104 |
|
|
65 |
|
}
|
|
105 |
|
}
|
66 |
|
|
|
106 |
|
|
67 |
|
function M
emberDelet
eNews()
|
|
107 |
|
function M
emberDelet
eNews()
|
68 |
|
{
|
|
108 |
|
{
|
69 |
|
$res =
db_res( "
DELETE FRO
M `News` W
HERE `ID`
= ". (int)
$_GET['del
ete_id'] )
;
|
|
109 |
|
$res =
db_res( "
DELETE FRO
M `News` W
HERE `ID`
= ". (int)
$_GET['del
ete_id'] )
;
|
70 |
|
|
|
110 |
|
|
71 |
|
return
$res;
|
|
111 |
|
return
$res;
|
72 |
|
}
|
|
112 |
|
}
|
73 |
|
|
|
113 |
|
|
74 |
|
function M
emberAddNe
ws()
|
|
114 |
|
function M
emberAddNe
ws()
|
75 |
|
{
|
|
115 |
|
{
|
76 |
|
global
$max_l;
|
|
116 |
|
global
$max_l;
|
77 |
|
global
$max_h;
|
|
117 |
|
global
$max_h;
|
78 |
|
|
|
118 |
|
|
79 |
|
$news_
text = str
len( $_POS
T['text']
) > $max_l
? "LEFT (
'". proce
ss_db_inpu
t( $_POST[
'text'] )
."', $max_
l )" : "'"
. process_
db_input(
$_POST['te
xt'] ) ."'
";
|
|
119 |
|
$news_
text = str
len( $_POS
T['text']
) > $max_l
? "LEFT (
'". proce
ss_db_inpu
t( $_POST[
'text'] )
."', $max_
l )" : "'"
. process_
db_input(
$_POST['te
xt'] ) ."'
";
|
80 |
|
$news_
header = s
trlen( $_P
OST['heade
r'] ) > $m
ax_h ? "LE
FT ( '". p
rocess_db_
input( $_P
OST['heade
r'] ) ."',
$max_h )"
: "'". pr
ocess_db_i
nput( $_PO
ST['header
'] ). "'";
|
|
120 |
|
$news_
header = s
trlen( $_P
OST['heade
r'] ) > $m
ax_h ? "LE
FT ( '". p
rocess_db_
input( $_P
OST['heade
r'] ) ."',
$max_h )"
: "'". pr
ocess_db_i
nput( $_PO
ST['header
'] ). "'";
|
81 |
|
$news_
snippet =
"'".proces
s_db_input
( $_POST['
snippet']
)."'";
|
|
121 |
|
$news_
snippet =
"'".proces
s_db_input
( $_POST['
snippet']
)."'";
|
82 |
|
|
|
122 |
|
|
83 |
|
$res
=
db_res(
"INSERT
INTO
`News`
(
`Date`,
`Header`,
`Text`,
`Snippet`
)
VALUES
(
NOW(),
$news_head
er,
$news_text
,
$news_snip
pet
)"
);
|
|
123 |
|
$sNews
Uri = uriG
enerate($n
ews_header
, 'News',
'NewsUri',
50);
|
|
|
124 |
|
|
|
|
125 |
|
$res
=
db_res(
"INSERT
INTO
`News`
(
`Date`,
`Header`,
`Text`,
`Snippet`
,
`NewsUri`
)
VALUES
(
NOW(),
$news_head
er,
$news_text
,
$news_snip
pet
,
'$sNewsUri
'
)"
);
|
84 |
|
|
|
126 |
|
|
85 |
|
return
$res;
|
|
127 |
|
return
$res;
|
86 |
|
}
|
|
128 |
|
}
|
87 |
|
|
|
129 |
|
|
88 |
|
function M
emberEditN
ews()
|
|
130 |
|
function M
emberEditN
ews()
|
89 |
|
{
|
|
131 |
|
{
|
90 |
|
global
$max_l;
|
|
132 |
|
global
$max_l;
|
91 |
|
global
$max_h;
|
|
133 |
|
global
$max_h;
|
92 |
|
|
|
134 |
|
|
93 |
|
$news_
id = (int)
$_POST['ed
it_id'];
|
|
135 |
|
$news_
id = (int)
$_POST['ed
it_id'];
|
94 |
|
$news_
text = str
len( $_POS
T['text']
) > $max_l
? "LEFT (
'". proce
ss_db_inpu
t( $_POST[
'text'] )
."', $max_
l )" : "'"
. process_
db_input(
$_POST['te
xt'] ) ."'
";
|
|
136 |
|
$news_
text = str
len( $_POS
T['text']
) > $max_l
? "LEFT (
'". proce
ss_db_inpu
t( $_POST[
'text'] )
."', $max_
l )" : "'"
. process_
db_input(
$_POST['te
xt'] ) ."'
";
|
95 |
|
$news_
header = s
trlen( $_P
OST['heade
r'] ) > $m
ax_h ? "LE
FT ( '". p
rocess_db_
input( $_P
OST['heade
r'] ) ."',
$max_h )"
: "'". pr
ocess_db_i
nput( $_PO
ST['header
'] ). "'";
|
|
137 |
|
$news_
header = s
trlen( $_P
OST['heade
r'] ) > $m
ax_h ? "LE
FT ( '". p
rocess_db_
input( $_P
OST['heade
r'] ) ."',
$max_h )"
: "'". pr
ocess_db_i
nput( $_PO
ST['header
'] ). "'";
|
96 |
|
$news_
snippet =
"'".proces
s_db_input
( $_POST['
snippet']
)."'";
|
|
138 |
|
$news_
snippet =
"'".proces
s_db_input
( $_POST['
snippet']
)."'";
|
97 |
|
|
|
139 |
|
|
98 |
|
$res =
db_res( "
UPDATE `Ne
ws` SET `D
ate` = NOW
(), `Heade
r` = $news
_header, `
Text` = $n
ews_text,
`Snippet`=
$news_snip
pet WHERE
`ID` = $ne
ws_id" );
|
|
140 |
|
$res =
db_res( "
UPDATE `Ne
ws` SET `D
ate`=NOW()
, `Header`
=$news_hea
der, `Text
`=$news_te
xt, `Snipp
et`=$news_
snippet WH
ERE `ID` =
$news_id"
);
|
99 |
|
|
|
141 |
|
|
100 |
|
return
$res;
|
|
142 |
|
return
$res;
|
101 |
|
}
|
|
143 |
|
}
|
102 |
|
|
|
144 |
|
|
103 |
|
$max_l =
getParam(
"max_news_
text" );
|
|
145 |
|
$max_l =
getParam(
"max_news_
text" );
|
104 |
|
$max_p =
getParam(
"max_news_
preview" )
;
|
|
146 |
|
$max_p =
getParam(
"max_news_
preview" )
;
|
105 |
|
$max_h =
getParam(
"max_news_
header" );
|
|
147 |
|
$max_h =
getParam(
"max_news_
header" );
|
106 |
|
|
|
148 |
|
|
107 |
|
if ( !$max
_l )
|
|
149 |
|
if ( !$max
_l )
|
108 |
|
$max_l
= 4096;
|
|
150 |
|
$max_l
= 4096;
|
109 |
|
if ( !$max
_h )
|
|
151 |
|
if ( !$max
_h )
|
110 |
|
$max_h
= 32;
|
|
152 |
|
$max_h
= 32;
|
111 |
|
|
|
153 |
|
|
112 |
|
$action_re
sult = "";
|
|
154 |
|
$action_re
sult = "";
|
113 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'new' )
|
|
155 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'new' )
|
114 |
|
{
|
|
156 |
|
{
|
115 |
|
if ( M
emberAddNe
ws() )
|
|
157 |
|
if ( M
emberAddNe
ws() )
|
116 |
|
$a
ction_resu
lt .= "New
s was adde
d";
|
|
158 |
|
$a
ction_resu
lt .= "New
s was adde
d";
|
117 |
|
else
|
|
159 |
|
else
|
118 |
|
$a
ction_resu
lt .= "New
s adding f
ailed";
|
|
160 |
|
$a
ction_resu
lt .= "New
s adding f
ailed";
|
119 |
|
}
|
|
161 |
|
}
|
120 |
|
|
|
162 |
|
|
121 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'edit' &&
((int)$_PO
ST['edit_i
d'] != 0)
)
|
|
163 |
|
if ( !$dem
o_mode &&
$_POST['ac
tion'] ==
'edit' &&
((int)$_PO
ST['edit_i
d'] != 0)
)
|
122 |
|
{
|
|
164 |
|
{
|
123 |
|
if ( M
emberEditN
ews() )
|
|
165 |
|
if ( M
emberEditN
ews() )
|
124 |
|
$a
ction_resu
lt .= "New
s was upda
ted";
|
|
166 |
|
$a
ction_resu
lt .= "New
s was upda
ted";
|
125 |
|
else
|
|
167 |
|
else
|
126 |
|
$a
ction_resu
lt .= "New
s updating
failed";
|
|
168 |
|
$a
ction_resu
lt .= "New
s updating
failed";
|
127 |
|
}
|
|
169 |
|
}
|
128 |
|
|
|
170 |
|
|
129 |
|
if ( !$dem
o_mode &&
(int)$_GET
['delete_i
d'] != 0 &
& $_GET['a
ction'] ==
"delete"
)
|
|
171 |
|
if ( !$dem
o_mode &&
(int)$_GET
['delete_i
d'] != 0 &
& $_GET['a
ction'] ==
"delete"
)
|
130 |
|
{
|
|
172 |
|
{
|
131 |
|
if ( M
emberDelet
eNews() )
|
|
173 |
|
if ( M
emberDelet
eNews() )
|
132 |
|
$a
ction_resu
lt .= "New
s was dele
ted";
|
|
174 |
|
$a
ction_resu
lt .= "New
s was dele
ted";
|
133 |
|
else
|
|
175 |
|
else
|
134 |
|
$a
ction_resu
lt .= "New
s deleting
failed";
|
|
176 |
|
$a
ction_resu
lt .= "New
s deleting
failed";
|
135 |
|
}
|
|
177 |
|
}
|
136 |
|
|
|
178 |
|
|
137 |
|
|
|
179 |
|
|
138 |
|
$_page['he
ader'] = "
News";
|
|
180 |
|
$_page['he
ader'] = "
News";
|
139 |
|
$_page['he
ader_text'
] = "News
compose";
|
|
181 |
|
$_page['he
ader_text'
] = "News
compose";
|
140 |
|
|
|
182 |
|
|
141 |
|
TopCodeAdm
in();
|
|
183 |
|
TopCodeAdm
in();
|
142 |
|
ContentBlo
ckHead("Ne
ws");
|
|
184 |
|
ContentBlo
ckHead("Ne
ws");
|
143 |
|
|
|
185 |
|
|
144 |
|
if ( strle
n($action_
result) )
|
|
186 |
|
if ( strle
n($action_
result) )
|
145 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$action_r
esult</div
></center>
<br>\n";
|
|
187 |
|
echo "
<br><cente
r><div cla
ss=\"err\"
>$action_r
esult</div
></center>
<br>\n";
|
146 |
|
|
|
188 |
|
|
147 |
|
MemberPrin
tNews();
|
|
189 |
|
MemberPrin
tNews();
|
148 |
|
|
|
190 |
|
|
149 |
|
if ( (int)
$_GET['edi
t_id'] !=
0 )
|
|
191 |
|
if ( (int)
$_GET['edi
t_id'] !=
0 )
|
150 |
|
{
|
|
192 |
|
{
|
151 |
|
$news_
arr = db_a
rr( "SELEC
T `ID`, DA
TE_FORMAT(
`Date`, '$
short_date
_format' )
AS 'Date'
, `Header`
, `Snippet
`, `Text`
FROM `News
` WHERE `I
D` = ". (i
nt)$_GET['
edit_id']
);
|
|
193 |
|
$news_
arr = db_a
rr( "SELEC
T `ID`, DA
TE_FORMAT(
`Date`, '$
short_date
_format' )
AS 'Date'
, `Header`
, `Snippet
`, `Text`
FROM `News
` WHERE `I
D` = ". (i
nt)$_GET['
edit_id']
);
|
152 |
|
}
|
|
194 |
|
}
|
153 |
|
|
|
195 |
|
|
154 |
|
{
|
|
196 |
|
{
|
155 |
|
|
|
197 |
|
|
156 |
|
ContentBlo
ckFoot();
|
|
198 |
|
ContentBlo
ckFoot();
|
157 |
|
ContentBlo
ckHead("Ne
ws compose
");
|
|
199 |
|
ContentBlo
ckHead("Ne
ws compose
");
|
158 |
|
?>
|
|
200 |
|
?>
|
159 |
|
|
|
201 |
|
|
160 |
|
<form meth
od="post"
action="ne
ws.php">
|
|
202 |
|
<form meth
od="post"
action="ne
ws.php">
|
161 |
|
|
|
203 |
|
|
162 |
|
<table sty
le="border
:1px solid
gray;back
ground-col
or:#EEEEEE
;margin:0p
x auto;">
|
|
204 |
|
<table sty
le="border
:1px solid
gray;back
ground-col
or:#EEEEEE
;margin:0p
x auto;">
|
163 |
|
<tr>
|
|
205 |
|
<tr>
|
164 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Hea
der:</td>
|
|
206 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Hea
der:</td>
|
165 |
|
<t
d style="p
adding:3px
;">
|
|
207 |
|
<t
d style="p
adding:3px
;">
|
166 |
|
<input n
ame="heade
r" style="
width:380p
x;" value=
"<?= htmls
pecialchar
s($news_ar
r['Header'
]) ?>">
|
|
208 |
|
<input n
ame="heade
r" style="
width:380p
x;" value=
"<?= htmls
pecialchar
s($news_ar
r['Header'
]) ?>">
|
167 |
|
</
td>
|
|
209 |
|
</
td>
|
168 |
|
</tr>
|
|
210 |
|
</tr>
|
169 |
|
|
|
211 |
|
|
170 |
|
<tr>
|
|
212 |
|
<tr>
|
171 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Sni
ppet:</td>
|
|
213 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Sni
ppet:</td>
|
172 |
|
<t
d style="p
adding:3px
;">
|
|
214 |
|
<t
d style="p
adding:3px
;">
|
173 |
|
<textarea
name="snip
pet"
rows="3"
style="wid
th:380px;
"><?=
htmlspecia
lchars($ne
ws_arr['Sn
ippet'])
?></textar
ea>
|
|
215 |
|
<textarea
name="snip
pet"
class="art
icl"
rows="3"
style="wid
th:380px;
height:380
px;
"><?=
htmlspecia
lchars($ne
ws_arr['Sn
ippet'])
?></textar
ea>
|
174 |
|
</
td>
|
|
216 |
|
</
td>
|
175 |
|
</tr>
|
|
217 |
|
</tr>
|
176 |
|
|
|
218 |
|
|
177 |
|
<tr >
|
|
219 |
|
<tr >
|
178 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Tex
t:</td>
|
|
220 |
|
<t
d style="t
ext-align:
right;font
-weight:bo
ld;padding
:3px;">Tex
t:</td>
|
179 |
|
<t
d style="p
adding:3px
;">
|
|
221 |
|
<t
d style="p
adding:3px
;">
|
180 |
|
<textarea
name="text
"
rows="10"
style="wid
th:380px;
"><?=
htmlspecia
lchars($ne
ws_arr['Te
xt'])
?></textar
ea>
|
|
222 |
|
<textarea
name="text
"
class="art
icl"
rows="10"
style="wid
th:380px;
height:380
px;
"><?=
htmlspecia
lchars($ne
ws_arr['Te
xt'])
?></textar
ea>
|
181 |
|
</
td>
|
|
223 |
|
</
td>
|
182 |
|
</tr>
|
|
224 |
|
</tr>
|
183 |
|
|
|
225 |
|
|
184 |
|
<tr >
|
|
226 |
|
<tr >
|
185 |
|
<t
d align="c
enter" col
span="2">
|
|
227 |
|
<t
d align="c
enter" col
span="2">
|
186 |
|
<?php
|
|
228 |
|
<?php
|
187 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
|
229 |
|
if ( (
int)$_GET[
'edit_id']
== 0 )
|
188 |
|
{
|
|
230 |
|
{
|
189 |
|
ec
ho '<input
type="hid
den" name=
"action" v
alue="new"
>';
|
|
231 |
|
ec
ho '<input
type="hid
den" name=
"action" v
alue="new"
>';
|
190 |
|
ec
ho '<input
class="no
" type="su
bmit" valu
e="Add new
s">';
|
|
232 |
|
ec
ho '<input
class="no
" type="su
bmit" valu
e="Add new
s">';
|
191 |
|
}
|
|
233 |
|
}
|
192 |
|
else
|
|
234 |
|
else
|
193 |
|
{
|
|
235 |
|
{
|
194 |
|
ec
ho '<input
type="hid
den" name=
"action" v
alue="edit
">';
|
|
236 |
|
ec
ho '<input
type="hid
den" name=
"action" v
alue="edit
">';
|
195 |
|
ec
ho '<input
type="hid
den" name=
"edit_id"
value="'.
( (int)$_G
ET['edit_i
d'] ) .'">
';
|
|
237 |
|
ec
ho '<input
type="hid
den" name=
"edit_id"
value="'.
( (int)$_G
ET['edit_i
d'] ) .'">
';
|
196 |
|
ec
ho '<input
class="no
" type="su
bmit" valu
e="Update
news">';
|
|
238 |
|
ec
ho '<input
class="no
" type="su
bmit" valu
e="Update
news">';
|
197 |
|
}
|
|
239 |
|
}
|
198 |
|
?>
|
|
240 |
|
?>
|
199 |
|
</
td>
|
|
241 |
|
</
td>
|
200 |
|
</tr>
|
|
242 |
|
</tr>
|
201 |
|
</table>
|
|
243 |
|
</table>
|
202 |
|
</form>
|
|
244 |
|
</form>
|
203 |
|
<?
|
|
245 |
|
<?
|
204 |
|
ContentBlo
ckFoot();
|
|
246 |
|
ContentBlo
ckFoot();
|
205 |
|
}
|
|
247 |
|
}
|
206 |
|
BottomCode
();
|
|
248 |
|
BottomCode
();
|
207 |
|
?>
|
|
249 |
|
?>
|