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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<? 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);
$optionqry = "SELECT optname, optvalue FROM options"; $optresult = mysql_query($optionqry); while( $optrow = mysql_fetch_array($optresult)){ //$optrow['optname'] = iconv_utf8($optrow['optname']); if($optrow['optname'] == "온주마감기능") $opt_ord_yn = $optrow['optvalue']; if($optrow['optname'] == "온주마감시간") $opt_ord_endtime = $optrow['optvalue']; }
if($opt_ord_yn != "" && $opt_ord_yn == "5189") { if($opt_ord_endtime!='00:00~00:00'){ $end_flag = 0; $v = explode("~",$opt_ord_endtime); $stime = trim($v[0]); $etime = trim($v[1]); $ctime = date("H:i"); if($etime>$stime){ if($stime<=$ctime && $ctime<=$etime){ $end_flag = 1; } } else { if(($stime<=$ctime && $ctime<='23:59') || ($etime>=$ctime && $ctime>='00:00')){ $end_flag = 1; } }
if($end_flag==1){ ?> <script> alert("온라인 주문서시간이 마감되었습니다."); parent.location.reload(); </script> <?php exit; } }
}
sb_log_write($_POST, "", ""); // post값 로그
// 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);
sb_log_write("", $tdqry , ""); // sql 로그
//상세내역삭제 $tdqry = "DELETE FROM ordbook_d WHERE ordno = '$uid'"; mysql_query($tdqry);
sb_log_write("", $tdqry , ""); // sql 로그
$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>
|