Server IP : 119.59.102.212 / Your IP : 3.22.217.190 Web Server : Apache/2 System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64 User : yangkam ( 1022) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/yangkam/domains/yangkam.go.th/public_html/coremain/module/download/ |
Upload File : |
<?php // Status Package Module $status_module=select_query("status_module","cms_status_module","id","28"); if($status_module[0]!=1) { fieldset_no_module(); } $navig['download']="ดาวน์โหลด"; navigator($navig); echo"<br>"; bar_header("ดาวน์โหลด"); // Bar_Header fieldset_top("ดาวน์โหลด"); import_request_variables('pG', 'p_'); 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); } // #################Update status download ################## // หัวข้อใหญ่ if ($show_download == "1" && $id_group != "") { $sql = "UPDATE `cms_download_group` SET `status` = '1' WHERE id_group='$id_group'"; mysql_query($sql); $sql = "UPDATE `cms_download` SET `status` = '1' WHERE id_group='$id_group'"; mysql_query($sql); } else if ($show_download == "0" && $id_group != "") { $sql = "UPDATE `cms_download_group` SET `status` = '0' WHERE id_group='$id_group'"; mysql_query($sql); $sql = "UPDATE `cms_download` SET `status` = '0' WHERE id_group='$id_group'"; mysql_query($sql); } // หัวข้อย่อย if ($show_download == "1" && $id_sub1 != "") { $sql = "UPDATE `cms_download` SET `status` = '1' WHERE id='$id_sub1'"; mysql_query($sql); } else if ($show_download == "0" && $id_sub1 != "") { $sql = "UPDATE `cms_download` SET `status` = '0' WHERE id='$id_sub1'"; mysql_query($sql); } // ###################Add download ######################## if ($_SESSION['admin_web'] == "admin" || ( id_sub_permission(7)) == 1) { button_add("index.php?mod=adddownload_form_topic&path=download"); // Add_News $sql1 = "SELECT * FROM cms_download_group order by id_group desc"; } else { $sql1 = "SELECT * FROM cms_download_group WHERE status='1' order by id_group desc"; } // ####################### ส่วนหัวดาวน์โหลด ################## $result1 = mysql_query($sql1); $ch = mysql_num_rows($result1); while ($data = mysql_fetch_array($result1)) { echo"<table width='98%' border='0' align='center' cellpadding='1' cellspacing='1' bgcolor='$_SESSION[bg_textrun]'>"; echo" <tr height='25' bgcolor='$_SESSION[bg_menu]'>"; echo"<td width='60%'><img src='coremain/images/com.gif'> <b>$data[name_group]</b></td>"; if ($_SESSION['admin_web'] == "admin" || ( id_sub_permission(7)) == 1) { echo"<td align='right' bgcolor='$_SESSION[bg_menu]'>"; // เพิ่มข้อมูล echo " <a href='index.php?mod=adddownload_form&id_group=$data[id_group]&path=download'><img src='coremain/images/true.gif' border='0' title='เพิ่มดาวน์โหลดย่อย'></a> "; // แสดง ซ่อน if ($data['status'] == "1") { echo "<a href='index.php?mod=download&id_group=$data[id_group]&show_download=0&path=download'><img src='coremain/images/show.gif' border='0' title='$title_show'></a>"; } else { echo "<a href='index.php?mod=download&id_group=$data[id_group]&show_download=1&path=download'><img src='coremain/images/hide.gif' border='0' title='$title_hide'></a>"; } // แก้ไข echo " <a href='index.php?mod=edit_download&id_group=$data[id_group]&update_download_g=1&path=download'><img src='coremain/images/edit.gif' border='0' title='$title_edit'></a>"; // ลบ echo " <a href='index.php?mod=del_download&id_group=$data[id_group]&del_download_g=1&path=download'><img src='coremain/images/del1.gif' border='0' onclick='return goURLdel();' title='ลบข้อมูล'></a>"; echo"</td>"; } echo" </tr>"; echo"</table>"; // ################## ส่วนดาวน์โหลดย่อย ########################## echo"<table width='98%' border='0' align='center' cellpadding='1' cellspacing='1' bgcolor='$_SESSION[bg_textrun]'>"; if ($_SESSION['admin_web'] == "admin" || ( id_sub_permission(7)) == 1) { $sqls = "SELECT * FROM cms_download WHERE id_group='$data[id_group]' order by id desc"; } else { $sqls = "SELECT * FROM cms_download WHERE id_group='$data[id_group]' and status='1' order by id desc"; } $results = mysql_query($sqls); while ($datas = mysql_fetch_array($results)) { echo" <tr bgcolor='ffffff' height='22'>"; echo"<td width='60%'> <img src='coremain/images/marker.gif'> $datas[topic]</td>"; //echo"<td width='20%'> <a href='$_SESSION[web_name]/mainfile/$datas[download]' target='blank'>ดาวน์โหลด</a></td>"; echo "<td width=20% align=center><a href='index.php?mod=download_full&ids=$datas[id]&path=download&id_g=$data[id_group]'>ดาวน์โหลด</a></td>"; if ($_SESSION['admin_web'] == "admin" || ( id_sub_permission(7)) == 1) { echo"<td align='right'> "; // แสดง ซ่อน if ($datas[status] == "1") { echo "<a href='index.php?mod=download&id_sub1=$datas[id]&show_download=0&path=download'><img src='coremain/images/show.gif' border='0' title='$title_show'></a>"; } else { echo "<a href='index.php?mod=download&id_sub1=$datas[id]&show_download=1&path=download'><img src='coremain/images/hide.gif' border='0' title='$title_hide'></a>"; } // แก้ไข echo " <a href='index.php?mod=edit_download&id_sub1=$datas[id]&update_download_s=1&link1=download&path=download'><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=download'><img src='coremain/images/del1.gif' border='0' onclick='return goURLdel();' title='ลบข้อมูล'></a>"; echo"</td>"; } echo" </tr>"; } echo"</table>"; } fieldset_down(); ?>