first commit
This commit is contained in:
179
application/views/admin/column/column_comment_list.php
Executable file
179
application/views/admin/column/column_comment_list.php
Executable file
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
include_once ("./static_data/code.php");
|
||||
|
||||
|
||||
if($search_comment_type == 'Y') {
|
||||
$menu_code = '342';
|
||||
} else {
|
||||
$menu_code = '341';
|
||||
}
|
||||
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
||||
?>
|
||||
|
||||
<form name="input_form" id="input_form" method="post" action="/admin/column/column_comment_list/3">
|
||||
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
||||
<input type="hidden" id="search_today" name="search_today" value="<?=$search_today?>">
|
||||
<input type="hidden" id="search_today_best" name="search_today_best" value="<?=$search_today_best?>">
|
||||
<input type="hidden" id="search_comment_type" name="search_comment_type" value="<?=$search_comment_type?>">
|
||||
<input type="hidden" id="idx" name="idx">
|
||||
<input type="hidden" id="mode" name="mode">
|
||||
|
||||
|
||||
<div class="common_table clearfix type01">
|
||||
|
||||
<div class="searh_area">
|
||||
<select name="search_type" id="search_type">
|
||||
<option value="">선택</option>
|
||||
<option value="write_name" <? if($search_type=='write_name'){ echo 'selected';}?>>닉네임</option>
|
||||
<option value="write_id" <? if($search_type=='write_id'){ echo 'selected';}?>>아이디</option>
|
||||
<option value="comment" <? if($search_type=='comment'){ echo 'selected';}?>>내용</option>
|
||||
</select> <input type="text" name="search_keyword" id="search_keyword" value="<?=$search_keyword?>" onkeypress="if( event.keyCode==13 ){check_search();}">
|
||||
<a href="javascript:check_search();" class="btn"><i class="fa moving_all fa-search" style="margin-left:8px;"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="common_table clearfix">
|
||||
<span style="font-weight:bold">Total:</span> <?=number_format($total_count);?>
|
||||
<a href="javascript:search_today();"><span style="font-weight:bold">오늘신규:</span> <?=number_format($new_count);?></a>
|
||||
<a href="/admin/news/news_comment_list/2?search_comment_type=Y"><span style="font-weight:bold" class="text_red">배댓전체:</span> <?=number_format($best_count);?></a>
|
||||
<a href="javascript:search_today_best();"><span style="font-weight:bold" class="text_blue">오늘의배댓:</span> <?=number_format($best_new_count);?></a>
|
||||
<div class="searh_area">
|
||||
<select name="search_theme_type" onchange="check_search();">
|
||||
<option value="">테마별</option>
|
||||
<? foreach ($def_arr_news_theme as $val) {?>
|
||||
<option value="<?=$val['code']?>" <? if($search_theme_type==$val['code']){ echo 'selected';}?>><?=$val['name']?></option>
|
||||
<? }?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="common_table">
|
||||
<table>
|
||||
|
||||
<?
|
||||
if(count($list)==0) {
|
||||
?>
|
||||
<tr><td>등록된 내용이 없습니다.</td></tr>
|
||||
<?
|
||||
} else {
|
||||
$now_date = date("Y-m-d");
|
||||
$dataNumber = ($total_count + $limit)-($page*$limit);
|
||||
foreach($list as $val) {
|
||||
$idx = $val['idx'];
|
||||
$p_idx = $val['p_idx'];
|
||||
$member_img = $val['member_img'];
|
||||
$write_name = $val['write_name'];
|
||||
$write_id = $val['write_id'];
|
||||
$reg_date = $val['reg_date'];
|
||||
$like_count = $val['like_count'];
|
||||
$bad_count = $val['bad_count'];
|
||||
$theme_types = $val['theme_types'];
|
||||
$title = $val['title'];
|
||||
$column_name = $val['column_name'];
|
||||
$comment = $val['comment'];
|
||||
$is_best = $val['is_best'];
|
||||
$content_idx = $val['content_idx'];
|
||||
$best_txt = '';
|
||||
if($is_best == 'Y') {
|
||||
$best_txt = '[best]';
|
||||
}
|
||||
|
||||
$parent_comment = '';
|
||||
if($p_idx!=$idx) {
|
||||
# model - 카테고리 list
|
||||
$ci=& get_instance();
|
||||
$ci->load->model('admin/comm/m_comment');
|
||||
$arr_parent_comment = $ci->m_comment->comment_where_p_idx_select($p_idx);
|
||||
if(count($arr_parent_comment) > 0) {
|
||||
$parent_comment = '</br></br>---------------- 원댓글 내용 --------------------</br>';
|
||||
$parent_comment.= $arr_parent_comment['comment'];
|
||||
|
||||
}
|
||||
}
|
||||
$comment = $comment.$parent_comment.'<p> </p>';
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">
|
||||
<img src="<?=$member_img?>" width="25"> <?=$write_name?>(<?=$write_id?>) <?=$reg_date?>
|
||||
</th>
|
||||
<th style="text-align: right">
|
||||
<?=$best_txt?> <img src="/img/web/img_thumbup.jpg" style="vertical-align:middle;margin-top:-3px;"><?=number_format($like_count)?> <img src="/img/web/img_thumbdown.jpg" style="vertical-align:middle;margin-top:-3px;"><?=number_format($bad_count)?>
|
||||
<button type="button" class="btn_s_blue" style="width:40px" onclick="column_comment_del_proc('<?=$idx?>');" style="cursor: pointer;">삭제</button>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left">
|
||||
<a href="/web/news/column_view/<?=$content_idx?>" target="_blank"><?=$title?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align:left;vertical-align: top" colspan="2"><?=$comment?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?
|
||||
$dataNumber--;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
<div class="pasing_wrap">
|
||||
<?=$pagination?>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function check_search(){
|
||||
if($("#search_type").val()=="" && $("#search_keyword").val()!=""){
|
||||
alert("검색할 항목을 선택해주세요.");
|
||||
return false;
|
||||
}
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
function search_today(){
|
||||
$("#search_today").val('Y');
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
function search_today_best(){
|
||||
$("#search_today_best").val('Y');
|
||||
$("#input_form").submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 삭제
|
||||
function column_comment_del_proc(idx) {
|
||||
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
||||
$("#idx").val(idx);
|
||||
$("#input_form").attr("action", "/admin/column/column_comment_del_proc");
|
||||
$("#input_form").submit();
|
||||
} else { //취소
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user