/home/mjc1/public_html/mjmall/mypageqna_view.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
<?
include_once("./_common.php");
    if( 
$_COOKIE['USERID'] == "" ) { 
?>
    <script>
        //alert("ȸ¿ø ·Î±×ÀΠÈÄ¿¡ À̿밡´ÉÇÕ´Ï´Ù.");
        location.href = "./mall.php";
    </script>
<?     
    
} if(!isset($ch_view)) $ch_view "";
?> 

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

    <div class="location">
        <div class="wrap">
            <a href="./mall.php" class="home"><span class="screen_out">Home</span></a>
            <span>></span><a href="./mypageedit.php"><span class="depth1">¸¶ÀÌÆäÀÌÁö</span></a>
            <span>></span><span class="depth2">1:1 »ó´ãÇϱâ</span>
        </div><!-- //wrap -->
    </div><!-- //location -->

    <div class="wrap">
        <div class="contents">

<?
    $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='./include/software/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"){ 
?>


            <? include("./include/mypage/sub_lnb.html"); ?>

            <div class="reqnaSection">
                <table class="reviewTable">
                    <caption>¹®ÀÇÇϱâ</caption>
                    <colgroup>
                        <col style="width:185px;"><col style="width:300px;"><col style="width:185px;"><col style="width:300px;">
                    </colgroup>
                        <tr>
                            <th>Á¦¸ñ</th>
                            <td><b><?=stripcslashes($row['subject']);?></b></td>
                            <th>ÀÛ¼ºÀÚ</th>
                            <td><?=stripcslashes($row['name']);?></td>
                        </tr>
                        <tr> 
                            <th>÷ºÎÆÄÀÏ</th>
                            <td colspan="3"><b><?=$_downfile;?></b></td>
                        </tr>
                        <tr> 
                            <th>´äº¯³»¿ë</th>
                            <td colspan="3">¾È³çÇϽʴϱî? ¿¥Á¦À̼ÒÇÁÆ® °í°´Áö¿ø¼¾ÅÍÀÔ´Ï´Ù.
                                <br /><br /><?=nl2br($content);?>
                            </td>
                        </tr>
                        <tr> 
                            <th class="notice">°øÁö»çÇ×</th>
                            <td colspan="3" class="notice">
                                ÀϹÝÀûÀΠÁú¹®Àº »ó´ãÆÀ¿¡¼­, ±â¼úÀûÀΠºÎºÐÀº °³¹ßÆÀ¿¡¼­ ´äº¯ÇÕ´Ï´Ù.<br />
                                °í°´´ÔÀÇ ÁÁÀº ÀǰßÀº Á¦Ç°ÀǠǰÁúÇâ»ó¿¡ ¸¹Àº µµ¿òÀÌ µË´Ï´Ù.<br />
                                Á¦Ç°ÀÇ ÇÏÀÚ ¿Ü ¼öÁ¤, Ãß°¡ÀÛ¾÷ ¿äû½Ã °³¹ß±â°£¿¡ µû¸¥ ºñ¿ëÀ̠û±¸µË´Ï´Ù.<br />
                                ¹«»ó, À¯»óÀÛ¾÷ÀÇ ÆÇ´ÜÀº ´ç»çÀÇ °í°´°ü¸® ¾à°ü ¹× ±ÔÁ¤¿¡ µû¸¨´Ï´Ù.
                            </td>
                        </tr>
                    </table><!-- //reviewTable -->
<? } 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="reviewSection">
                        <table class="reviewTable">
                            <caption>1:1¹®ÀDZÛ</caption>
                            <colgroup>
                                <col style="width:185px;"><col style="width:805px;">
                            </colgroup>
                            <col>
                            <tr> 
                                <th>Á¦¸ñ</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"><?=$content;?></textarea>
                                </td>
                            </tr>
                            <tr> 
                                <th class="notice">°øÁö»çÇ×</th>
                                <td class="notice">
                                    ÀϹÝÀûÀΠÁú¹®Àº »ó´ãÆÀ¿¡¼­, ±â¼úÀûÀΠºÎºÐÀº °³¹ßÆÀ¿¡¼­ ´äº¯ÇÕ´Ï´Ù.<br />
                                    °í°´´ÔÀÇ ÁÁÀº ÀǰßÀº Á¦Ç°ÀǠǰÁúÇâ»ó¿¡ ¸¹Àº µµ¿òÀÌ µË´Ï´Ù.<br />
                                    Á¦Ç°ÀÇ ÇÏÀÚ ¿Ü ¼öÁ¤, Ãß°¡ÀÛ¾÷ ¿äû½Ã °³¹ß±â°£¿¡ µû¸¥ ºñ¿ëÀ̠û±¸µË´Ï´Ù.<br />
                                    ¹«»ó, À¯»óÀÛ¾÷ÀÇ ÆÇ´ÜÀº ´ç»çÀÇ °í°´°ü¸® ¾à°ü ¹× ±ÔÁ¤¿¡ µû¸¨´Ï´Ù.
                                </td>
                            </tr>
                        </table>
                    </div><!-- //reviewSection -->
                    </form>   
                                    


<?     
      
}
    } 
?>            

                    <div class="qnaBtn1">
                        <a href="javascript:asChk();">¼öÁ¤¿Ï·á</a>
                    </div>


                    <!-- ³ªÀÇ ¹®Àdz»¿ª -->
                    <table class="qnaTable">
                        <caption>³ªÀÇ ¹®Àdz»¿ª</caption>
                        <colgroup>
                            <col style="width:100px;"><col style="width:300px;"><col style="width:200px;"><col style="width:200px;"><col style="width:190px;">
                        </colgroup>
                        <tr>
                            <th>±Û¹øÈ£</th>
                            <th>Á¦¸ñ</th>
                            <th>´äº¯ÀÚ</th>
                            <th>»óÅÂ</th>
                            <th>ÀÛ¼ºÀÏ</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_view.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">
                                <span class="replyIcon"></span><a href="mypageqna_view.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">
                                <span class="replyIcon"></span><a href="mypageqna_view.php?uid=<?=$replyRow2['uid'];?>"><?=$replyRow2['subject'];?></a>
                            </td>
                            <td><?=$replyRow2['name'];?></td>
                            <td></td>
                            <td><?=$replyReg_date2;?></td>
                        </tr>

<?        
        
}        
      }  
      } 
    }
  }  
?>

                </table><!-- //qnaTable -->
            </div><!-- //qnaSection -->

            
            <div class="qnaBtn1">
                <? if ($pType !== "up"){ ?>
                <p><a href="./mypageqna.php">¸ñ·Ïº¸±â</a></p>
                <? ?>
            </div>

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

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