first commit

This commit is contained in:
pakerpale
2020-06-10 06:19:03 +09:00
commit cd6b5b7832
6081 changed files with 624389 additions and 0 deletions

View File

@@ -0,0 +1,109 @@
<!-- 레이어팝업 : 기시검색 -->
<section class="common_layer common_search" id="search_article">
<div class="dim_area"></div>
<div class="layer_box">
<h2>컨텐츠 검색</h2>
<button type="button" class="btn_close_layer" onclick="search_article_close();"><img src="/img/admin/btn_layer_close.gif" alt="레이어 팝업 닫기"></button>
<fieldset>
<p class="guide">컨텐츠를 검색해주세요.</p>
<div class="input_box in_btn">
<input type="text" id="article_keyword" name="article_keyword" placeholder="검색어 입력" onkeypress="if( event.keyCode==13 ){search_article();}">
<a href="javascript:search_article();" class="btn">검색하기</a>
</div>
<!-- 검색결과 -->
<div class="result" id="result"></div>
</fieldset>
</div>
</section>
<script type="text/javascript">
// 기사 검색
function search_article(){
var article_keyword = $("#article_keyword").val();
var sort = $(":input:radio[name=sort]:checked").val();
var category1 = '';
var category2 = '';
var category3 = '';
if($("#rank1").length > 0) {
var rank1 = $("#rank1").val();
if($("#category1_"+rank1).length > 0) category1 = $("#category1_"+rank1).val();
if($("#category2_"+rank1).length > 0) category2 = $("#category2_"+rank1).val();
if($("#category3_"+rank1).length > 0) category3 = $("#category3_"+rank1).val();
}
if(article_keyword == '') {
alert("검색어를 입력해주세요");
return false;
}
var form_data = {
"content_type" : "<?=$content_type?>",
"article_keyword" : article_keyword,
"sort" : sort,
"category1" : category1,
"category2" : category2,
"category3" : category3
};
$.ajax({
url: '/admin/search/search_article_list',
async : false,
type : 'POST',
dataType : 'HTML',
data : form_data,
success: function (rtnHtml) {
if(rtnHtml=='') return false;
$("#result").show();
$("#result").html(rtnHtml);
},
error: function(jqXHR, exception) {
console.log(jqXHR);
}
});
}
function search_article_close(){
$("#result").hide();
commonLayerClose('search_article');
}
// 프로그램 선택
function select_article(idx, name, img, share_cnt, review_cnt, comment_cnt, hit_cnt, column_name, sub_title, head_title, editor_name, like_count, content_name, content_type, video_url, editor_idx, press_name){
var key = $("#key").val();
$("#title"+key).val(name);
$("#content_idx"+key).val(idx);
$("#content"+key).val('');
var html = '';
if(img!='') {
html = '<img src="'+img+'" width="200">';
}
$("#img_view"+key).html(html);
$("#img"+key).val(img);
$("#article_keyword").val("");
$("#result").hide();
if($("#hit_count"+key).length > 0) $("#hit_count"+key).val(hit_cnt);
if($("#share_count"+key).length > 0) $("#share_count"+key).val(share_cnt);
if($("#review_count"+key).length > 0) $("#review_count"+key).val(review_cnt);
if($("#comment_count"+key).length > 0) $("#comment_count"+key).val(comment_cnt);
if($("#column_name"+key).length > 0) $("#column_name"+key).val(column_name);
if($("#sub_title"+key).length > 0) $("#sub_title"+key).val(sub_title);
if($("#head_title"+key).length > 0) $("#head_title"+key).val(head_title);
if($("#editor_name"+key).length > 0) $("#editor_name"+key).val(editor_name);
if($("#like_count"+key).length > 0) $("#like_count"+key).val(like_count);
if($("#content_name"+key).length > 0) $("#content_name"+key).val(content_name);
if($("#content_type"+key).length > 0) $("#content_type"+key).val(content_type);
if($("#video_url"+key).length > 0) $("#video_url"+key).val(video_url);
if($("#category3"+key).length > 0) $("#category3"+key).val(editor_idx).prop("selected", true);
if($("#press_name"+key).length > 0) $("#press_name"+key).val(press_name);
commonLayerClose('search_article');
}
</script>

View File

@@ -0,0 +1,68 @@
<p class="info">총 <span class="mark"><?=number_format($count)?></span> 개의 검색결과가 있습니다.&nbsp;&nbsp;<input type="radio" name="sort" id="sort" value="1" onclick="search_article();" <? if($sort=='1') { echo 'checked';}?>> 최신순 <input type="radio" name="sort" id="sort" value="2" onclick="search_article();" <? if($sort=='2') { echo 'checked';}?>> 오래된순 </p>
<ul class="list">
<?
if(count($list)==0) {
echo '<li><p class="name">검색된 컨텐츠가 없습니다.</p></li>';
} else {
?>
<?
foreach($list as $val) {
$idx = $val['idx'];
$title = $val['title'];
$title = htmlspecialchars($title);
$title1 = str_replace("'", "\\'", $title);
$main_img = $val['main_img'];
$share_count = $val['share_count'];
$comment_count = $val['comment_count'];
$hit_count = $val['hit_count'];
$like_count = $val['like_count'];
$content_name = '';$content_name_txt='';
if(isset($val['content_name'])==true) {
$content_name = $val['content_name'];
$content_name_txt = '['.$content_name.']';
}
$content_type = '';
if(isset($val['content_type'])==true) $content_type = $val['content_type'];
$column_name = '';
if(isset($val['column_name'])==true) $column_name = $val['column_name'];
$sub_title = '';
if(isset($val['sub_title'])==true) $sub_title = $val['sub_title'];
$head_title = '';
if(isset($val['head_title'])==true) $head_title = $val['head_title'];
$editor_name = '';
if(isset($val['editor_name'])==true) $editor_name = $val['editor_name'];
$editor_idx = '';
if(isset($val['partner_idx'])==true) $editor_idx = $val['partner_idx'];
$video_url = '';
if(isset($val['video_url'])==true) $video_url = $val['video_url'];
$press_name = '';
if(isset($val['press_name'])==true) $press_name = $val['press_name'];
$review_count = '';
if(isset($val['review_count1'])==true) $review_count = $val['review_count1'];
?>
<li>
<p class="name"><?=$content_name_txt?> <?=$title?></p>
<a href="javascript:;" class="btn_green" onclick="select_article('<?=$idx?>', '<?=$title1?>', '<?=$main_img?>', '<?=$share_count?>', '<?=$review_count?>', '<?=$comment_count?>', '<?=$hit_count?>', '<?=$column_name?>', '<?=$sub_title?>', '<?=$head_title?>', '<?=$editor_name?>', '<?=$like_count?>', '<?=$content_name?>', '<?=$content_type?>', '<?=$video_url?>', '<?=$editor_idx?>', '<?=$press_name?>');">선택</a>
</li>
<?
}
}
?>
</ul>