1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
<?php
if ($p_status_news_out != "") { $status_news_out = trim($p_status_news_out); } if ($p_id_delss != "") { $id_delss = trim($p_id_delss); } fieldset_top("ข่าวประชาสัมพันธ์ (ภายนอก)"); $date = date("d"); $month = date("m"); $year = date("Y"); $yearthai = $year + 543; $datenow = $yearthai . $month . $date;
include('coremain/connec_out.php');
// Delete News if ($id_delss != "") { $sql = "delete from cms_news where id='$id_delss' and id_tumbon='$_SESSION[id_tumbon]'"; $result = mysql_query($sql) or die(mysql_error()); }
//if ($x[0] == 1) { // ########################แสดงข่าวประชาสัมพันธ์ภายนอกหน่วยงาน ################### echo"<table width='98%' border='0' cellpadding='0' cellspacing='0' align=center>"; $count_news = 0; $sql = "select id,id_tumbon,LEFT(topic, 90) as topic ,LEFT(fulltexts, 155) as b,pic1,status,state from cms_news WHERE status='1' and date_line>='$datenow' and show_on_off!='1' and (show_on_off='3' OR province='$_SESSION[name_province]') order by orders desc Limit 10";
$result = mysql_query($sql); while ($data = mysql_fetch_array($result)) { // ######################## แสดงหัวข้อข่าว และเนื้อหาข่าว echo"<tr>"; /* echo" <td width='20%' height='100' valign='top'>";
if($data[pic1]!="") { box_picture_firstpage1($data[pic1],"index.php?mod=news_full&id_news=$data[id]&path=news_out&id_tumbon=$data[id_tumbon]"); } else { box_nopicture_firstpage("index.php?mod=news_full&id_news=$data[id]&path=news_out&id_tumbon=$data[id_tumbon]"); } echo"</td>"; */ echo"<td width='3%' valign='top'></td>"; echo"<td width='75%' height='30' valign='top'>"; echo"<img SRC='coremain/images/marker.gif'> "; echo"<a href='index.php?mod=news_full&id_news=$data[id]&path=news_out&&id_tumbon=$data[id_tumbon]'><font color='333333'>$data[topic]</font></a>... "; if ($count_news <= 1) echo"<img SRC='coremain/images/news.gif'>"; // echo"<br> "; //echo strip_tags($data[b]); number_format(box_counter($data[state]), "0"); echo"</td>"; echo"</tr>";
$count_news++; } echo"</table>";
// ####################### ข้อมูลย้อนหลัง if ($count_news >= "3") { echo"<table width='95%' border='0' align=center>"; echo"<tr> "; echo"<td align=center><img src='coremain/images/arrow.gif' border='0'>"; echo " <a href='index.php?mod=news_old&path=news_out'>ข่าวย้อนหลัง</a></td>"; echo "</tr>"; echo "</table>"; } //}
mysql_close($handle_out); include("$_SESSION[web_name]/connect.php"); fieldset_down(); ?>
|