/home/mjc1/public_html/manage/m_totallist_process.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
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
<?php
include("./_common.php");
?>


<?php

if($sel_del == "Y") {
    
$uids "";
    foreach(
$code_idx as $key=>$val){
        
$code $codes[$val]; // 삭제할 게시물의 코드
        
$idx $idxs[$val]; // 어느 테이블인지 판단할 코드

        
switch($idx) {
            case 
"1":
                
$table "mBoard_consult";
                
$key "uid";
                break;
            case 
"2":
                
$table "mBoard_install_req";
                
$key "uid";
                break;
            case 
"3":
                
$table "mBoard_install_req";
                
$key "uid";
                break;
            case 
"4":
                
$table "mBoard_install_req";
                
$key "uid";
                break;
            case 
"5":
                
$table "mBoard_education";
                
$key "uid";
                break;
            case 
"6":
                
$table "mBoard_file_download_setting";
                
$key "idx";
                break;
            default:
                
$table "";
                
$key "";
                break;
        }

        if(
$table == "" && $key == "") {
?>
        <script>
            alert("삭제할 수 없는 데이터입니다.");
            history.back(); 
        </script>
<?php
        
}

        
$sql "delete from {$table} where {$key} = '{$code}' ";
        
mysql_query($sql,$connect_web);
    }
}

?>

<script>
    document.location.href='m_totallist.php';
</script>