/home/banprang/domains/plai.go.th/public_html/coremain/module/news_page/news_page1.php


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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
$navig
['new_page'] = $data_name_menu_sub['name'];
navigator($navig);
echo 
"<br>";
bar_header("$data_name_menu_sub[name]"); // Bar_Header
fieldset_top($data_name_menu_sub['name']);
if (
$_SESSION['admin_web'] == "admin" || id_sub_permission($id_sub) == 1) {
  
button_edit("index.php?mod=news_page_update&path=news_page"); // Edit_Data
}
// Update State
if ($id_news != "") {
  
$sql_up "select max(state+1) from cms_news_page WHERE id_sub='$_SESSION[id_sub]' and id_type='$_SESSION[id_type]'";
  
$result_up mysql_query($sql_up);
  
$data_up mysql_fetch_array($result_up);
  
$sqlw "UPDATE cms_news_page SET state='$data_up[0]' WHERE id_sub='$_SESSION[id_sub]' and id_type='$_SESSION[id_type]'";
  
$resultw mysql_query($sqlw);
}
?>

<table width='100%' border='0' cellspacing='1'  align='center' cellpadding='0'>
  <tr>
    <td height='100' valign='top'>
      <div align='center'>
      <?php
        $sql 
"select * from cms_news_page  WHERE id_sub='$_SESSION[id_sub]' and id_type='$_SESSION[id_type]'";
        
$result mysql_query($sql);
        
$datanews mysql_fetch_array($result); {
        
// เนื้อหาข่าว
      
?>
      <table width='98%' border='0' cellpadding='0' cellspacing='0'>
        <tr>
          <td width='100%'>
          <?php if ($datanews['topic'] != "") { ?>
            <img src='coremain/images/top_menu.gif'>&nbsp;&nbsp;<b><?= $datanews['topic'?></b>&nbsp;&nbsp;
          <?php ?>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <?= $datanews['fulltexts'?>
          </td>
        </tr>
        
      <?php if ($datanews['pic1'] != "") {  // มีรูปที่ 1 หรือไม่ ?>
        <tr>
          <td width='100%'><br>
            <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align='<?= $datanews['position_pic1'?>'>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_01.gif' WIDTH=15 HEIGHT=15 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_02.gif'></TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_03.gif' WIDTH=17 HEIGHT=15 ALT=''></TD>
              </TR>
              <TR>
                <TD valign='top' background='coremain/images/border/popup_border_04.gif'> </TD>
                <TD valign='top'><img src='<?= $_SESSION['web_name'?>/mainfile/<?= $datanews['pic1'?>' border='0' name='Img1' width='100%'></TD>
                <TD valign='top' background='coremain/images/border/popup_border_06.gif'></TD>
              </TR>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_07.gif' WIDTH=15 HEIGHT=16 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_08.gif'> </TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_09.gif' WIDTH=17 HEIGHT=16 ALT=''></TD>
              </TR>
            </TABLE>
          </td>
        </tr>
        <tr>
          <td><div align='<?= $datanews['position_pic1'?>'><?= $datanews['explain1'?></div></td>
        </tr>
      <?php }
      
      if (
$datanews['pic2'] != "") {  // มีรูปที่ 2 หรือไม่ ?>
        <tr>
          <td width='100%'><br>
            <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align='<?= $datanews['position_pic2'?>'>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_01.gif' WIDTH=15 HEIGHT=15 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_02.gif'></TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_03.gif' WIDTH=17 HEIGHT=15 ALT=''></TD>
              </TR>
              <TR>
                <TD valign='top' background='coremain/images/border/popup_border_04.gif'> </TD>
                <TD valign='top'><img src='<?= $_SESSION['web_name'?>/mainfile/<?= $datanews['pic2'?>' border='0' name='Img1' width='100%' ></TD>
                <TD valign='top' background='coremain/images/border/popup_border_06.gif'></TD>
              </TR>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_07.gif' WIDTH=15 HEIGHT=16 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_08.gif'> </TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_09.gif' WIDTH=17 HEIGHT=16 ALT=''></TD>
              </TR>
            </TABLE>
          </td>
        </tr>
        <tr><td><div align='<?= $datanews['position_pic2'?>'><?= $datanews['explain2'?></div></td></tr>
      <?php }
      
      if (
$datanews['pic3'] != "") {  // มีรูปที่ 3 หรือไม่ ?>
        <tr>
          <td width='100%'><br>
            <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align='<?= $datanews['position_pic3'?>'>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_01.gif' WIDTH=15 HEIGHT=15 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_02.gif'></TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_03.gif' WIDTH=17 HEIGHT=15 ALT=''></TD>
              </TR>
              <TR>
                <TD valign='top' background='coremain/images/border/popup_border_04.gif'> </TD>
                <TD valign='top'><img src='<?= $_SESSION['web_name'?>/mainfile/<?= $datanews['pic3'?>' border='0' name='Img1' width='100%' ></TD>
                <TD valign='top' background='coremain/images/border/popup_border_06.gif'></TD>
              </TR>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_07.gif' WIDTH=15 HEIGHT=16 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_08.gif'> </TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_09.gif' WIDTH=17 HEIGHT=16 ALT=''></TD>
              </TR>
            </TABLE>
          </td>
        </tr>
        <tr><td><div align='<?= $datanews['position_pic3'?>'><?= $datanews['explain3'?></div></td></tr>
      <?php }
      
      if (
$datanews['pic4'] != "") {  // มีรูปที่ 4 หรือไม่ ?>
        <tr>
          <td width='100%'><br>
            <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 align='<?= $datanews['position_pic4'?>'>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_01.gif' WIDTH=15 HEIGHT=15 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_02.gif'></TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_03.gif' WIDTH=17 HEIGHT=15 ALT=''></TD>
              </TR>
              <TR>
                <TD valign='top' background='coremain/images/border/popup_border_04.gif'> </TD>
                <TD valign='top'><img src='<?= $_SESSION['web_name'?>/mainfile/<?= $datanews['pic4'?>' border='0' name='Img1' width='100%' ></a></TD>
                <TD valign='top' background='coremain/images/border/popup_border_06.gif'></TD>
              </TR>
              <TR>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_07.gif' WIDTH=15 HEIGHT=16 ALT=''></TD>
                <TD valign='top' background='coremain/images/border/popup_border_08.gif'> </TD>
                <TD valign='top'> <IMG SRC='coremain/images/border/popup_border_09.gif' WIDTH=17 HEIGHT=16 ALT=''></TD>
              </TR>
            </TABLE>
          </td>
        </tr><tr><td><div align='<?= $datanews['position_pic4'?>'><?= $datanews['explain4'?></div></td></tr>
      <?php }
      
      if (
$datanews['files'] != "") { // ไฟล์ประกอบ ?>
        <tr>
          <td width='100%' align='center'><br>
            <a href="#" onClick="window.open('<?= $_SESSION['web_name'?>/mainfile/<?= $datanews['files'?>','blah12','width=540,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes')"><u>ไฟล์ประกอบ</u></a>&nbsp;
          </td>
        </tr>
      <?php }
      
// รายละเอียดอื่น ๆ ?>
        <tr>
          <td width='100%'>
            <p align='right'><br>ประกาศโดย : <?= $datanews['who'?><br>วันที่ประกาศ : <?= $datanews['date_post'?></p>
          </td>
        </tr>
      </table>
<?php ?>
      </div>
    </td>
  </tr>
</table>

<?php
  fieldset_down
();
?>