/home/mjc1/public_html/html/carmate/dealdetail.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
<?
include("./include/header.php");

    
//*************µô·¯½ÂÀο©ºÎ È®ÀÎ***************
    
$SelectQry "select Com_num, Mcode from member where Mid = '$_COOKIE[USERID]' ";

    
$sSQL_result  =  mysql_query($SelectQry);

    
$row  =  mysql_fetch_array($sSQL_result);    
    
    if (
$row[Com_num] == 0) {

?>

<script>
    alert("µô·¯½ÂÀΠÈÄ ÁÖ¹®³»¿ªÀ» È®ÀΠÇÒ ¼ö ÀÖ½À´Ï´Ù. \n\nµô·¯°¡ÀÔ¹®ÀÇ:02-401-5121 / 011-522-0911");
    location.href = "deallist.php";
</script>    

<?
    


    
$MCODE $row[Mcode];   //·Î±×ÀÎÇÑ À¯ÀúÀÇ Mcode¸¦ ±¸Çؼ­ º¯¼ö¿¡ ´ãÀ½

    
$string substr(strtolower(md5(uniqid(rand(),1))),0,5);
    
$string str_replace('1','a',$string);

    
$cm_nCount          =      30;
    
$cm_item_nCount     =      30;

    function 
pageListing($cur_page$total_page$n$url) {

        
$retValue .= "<table width=600 border=0 cellspacing=0 cellpadding=0 height=40 align=center><tr><td align=center valign=middle>";
        if (
$cur_page 1) {

            
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($cur_page-1) ."'>ÀÌÀü</a></font></span>";
        } else {
            
$retValue .= "&nbsp;";
            
$retValue .= "&nbsp;";
        }
        
$retValue .= "&nbsp;";
        
$start_page = ( ( (int)( ($cur_page ) / 10 ) ) * 10 ) + 1;
        
//echo (int)(($cur_page - 1) / 10);
        
$end_page $start_page 9;
        if (
$end_page >= $total_page$end_page $total_page;
        if (
$start_page 1$retValue .= " <span style=font-size:9pt;><font face=Verdana><a href='" $url . ($start_page-1) . "'>...</a></font></span> ";
        if (
$total_page 1)
        for (
$k=$start_page;$k<=$end_page;$k++)
        if (
$cur_page != $k$retValue .= "&nbsp;<span style=font-size:9pt;><font face=Verdana><a href='$url$k'>$k</a>&nbsp;</font></span>";
        else 
$retValue .= "&nbsp;<b>$k</b> ";
        if (
$total_page $end_page$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='" $url . ($end_page+1) . "'>...</a></font></span> ";
        
$retValue .= "&nbsp;&nbsp;";
        if (
$cur_page $total_page) {
            
$retValue .= "<span style=font-size:9pt;><font face=Verdana><a href='$url. ($cur_page+1) ."'>´ÙÀ½</a></font></span>";

        } else {
            
$retValue .= "&nbsp;";
            
$retValue .= "&nbsp;";
        }
        
$retValue .= "</td></tr></table>";
        return 
$retValue;
    }


    
$total_sql  .=   " select * from dealerorder where ocode = $MCODE";

    
$result      mysql_query($total_sql) or die (mysql_error());
    
$nTotalCount mysql_num_rows($result);
    
$nPage       ceil($nTotalCount $cm_nCount);
    if (
$pg == ""$pg 1;
    
$nFrom = ($pg 1) * $cm_nCount;

    
$sql    $total_sql "  order by code DESC limit $nFrom$cm_nCount ";

    
$total_result mysql_query($sql) or die (mysql_error());

?>

<table style="margin:0 auto;width:942px;">
    <tr>
        <td style="height:30px;" colspan="3"></td>
    </tr>
    <tr>
        <td width="212" valign="top">
            <table>
                <caption class="sound_only">ÁÂÃø¸Þ´º</caption>
                <tr>
                    <td>
                        <? include("./include/aside_deal.html"); ?>
                    </td>
                </tr>
                <tr>
                    <td height="25">
                    </td>
                </tr>
            </table>
        </td>
        
        <td width="12"><span class="sound_only">¸Þ´º¿©¹é</span></td>
        
        <td valign="top">
            <table>
                <caption class="sound_only">³»¿ë¿µ¿ª</caption>
                <tr>
                    <td>
                        <table background="./img/titlebar/dealorder.gif" width="718" height="44">
                            <tr>
                                <td class="txt04" style="text-align:right">HOME > <font color="000000"><b>ÁÖ¹®³»¿ªÈ®ÀÎ</b></td>
                            </tr>
                            <tr>
                                <td colspan="2" height="12"></td>
                            </tr>
                        </table>                    
                    </td>
                </tr>
                <tr>
                    <td>
                        <!-- Á¦Ç°¼Ò°³»ó´Ü -->
                        <div class="dealSection txt04">
                            <? include("show_top_deal.php"); ?>
                            <p class="dealText first">ÇöÀç±îÁö µô·¯ºÐÀÇ »óǰÁÖ¹®(ÆÇ¸Å)³»¿ª È®ÀÎÀÌ °¡´ÉÇÕ´Ï´Ù.</p>
                            <p class="dealText">ÇØ´ç ¶óÀÎÀ» Å¬¸¯Çϸ頻ó¼¼Á¤º¸°¡ ³ª¿É´Ï´Ù.</p>
                        
                            <p class="dotLine"></p>

                        <form name='F2'>
                        <table class="vertiTable txt03">
                            <caption><img src="./img/titlebar/deal1sub1.gif" alt="µô·¯¸ñ·Ï"><span class="txt03">ÃÑ <?=$nTotalCount;?> °Ç</span></caption>
                            <colgroup>
                                <col style="width:40px;" /><col style="width:160px;" /><col style="width:150px;" />
                                <col style="width:120px;" /><col style="width:150px;" /><col style="width:80px;" />
                            </colgroup>
                            <tr> 
                                <th><img src="./img/dealler/dealdetail_01.gif" alt="¹øÈ£"></th>
                                <th><img src="./img/dealler/dealdetail_02.gif" alt="ÁÖ¹®ÀÏÀÚ"></th>
                                <th><img src="./img/dealler/dealdetail_03.gif" alt="±¸¸ÅÀÚ»óÈ£"></th>
                                <th><img src="./img/dealler/dealdetail_04.gif" alt="±¸¸ÅÀÚ¸í"></th>
                                <th><img src="./img/dealler/dealdetail_05.gif" alt="±¸¸ÅÀÚ¿¬¶ôó"></th>
                                <th><img src="./img/dealler/dealdetail_06.gif" alt="󸮿©ºÎ"></th>
                            </tr>

<?

    
if(  mysql_num_rows($total_result) > ){

        
$i 1;

        while(
$m_row  mysql_fetch_array($total_result)) {

            if(
$pg == "")  $num  =  $i;
            else           
$num  = ( ( $pg $cm_nCount ) -30 ) + $i ;

            if(
$m_row[btell]=="--")        $tel "&nbsp;";
            else            
                
$tel $m_row[btell];

            if(
$m_row[bhp]=="--")        $hp "&nbsp;";
            else            
                
$hp $m_row[bhp];

            if (
$m_row[bsend] == 0) {
                
$SendEnd "ÁÖ¹®Á¢¼ö";
            } elseif (
$m_row[bsend] == 1) {
                
$SendEnd "¹è¼ÛÁغñÁß";
            } elseif (
$m_row[bsend] == 2) {
                
$SendEnd "¹è¼Û¿Ï·á";
            }
            
            
$info="¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡  »óǰÁÖ¹®³»¿ª  ¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡<br>";
            
$info.="±¸¸Å»óÈ£ : ".$m_row[bcomp]."<br>";
            
$info.="±¸¸ÅÀÚ¸í : ".$m_row[bname]."<br>";
            
$info.="Àü&nbsp;&nbsp;&nbsp;&nbsp;È­ : ".$tel."<br>";
            
$info.="ÇÚ&nbsp;µå&nbsp;Æù : ".$hp."<br>";
            
$info.="ÁÖ&nbsp;&nbsp;&nbsp;&nbsp;¼Ò : ".$m_row[badd]."<br>";
            
$info.="Á¦Ç°³»¿ª : ".$m_row[bproduct]."<br>";
            
$info.="Ãß°¡¿É¼Ç : ".$m_row[boption]."<br>";
            
$info.="ƯÀÌ»çÇ× : ".$m_row[bigo]."<br>";
            
$info.="¹è¼Û¿äû : ".$m_row[sdate]."<br>";
            
$info.="¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡ Ã³¸®³»¿ª ¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡¦¡<br>";
            
$info.="󸮿©ºÎ : ".$SendEnd."<br>";
            
$info.="ÇÕ°è±Ý¾× : ".$m_row[bmoney]."<br>";
            
$info.="¹è¼ÛÀÏÀÚ : ".$m_row[bdate]."<br>";
            
$info.="¼ÛÀå¹øÈ£ : ".$m_row[bnum]."<br>";
            
$info.="Åùèȸ»ç : ".$m_row[bdeliver]."<br>";

            
$info stripslashes($info);

            echo 
"
            <tr style='cursor:pointer;' onclick=\"if(document.all('tr_
$i').style.display==''){document.all('tr_$i').style.display='none';}else{document.all('tr_$i').style.display=''}\" onmouseover=\"this.style.background='#FFFBFB'\" onmouseout=\"this.style.background='#ffffff'\">
            <td align=center>
$num</td>
            <td>
$m_row[odate]</td>
            <td>
$m_row[bcomp]</td>
            <td>
$m_row[bname]</td>
            <td>
$tel</td>
            <td>
$SendEnd</td>    
            </tr>
            <tr id='tr_
$i' style='display:none;'>
                <td colspan='7' style='text-align:left'>
$info</td>
            </tr>"
;

            
$i++;

        }
?>
                        </table>

                        <table >
                            <tr>
                                <td align="center" class="txt03"><?= pageListing($pg$nPage$cm_nCount"deal.php?pg=" );?></td>
                            </tr>
                        </table>
<?

    
}
    else {
        echo 
"
            <tr>
                <td colspan='6'>ÁÖ¹®³»¿ªÀÌ ¾ø½À´Ï´Ù.</td>
            </tr>
        </table>"
;
    }
?>


                        </div><!--//dealSection-->

    <!-- ³»¿ë ---------------  ³¡ ----->
                    </td>
                </tr>
            </table>
    <!-- Áß°£ --------------  ³¡ -->
        </td>
    </tr>

<? include('./include/footer.php'); ?>