/home/mjc1/public_html/onlinecs/mobile/process/rowDeleteProcess.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
<? session_start(); ?>
<?
include_once("../_common.php");
    if(( 
$id == "" ) && ( $sid == "" )) { 
?>
<script>
    alert("천년스마트발주 로그인 후에 이용가능합니다.");
    parent.location.href = "../../onlinecs/mobile/index.php";
</script>
<?     
     
}

   include(
"../../../onlinecs/commonST.php");
   
   
$charSet_sql "set names utf8";      
   
mysql_query($charSet_sql);   
?>

<?

    
// ordstate 상태값이 0:신청 일때만 삭제 가능하게 수정 psw 2015-07-03
    
$sql "select * from ordbook_m where ordno = '{$ordno}' ";
    
$res mysql_query($sql);
    
$info mysql_fetch_array($res);

    if(
$info['ordstate']<'2'){
        
$delqry "DELETE FROM ordbook_d WHERE ordno = '{$ordno}' AND seq= '{$cnt}'";
        
mysql_query($delqry);

        
sb_log_write(""$delqry""); // sql 로그
    
} else {
?>
    <script>
        parent.alert("발주 작성/신청 상태에서만 삭제가 가능합니다.");
        parent.location.reload();
    </script>
<?
        
exit;
    }

//echo ($delqry);
?>
<script>
    parent.alert("삭제 되었습니다.");
    parent.location.reload();
</script>