/home/mjc1/public_html/onlinecs/deleteorderProcess.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
<? session_start(); ?>
<?php 
include_once("_common.php");?>

<?
    
if(( $id == "" ) && ( $sid == "" )) { 
?>
<script>
    alert("e¼ö¹ßÁÖ ·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "../onlinecs/intro.php";
</script>
<?     
     
}

  include(
"../onlinecs/commonST.php");
?>
<? 
// ordstate »óŰªÀÌ 0:½Åû À϶§¸¸ »èÁ¦ °¡´ÉÇϰԠ¼öÁ¤ psw 2015-07-03
    
$sql "select * from ordbook_m where ordno = '{$uid}' ";
    
$res mysql_query($sql);
    
$info mysql_fetch_array($res);

    if(
$info['ordstate']<'2'){
        
//»ó´Ü³»¿ª»èÁ¦
        
$tdqry "DELETE FROM ordbook_m WHERE ordno = '$uid'";
        
mysql_query($tdqry);

        
//»ó¼¼³»¿ª»èÁ¦
        
$tdqry "DELETE FROM ordbook_d WHERE ordno = '$uid'";
        
mysql_query($tdqry);

        
$mqry "SELECT max(ordno) AS maxordno FROM ordbook_m";
        
$mresult mysql_query($mqry);
        
$mrow mysql_fetch_array($mresult);
        
$maxordno $mrow['maxordno'];
    } else {
?>
    <script>
        parent.alert("¹ßÁÖ ÀÛ¼º/½Åû »óÅ¿¡¼­¸¸ »èÁ¦°¡ °¡´ÉÇÕ´Ï´Ù.");
        parent.location.reload();
    </script>
<?
        
exit;
    }

?>
<script language="javascript">
    parent.alert('Àüü»èÁ¦ µÇ¾ú½À´Ï´Ù.');
    //parent.location.href = "buy.php?uid=<?=$maxordno?>&detail=y&txtdate=<?=$txtdate?>&txtdate2=<?=$txtdate2?>";    //ºÎ¸ðâ »õ·Î°íħ
    parent.location.href = "buy.php?detail=y&txtdate=<?=$txtdate?>&txtdate2=<?=$txtdate2?>&new=y";    //ºÎ¸ðâ »õ·Î°íħ
    //parent.location.href="buy.php";
</script>