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
|
<?php $id_pic = $_GET["id_pic"]; $pic_link = select_query_object("*","cms_link_picture","id_pic",$id_pic);
$info = $link_info[0];
$navig['link_picture']="รายละเอียดข้อมูล"; navigator($navig); echo "<br>"; bar_header("รายละเอียดข้อมูล"); // Bar_Header fieldset_top("ลิงค์");
import_request_variables('pG', 'p_'); if($p_del_pic!="") { $del_pic=trim($p_del_pic); } if($_SESSION[admin_web]=="admin"){ echo "<center>"; box_update("index.php?mod=link_picture_edit&path=link_picture&id_pic=$_GET[id_pic]&old_path=$pic_link->pic_name_info"); echo " แก้ไขข้อมูล ";
box_delete("index.php?mod=link_picture&path=link_picture&id_pic=$_GET[id_pic]&data_top=$_GET[data_top]&del_pic=1","del_popup"); echo " ลบข้อมูล "; echo "</center>"; } // ################################# ลบลูกลิงค์ ############ if($del_pic=="1"){ $sql="select id_pic,pic_name from cms_link_picture where id_pic='$id_pic'"; $result=mysql_query($sql); $data=mysql_fetch_row($result); if($data[1]!="") { unlink("$_SESSION[web_name]/module_picture/$data[1]"); }
$sql="DELETE FROM cms_link_picture WHERE id_pic=$id_pic"; $result=mysql_query($sql);
msg_delete_data(); refresh_data("index.php","2"); fieldset_down(); // include('coremain/footer.php'); exit; }
?> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align='center'> <?php echo "<img src='$_SESSION[web_name]/module_picture/$pic_link->pic_name' style='max-width: 500px; max-height: 500px;' />";?> </td> </tr> <tr> <td align="left"> <?php echo $pic_link->pic_name_info;?> </td> </tr>
<tr> <td align='left'> <?php echo $pic_link->pic_description;?> </td> </tr>
</table>
<?php fieldset_down();
if(in_array($_SESSION['template'], array('t03'))){ ?> <br/><br/> <?php bar_header('สถานที่ท่องเที่ยว'); ?> <table width='100%' border='0' cellpadding='5' cellspacing='0'> <?php // ##################### สถานที่ท่องเที่ยว ########################## if(id_top_permission('id_top_permission')){ $sql_sub="select * from cms_link_picture WHERE id_top='$pic_link->id_top' and place='$pic_link->place' order by position desc Limit 9"; }else{ $sql_sub="select * from cms_link_picture WHERE id_top='$pic_link->id_top' and place='$pic_link->place' and status=1 order by position desc Limit 9"; } $result_sub=mysql_query($sql_sub); $num_link_pic = 0; while($data_sub=mysql_fetch_array($result_sub)){ // ส่วน display รูป และ ส่ง link $new_row = $num_link_pic % 3;// == 0 ? 1 : 0; if($new_row == 0){ echo '<tr>'; } ?> <td colspan=2 height='24' align='center'> <a href='index.php?mod=link_picture&path=link_picture&id_pic=<?= $data_sub['id_pic'] ?>&data_top=0'> <img src='<?= $_SESSION['web_name'] ?>/module_picture/<?= $data_sub['pic_name'] ?>' class="img-corner"> </a> </td> <?php if($new_row == 2){ //if($num_link_pic > 0 && $new_row == 1){ echo '</tr>'; } ++$num_link_pic; }
$link_pic_col = $num_link_pic * 2; if(id_top_permission('id_top_permission')){ ?> <tr><td colspan='<?= $link_pic_col ?>'><div align='center'><img src='coremain/images/true.gif'> <a href='index.php?mod=link_picture_add&path=link_picture&id_top=0&place=1' title='เพิ่มข้อมูล'>เพิ่มข้อมูล</a></div></td></tr> <?php } ?> </table> <?php } ?>
|