쇼핑몰관리자: #20 쇼핑몰관리 내용관리 추가/수정 표준화 및 스타일 완료

This commit is contained in:
whitedot
2013-04-17 21:14:29 +09:00
parent a74cec1f5e
commit 1d3370c35d

View File

@ -6,11 +6,12 @@ include_once(G4_CKEDITOR_PATH.'/ckeditor.lib.php');
auth_check($auth[$sub_menu], "w"); auth_check($auth[$sub_menu], "w");
// 상단, 하단 파일경로 필드 추가 // 상단, 하단 파일경로 필드 추가
$sql = " ALTER TABLE `{$g4['shop_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL , $sql = " ALTER TABLE `{$g4['shop_content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL "; ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
sql_query($sql, false); sql_query($sql, false);
$html_title = "내용"; $html_title = "내용";
$g4['title'] = $html_title.' 관리';
if ($w == "u") if ($w == "u")
{ {
@ -28,90 +29,97 @@ else
$co['co_html'] = 2; $co['co_html'] = 2;
} }
$g4['title'] = $html_title;
include_once (G4_ADMIN_PATH.'/admin.head.php'); include_once (G4_ADMIN_PATH.'/admin.head.php');
?> ?>
<form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" > <form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
<input type="hidden" name="w" value="<? echo $w?>"> <input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="co_html" value="1"> <input type="hidden" name="co_html" value="1">
<section class="cbox"> <section class="cbox">
<h2>내용 입력</h2> <h2>내용 입력</h2>
<table class="frm_tbl"> <table class="frm_tbl">
<colgroup> <colgroup>
<col class="grid_3"> <col class="grid_3">
<col class="grid_15"> <col>
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<th scope="row"><label for="co_id">ID</label></th> <th scope="row"><label for="co_id">ID</label></th>
<td> <td>
<input type="text" value="<? echo $co['co_id'] ?>" name="co_id" id ="co_id" required class="required frm_input" size="20" maxlength="20" <? echo $readonly ?>> <?=help('20자 이내의 영문자, 숫자, _ 만 가능합니다.')?>
<? if ($w == 'u') { echo icon("보기", "$g4[shop_path]/content.php?co_id=$co_id"); } ?> <input type="text" value="<? echo $co['co_id'] ?>" name="co_id" id ="co_id" required <?=$readonly ?> class="required <?=$readonly ?> frm_input" size="20" maxlength="20">
(영문자, 숫자, _ 만 가능; 20자 이내; 공란 불가) <? if ($w == 'u') { ?><a href="<?=G4_SHOP_URL?>/content.php?co_id=<?=$co_id?>" class="btn_frmline">내용확인</a><? } ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="co_subject">제목</label></th> <th scope="row"><label for="co_subject">제목</label></th>
<td> <td><input type="text" name="co_subject" value="<?=htmlspecialchars2($co['co_subject'])?>" id="co_subject" required class="frm_input required" size="90"></td>
<input type="text" name="co_subject" value="<?=htmlspecialchars2($co['co_subject'])?>" id="co_subject" required class="frm_input required">
</td>
</tr> </tr>
<tr> <tr>
<th scope="row">내용</th> <th scope="row">내용</th>
<td> <td><?=editor_html('co_content', $co['co_content']);?></td>
<?=editor_html('co_content', $co['co_content']);?>
</td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th> <th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
<td> <td>
<?=help("내용별로 상단+좌측의 내용이 다를 경우 상단+좌측 디자인 파일의 경로를 입력합니다.\n입력이 없으면 기본 상단 파일을 사용합니다.\n상단 내용과 달리 PHP 코드를 사용할 수 있습니다.\n");?> <?=help("설정값이 없으면 기본 상단 파일을 사용합니다.");?>
<input type="text" name="co_include_head" value="<?=$co['co_include_head']?>" id="co_include_head" class="frm_input" size="60"> <input type="text" name="co_include_head" value="<?=$co['co_include_head']?>" id="co_include_head" class="frm_input" size="60">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th> <th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
<td> <td>
<?=help("내용별로 하단+우측의 내용이 다를 경우 하단+우측 디자인 파일의 경로를 입력합니다.\n입력이 없으면 기본 하단 파일을 사용합니다.\n하단 내용과 달리 PHP 코드를 사용할 수 있습니다.\n");?> <?=help("설정값이 없으면 기본 하단 파일을 사용합니다.");?>
<input type="text" name="co_include_tail" value="<?=$co['co_include_tail']?>" id="co_include_tail" class="frm_input" size="60"> <input type="text" name="co_include_tail" value="<?=$co['co_include_tail']?>" id="co_include_tail" class="frm_input" size="60">
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">상단이미지</th> <th scope="row"><label for="co_himg">상단이미지</label></th>
<td> <td>
<input type="file" name="co_himg"> <input type="file" name="co_himg" id="co_himg">
<? <?
$himg = G4_DATA_PATH."/content/{$co['co_id']}_h"; $himg = G4_DATA_PATH.'/content/'.$co['co_id'].'_h';
if (file_exists($himg)) { if (file_exists($himg)) {
echo "<input type=checkbox name=co_himg_del value='1'>삭제"; echo '<input type="checkbox" name="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
$himg_str = "<img src='".G4_DATA_URL."/content/{$co['co_id']}_h' border=0>"; $himg_str = '<img src="'.$himg.'" alt="">';
}
if ($himg_str) {
echo '<div class="banner_or_img">';
echo $himg_str;
echo '</div>';
} }
?> ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<th scope="row">하단이미지</th> <th scope="row"><label for="co_timg">하단이미지</label></th>
<td> <td>
<input type="file" name="co_timg"> <input type="file" name="co_timg" id="co_timg">
<? <?
$timg = G4_DATA_PATH."/content/{$co['co_id']}_t"; $timg = G4_DATA_PATH.'/content/'.$co['co_id'].'_t';
if (file_exists($timg)) { if (file_exists($timg)) {
echo "<input type=checkbox name=co_timg_del value='1'>삭제"; echo '<input type="checkbox" name="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
$timg_str = "<img src='".G4_DATA_URL."/content/{$co['co_id']}_t' border=0>"; $timg_str = '<img src="'.$timg.'" alt="">';
}
if ($timg_str) {
echo '<div class="banner_or_img">';
echo $timg_str;
echo '</div>';
} }
?> ?>
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</section>
<div class="btn_confirm"> <div class="btn_confirm">
<input type="submit" value="확인" class="btn_submit" accesskey="s"> <input type="submit" value="확인" class="btn_submit" accesskey="s">
<a href="./contentlist.php">목록</a> <a href="./contentlist.php">목록</a>
</div> </div>
</section>
</form> </form>
<script> <script>
@ -133,12 +141,6 @@ function frmcontentform_check(f)
} }
return true; return true;
} }
/*<? if ($w == "u") { ?>
document.frmcontentform.co_subject.focus();
<? } else { ?>
document.frmcontentform.co_id.focus();
<? } ?> 김혜련 2013-04-02 포커스해제*/
</script> </script>
<? <?