/home/mjc1/public_html/html/millennium/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
<?php include_once("./_common2.php"); ?>
<? 
include("./Page/common/header.php"); ?>

<?
    
if( $_COOKIE['USERID'] == "" ) { 
?>
<script>
    alert("ȸ¿ø ·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
    location.href = "intro.php";
</script>
<?     
    
} if(!isset($ch_view)) $ch_view "";
?> 

<style>
.subContents_mail{padding:17px 10px;font-weight:600;font-size:11pt;}
.mail_orange{color:#ff6600;font-weight:600;}
.mail_blue{color:#00429d;font-weight:600;}

.qna_tit{height: 320px;background: url('./img/customer/board_title/qna_tit1-1.png') center no-repeat;}

.mypageInfo {table-layout: fixed;width: 100%;}
.mypageInfo th{height: 55px;line-height: 55px;font-size: 16px;font-weight: 600;text-align: left;border-bottom: 1px solid #acacac;border-right: 1px solid #acacac;padding-left: 20px;width: 160px;}
.mypageInfo td{width: calc(100% - 160px);border-bottom: 1px solid #acacac;}
.mypageInfo td input{border: 1px solid #b3b3b3 !important;height: 30px !important;line-height: 30px !important;vertical-align: middle;}
.mypageInfo td [type="file"]{border: 0px !important;}
.mypageInfo td textarea{resize: none;margin: 10px 0px;padding: 10px;width: 880px;border: 1px solid #b3b3b3 !important;font-size: 14px;line-height: 20px;}
.mypageInfo td select{height: 32px;width: 160px;font-size: 14px;border: 1px solid #b3b3b3;}

.faqTable, .qnaTable{width: 100%;}
</style>


    <div class="qna_tit"></div>
    <div class="wrap">
        <div class="contents" style="margin: 0px;margin-bottom: 50px;">

                <!-- <h1>
                    <img src="./img/titlebar/mypageqna.jpg" alt="Áú¹®/´äº¯È®ÀÎ">
                    <p>
                        <span class="home"><a href="intro.php">Home</a></span>
                        <span class="depth">></span>
                        <span class="depth1">¸¶ÀÌÆäÀÌÁö</span>
                        <span class="depth">></span>
                        <span class="depth2">Áú¹®/´äº¯ È®ÀÎ</span>
                    </p>
                </h1> -->

                <div class="section" style="position: relative;width: 1100px;margin: 0 auto;">
                    <!-- <h2><img src="./img/customer/as_top.jpg" alt="ÀüÈ­¹®ÀÇ:1566-8680"></h2> -->

<?
    $sql       
=     " select * from mBoard_as  where id = '{$_COOKIE['USERID']}' and uid = '{$uid}' ";
    
//echo $sql;
    
$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]'><img src='img/customer/file.gif' alt='ÆÄÀÏ´Ù¿î·Îµå'> <font class='blue'>[ÆÄÀÏ´Ù¿î·Îµå]</font></a>";  

        } else {
          
$_downfile    =    "<a href='fileDownLoad.php?type=as&th=Y&filename=$row[add_file]'><img src='img/customer/file.gif' alt='ÆÄÀÏ´Ù¿î·Îµå'> <font class='blue'>[ÆÄÀÏ´Ù¿î·Îµå]</font></a>";  
  
          }
      }
      
      
$content         stripcslashes($row['content']);
      
     if(
$pType !== "up"){ 
?>            

                    <!-- ³ªÀÇ ¹®Àdz»¿ª -->
                    <table class="mypageInfo mt30">
                        <tr>
                            <th width="90">Á¦¸ñ</th>
                            <td width="300"><b><?=stripcslashes($row['subject']);?></b></td>
                            <th width="110" style="border-left: 1px solid #acacac;">ÀÛ¼ºÀÚ</th>
                            <td width="100"><?=stripcslashes($row['name']);?></td>
                        </tr>
                        <tr> 
                            <th>÷ºÎÆÄÀÏ</th>
                            <td colspan="3"><b><?=$_downfile;?></b></td>
                        </tr>
                        <tr> 
                            <th>´äº¯³»¿ë</th>
                            <td colspan="3">
                                ¾È³çÇϽʴϱî? ¿¥Á¦À̼ÒÇÁÆ® °í°´Áö¿ø¼¾ÅÍÀÔ´Ï´Ù.<br />
                                <?=nl2br($content);?>
                            </td>
                        </tr>
                        <tr> 
                            <th style="background:#ecf0f9">°øÁö»çÇ×</th>
                            <td colspan="3" class="notice">
 ÀϹÝÀûÀΠÁú¹®Àº »ó´ãÆÀ¿¡¼­, ±â¼úÀûÀΠºÎºÐÀº °³¹ßÆÀ¿¡¼­ ´äº¯ÇÕ´Ï´Ù.<br />
 °í°´´ÔÀÇ ÁÁÀº ÀǰßÀº Á¦Ç°ÀǠǰÁúÇâ»ó¿¡ ¸¹Àº µµ¿òÀÌ µË´Ï´Ù.<br />
 Á¦Ç°ÀÇ ÇÏÀÚ ¿Ü ¼öÁ¤, Ãß°¡ÀÛ¾÷ ¿äû½Ã °³¹ß±â°£¿¡ µû¸¥ ºñ¿ëÀ̠û±¸µË´Ï´Ù.<br />
 ¹«»ó, À¯»óÀÛ¾÷ÀÇ ÆÇ´ÜÀº ´ç»çÀÇ °í°´°ü¸® ¾à°ü ¹× ±ÔÁ¤¿¡ µû¸¨´Ï´Ù.
                            </td>
                        </tr>
                    </table>
<? } else{ ?> 

<script>

    function asChk(){
        var blank_pattern = /^\s+|\s+$/g;

        if(asFrm.subject.value == "" ){
            alert("Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä");
            asFrm.subject.focus();
            return;
        }
        if(asFrm.content.value == "" ){
            alert("³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä");
            asFrm.content.focus();
            return;
        }

        if (asFrm.content.value.replace(blank_pattern,'') =="")
        {
             alert("±Û³»¿ë¿¡ °ø¹é¸¸ ÀԷµǾú½À´Ï´Ù.");
             asFrm.content.focus();
             return;
        }
            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;?>'>
                            
                    <table class="mypageInfo mt30">
                        <tr> 
                            <th width="110">Á¦¸ñ</th>
                            <td><input type="text" name="subject" value='<?=stripcslashes($row['subject']);?>' size="70"></td>
                        </tr>
                        <tr>
                            <th>÷ºÎÆÄÀÏ</th>
                            <td><?=$_downfile;?></td>
                        </tr>
                        <tr>
                            <th>Áú¹®³»¿ë</th>
                            <td>
                                <textarea name="content" cols="90" rows="10"><?=$content;?></textarea>
                            </td>
                        </tr>
                        <tr> 
                            <th style="background:#ecf0f9">°øÁö»çÇ×</th>
                            <td style="padding:15px 10px; line-height:16px;">
<font color="fc5528">ÀϹÝÀûÀΠÁú¹®Àº »ó´ãÆÀ¿¡¼­, ±â¼úÀûÀΠºÎºÐÀº °³¹ßÆÀ¿¡¼­ ´äº¯ÇÕ´Ï´Ù.<br />
°í°´´ÔÀÇ ÁÁÀº ÀǰßÀº Á¦Ç°ÀǠǰÁúÇâ»ó¿¡ ¸¹Àº µµ¿òÀÌ µË´Ï´Ù.<br />
Á¦Ç°ÀÇ ÇÏÀÚ ¿Ü ¼öÁ¤, Ãß°¡ÀÛ¾÷ ¿äû½Ã °³¹ß±â°£¿¡ µû¸¥ ºñ¿ëÀ̠û±¸µË´Ï´Ù.<br />
¹«»ó, À¯»óÀÛ¾÷ÀÇ ÆÇ´ÜÀº ´ç»çÀÇ °í°´°ü¸® ¾à°ü ¹× ±ÔÁ¤¿¡ µû¸¨´Ï´Ù.</font>
                            </td>
                        </tr>
                    </table>
                    </form>   
                                    
                    <div class="qnaBtn">
                        <p><a href="javascript:asChk();"><img src="./img/mypage/modify_bt.jpg" alt="¼öÁ¤¿Ï·á"></a></p>
                    </div>

<?     
      
}
    } 
?>            
                    <!-- ³ªÀÇ ¹®Àdz»¿ª -->
                    <table class="faqTable mt30">
                        <caption><img src="./img/mypage/qna_txt_01.jpg"></caption>
                        <tr>
                            <td width="90">±Û¹øÈ£</td>
                            <td width="300">Á¦¸ñ</td>
                            <td width="110">´äº¯ÀÚ</td>
                            <td width="100">»óÅÂ</td>
                            <td width="110">ÀÛ¼ºÀÏ</td>
                        </tr>
                    </table>
                            
<?
    $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'] );
?>
                    <table class="qnaTable">
                        <tr> 
                            <td width="90"><?=$row['uid'];?></td>
                            <td width="300" class="title">
                                <img src="./img/mypage/post_icon.gif" alt="Áú¹®¾ÆÀÌÄÜ"> <a href="mypageqna_03_01.php?pType=up&uid=<?=$row['uid'];?>"><?=stripcslashes($row['subject']);?></a>
                            </td>
                            <td width="110"></td>
                            <td width="100"><?=$proResult;?></td>
                            <td width="110"><?=$Reg_date;?></td>
                        </tr>
                    </table>

<?
       $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'] );

?>
                    <table class="qnaTable">
                        <tr> 
                            <td width="90"></td>
                            <td width="300" class="retitle">
                                <img src="./img/mypage/reply_icon.gif" alt="´äº¯¾ÆÀÌÄÜ"> <a href="mypageqna_03_01.php?uid=<?=$replyRow['uid'];?>"><?=$replyRow['subject'];?></a>
                            </td>
                            <td width="110"><?=$replyRow['name'];?></td>
                            <td width="100"></td>
                            <td width="110"><?=$replyReg_date;?></td>
                        </tr>
                    </table>
<?     
       
       
           
}
       
$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  =  "ÀÐÀ½";
?>
                    <table class="qnaTable">
                        <tr> 
                            <td width="90"></td>
                            <td width="300"><img src="./img/mypage/reply_icon.gif" alt="´äº¯¾ÆÀÌÄÜ"> <a href="mypageqna_03_01.php?uid=<?=$replyRow2['uid'];?>"><?=$replyRow2['subject'];?></a>
                            </td>
                            <td width="110"><?=$replyRow2['name'];?></td>
                            <td width="100"></td>
                            <td width="110"><?=$replyReg_date2;?></td>
                        </tr>
                    </table>

<?        
        
}        
      }  
      } 
    }
  }  
?>               
                    <div class="qnaBtn">
                        <? if ($pType !== "up"){ ?>
                        <p><a href="./mypageqna.php"><img src="./img/mypage/add_bt.jpg" alt="¼öÁ¤¿Ï·á"></a></p>
                        <? } else { ?>
        
                        <? ?>
                    </div>

                </div><!-- //section -->

        </div><!-- //contents -->
    </div><!-- //wrap -->

<? include("./Page/common/footer.php"); ?>