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
|
<?php $navig['blog']=$data_name_menu_sub[name]; navigator($navig);
bar_header($_SESSION[bar_name]); // Bar_Header fieldset_top($_SESSION[bar_name]);
import_request_variables('pG', 'p_'); if($p_id_group!="") { $id_group=trim($p_id_group); } if($p_id_group!="") { $id_group=trim($p_id_group); } if($p_show_download!="") { $show_download=trim($p_show_download); } if($p_id_sub1!="") { $id_sub1=trim($p_id_sub1); } if($p_update_state!="") { $update_state=trim($p_update_state); }
if($id_type=="") $id_type=1;
// หัวข้อย่อย if($show_download=="1" and $id_sub1!=""){ $sql="UPDATE `cms_file` SET `status` = '1' WHERE id='$id_sub1'"; mysql_query($sql); } else if($show_download=="0" and $id_sub1!=""){ $sql="UPDATE `cms_file` SET `status` = '0' WHERE id='$id_sub1'"; mysql_query($sql); }
// ###################Add download ######################## if($_SESSION['admin_web']=="admin" or (id_sub_permission($_SESSION[id_sub]))==1){ button_add("index.php?mod=adddownload_form&path=load"); // Add_Load }
// ################## ส่วนดาวน์โหลดย่อย ########################## echo"<table width='98%' border='0' align='center' cellpadding='1' cellspacing='1' bgcolor='$datatm[color1]'>"; if($_SESSION['admin_web']=="admin" or (id_sub_permission($_SESSION[id_sub]))==1){ $sqls="SELECT * FROM cms_file WHERE id_sub='$_SESSION[id_sub]' order by id desc"; }else{ $sqls="SELECT * FROM cms_file WHERE id_sub='$_SESSION[id_sub]' and status='1' order by id desc"; } $results=mysql_query($sqls); while ($datas = mysql_fetch_array($results)) { echo" <tr bgcolor='eeeeee' height='22'>";
echo"<td width='65%'> <img src='coremain/images/marker.gif'> $datas[topic]</td>"; echo"<td width='15%' align=center>$datas[date_post]</a></td>"; echo"<td width='10%' align=center><a href='$_SESSION[web_name]/mainfile/$datas[files]' target='_blank'>เปิดอ่าน</a></td>"; if($_SESSION['admin_web']=="admin" or (id_sub_permission($_SESSION[id_sub]))==1){ echo"<td align='center' bgcolor='eeeeee' width='15%'> "; // แสดง ซ่อน if($datas[status]=="1") { echo "<a href='index.php?mod=load&id_sub1=$datas[id]&show_download=0&path=load'><img src='coremain/images/show.gif' border='0' title='ซ่อนข้อมูล'></a>"; } else { echo "<a href='index.php?mod=load&id_sub1=$datas[id]&show_download=1&path=load'><img src='coremain/images/hide.gif' border='0' title='แสดงข้อมูล'></a>"; } // แก้ไข echo " <a href='index.php?mod=edit_download&id_sub1=$datas[id]&update_download_s=1&link1=download&path=load'><img src='coremain/images/edit.gif' border='0' title='$title_edit'></a>"; // ลบ echo " <a href='index.php?mod=del_download&ids=$datas[id]&del_download_s=1&path=load'><img src='coremain/images/del1.gif' border='0' onclick='return goURLdel();' title='ลบข้อมูล'></a>"; echo"</td>"; } echo" </tr>"; echo "<tr height='10' bgcolor='ffffff'><td colspan=3></td></tr>"; } echo"</table>";
fieldset_down(); ?>
|