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
|
<?php import_request_variables('pG', 'p_'); if($p_id_del_top!="") { $id_del_top=trim($p_id_del_top); }
if ($id_del_top != "") { $sql = "SELECT picture FROM cms_boss_message WHERE id_top = $id_del_top"; $re = mysql_query($sql); $data = mysql_fetch_array($re); if ($data['picture'] != "") { unlink("$_SESSION[web_name]/module_boss_message/$data[picture]"); }
$sql = "DELETE FROM cms_boss_message WHERE id_top = '$id_del_top'"; mysql_query($sql);
$sql = "DELETE FROM cms_menu_top WHERE id_top = '$id_del_top'"; mysql_query($sql); }
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
if($left_right == '3'){ $bg_color = ''; echo '<tr>'; $limit = " Limit 4"; }else{ $bg_color = ' bgcolor="'.$_SESSION['bg_menu'].'"'; $limit = ""; } $sql_sub = "select * from cms_boss_message WHERE id_top='$id_top' and status=1 order by position $limit"; $result_sub = mysql_query($sql_sub); $num_row = mysql_num_rows($result_sub); while ($data_sub = mysql_fetch_array($result_sub)) { // ส่วน display รูป และ ส่ง link // echo "<tr $bg_color><td colspan=2> </td></tr>"; // spacing if($left_right == '3'){ echo" <td colspan=2 height='20' align='center'>"; $img_width = " style='max-width: 100%;'"; }else{ echo" <tr $bg_color>"; echo" <td colspan=2 height='20' align='center'>"; $img_width = " style='max-width: 180px; max-height: 180px;'"; }
echo "<a href='index.php?mod=boss_msg_view&path=boss_message&id_top=$data_sub[id_top]&id_message=$data_sub[id_message]'>"; echo "<img src='$_SESSION[web_name]/module_boss_message/{$data_sub[picture]}' border='0' class='img-corner' $img_width>"; echo "</a>"; echo "<br/>"; echo "<b>$data_sub[owner]<br><font color='ffcc00'>$data_sub[topic]</font></b>"; if($left_right == '3'){ echo '</td>'; }else{ echo"</td>"; echo "</tr>"; } } if($left_right == '3'){ echo '</tr>'; }
// spacing if (id_top_permission(id_top_permission)) { $colspan = $num_row * 2; echo "<tr $bg_color><td colspan=$colspan align=center><img src='coremain/images/true.gif'> <a href='index.php?mod=boss_message_add&path=boss_message&id_top=$id_top' title='เพิ่มข้อมูล'>เพิ่มข้อมูล</a></td></tr>"; }
echo "</table>"; ?>
|