/home/mjc1/public_html/html/carmate/mypageqna_03_01.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
<?
    
if(!isset($pType)) $pType "";
    if(!isset(
$_downfile)) $_downfile "";
    if (!isset(
$_COOKIE['USERID']) || $_COOKIE['USERID'] == ""){
?>
<script>
    alert("ȸ¿ø ·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "./intro.php";
</script>
<?
    
}
    
    include(
"./include/header.php");
?> 

<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_mypage.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/mypageqna.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>
                        <!-- Á¦Ç°¼Ò°³»ó´Ü -->
<?
    $sql       
=     " select * from mBoard_as  where id = '{$_COOKIE['USERID']}' and uid = '$uid' ";
    
$result    =       mysql_query($sql) or die (mysql_error());
    
 if(
$num mysql_num_rows($result)){
   
     
$updateQry  =   " UPDATE  mBoard_as   SET ch_view='y' WHERE uid = '$uid' ";
                       
mysql_query($updateQry); 
      
       
$row         =    mysql_fetch_array($result);
       
     if(
$row['add_file'] !== ""){
       
        if(
$row['thread'] == "A"){
       
        
$_downfile    =   "<a href='fileDownLoad.php?type=as&filename=$row[add_file]'><strong><font color=003399>ÆÄÀÏ ´Ù¿î·Îµå</font></strong><img src=../img/skin/file.gif width=14 height=14 hspace=5 border=0></a>";  

        }
        else{
          
$_downfile    =   "<a href='fileDownLoad.php?type=as&th=Y&filename=$row[add_file]'><strong><font color=003399>ÆÄÀÏ ´Ù¿î·Îµå</font></strong><img src=../img/skin/file.gif width=14 height=14 hspace=5 border=0></a>";  
  
          }
      }
      
      
$content         stripcslashes($row['content']);
      
     if(
$pType !== "up"){ 
?>
                        <div class="asSection" style="margin:50px 0 0 ;">
                            <h2><?
                            
if( !isset($_COOKIE['USERID']) || $_COOKIE['USERID'] == "" ) {
                            
?>
                            <img src="../millennium/img/mypage/asinfo.gif">
                            <? } else { ?>
                            <img src="../millennium/img/mypage/asinfo_login.gif">
                            <? ?></h2>
                            
                            <table class="boardTable txt04">
                                <caption>¹®Àǵî·Ï</caption>
                                <colgroup>
                                    <col style="width:120px" /><col style="width:580px" />
                                </colgroup>
                                <tr> 
                                    <th>Á¦ ¸ñ</th>
                                    <td><input name="subject" type="text" class="log" size="50" maxlength="70"></td>
                                    <!--th>ÀÛ¼ºÀÚ</th>
                                    <td><?=stripcslashes($row['name']);?></td-->
                                </tr>
                                <tr> 
                                    <th>÷ºÎÆÄÀÏ</th>
                                    <td><?=$_downfile;?></td>
                                </tr>
                                <tr> 
                                    <th>´äº¯³»¿ë</th>
                                    <td>¾È³çÇϽʴϱî? Ä«¸ÞÀÌÆ® °í°´Áö¿ø¼¾ÅÍÀÔ´Ï´Ù.<br><br><?=nl2br($content);?></td>
                                </tr>
                                <tr> 
                                    <th>°øÁö»çÇ×</th>
                                    <td>
ÀϹÝÀûÀΠÁú¹®Àº »ó´ãÆÀ¿¡¼­, ±â¼úÀûÀΠºÎºÐÀº °³¹ßÆÀ¿¡¼­ ´äº¯ÇÕ´Ï´Ù.<br>
°í°´´ÔÀÇ ÁÁÀº ÀǰßÀº Á¦Ç°ÀǠǰÁúÇâ»ó¿¡ ¸¹Àº µµ¿òÀÌ µË´Ï´Ù.<br>
Á¦Ç°ÀÇ ÇÏÀÚ ¿Ü ¼öÁ¤, Ãß°¡ÀÛ¾÷ ¿äû½Ã °³¹ß±â°£¿¡ µû¸¥ ºñ¿ëÀ̠û±¸µË´Ï´Ù.<br>
¹«»ó, À¯»óÀÛ¾÷ÀÇ ÆÇ´ÜÀº ´ç»çÀÇ °í°´°ü¸® ¾à°ü ¹× ±ÔÁ¤¿¡ µû¸¨´Ï´Ù.<br></td>
                                </tr>
                            </table>

<?
   
} else {
?> 

<script>
function asChk(){

    if(asFrm.subject.value == "" ){
        alert("Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä");
        asFrm.subject.focus();
    }
    
    if(asFrm.content.value == "" ){
        alert("³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä");
        asFrm.content.focus();
    }
    
    asFrm.submit();{
    alert("¼öÁ¤ÀÌ ¿Ï·á µÇ¾ú½À´Ï´Ù.");
    }
}
</script>
                        <form name='asFrm' method=post action="./asBoardProcess.php">   
                        <input type=hidden name=mode value='update'>
                        <input type=hidden name=uid value='<?=$uid;?>'>
                        <div class="asSection" style="margin:0 0 50px;">
                            <h2><img src="../millennium/img/mypage/aseditinfo.gif"></h2>
                            
                            <table class="boardTable txt04">
                                <caption>¹®Àǵî·Ï</caption>
                                <colgroup>
                                    <col style="width:120px" /><col style="width:580px" />
                                </colgroup>
                                <tr> 
                                    <th>Á¦ ¸ñ</th>
                                    <td><input name="subject" type="text" class="log" value='<?=stripcslashes($row['subject']);?>'></td>
                                </tr>
                                <tr> 
                                    <th>÷ºÎÆÄÀÏ</th>
                                    <td><?=$_downfile;?></td>
                                </tr>
                                <tr> 
                                    <th>Áú¹®³»¿ë</th>
                                    <td><textarea name="content" cols="82" rows="10" class="log"><?=$content;?></textarea></td>
                                </tr>
                            </table>
                        </form>   

                        <div class="btnArea"><a href="javascript:asChk();"><img src="./img/mypage/content_bt.gif" alt="³»¿ë¼öÁ¤"></a></div>
<?     
      
}
    } 
?>
                        <div class="asSection" style="margin:50px 0 0;">
                            <h2><?
                            
if( $_COOKIE['USERID'] == "" ) { 
                            
?>
                            <img src="../millennium/img/mypage/asinfo.gif">
                            <? } else { ?>
                            <img src="../millennium/img/mypage/asinfo_login.gif">
                            <? ?></h2>

                            <table class="vertiTable txt03">
                                <caption>³ªÀÇ ¹®Àdz»¿ª</caption>
                                <colgroup>
                                    <col style="width:62px;" /><col style="width:360px;" /><col style="width:110px;" />
                                    <col style="width:71px;" /><col style="width:97px;" />
                                </colgroup>
                                <tr> 
                                    <th colspan="5"><img src="./img/mypage/board_01.gif" alt="¹øÈ£"><img src="./img/mypage/board_02.gif" alt="Á¦¸ñ"><img src="./img/mypage/board_03.gif" alt="´äº¯ÀÚ"><img src="./img/mypage/board_04.gif" alt="»óÅÂ"><img src="./img/mypage/board_05.gif" alt="ÀÛ¼ºÀÏ"></th>
                                </tr>
<?
    $sql       
=     " select * from mBoard_as  where id = '{$_COOKIE['USERID']}' and thread = 'A' order by uid desc ";
    
$result    =       mysql_query($sql) or die (mysql_error());
    
 if(
$num mysql_num_rows($result)){   
      
     while(
$row  mysql_fetch_array($result)) { 
          if( 
$row[21] == "A")  $proResult  =  "´ë±â";
          if( 
$row[21] == "B")  $proResult  =  "Á¢¼ö";
          if( 
$row[21] == "C")  $proResult  =  "ó¸®";
          if( 
$row[21] == "D")  $proResult  =  "º¸·ù";
          if( 
$row[21] == "E")  $proResult  =  "¿Ï·á";
          if( 
$row[21] == "F")  $proResult  =  "Áú¹®";
          if( 
$row[21] == "G")  $proResult  =  "¿äû";
       
       
$Reg_date    date('Y-m-d',$row['reg_date'] );
?>
                                <tr> 
                                    <td><?=$row['uid'];?></td>
                                    <td class="alignL"><a href="mypageqna_03_01.php?pType=up&uid=<?=$row['uid'];?>"><?=stripcslashes($row['subject']);?></a></td>
                                    <td></td>
                                    <td><?=$proResult;?></td>
                                    <td><?=$Reg_date;?></td>
                                </tr>
<?
       $replyQry      
=   " select a.uid, a.name , a.proResult, a.fid , a.subject, a.reg_date from mBoard_as a where a.fid = '$row[fid]' and a.id = '{$_COOKIE['USERID']}' and thread = 'AA' order by a.uid desc limit 20  ";   

       
$replyResult   =     mysql_query$replyQry);
      
///////////////////////////ù¹øÂ° ÀÀ´ä//////////////////////////////
      
if( mysql_num_rows($replyResult) > ){
      
        
        while( 
$replyRow  mysql_fetch_array($replyResult)){



          if(
$replyRow['ch_view'] == "y")    $_confirm  =  "ÀÐÀ½";
             
$replyReg_date    date('Y-m-d',$replyRow['reg_date'] );




?>
                                <tr> 
                                    <td></td>
                                    <td class="alignL"><img src="./img/mypage/post_icon.gif" style="padding-left:10px;"><a href="mypageqna_03_01.php?uid=<?=$replyRow['uid'];?>"><?=$replyRow['subject'];?></a></td>
                                    <td><?=$replyRow['name'];?></td>
                                    <td></td>
                                    <td><?=$replyReg_date;?></td>
                                </tr>
<?     
    
}
       
$replyQry2      =   " select * from mBoard_as where fid = '$row[fid]' and id = '{$_COOKIE['USERID']}' and thread = 'AAA' ";   
       
$replyResult2   =   mysql_query$replyQry2);
      
///////////////////////////µÎ¹øÂ° ÀÀ´ä//////////////////////////////
      
if( mysql_num_rows($replyResult2) > ){
        
        while( 
$replyRow2  mysql_fetch_array($replyResult2)){
         
         
$replyReg_date2    date('Y-m-d',$replyRow2['reg_date'] );
         if(
$replyRow2['ch_view'] == "y")    $_confirm2  =  "ÀÐÀ½";
?>

                                <tr> 
                                    <td></td>
                                    <td class="alignL"><img src="./img/mypage/post_icon.gif" style="padding-left:30px;"><a href="mypageqna_03_01.php?uid=<?=$replyRow2['uid'];?>"><?=$replyRow2['subject'];?></a></td>
                                    <td><?=$replyRow2['name'];?></td>
                                    <td></td>
                                    <td><?=$replyReg_date2;?></td>
                                </tr>
<?        
        
}        
      }  
      } 
    }
  }  
?>               

                            </table>
<? if ($pType !== "up"){ ?>
                            <div class="btnArea">
                                <a href="./mypageqna.php"><img src="./img/customer/asadd_bt.gif" alt=""></a>
                            </div>
<?
    
} else { 
}
?>

    <!-- ³»¿ë ---------------  ³¡ ----->
                    </td>
                </tr>
            </table>
    <!-- Áß°£ --------------  ³¡ -->
        </td>
    </tr>
    <tr>
        <td colspan="3">
        <br>
            <? include("./bottom.php"); ?>
        </td>
    </tr>
</table>


</form>
</body>