/home/mjc1/public_html/html/smarttax/popadmincustomer.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<?php include_once("./_common2.php");?>
<? session_start
(); ?>
<?
        
if (isset ($cookie)) {
            while (list (
$name$value) = each ($cookie)) {
               if(
$name == "op1"$op1 $value;
               if(
$name == "op2"$op2 $value;
               if(
$name == "op3"$op3 $value;
               if(
$name == "op4"$op4 $value;
               if(
$name == "op5"$op5 $value;
               if(
$name == "op6"$op6 $value;
               if(
$name == "op7"$op7 $value;
               if(
$name == "op8"$op8 $value;
               if(
$name == "op9"$op9 $value;
               if(
$name == "op10"$op10 $value;
               if(
$name == "op11"$op11 $value;
               if(
$name == "op12"$op12 $value;
               if(
$name == "op13"$op13 $value;
               if(
$name == "op14"$op14 $value;
            }
        }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<SCRIPT LANGUAGE="JavaScript">
    function cselect(i)
    {
    var code = document.getElementsByName("code")[i].value;
    var compname = document.getElementsByName("compname")[i].value;
//    var saledc = document.getElementsByName("sale_dc")[i].value;
//    var taxmode = document.getElementsByName("taxmode")[i].value;
    parent.document.getElementById("ccode").value = code;
    parent.document.getElementById("cinput").value = compname;
//    parent.document.getElementById("sale_dc").value = saledc;
//    parent.document.getElementById("taxmode").value = taxmode;
     var popmode = parent.document.getElementById("popmode").value;
     if(popmode == "menu1_2"){
         parent.paysearch();
    }
    parent.CloselayerPop();
    }
</SCRIPT>
<head>
<?  include("./commonST.php"); ?>
<title>õ³â°æ¿µ Mobile</title>
<link rel="shortcut icon" href="http://www.mijinsoft.co.kr/mijin2.ico" type="image/icon" />
<link rel="apple-touch-icon-precomposed" href="http://www.mijinsoft.co.kr/html/adminmobile/img/homeicon.png" />
<link href="http://www.mijinsoft.co.kr/html/adminmobile/css/common.css" rel="stylesheet" type="text/css" />
<!-- <script language='javascript' src='/js/prototype.js'></script>
<script language='javascript' src='/js/default.js'></script>
<script language='javascript' src='/js/miya_validator.js'></script> -->
</head>
<body bgcolor="#efefef">
    <table border="1" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" bgcolor="#cccccc" style="border-collapse:collapse">
        <tr class="txt01w" height="32" bgcolor="#af191e">
            <td width="25%" align="center">
                Äڵ堠  
            </td>
            <td width="50%" align="center">
                °Å·¡Ã³¸í
            </td>
            <td width="25%" align="center">
                ´ëÇ¥ÀÚ¸í
            </td>
        </tr>
<?
    
if($cmode ==""$cmode 1;
    
$cname 0;
    
//¹ßÁÖ ¼öÁÖ ±¸ºÐ
    
if ($cmode == "0"){
        
$qcmode "AND    (part = 0 or part = 2)";
    } else if (
$cmode == "1"){
        
$qcmode "AND    (part = 1 or part = 2)";
    }

    
//°Ë»ö¾î ±¸ºÐ
    
if ($cname == "0"){
        
$qcname "AND ( compname like '%$cinput%' or compalias like '%$cinput%' or code like '%$cinput%' or code2 like '%$cinput%') ";
    } else if (
$cname == "1"){
        
$qcname "AND ( compname like '%$cinput%') ";
    } else if (
$cname == "2"){
        
$qcname "AND ( compalias like '%$cinput%') ";
    } else if (
$cname == "3"){
        
$qcname "AND ( code like '%$cinput%') ";
    } else if (
$cname == "4"){
        
$qcname "AND ( code2 like '%$cinput%') ";
    }


    
$qry "SELECT code, compname, ceoname, sale_dc, taxmode FROM customer WHERE hidden=0  $qcmode $qcname order by compname";
    
$result mysql_query($qry);
//    echo $qry;
?>

<!-- °Ë»ö°á°ú°¡ 0°ÇÀ̸頰æ°íâ Ãâ·Â -->
<?
    
if(mysql_num_rows($result) == 0){    //°Ë»ö°á°ú°¡ 0À̸é
?>
<script type="text/javascript">
parent.alert("°Ë»öµÈ °Å·¡Ã³°¡ ¾ø½À´Ï´Ù.");
parent.ClearCinput();
parent.CloselayerPop();
</script>
<?
    
}
?>

<!-- °Ë»ö°á°ú°¡ 1°ÇÀ̸é ÀÔ·Â⠹ٷΠµî·Ï Ãâ·Â -->
<?
    
if(mysql_num_rows($result) == 1){    //°Ë»ö°á°ú°¡ 1À̸é
        
while($row mysql_fetch_array($result)){
?>
        <tr class="txt01nb" height="32" bgcolor="#ffffff"  style="cursor:pointer">
            <td align="center">
                <input type="hidden" name="code" value="<?=$row[code]?>">
                <input type="hidden" name="compname" value="<?=$row[compname]?>">
                <input type="hidden" name="sale_dc" value="<?=$row[sale_dc]?>">
                <input type="hidden" name="taxmode" value="<?=$row[taxmode]?>">
                <?=$row[code]?>
            </td>
            <td align="left" style="padding:0 0 0 10px;">
                <?=$row[compname]?>
            </td>
            <td align="left" style="padding:0 0 0 10px;">
                <?=$row[ceoname]?>
            </td>
        </tr>
<script type="text/javascript">
cselect(0);
     var popmode = parent.document.getElementById("popmode").value;
     if(popmode == "menu1_2"){
         parent.paysearch();
    }
parent.addlistproduct();
parent.CloselayerPop();

</script>
<?        }
    }
?>

<?
    $i
=0;
    while(
$row mysql_fetch_array($result)){
?>
        <tr class="txt01nb" height="32" bgcolor="#ffffff" onclick="cselect('<?=$i?>');" style="cursor:pointer">
            <td align="center">
                <input type="hidden" name="code" value="<?=$row[code]?>">
                <input type="hidden" name="compname" value="<?=$row[compname]?>">
                <input type="hidden" name="sale_dc" value="<?=$row[sale_dc]?>">
                <input type="hidden" name="taxmode" value="<?=$row[taxmode]?>">
                <?=$row[code]?>
            </td>
            <td align="left" style="padding:0 0 0 10px;">
                <?=$row[compname]?>
            </td>
            <td align="left" style="padding:0 0 0 10px;">
                <?=$row[ceoname]?>
            </td>
        </tr>
<?    $i++;
    } 
?>
        <tr bgcolor="#ffffff" height="32">
            <td colspan="3" align="center" class="txt01">
                <a href="javascript:parent.CloselayerPop();"><div class="popbutton">´Ý±â</div></a>
            </td>
        </tr>
    </table>
</body>
</html>