/home/mjc1/public_html/onlinecs/mobile/loadData_2.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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<? session_start(); ?>
<?
include_once("./_common.php");
if(( 
$id == "" ) && ( $sid == "" )) { 
    echo 
"<script>alert('e수발주 로그인 후에 이용가능합니다.');location.href = 'index.php';</script>"
}

include(
"../commonST.php");

$charSet_sql "set names utf8";      
mysql_query($charSet_sql);   


if(!isset(
$_GET['uid'])){
    
$uid "";
}else{
    
$uid $_GET['uid']; 


if(!isset(
$_GET['idx'])){
    
$idx "";
}else{
    
$idx $_GET['idx']; 


if(!isset(
$_GET['nidx'])){
    
$nidx "";
}else{
    
$nidx $_GET['nidx']; 


$optionqry "SELECT optname, optvalue FROM options";
$optresult mysql_query($optionqry);
while(
$optrow mysql_fetch_array($optresult)){
    if(
$optrow['optname'] == "ON지정상품분류")                $optcate     $optrow['optvalue'];    
}

$optcate_cnt "0";
if(
$optcate=='1'){ // 거래처별 상품분류지정 상품이 몇개인지 체크 없을경우 거래처별 상품분류지정 상품옵션 무력화하기 위함
    
$sql "select count(*) as cnt from custpclassmatch where ccode = '{$cuscode}' ";
    
$res mysql_query($sql);
    
$info mysql_fetch_array($res);

    
$optcate_cnt $info['cnt'];
}

?>
<script>

<?
 $sub2 
substr($sub,0,4)."9999";
 
$mqry "SELECT * FROM pclass WHERE plevel ='2' AND fullpath BETWEEN '{$sub}' AND '{$sub2}'";

 
$resultm mysql_query($mqry);
 
$total mysql_affected_rows()+1;
 

?>

    //parent.category.detail.length = <?=$total?>;


<? 
    $i 
1;
    while(
$data mysql_fetch_array($resultm)){
?>
//    parent.category.detail.options[<?=$i?>].text = '<?=$data[name]?>';
//    parent.category.detail.options[<?=$i?>].value = '<?=$data[fullpath]?>';

<? 
    $i
++;
?>

</script>

<!--------------------소분류 카테고리 처리 완료 --------------------->

<?
    $i 
1;
    if(
$optcate_cnt>"0"){
        
$Lqry "SELECT a.* FROM  pclass a inner join custpclassmatch b on a.code = b.pccode and b.ccode = '{$cuscode}' WHERE plevel = '2' AND fullpath BETWEEN '{$sub}' AND '{$sub2}'";
    } else {
        
$Lqry "SELECT * FROM  pclass WHERE plevel = '2' AND fullpath BETWEEN '{$sub}' AND '{$sub2}'";
    }
    
//echo $Lqry;
    
$Lresult mysql_query($Lqry);
    while(
$Ldata mysql_fetch_array($Lresult)){
?>
<script>
    
    parent.insertform('tb_list',0); 
    parent.document.getElementsByName('leftcode')[<?=$i?>].value = "<?=$Ldata['fullpath']?>";
    parent.document.getElementsByName('leftname')[<?=$i?>].value = "<?=$Ldata['name']?>";
    //parent.document.getElementsByName('leftname2')[<?=$i?>].text = "<?=$Ldata['name']?>";
    parent.document.getElementsByName('leftname2')[<?=$i?>].innerHTML = "<?=$Ldata['name']?>";    

</script>
<?
     $i
++;
    }
?>
<script>
    parent.cate_li_init();
</script>
<?php
    
echo "<script>";
    echo 
"var code = parent.document.getElementsByName('leftcode')[1].value;";
    echo 
"var len = parent.document.getElementsByName('leftcode').length;";
    echo 
"var orddate = parent.document.getElementById('orddate').value;";
    echo 
"var deldate = parent.document.getElementById('deldate').value;";
    echo 
"var bigo = parent.document.getElementById('bigo').value;";
    echo 
"parent.document.getElementsByName('cate')[0].value = code.substr(0,4);";
    echo 
"url = 'loadResult.php?uid={$uid}&idx={$idx}&nidx={$nidx}&detail='+code.substr(0,4)+'&orddate='+orddate+'&deldate='+deldate+'&bigo='+bigo;";
    echo 
"parent.resultdata.location.replace(url);";
    echo 
"var lefttable = document.getElementById('lefttable');";
    echo 
"var leftcode = document.getElementsByName('leftname');";
    echo 
"document.getElementById('chb_all').checked = '';";
    echo 
"</script>"
?>