001.
<?
002.
include
(
"connect.php"
);
003.
if
(
$_SESSION
[username_type] !=
"a"
)
004.
{
005.
session_destroy();
006.
header(
"location:index.php"
);
007.
}
008.
009.
if
(
$_GET
[ac] ==
"del"
&&
$_GET
[id] !=
""
)
010.
{
011.
012.
$del_order
=
"delete from tbl_news where id = '"
.
$_GET
[id].
"' "
;
013.
sendquery(
$del_order
);
014.
015.
}
016.
017.
?>
018.
019.
020.
<html>
021.
<head>
022.
<title>ͧ¤ì¡ÒúÃÔËÒÃÊèǹµÓºÅ»Ò¡¹¤Ã</title>
023.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=windows-874"
>
024.
<link rel=
"stylesheet"
type=
"text/css"
href=
"style.css"
/>
025.
<link href=
"style.css"
rel=
"stylesheet"
type=
"text/css"
>
026.
<link href=
"text.css"
rel=
"stylesheet"
type=
"text/css"
>
027.
<link href=
"text1.css"
rel=
"stylesheet"
type=
"text/css"
>
028.
</head>
029.
030.
<body bgcolor=
"#A8CF30"
leftmargin=
"0"
topmargin=
"0"
marginwidth=
"0"
marginheight=
"0"
>
031.
<table width=
"855"
border=
"2"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
bordercolor=
"#990033"
>
032.
<tr>
033.
<td><table width=
"855"
border=
"0"
align=
"center"
cellpadding=
"0"
cellspacing=
"0"
>
034.
<tr>
035.
<td colspan=
"2"
><img src=
"../imgs/iconadmin-2.gif"
width=
"855"
height=
"109"
></td>
036.
</tr>
037.
<tr>
038.
039.
<td width=
"855"
valign=
"top"
class
=
"unnamed1"
> <br>
040.
<b>¢èÒÇ»ÃЪÒÊÑÁ¾Ñ¹¸ì</b> [ <a href=
"member_news_add.php"
>à¾ÔèÁ¢èÒÇ»ÃЪÒÊÑÁ¾Ñ¹¸ì</a> ] [<a href=
"member_list.php"
>¡ÅѺÊÙè˹éÒ Admin</a>
041.
] <br>
042.
<b><br>
043.
<table width=
"855"
border=
"1"
cellpadding=
"1"
cellspacing=
"1"
class
=
"unnamed1"
>
044.
<tr>
045.
<td width=
"6%"
>ÅӴѺ·Õè</td>
046.
<td width=
"15%"
>ª×èÍ</td>
047.
<td width=
"38%"
>àÃ×èͧ</td>
048.
<td width=
"14%"
>Çѹ·Õè</td>
049.
<td width=
"17%"
>àÍ¡ÊÒÃ</td>
050.
<td width=
"17%"
>á¡éä¢</td>
051.
</tr>
052.
053.
<?
054.
if
(!isset(
$start
)){
055.
$start
= 0;
056.
}
057.
$limit
=
'7'
;
058.
$no
= 1;
059.
060.
$sql
=
"select * from tbl_news order by id ASC LIMIT $start,$limit"
;
061.
062.
$exec
= sendquery(
$sql
);
063.
064.
printf(
"<B><CENTER><FONT SIZE='5' COLOR='#FF0000'>ÁÕ¢èÒÇ·Ñé§ËÁ´ %d ¢èÒÇ </CENTER></FONT></B>"
,
$exec
);
065.
while
(
$show
= mysql_fetch_array(
$exec
))
066.
{
067.
if
(
$no
%2 ==
"0"
)
echo
"<tr>"
;
068.
else
echo
"<tr bgcolor='#FF9900'>"
;
069.
?>
070.
<td><?=
$no
?></td>
071.
<td><?=
$show
[number]?></td>
072.
<td><a href=
"member_news_detail.php?id=<?=$show[id]?>"
target=
"_blank"
><?=
$show
[name]?></a></td>
073.
<td><?=
$show
[post]?></td>
074.
<td><A href=
"file/<?=$show[filename]?>"
target=
"_blank"
>File Upload</a></td>
075.
<td width=
"10%"
><a href=
"member_news_edit.php?id=<?=$show[id]?>"
>Edit</a>
076.
| <a href=
"javascript:confirm_del(<?=$show[id]?>)"
>Del</a>
077.
</tr>
078.
<?
079.
$no
++;
080.
081.
}
082.
083.
$page
=
ceil
(
$exec
/
$limit
);
084.
085.
086.
for
(
$i
=1;
$i
<=
$page
;
$i
++){
087.
if
(
$_GET
[
'page'
]==
$i
){
088.
echo
"[<a href='?start="
.
$limit
*(
$i
-1).
"&page=$i'><B>$i</B></A>]"
;
089.
}
else
{
090.
echo
"[<a href='?start="
.
$limit
*(
$i
-1).
"&page=$i'>$i</A>]"
;
091.
}
092.
}
093.
?>
094.
095.
</table>
096.
097.
</td>
098.
</tr>
099.
<tr>
100.
<td>
101.
102.
103.
</td>
104.
<td> </td>
105.
</tr>
106.
</table></td>
107.
</tr><tr>
108.
<td>
109.
110.
<?
111.
include
(
"foot.php"
);
112.
?>
113.
</td>
114.
115.
</tr>
116.
</table>
117.
<script language=
"Javascript"
>
118.
function
confirm_del( id )
119.
{
120.
if
(confirm(
'Â×¹Âѹ¡ÒÃź¢éÍÁÙÅ'
)==true)
121.
{
122.
window.location=
"member_news.php?ac=del&id="
+id;
123.
}
124.
125.
}
126.
</script>
127.
</body>
128.
</html>