199 lines
6.4 KiB
PHP
Executable File
199 lines
6.4 KiB
PHP
Executable File
<?php
|
|
include_once ("./static_data/code.php");
|
|
|
|
if($search_comment_type == 'Y') {
|
|
$menu_code = '562';
|
|
} else {
|
|
$menu_code = '561';
|
|
}
|
|
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
|
?>
|
|
|
|
|
|
|
|
<form name="input_form" id="input_form" method="post" action="/admin/life/life_comment_list/5">
|
|
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
|
<input type="hidden" id="page" name="search_comment_type" value="<?=$search_comment_type?>">
|
|
<input type="hidden" id="idx" name="idx">
|
|
<input type="hidden" id="mode" name="mode">
|
|
<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?>">
|
|
|
|
<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/life/life_comment_list/5?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_life_type" onchange="check_search();">
|
|
<option value="">기능별</option>
|
|
<? foreach ($def_arr_life_type as $key=>$val) {?>
|
|
<option value="<?=$key?>" <? if($search_life_type==$key){ echo 'selected';}?>><?=$val?></option>
|
|
<? }?>
|
|
</select>
|
|
|
|
|
|
<select name="search_theme_type" onchange="check_search();">
|
|
<option value="">테마별</option>
|
|
<? foreach ($def_arr_life_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'];
|
|
$title = $val['title'];
|
|
$life_type = $val['life_type'];
|
|
$theme_types = $val['theme_types'];
|
|
$comment = $val['comment'];
|
|
$content_idx = $val['content_idx'];
|
|
$category_name1 = $val['category_name1'];
|
|
$category_name2 = $val['category_name2'];
|
|
$is_best = $val['is_best'];
|
|
$content_idx = $val['content_idx'];
|
|
$best_txt = '';
|
|
if($is_best == 'Y') {
|
|
$best_txt = '[best]';
|
|
}
|
|
|
|
$category_name = $category_name1;
|
|
if($category_name2!='') $category_name.= '> '.$category_name2;
|
|
|
|
$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:60px" onclick="location.href='/admin/life/life_reg/5?mode=edit&idx=<?=$content_idx?>'" style="cursor: pointer;">글보기</button>
|
|
<button type="button" class="btn_s_blue" style="width:40px" onclick="life_comment_del_proc('<?=$idx?>');" style="cursor: pointer;">삭제</button>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<td style="text-align: left">
|
|
<a href="/web/life/life_view/<?=$content_idx?>" target="_blank">[<?=$category_name?>]</br><?=$title?></a>
|
|
</td>
|
|
<td style="text-align:right"><?=$def_arr_life_type[$life_type]?></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 life_comment_del_proc(idx) {
|
|
if(confirm("댓글이 삭제됩니다. 삭제하시겠습니까?") == true) { //확인
|
|
$("#idx").val(idx);
|
|
$("#input_form").attr("action", "/admin/life/life_comment_del_proc");
|
|
$("#input_form").submit();
|
|
} else { //취소
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|