131 lines
4.9 KiB
PHP
Executable File
131 lines
4.9 KiB
PHP
Executable File
<?php
|
|
include_once ("./static_data/code.php");
|
|
|
|
$head_title = $result['head_title'];
|
|
$head_title = htmlspecialchars($head_title);
|
|
$title = $result['title'];
|
|
$title = htmlspecialchars($title);
|
|
$sub_content = $result['sub_content'];
|
|
$sub_content = htmlspecialchars($sub_content);
|
|
$content_idx = $result['content_idx'];
|
|
$main_img = $result['theme_img'];
|
|
$theme_type = $result['theme_type'];
|
|
$rank = $result['rank'];
|
|
$press_name = $result['press_name'];
|
|
|
|
|
|
if($main_img!='') $main_img_txt = '<img src="'.$main_img.'" width=250>';
|
|
|
|
$menu_code = '24';
|
|
require_once (APPPATH.'views/skin/admin/_content_comm.php');
|
|
|
|
$rowspan = "3";
|
|
if($theme_type=='1' || $theme_type=='6' ) {
|
|
$rowspan = "4";
|
|
}
|
|
|
|
|
|
?>
|
|
|
|
|
|
<form name="input_form" id="input_form" action="/admin/news/news_theme_edit_proc" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="idx" id="idx" value="<?=$idx?>">
|
|
<input type="hidden" id="search_type" name="search_type" value="<?=$search_type?>">
|
|
<input type="hidden" id="search_keyword" name="search_keyword" value="<?=$search_keyword?>">
|
|
<input type="hidden" id="search_ranking_type" name="search_theme_type" value="<?=$search_theme_type?>">
|
|
<input type="hidden" id="search_category_code1" name="search_category_code1" value="<?=$search_category_code1?>">
|
|
<input type="hidden" id="search_category_code2" name="search_category_code2" value="<?=$search_category_code2?>">
|
|
<input type="hidden" id="search_category_code3" name="search_category_code3" value="<?=$search_category_code3?>">
|
|
<input type="hidden" id="sort" name="sort" value="<?=$sort?>">
|
|
<input type="hidden" id="page" name="page" value="<?=$page?>">
|
|
<input type="hidden" id="key" name="key">
|
|
<input type="hidden" id="mode" name="theme_type" value="<?=$theme_type?>">
|
|
<input type="hidden" id="mode" name="mode" value="edit">
|
|
|
|
<div class="common_table news">
|
|
<h2 class="subtitle"><?=$def_arr_news_theme[$theme_type]['name']?></h2>
|
|
<?
|
|
if($def_arr_news_theme[$theme_type]['display']=='all') {
|
|
?>
|
|
<span class="text_blue"><b>* 모바일과 공통 송출관리</b></span>
|
|
<?
|
|
}
|
|
?>
|
|
<table>
|
|
<tr>
|
|
<th rowspan="<?=$rowspan?>"><?=$rank?>위</th>
|
|
<td class="tl">
|
|
<input type="hidden" name="content_idx" id="content_idx" value="<?=$content_idx?>">
|
|
<input type="text" name="head_title" id="head_title" class="type02" size="20" placeholder="말머리" value="<?=$head_title?>">
|
|
<input type="text" name="title" id="title" class="type00" size="50" placeholder="제목을 입력해주세요." value="<?=$title?>">
|
|
</td>
|
|
</tr>
|
|
<? if($theme_type == '1') {?>
|
|
<tr>
|
|
<td class="tl">
|
|
<textarea id="sub_content" name="sub_content" placeholder="기사 간략 노출(2줄)" rows="2" cols="80"><?=$sub_content?></textarea>
|
|
</td>
|
|
</tr>
|
|
<? }?>
|
|
<? if($theme_type == '6') {?>
|
|
<tr>
|
|
<td class="tl">
|
|
<input type="text" name="press_name" id="press_name" class="type02" size="20" placeholder="언론사" value="<?=$press_name?>" readonly>
|
|
</td>
|
|
</tr>
|
|
<? }?>
|
|
<tr>
|
|
<td class="tl">
|
|
<div id="img_view"><?=$main_img_txt?></div>
|
|
<input type="hidden" name="img" id="img">
|
|
<input type="hidden" name="org_img" id="org_img" value="<?=$main_img?>">
|
|
<input type="file" name="theme_img" id="theme_img" class="input00" size="20">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tl">
|
|
<button type="button" class="btn_black" style="width:100px" onclick="open_search_article('');" style="cursor: pointer;">컨텐츠검색</button>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
<div class="write_btn tc">
|
|
<a href="javascript:news_theme_list_reg_proc();">저장하기</a>
|
|
<a href="/admin/news/news_theme_list/2/<?=$page?>?search_type=<?=$search_type?>&search_keyword=<?=$search_keyword?>&search_theme_type=<?=$search_theme_type?>&search_category_code1=<?=$search_category_code1?>&search_category_code2=<?=$search_category_code2?>&search_category_code3=<?=$search_category_code3?>&sort=<?=$sort?>">목록으로</a>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<? require_once(APPPATH."views/admin/search/search_article_inc.php"); ?>
|
|
|
|
|
|
<script type="text/javascript">
|
|
function open_search_article(key){
|
|
$("#key").val(key);
|
|
$("#article_keyword").val('');
|
|
commonLayerOpen('search_article');
|
|
$("#article_keyword").focus();
|
|
}
|
|
|
|
function news_theme_list_reg_proc(){
|
|
if($("#title").val()!='') {
|
|
if($("#content_idx").val()==''){
|
|
alert("기사를 선택해주세요.");
|
|
return false;
|
|
}
|
|
<? if($theme_type != '3') {?>
|
|
if($("#theme_img").val()=='' && $("#img").val()=='' && $("#org_img").val()=='') {
|
|
alert("메인이미지를 입력해주세요.");
|
|
return false;
|
|
}
|
|
<?}?>
|
|
}
|
|
|
|
$("#input_form").submit();
|
|
|
|
}
|
|
|
|
</script>
|