/home/mjc1/public_html/j3demo/adm/board_comm_list.inc.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
<?php
include("./_common.php");

$sql "select * from {$table_name} where w_comment > 0 and w_parent = '{$code}' order by w_comment, w_subject ";
$res mysql_query($sql,$connect_j3);
while(
$info=mysql_fetch_array($res)){
    
$comm_array[] = $info;
}

foreach(
$comm_array as $key=>$info){
    if(
strlen($info['w_subject'])>0){ $ccomm_hidden "screen_out"; } else { $ccomm_hidden ""; }
    if(
$info['w_subject']!=''){
        
$rep_len strlen($info['w_subject'])*10;
        
$info['w_rep_icon'] = "<img src='{$j3['j3_img_url']}/icon_reply.gif' style='margin-left:{$rep_len}px;margin-right:3px;'>";
        
$rep_len $rep_len+17;
        
$comm_padding "padding-left:{$rep_len}px !important;";
    } else {
        
$info['w_rep_icon'] = "";
        
$comm_padding "";
    }
?>
        <tr class='comm_head_class'>
            <th>
                <input type='hidden' name='w_idx[]' value='<?php echo $info['idx'];?>'>
                <input type='hidden' name='w_name[]' value='<?php echo $info['w_name'];?>'>
                <input type='hidden' name='w_content[]' value='<?php echo $info['w_content'];?>'>
                <?php echo $info['w_rep_icon'].$info['w_name'];?> <span class='com_head_span_classs'><?php echo $info['w_regdate'];?> &nbsp;<label class='ccomm_class <?php echo $ccomm_hidden;?>'>대댓글</label>&nbsp; <label class='ecomm_class'>수정</label>&nbsp; <label class='dcomm_class'>삭제</label></span>
            </th>
        </tr>
        <tr class='comm_cont_class'>
            <td><span style='<?php echo $comm_padding;?>'><?php echo nl2br($info['w_content']);?></span></td>
        </tr>
<?php
}
?>