/home/mjc1/public_html/html/smarttax/menu2.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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<?php include_once("./_common2.php");?>
<? session_start
(); ?>
<?
    
if ($txtdate == "") { 
    
$txtdate = ($txtdate == "") ? date("Y-m-d"strtotime("-7 Day")) : $txtdate
      }
    if (
$txtdate2 == "") { 
     
$txtdate2 = ($txtdate2 == "") ? date("Y-m-d"time()) : $txtdate2
      }

    if( 
$st_uid == "" ){ 
?>
<SCRIPT LANGUAGE='JavaScript'> 
    alert("·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "./intro.php";
</script>
<? ?>
<? 
if($apsa_demo == "demo"){
    if(
$today $st_limitdemo){ ?>
<SCRIPT LANGUAGE='JavaScript'> 
    alert("µ¥¸ð»ç¿ë±â°£ÀÌ ¸¸·áµÇ¾ú½À´Ï´Ù.");
    location.href = "./intro.php";
</script>
<? } }

//    $admin = str_replace("admin+","",$adminid);
 
include("../../manage/category/etaxcommontest.php");
// include("./commonST.php");

 
$today date("Y-m-d"); //¿À´Ã³¯Â¥
 
$today2 date("Y-m-01"); //À̹ø´Þ 1ÀÏ
?>
<!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">
<head>
<title>½º¸¶Æ®Åؽº</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/smarttax/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> -->
<script type="text/javascript" src="./js/calendar.js"></script>
<SCRIPT LANGUAGE="JavaScript">
    //·¹À̾ŷ¡Ã³ ÆË¾÷

      function ViewlayerPop(taxnum){

            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="./popviewtax.php?code="+taxnum+"";    //¸ÅÀÔ:cmode=0 ¸ÅÃâ:cmode=1
            ClearCinput2();
     }

      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 ViewlayerPop2(){
        var ccode = document.getElementById("ccode").value;    //°Å·¡Ã³ ÄÚµå

          if( ccode == ""){
              alert("¸ÕÀú °Å·¡Ã³¸¦ ¼±ÅÃÇØ ÁֽʽÿÀ");
              document.getElementById("cinput").focus();
              return;
          }
            var pname = document.getElementById("pname").value;
            var pinput = document.getElementById("pinput").value;
            var garage = document.getElementById("garage").value;
            popup2.location.href="./popproduct.php?pname="+pname+"&pinput="+pinput+"&ccode="+ccode+"&cmode=1&garage="+garage+""; 
            document.getElementById("layerPop2").style.display='block';
            document.getElementById("wrap").style.display='none';
            document.getElementById("footer").style.display='none';
            ClearCinput2();

     }

      function CloselayerPop2(){
            document.getElementById("layerPop2").style.display='none';
            document.getElementById("wrap").style.display='block';
            document.getElementById("footer").style.display='block';
            popup2.location.href="./empty.php";
//            window.scrollTo(0,0);

     }


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

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



    function pricesearch(){
        search.submit();
    }

</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">
    <? 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>
        </ul>
    </div>
    <div class="snb f_clear">
        <ul>
            <li class="menu3 "><a href="menu3.php">°Å·¡Ã³°ü¸®</a></li>
            <li class="menu4"><a href="menu4.php">»óǰ°ü¸®</a></li>
        <ul>
    </div>
<!--     <div class="snb_sub">
        <ul>
            <li class="txt01" style="width:48%;text-align:center;"><a href="menu3.php"><img src="http://www.mijinsoft.co.kr/html/smarttax/img/common/arrow.gif" align="absmiddle"> °Å·¡Ã³¸®½ºÆ®</a></li>
            <li class="txt01" style="width:48%;text-align:center;border-right:1px solid #c9c9c9;"><a href="menu3-1.php"><img src="http://www.mijinsoft.co.kr/html/smarttax/img/common/arrow.gif" align="absmiddle"> °Å·¡Ã³Ãß°¡</a></li>
        <ul>
    </div> -->
    <div class="list-wrap">
    
        <form name="search" method="post" >
        <table border="0" cellpadding="0" cellspacing="0" width="100%" valign="top" align="center" style="margin-top:5px;">
            <tr>
                <td colspan="4" bgcolor="#627aaf" height="2">
                </td>
            </tr>
            <tr height="42" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline tline" width="20%" >Àü¼Û°á°ú
                <input type="hidden" id="popmode" name="popmode" value="menu3">
                </td>
                <td align="center" class="bline tline " bgcolor="#ffffff" class="b_no"  width="50%"  colspan="3">
                    <select name="cmode" id="cmode" style="font-size:14px;width:90%;height:30px;font-size:16px;" >
                        <option value="0" <? if($cmode == 0) echo selected;if($cmode == "") echo selected?>>Àüü
                        <option value="1" <? if($cmode == 1) echo selected;  ?>>Àü¼Û¼º°ø
                        <option value="2" <? if($cmode == 2) echo selected;  ?>>Àü¼Û¿¡·¯
                    </select>
                </td>
            </tr>
            <tr height="42" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline" width="20%" >°Ë»ö±â°£</td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" colspan="3" >
                    <input type="text" name="txtdate" id="txtdate" readonly style="width:40%;height:20px;font-size:12px;text-align:center" value="<?=$txtdate;?>" onClick="calendar(event, 'txtdate')"> <!-- <img src="./img/common/calendar.gif" onClick="calendar(event, 'date1')"> --> ~
                    <input type="text" name="txtdate2" id="txtdate2" readonly style="width:40%;height:20px;font-size:12px;text-align:center" value="<?=$txtdate2;?>" onClick="calendar(event, 'txtdate2')"> <!-- <img src="./img/common/calendar.gif" onClick="calendar(event, 'date2')"> -->
                </td>
            </tr>
            <tr height="38" bgcolor="#696969" class="txt01w">
                <td align="center" class="bline rline" width="20%" >»ç¾÷ÀÚ¹øÈ£</td>
                <td align="center" class="bline b_no txt01" bgcolor="#ffffff" width="50%">
                    <input type="text" name="keyword" id="keyword" value="<?=$keyword?>" style="width:50%;height:30px;font-size:16px;">(-¾øÀÌ)
                </td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" style="padding:0 10px 0 0;" width="10%">
                    <a href="javascript:ClearPinput();"><div class="cbutton" style="float:left;">C</div></a>
                </td>
                <td align="center" class="bline" bgcolor="#ffffff" class="b_no" style="padding:0 10px 0 0;" width="20%">
                    <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>  -->

    <!-- °Å·¡Ã³ °Ë»ö -->
        <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="20%" align="center">ÀÛ¼ºÀÏÀÚ</td>
                <td width="20%" align="center">󸮰á°ú</td>
                <td width="35%" align="center">°Å·¡Ã³¸í</td>
                <td width="25%" align="center">ÇÕ°è±Ý¾×</td>
            </tr>
        <?    
            $idsql 
"SELECT * FROM members WHERE userid = '$st_uid'"//»ç¾÷ÀÚ¹øÈ£ µî·ÏÁ¶È¸
            
$idresult mysql_query($idsql);
            
$idrow mysql_fetch_array($idresult);
            
$taxcompnum $idrow[companyNum];    //dbµî·ÏµÈ »ç¾÷ÀÚ¹øÈ£

            
$stxtdate str_replace("-","",$txtdate);
            
$stxtdate2 str_replace("-","",$txtdate2);
            
$searchsql " AND a.WRITE_DT BETWEEN '$stxtdate' AND '$stxtdate2' ";
                                

                
//󸮰á°ú Á¶È¸
                
if($cmode == "0"){ 
                    
$sendsql "";
                } else if (
$cmode == "1"){    
                    
$sendsql " AND s.RESULT_CD = 'SUC001'";
                } else if (
$cmode == "2"){    
                    
$sendsql " AND s.RESULT_CD != 'SUC001'";
                }


            if(
$keyword != ""){ //Ű¿öµå°¡ ÀÖÀ¸¸é »óÈ£ »ç¾÷ÀÚ¹øÈ£Á¶È¸
                
$keysql " AND a.DMDER_BUSNID_ID = FN_GET_BIZNO('$keyword')";
            }

                
$osql 
                        
"SELECT a.ETAXBIL_APPV_NO, a.ETAXBIL_CL_CD, a.ETAXBIL_KND_CD, a.ETAXBIL_RVS_CS_CD, a.WRITE_DT, a.SND_STATUS_CD, 
                                DECODE(a.TOT_AMT, '12345678') AS TOT_AMT, a.EMAIL_CHECK, CONVERT(DECODE(b.TRADE_NM,'12345678') USING euckr) AS TRADE_NM, 
                                DECODE(b.BUSNID, '12345678') AS BUSNID, c.THNG_NM, s.RESULT_CD
                        FROM ((tn_eaaa AS a JOIN tn_eaab AS b ON (a.ETAXBIL_APPV_NO = b.ETAXBIL_APPV_NO))
                        INNER JOIN tn_aaaa AS t1 ON a.SUPLER_BUSNID_ID = t1.BUSNID_ID
                        JOIN tn_eaac AS c ON(a.ETAXBIL_APPV_NO = c.ETAXBIL_APPV_NO))
                        LEFT JOIN tn_baab AS s ON (a.ETAXBIL_APPV_NO = s.ETAXBIL_APPV_NO AND a.SUBMIT_ID = s.SUBMIT_ID)
                        WHERE  t1.BUSNID = '
$taxcompnum' AND b.BUSN_KND_CD = '02' AND c.THNG_SEQNO = '1'
                        
$searchsql $sendsql $keysql
                        order by  a.WRITE_DT desc
                        limit 30

                        "
;

        echo 
$osql;
            
$oresult mysql_query($osql);
            if( 
MYSQL_NUM_ROWS($oresult) > 0){
            while(
$orow  mysql_fetch_array($oresult)){

            
$listdate substr($orow[WRITE_DT],0,4)."-".substr($orow[WRITE_DT],4,2)."-".substr($orow[WRITE_DT],6,2);    //ÀÛ¼ºÀÏÀÚ YYYY-MM-DD·Î Ç¥½Ã

            
if($orow[RESULT_CD] == "SUC001"){    //Àü¼Û°á°ú
                
$taxstate "Àü¼Û¼º°ø"
            } ELSE IF (
$orow[RESULT_CD] == ""){ 
                if(
$orow[SND_STATUS_CD] == "D"){
                    
$taxstate "Æó±â"
                } else {
                    
$taxstate "Á¢¼öÁß"
                }
            } ELSE IF (
$orow[RESULT_CD] == "SYN002"){ 
                if(
$orow[SND_STATUS_CD] == "S"){
                    
$taxstate "ÀçÀü¼Û"
                } else {
                    
$taxstate "¿À·ù:".$orow[RESULT_CD];
                }
            } ELSE {
                if(
$orow[SND_STATUS_CD] == "D"){
                    
$taxstate "¿À·ù:[Æó±â]";
                } else {
                    
$taxstate "¿À·ù:".$orow[RESULT_CD];
                }
                
            }

        
/*
        ¼¼±Ý°è»ê¼­ ºÐ·ù(2ÀÚ¸®) : 01(¼¼±Ý°è»ê¼­), 02(¼öÁ¤¼¼±Ý°è»ê¼­), 03(°è»ê¼­), 04(¼öÁ¤°è»ê¼­)
        ¼¼±Ý°è»ê¼­ Á¾·ù(2ÀÚ¸®) : 01(ÀϹÝ), 02(¿µ¼¼À²), 03(ÀϹݠÀ§¼öŹ), 04(¼öÀÔ), 05(¿µ¼¼À² À§¼öŹ)
        */
                
if($orow[ETAXBIL_CL_CD] == "01" && $orow[ETAXBIL_KND_CD] == "01"){ $part "ÀüÀÚ¼¼±Ý°è»ê¼­"
                } else if(
$orow[ETAXBIL_CL_CD] == "03"){ $part "¸é¼¼°è»ê¼­";
                } else if(
$orow[ETAXBIL_CL_CD] == "01" && $orow[ETAXBIL_KND_CD] == "02"){ $part "¿µ¼¼À²°è»ê¼­";
                } else if(
$orow[ETAXBIL_CL_CD] == "02" &&  $orow[ETAXBIL_KND_CD] == "01"){ $part "ÀϹݼöÁ¤";
                } else if(
$orow[ETAXBIL_CL_CD] == "04"){ $part "¸é¼¼¼öÁ¤";
                } else if(
$orow[ETAXBIL_CL_CD] == "02" &&  $orow[ETAXBIL_KND_CD] == "02"){ $part "¿µ¼¼¼öÁ¤";
                }

            
$compname $orow[TRADE_NM];    //°Å·¡Ã³¸í

echo $orow[TRADE_NM];
                
$line $i 2;
        
?>
            <tr height="30" bgcolor="<? if($line == "1"){ echo "#f7f7f7"; } else { echo "#ffffff"; } ?>" onclick='ViewlayerPop("<?=$orow[ETAXBIL_APPV_NO]?>")' style="cursor:pointer;"  class="txt01nb">
                <td align="left" style="padding:0 0 0 5px;"><?=$listdate?></td>
                <td align="center" style="padding:0 0 0 0px;"><?=$taxstate?></td>
                <td align="left" style="padding:0 0 0 5px;"><?=$compname?></td>
                <td align="right" style="padding:0 5px 0 0;"><?=number_format($orow[TOT_AMT])?></td>
            </tr>


        <? $i++;
            } 
            } else {
        
?>
            <tr height="30" bgcolor="<? if($line == "1"){ echo "#f7f7f7"; } else { echo "#ffffff"; } ?>"  class="txt01nb">
                <td colspan="4" align="center">°Ë»ö°á°ú°¡ ¾ø½À´Ï´Ù.</td>

            </tr>
        <? ?>
        </table>

    </div>
    

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


</body>
</html>