/home/banprang/domains/plai.go.th/public_html/coremain/module/load/del_download.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
<?php

$navig
['load']=$data_name_menu_sub[name];
$navig['adddownload_form']="ลบข้อมูล";
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_del_download_g!="")                {  $del_download_g=trim($p_del_download_g);                    }
if(
$p_del_download_s!="")                {  $del_download_s=trim($p_del_download_s);                    }
if(
$p_ids!="")                                        {  $ids=trim($p_ids);                                                                    }

// ################################# ลบลูกลิงค์ ############
if($ids!="" and $del_download_s=="1")
{
          
// ลบไฟล์เก่าออกก่อน    
                    
$sql1="select files  from cms_file  where id='$ids'";
                    
$result1=mysql_query($sql1);
                    
$data1=mysql_fetch_row($result1);
                    if(
$data1[0]!="")        {            unlink("$_SESSION[web_name]/mainfile/$data1[0]");        }

            
$sql="DELETE FROM cms_file WHERE id=$ids";
            
$result=mysql_query($sql);
        echo 
"<br><br><center>ข้อมูลได้ถูกลบแล้ว</center><br><br>";
        echo
"<meta http-equiv='refresh' content='1; url=index.php?mod=load&path=load'>";
//        include('coremain/footer.php');
        
exit;
}
fieldset_down();

?>