/home/mjc1/public_html/html/smarttax/menu2_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
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<?php include_once("./_common2.php");?>
<? session_start
(); ?>
<?
    
if( $apsid == "" ){ 
?>
<SCRIPT LANGUAGE='JavaScript'> 
    alert("·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "./intro.php";
</script>
<? }

//    $admin = str_replace("admin+","",$adminid);
 
include("./commonST.php");
?>
<SCRIPT LANGUAGE="JavaScript">
    
    //·¹À̾ŷ¡Ã³ ÆË¾÷
      function ViewlayerPop(){
            var cinput = document.getElementById("cinput").value;
            var cmode= document.getElementById("cmode").value;
            document.getElementById("popup").style.display='block';
            document.getElementById("layerPop").style.display='block';
            document.getElementById("wrap").style.display='none';
            document.getElementById("footer").style.display='none';

        
            popup.location.href="./popadmincustomer.php?cinput="+cinput+"&cmode="+cmode+"";
/*
            var cmode = document.getElementById("mode").value;
            var cname = 0;
            var cinput = document.getElementById("cinput").value;
            document.getElementById("popup").style.display='block';
            document.getElementById("layerPop").style.display='block';
            document.getElementById("wrap").style.display='none';
            document.getElementById("footer").style.display='none';

        
            popup.location.href="./popcustomer.php?cmode="+cmode+"&cname="+cname+"&cinput="+cinput+"";
*/
     }

      function ViewlayerPop2(){
        var modecode = document.getElementById("cmode").value; //¼ö¹ßÁÖ ±¸ºÐ °Å·¡Ã³¶û ¹Ý´ëó¸®
            if( modecode == '0'){
                cmode = '1';
            } else if( modecode == '1'){
                cmode = '0';
            }
            var pname = document.getElementById("pname").value;
            popup2.location.href="./popproduct.php?pname="+pname+"&cmode="+cmode+""; 
            document.getElementById("layerPop2").style.display='block';
            document.getElementById("wrap").style.display='none';
            document.getElementById("footer").style.display='none';
     }

      function CloselayerPop(){
            popup.location.href="./empty.php";
            document.getElementById("layerPop").style.display='none';
            document.getElementById("wrap").style.display='block';
            document.getElementById("footer").style.display='block';
            window.scrollTo(0,0);
     } 

    //ÀÔ·Ââ Å¬¸®¾î
    function ClearCinput(){
        document.getElementById("cinput").value= '';
        document.getElementById("ccode").value= '';
    }

    function ClearPinput(){
        document.getElementById("pname").value= '';
    }


    function pricesearch(){
        var ccode = document.getElementById("ccode").value;
        var cinput = document.getElementById("cinput").value;
        var cmode = document.getElementById("cmode").value;
        var pname = document.getElementById("pname").value;
        location.href="./menu2_2.php?mode=search&cmode="+cmode+"&ccode="+ccode+"&cinput="+cinput+"&pname="+pname+"";
    }

</SCRIPT>
<!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">
<META http-equiv=Content-Type content="text/html; charset=euc-kr">
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width" />

<head>

<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/mobile/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">
       <!--  ·¹ÀÌ¾î ÆË¾÷ div-->
    <Div id="layerPop" style="position:relative; left:0px; top:0px; width:100%; height:100%;z-index:2000;display:none;background:black;alpha(opacity=10%);">
        <iframe name="popup" id="popup" width="100%" height="100%" style='border:0px;display:none;'></iframe>
    </Div>
    <Div id="layerPop2" style="position:relative; left:0px; top:0px; width:100%; height:100%;z-index:888;display:none;background:black;alpha(opacity=10%);">
        <iframe name="popup2" width="100%" height="100%" style='border:0px;'></iframe>
    </Div>
    <!-- //·¹ÀÌ¾î ÆË¾÷ div ³¡-->
<div id="wrap">
 <?
 
/*
        echo $apcount."<br>";    //Á¢¼ÓÀÚ¼öüũ¿ë
        echo $apsid."<br>";        //»ç¾÷ÀÚID
        echo $apsacode."<br>";        //»ç¾÷ÀÚÄÚµå
        echo $apsname."<br>";        //»ç¾÷ÀÚ¸í Äڵ庰·Î Àû¿ë
        echo $apcusid."<br>";    //»ç¿øID
        echo $apcuscode."<br>";    //»ç¿øÄÚµå
         echo $apcusname."<br>";        //»ç¿ø¸í
        echo $apsa_uid."<br>";        //dbÁ¢¼Ó¾ÆÀ̵ð
        echo $apsa_dbip."<br>";    //db¾ÆÀÌÇÇ
        echo $apsa_dbname."<br>";//db¸í
*/
 
?>
    <? include("./topmenu.php"); ?> 




    <div class="snb f_clear">
        <ul>
            <li class="menu1 "><a href="menu1.php">°Å·¡Ã³Á¤º¸</a></li>
            <li class="menu2 on"><a href="menu2.php">»óǰÁ¤º¸</a></li>
            <li class="menu3 "><a href="menu3.php">°Å·¡Á¤º¸</a></li>
        </ul>
    </div>
    <div class="snb_sub">    
                
        <ul podo:else>
            <li class=""><a href="menu2.php">Àç°íÁ¶È¸</a></li>
            <li class="on"><a href="menu2_2.php">»óǰ´Ü°¡</a></li>
        </ul>
    </div>


    <div class="list-wrap">

        <form name="search" method="post" action="menu2_2.php">
        <table border="0" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" >
            <tr height="38" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline" width="20%" >±¸ºÐ
                <input type="hidden" id="popmode" name="popmode" value="menu2_2">
                </td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no"  width="50%"  colspan="2">
                    <select name="cmode" id="cmode" style="font-size:14px;width:90%;height:30px;font-size:16px;" onchange="menuchange(this.value);" >
                        <option value="0" <? if($cmode == 0) echo selected?>>¸ÅÀÔó
                        <option value="1" <? if($cmode == 1) echo selected?>>¸ÅÃâó
                    </select>
                </td>
            </tr>
            <tr height="38" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline" width="20%" >»óÈ£</td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no"  width="50%">
                    <input type="text" name="cinput" id="cinput" style="width:80%;height:30px;font-size:16px;text-align:left" value="<? if ($cname == ""){ echo $cinput; } else { echo $cname; } ?>">
                    <input type="hidden" name="ccode" id="ccode" value="<?=$ccode?>"><!-- °Å·¡Ã³ ÄÚµå-->
                </td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" style="padding:0 10px 0 0;" width="30%">
                    <a href="javascript:ClearCinput();"><div class="cbutton" style="float:left;">C</div></a>
                    <a href="javascript:ViewlayerPop();"><div class="popbutton" style="float:right;">°Ë»ö</div></a>
                </td>
            </tr>
            <tr height="38" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline" width="20%" >»óǰ¸í</td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no"  width="50%">
                    <input type="text" name="pname" id="pname" value="<?=$pname?>" style="width:80%;height:30px;font-size:16px;">
                </td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" style="padding:0 10px 0 0;" width="30%">
                    <a href="javascript:ClearPinput();"><div class="cbutton" style="float:left;">C</div></a>
                    <a href="javascript:pricesearch();"><div class="popbutton" style="float:right;">Á¶È¸</div></a>
                </td>
            </tr>
        </table>
        </form>

        <table border="0" cellpadding="0" height="5"><tr><td></td></tr></table>
        <!-- <Table width='100%' border='0' cellpadding='0' cellspacing='0' align='center' style="border:1px solid #cccccc;"> 
            <tr height="38" bgcolor="#f0f0f0" class="txt01" style="border:1px solid #cccccc;">

                <td width="33%" align="center">
                    <a href="javascript:pricesearch();"><div class="popbutton">Á¶È¸</div></a>
                </td>
            </tr>
        </Table> --> 

    <!-- °Å·¡Ã³ °Ë»ö -->
        <? if($mode =="search"){ ?>
        <table border="1" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" bordercolor="#dddddd" style="border-collapse:collapse">
            <tr height="28" bgcolor="#f0f0f0" class="txt01">
                <td width="40%" align="center">»óǰ¸í</td>
                <td width="20%" align="center">¸ÅÀÔ°¡</td>
                <td width="20%" align="center">¸ÅÃâ°¡</td>
                <td width="20%" align="center">Ưº°´Ü°¡</td>
            </tr>
        <?    
            $i
=0;
            if(!
$pname == ""$psearch " AND m.name LIKE '%$pname%' ";
            if(
$ccode == ""){

            
                
$osql "
                            SELECT m.name, d.buyprice, d.saleprice
                            FROM product_m m JOIN product_d d ON (m.code = d.pcode)
                            WHERE d.ocode = '1' 
$psearch
                            ORDER BY m.name
                    
                        "
;

            } else {
                
$osql "SELECT m.name, d.buyprice, d.saleprice, s.amount
                        FROM (product_m m JOIN product_d d ON (m.code = d.pcode)) LEFT OUTER JOIN special_price s ON (m.code = s.pcode AND s.part='
$cmode' AND s.ccode = '$ccode')
                        WHERE d.ocode = '1' 
$psearch
                        ORDER BY m.name
                        "
;
            }    

//            echo $osql;
            
$oresult mysql_query($osql);
            while(
$orow  mysql_fetch_array($oresult)){

                
$line $i 2;
        
?>
            <tr height="30" bgcolor="<? if($line == "1"){ echo "#f7f7f7"; } else { echo "#ffffff"; } ?>"  class="txt01nb">
                <td align="left" style="padding:0 0 0 5px;"><?=$orow[name]?></td>
                <td align="right" style="padding:0 5px 0 0;"><?=$orow[buyprice]?></td>
                <td align="right" style="padding:0 5px 0 0;"><?=$orow[saleprice]?></td>
                <td align="right" style="padding:0 5px 0 0;"><? if($cmode =="0"){ echo "<font color='#0000ff'>"; } else { echo "<font color='#ff0000'>"; } ?><?=$orow[amount]?></td>
            </tr>
        <? $i++;
            } 
        }
        
?>
        </table>

    </div>
    

</div>
    <div id="footer">
        <!-- <li><a href="./config.php"><img src="./img/common/config_bt.gif" border="0"></a></li> -->
        <li><div class="corp">Copyright ¨Ï Mijinsoft Corp.</div></li>
    </div>

</body>
</html>