<?php if(!defined("__ZBXE__")) exit();?><?php  if($__Context->oDocument->getCommentCount()){ ?>
<div class="replyBox">

    <?php @$__Context->_comment_list = $__Context->oDocument->getComments();?>
    <?php $__Context->Context->__idx[2]=0;if(count($__Context->_comment_list))  foreach($__Context->_comment_list as $__Context->key => $__Context->comment){$__Context->__idx[3]=($__Context->__idx[3]+1)%2; $__Context->cycle_idx = $__Context->__idx[3]+1; ?>

        <div class="replyItem <?php  if($__Context->comment->get('depth')){ ?>reply<?php  } ?>">
            <?php  if($__Context->comment->get('depth')){ ?>
            <div style="margin-left:<?php @print(($__Context->comment->get('depth')-1)*20);?>px" class="replyIndent">
            <?php  } ?>

            <a name="comment_<?php @print($__Context->comment->comment_srl);?>"></a>

            <div class="replyOption">
                <?php  if($__Context->comment->isGranted() || !$__Context->comment->get('member_srl')){ ?>
                    <a href="<?php @print(getUrl('act','dispBoardDeleteComment','comment_srl',$__Context->comment->comment_srl));?>"><img src="/board/./modules/board/skins/xe_board/images/common/buttonDeleteX.gif" alt="<?php @print($__Context->lang->cmd_delete);?>" width="12" height="13" /></a>
                    <a href="<?php @print(getUrl('act','dispBoardModifyComment','comment_srl',$__Context->comment->comment_srl));?>"><img src="/board/./modules/board/skins/xe_board/images/<?php @print($__Context->module_info->colorset);?>/buttonModifyE.gif" alt="<?php @print($__Context->lang->cmd_modify);?>" width="20" height="17" /></a> 
                <?php  } ?>
                    <a href="<?php @print(getUrl('act','dispBoardReplyComment','comment_srl',$__Context->comment->comment_srl));?>"><img src="/board/./modules/board/skins/xe_board/images/<?php @print($__Context->module_info->colorset);?>/buttonReply.gif" alt="<?php @print($__Context->lang->cmd_reply);?>" width="20" height="17" /></a> 
            </div>

            <div class="date">

                <strong><?php @print($__Context->comment->getRegdate('Y.m.d'));?></strong> <?php @print($__Context->comment->getRegdate('H:i:s'));?>
                <?php  if($__Context->grant->manager|| $__Context->module_info->display_ip_address!='N'){ ?>(<?php @print($__Context->comment->getIpaddress());?>)<?php  } ?>
            </div>

            <div class="author">
            <?php  if(!$__Context->comment->member_srl){ ?>
                <?php  if($__Context->comment->homepage){ ?>
                    <a href="<?php @print($__Context->comment->homepage);?>" onclick="window.open(this.href);return false;"><?php @print($__Context->comment->getNickName());?></a>
                <?php  }else{ ?>
                    <?php @print($__Context->comment->getNickName());?>
                <?php  } ?>
            <?php  }else{ ?>
                <div class="member_<?php @print($__Context->comment->member_srl);?>"><?php @print($__Context->comment->getNickName());?></div>
            <?php  } ?>
            </div>

            <?php  if($__Context->comment->get('voted_count')!=0 || $__Context->comment->get('blamed_count') != 0){ ?>
            <div class="voted">
                (<?php @print($__Context->lang->voted_count);?>:
                <strong><?php @print($__Context->comment->get('voted_count')?$__Context->comment->get('voted_count'):0);?></strong> / <strong><?php @print($__Context->comment->get('blamed_count')?$__Context->comment->get('blamed_count'):0);?></strong>)
            </div>
            <?php  } ?>

            <div class="clear"></div>

            <div class="replyContent">
                <?php  if(!$__Context->comment->isAccessible()){ ?>
                    <div class="secretContent">
                        <form action="./" method="get" onsubmit="return procFilter(this, input_password)">
                        <input type="hidden" name="mid" value="<?php @print($__Context->mid);?>" />
                        <input type="hidden" name="page" value="<?php @print($__Context->page);?>" />
                        <input type="hidden" name="document_srl" value="<?php @print($__Context->comment->get('document_srl'));?>" />
                        <input type="hidden" name="comment_srl" value="<?php @print($__Context->comment->get('comment_srl'));?>" />
                            <div class="title"><?php @print($__Context->lang->msg_is_secret);?></div>
                            <div class="content"><input type="password" name="password" class="inputTypeText" /><span class="button <?php @print($__Context->btn_class);?>"><input type="submit" value="<?php @print($__Context->lang->cmd_input);?>" accesskey="s" /></span></div>
                        </form>
                    </div>
                <?php  }else{ ?>
                    <?php  if($__Context->comment->getProfileImage()){ ?>
                    <img src="<?php @print($__Context->comment->getProfileImage());?>" alt="profile" class="commentProfileImage" />
                    <?php  } ?>
                    <?php @print($__Context->comment->getContent(true));?>
                <?php  } ?>
                <div class="clear"></div>
            </div>

            <?php  if($__Context->comment->hasUploadedFIles()){ ?>
                <div class="fileAttached">
                    <ul>
                        <?php @$__Context->_uploaded_files = $__Context->comment->getUploadedFiles();?>
                        <?php $__Context->Context->__idx[3]=0;if(count($__Context->_uploaded_files))  foreach($__Context->_uploaded_files as $__Context->key => $__Context->file){$__Context->__idx[4]=($__Context->__idx[4]+1)%2; $__Context->cycle_idx = $__Context->__idx[4]+1; ?>
                        <li><a href="<?php @print(getUrl(''));?><?php @print($__Context->file->download_url);?>"><?php @print($__Context->file->source_filename);?> (<?php @print(FileHandler::filesize($__Context->file->file_size));?>)(<?php @print(number_format($__Context->file->download_count));?>)</a></li>
                        <?php  } ?>
                    </ul>
                    <div class="clear"></div>
                </div>
            <?php  } ?>

            <?php  if($__Context->comment->get('depth')){ ?>
            </div>
            <?php  } ?>
        </div>
    <?php  } ?>

    <!-- 댓글 페이지 네비게이션 -->
    <?php  if($__Context->oDocument->comment_page_navigation){ ?>
    <div class="pagination a1">
        <a href="<?php @print(getUrl('cpage',1));?>#comment" class="prevEnd"><?php @print($__Context->lang->first_page);?></a> 
        <?php  while($__Context->page_no = $__Context->oDocument->comment_page_navigation->getNextPage()){ ?>
            <?php  if($__Context->cpage == $__Context->page_no){ ?>
                <strong><?php @print($__Context->page_no);?></strong> 
            <?php  }else{ ?>
                <a href="<?php @print(getUrl('cpage',$__Context->page_no));?>#comment"><?php @print($__Context->page_no);?></a>
            <?php  } ?>
        <?php  } ?>
        <a href="<?php @print(getUrl('cpage',$__Context->oDocument->comment_page_navigation->last_page));?>#comment" class="nextEnd"><?php @print($__Context->lang->last_page);?></a>
    </div>
    <?php  } ?>

</div>
<?php  } ?>