/home/mjc1/public_html/html/community_07_02.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
<?
    
include("../manage/category/common.php");
    include(
'./include/_Head.php');

    
//º¹È£È­
    
$strArr  explode"---",base64_decode($KeyCode) );

    
$Qry      =  " select * from bill_publish WHERE replace(companyNum,'-','') = '$strArr[1]' ";
    
$Result   =   mysql_query($Qry);

    if( 
mysql_num_rows($Result) > 0){
        
$billpublishRow    =   mysql_fetch_array($Result);
    }
    else{
?>
<script>
location.href  =  "community_07.php";
</script>
<?
    
}
?>



                        <table width="725" border="0" cellspacing="0" cellpadding="0" align="center">
                            <tr>
                                <td height="100"><img src="../newimg/community/tit_09.gif"></td>
                            </tr>
                        </table>

                        <table width='680' border='0' cellpadding='15' cellspacing='5' bgcolor='f3f3f3' align="center">
                            <tr>
                                <td align=center valign=top bgcolor=FFFFFF class=txt03>

                                    <table width=100% border=0 cellpadding=0 cellspacing=0 class=txt03>
                                        <tr>
                                            <td height=25>
                                                <img src=../img/common/box_orange.gif width=3 height=3 hspace=10 align=absmiddle><strong>¼¼±Ý°è»ê¼­
                                                ¹ßÇàÀ» ¿øÇϽøé [³»¿ëº¸±â]¸¦ Å¬¸¯Çϼ¼¿ä.</strong>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height=25>
                                                <img src=../img/common/box_orange.gif width=3 height=3 hspace=10 align=absmiddle><strong>[½ÂÀÎ]¹öưÀ» ´©¸¥ ÈÄ ¾Æ·¡ÀÇ [¼¼±Ý°è»ê¼­¹ßÇà]À» ´©¸£½Ã¸é Ãâ·Â °¡´ÉÇÕ´Ï´Ù.</strong>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td height=25><img src=../img/common/box_orange.gif width=3 height=3 hspace=10 align=absmiddle><strong><FONT COLOR="#0066FF">ÀüÀÚ°è»ê¼­ »ç¿ë ½Åû¹®ÀÇ : 1566-8680 (¹ÌÁø¼ÒÇÁÆ®)</FONT></strong></td>
                                        </tr>
                                        <tr>
                                            <td height=25>
                                                <img src=../img/common/box_orange.gif width=3 height=3 hspace=10 align=absmiddle><strong>¼¼±Ý°è»ê¼­ ³»¿ë¿¡ ¹®Á¦°¡ ÀÖÀ» °æ¿ì [¹Ý¼Û]¹öưÀ» ´©¸£½Å ÈÄ ¹ßÇàÀÚ(°Å·¡Ã³)¿¡°Ô ¿¬¶ôÇϼ¼¿ä.</strong>
                                            </td>
                                        </tr>
                                    </table>

                                    <br>

                                    <table width=650 border=0 cellpadding=5 cellspacing=1 bgcolor=CCCCCC class=txt03>
                                        <tr>
                                            <td align=center bgcolor=f0f0f0 width="80">¹ßÇàÀÏÀÚ</td>
                                            <td align=center bgcolor=f0f0f0 width="100">¹ßÇàó</td>
                                            <td align=center bgcolor=f0f0f0 width="90">»ç¾÷ÀÚ¹øÈ£</td>
                                            <td align=center bgcolor=f0f0f0 width="70">´ëÇ¥ÀÚ</td>
                                            <td align=center bgcolor=f0f0f0 width="80">±Ý¾×</td>
                                            <td align=center bgcolor=f0f0f0 width="70">½ÂÀλóÅÂ</td>
                                            <td align=center bgcolor=f0f0f0 width="100">ÀÚ¼¼È÷ º¸±â</td>
                                        </tr>
<?
    
    $tableQry      
=  " select p.admission, p.idx, p.year, p.MONTH, p.DAY, p.from_companynum, p.totalprice, p.tax_visible, m.companyName, m.chiefName from bill_publish p inner join bill_mijin m on m.companyNum = p.from_companynum WHERE replace(p.companyNum,'-','') = '$strArr[1]' ORDER BY p.idx DESC "

    
$tableResult   =   mysql_query($tableQry);

    if( 
mysql_num_rows($tableResult) > 0){

        while( 
$tableRow mysql_fetch_array($tableResult) ){

            
$regdate     =  $tableRow[year]."-" .$tableRow[MONTH]."-"$tableRow[DAY];
            
            if(
$tableRow[admission] == "1" )                $statu =  "ºñ½ÂÀÎ";
            else if (
$tableRow[admission] == "3" )  $statu =  "<FONT COLOR='#FF0000'>¹Ý¼Û</FONT>";
            else                                                                      
$statu =  "<FONT COLOR='#0066FF'>½ÂÀÎ</FONT>";

            if(
$idx == $tableRow[idx]) $bgcolor "lightyellow";
            else                       
$bgcolor "#ffffff";
?>
                                        <tr bgcolor=<?=$bgcolor?>>
                                        <td align=center><?=$regdate;?> <!-- ¹ßÇàÀÏÀÚ -->
                                        <td align=center><?=$tableRow[companyName];?><!-- ¹ßÇàó -->
                                        <td align=center><?=$tableRow[from_companynum];?> <!-- »ç¾÷ÀÚ¹øÈ£ -->
                                        <td align=center><?=$tableRow[chiefName];?>     <!-- ´ëÇ¥ÀÚ -->
                                        <td align=center><?=number_format($tableRow['totalprice']);?> <!-- ±Ý¾× -->
                                        <td align=center><?=$statu;?></td> <!-- ½ÂÀλóÅ -->
                                        <? if($tableRow[tax_visible] == "0") { ?>
                                        <td align=center><a href="community_07_02.php?KeyCode=<?=$KeyCode;?>&detail=y&idx=<?=$tableRow[idx];?>"><B><FONT COLOR="#0066FF">³»¿ëº¸±â</FONT></B></a></td> <!-- ÀÚ¼¼È÷ º¸±â -->
                                      <? } else { ?>
                                        <td align=center>Ãâ·Â ±â°£ ¸¶°¨</a></td> <!-- ÀÚ¼¼È÷ º¸±â -->
                                      <?  ?>
                                
                                        </tr>
<?
        
}
    }
?>                


                                    <br>
<script>
function admissionChk(idx,stat){
    
    exCodeFrm.stat.value =  stat ;
    exCodeFrm.submit();
    
}

function printChk( num ,code){
    
    window.open("billPrint.php?num=" +num + "&code=" + code,"","width=700,height=675" );
    
}
</script>
<?
    
if( isset($detail) && $detail == "y" ) {

        
$queryTax " SELECT  volume, pageName, serialNum,
        m.companyNum sCompanyNum, m.companyName sCompanyName, m.chiefName sChiefName, m.CompanyAddr sCompanyAddr,
        m.opt_1 sUptae, m.opt_2 sJongmok,
        p.companyNum rCompanyNum, p.companyName rCompanyName, p.chiefName rChiefName, p.CompanyAddr rCompanyAddr,
        p.opt_1 rUptae, p.opt_2 rJongmok,
        year, MONTH, DAY, blankNum, offerPrice, billPrice,

        month_1, day_1, item_1, standard_1, cnt_1, unitPrice_1, offerPrice_1, billPrice_1,
        month_2, day_2, item_2, standard_2, cnt_2, unitPrice_2, offerPrice_2, billPrice_2,
        month_3, day_3, item_3, standard_3, cnt_3, unitPrice_3, offerPrice_3, billPrice_3,

        totalPrice, cash, checkPrice, bill, onCredit, irecved,

        admission
        FROM bill_mijin m
        INNER JOIN bill_publish p ON m.companyNum = p.from_companynum
        WHERE p.idx = 
$idx ";

        
$resultTax mysql_query($queryTax);
        
$rowTax    mysql_fetch_array($resultTax);
?>
                                    <!---------------------------Å×ÀÌºí ½ÃÀÛ---------------------------------------------------->
                                    <table width=650 border=0 cellpadding=5 cellspacing=0 bgcolor=CCCCCC class=txt03>
                                        <form name="exCodeFrm" method=post target='' action='billProcess02.php'>
                                        <input type=hidden name='mode' value='detail'>
                                        <input type=hidden name='detail' value='y'>
                                        <input type=hidden name='idx' value='<?=$idx;?>'>
                                        <input type=hidden name='KeyCode' value='<?=$KeyCode;?>'>
                                        <input type=hidden name='stat'>
                                        </form>
                                        <tr>
                                            <td colspan=2 align=right bgcolor=#FFFFFF height="70">
<?
        
if($rowTax[admission] == "1"){ //ºñ½ÂÀÎÀ̸é...
?>
                                                <img src=../img/community/btn_agree_on.gif  name='admission_img' onclick="admissionChk('<?=$idx;?>','2');" style="cursor:hand;" width=59 height=25>
                                                <img src=../img/community/btn_not_on.gif name='admission_img2' onclick="admissionChk('<?=$idx;?>','3');" style="cursor:hand;" width=59 height=25 hspace=5>
<?
        
} else {
?>
                                                <img src=../img/community/btn_agree_off.gif  name='admission_img' style="cursor:hand;" width=59 height=25 onclick="alert('À̹̠󸮵Ƞ³»¿ªÀº ½ÂÀΠºÒ°¡ÇÕ´Ï´Ù.')">
                                                <img src=../img/community/btn_not_off.gif style="cursor:hand;" name='admission_img2' width=59 height=25 hspace=5 onclick="alert('À̹̠󸮵Ƞ³»¿ªÀº ¹Ý¼Û ºÒ°¡ÇÕ´Ï´Ù.')">
<?
        
}
?>
                                            </td>
                                        </tr>
                                        <tr bgcolor=FFFFFF>
                                            <td colspan=2 align=center>
<?
        
include "inc.tax.php";
    }
?>
                                                <!---------Å×ÀÌºí ³¡------------>
                                            </td>
                                        </tr>

                                    </TABLE>
                                    </table>
                                    <br>
<?
    
if($rowTax[admission] == "2"){
?>

                                    <table align='center' width="690" border="0" cellpadding="2" cellspacing="1" bgcolor="#D2D2D2" class="title">
                                        <tr align="center" bgcolor="#FFFFFF">
                                            <td align=center>º» ¼¼±Ý°è»ê¼­´Â ºÎ°¡°¡Ä¡¼¼¹ý ½ÃÇà·É Á¦ 53Á¶¿¡ ÀǰÅÇÏ¿©, Á¾À̼¼±Ý°è»ê¼­¸¦ ´ëüÇϴ ¼¼±Ý°è»ê¼­ÀÔ´Ï´Ù.</td>
                                        </tr>
                                    </table>

                                    <br>

                                    <TABLE width="700" align="center">
                                        <TR>
                                            <TD align="center" height="100" valign="top"><img src=../img/community/btn_submit01.gif onClick="printChk('<?=$KeyCode;?>','<?=$idx;?>');" style="cursor:hand;"></TD>
                                        </TR>
                                    </TABLE>
                                </td>
                            </tr>
                        </table>
<?
    
}
?>