쇼핑몰관리자: #9 상품입력/수정 중 상품요약정보 설정 새창 표준화 및 스타일 완료

This commit is contained in:
whitedot
2013-04-19 17:04:15 +09:00
parent 03d01774c5
commit 28b93376c0
2 changed files with 64 additions and 60 deletions

View File

@ -374,7 +374,7 @@ $pg_anchor ='<ul class="anchor">
<th scope="row">요약상품정보</th>
<td>
<?=help("<strong>전자상거래 등에서의 상품 등의 정보제공에 관한 고시</strong>에 따라 총 35개 상품군에 대해 상품 특성 등을 양식에 따라 입력할 수 있습니다.");?>
<button type="button" class="btn_frmline" onclick="window.open('./iteminfo.php?it_id=<?=$it['it_id']?>', '_blank', 'width=670 height=800');">상품요약정보 설정</button>
<button type="button" class="btn_frmline" onclick="window.open('./iteminfo.php?it_id=<?=$it['it_id']?>', '_blank', 'width=670 height=800 scroll=yes');">상품요약정보 설정</button>
<span id="item_info_gubun"><?=$item_info_gubun?></span>
</td>
</tr>

View File

@ -1,5 +1,6 @@
<?
include_once('./_common.php');
$g4['title'] = "상품요약정보 설정"; // 상품군 선택 시 제목에 상품군을 포함했으면 합니다. ex) 상품요약정보 설정 : 의류
include_once(G4_LIB_PATH.'/iteminfo.lib.php');
include_once(G4_PATH.'/head.sub.php');
@ -14,74 +15,77 @@ if ($_GET['gubun']) {
$null_text = "상품페이지 참고";
?>
<style>
.confirm {text-align:center}
.confirm input {padding:3px}
</style>
<form id="fiteminfo" method="post" action="#" onsubmit="return fiteminfo_submit(this)">
<input type="hidden" name="it_id" value="<?=$it_id?>">
<div style="width:95%;padding:10px">
<div style="float:left;"><?//=subtitle("요약상품정보")?></div>
<div style="float:right;">(모든필드 필수입력)</div>
<table width=100% cellpadding=0 cellspacing=0 border=0>
<colgroup width=15%></colgroup>
<colgroup width=85% bgcolor=#FFFFFF></colgroup>
<tbody>
<tr><td colspan=2 height=2 bgcolor=0E87F9></td></tr>
<tr><td colspan=2 height=5></td></tr>
<tr class=ht>
<td style='padding:3px;' valign='top' width='25%'><b>상품군</b></td>
<td style='padding:3px;' valign='top'>
<div style="float:left;">
<select id="gubun" name="gubun" onchange="location.href='?it_id=<?=$it_id?>&amp;gubun='+this.value;">
<option value="">상품군을 선택하세요.</option>
<?
foreach($item_info as $key=>$value) {
$opt_value = $key;
$opt_text = $value['title'];
echo "<option value='$opt_value'>$opt_text</option>\n";
}
?>
</select>
<script>document.getElementById("gubun").value="<?=$gubun?>";</script>
</div>
<div style="float:right;"><label><input type="checkbox" id="null" />비어있는 필드를 "<?=$null_text?>"로 채우기</label></div>
</td>
</tr>
<?
$article = $item_info[$gubun]['article'];
if ($article) {
foreach($article as $key=>$value) {
$el_name = $key;
$el_title = $value[0];
$el_example = $value[1];
$sql = " select ii_value from {$g4['shop_item_info_table']} where it_id = '$it_id' and ii_gubun = '$gubun' and ii_article = '$key' ";
$row = sql_fetch($sql);
if ($row['ii_value']) $el_value = $row['ii_value'];
<div class="cbox">
<h1>상품요약정보 설정</h1>
<p>모든 필드를 반드시 입력하셔야 합니다.</p>
<table class="frm_tbl">
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row"><label for="gubun">상품군</label></th>
<td>
<?=help("상품군을 선택하면 자동으로 페이지가 전환됩니다.")?>
<select id="gubun" name="gubun" onchange="location.href='?it_id=<?=$it_id?>&amp;gubun='+this.value;">
<option value="">상품군을 선택하세요.</option>
<?
foreach($item_info as $key=>$value) {
$opt_value = $key;
$opt_text = $value['title'];
echo '<option value="'.$opt_value.'" '.get_selected($gubun, $opt_value).'>'.$opt_text.'</option>'.PHP_EOL;
}
?>
</select>
</td>
</tr>
<?
$article = $item_info[$gubun]['article'];
if ($article) {
foreach($article as $key=>$value) {
$el_name = $key;
$el_title = $value[0];
$el_example = $value[1];
echo "<tr class='ht'>\n";
echo "<td style='padding:3px;' valign='top'><b>$el_title</b></td>\n";
echo "<td style='padding:3px;' valign='top'>";
echo "<input type='hidden' name='{$el_name}[]' value='$el_title' />";
echo "<input type='text' name='{$el_name}[]' value='$el_value' class='ed' style='width:99%;' required itemname='$el_title' />";
if ($el_example != "") {
echo "<p style=\"margin:2px 0;padding:0\">$el_example</p>";
$sql = " select ii_value from {$g4['shop_item_info_table']} where it_id = '$it_id' and ii_gubun = '$gubun' and ii_article = '$key' ";
$row = sql_fetch($sql);
if ($row['ii_value']) $el_value = $row['ii_value'];
?>
<tr>
<th scope="row"><label for="<?=$el_name.$i?>"><?=$el_title?></label></th>
<td>
<input type="hidden" name="<?=$el_name?>[]" value="<?=$el_title?>">
<? if ($el_example != "") echo help($el_example); ?>
<input type="text" name="<?=$el_name?>[]" value="<?=$el_value?>" id="<?=$el_name.$i?>" required class="frm_input required" />
</td>
</tr>
<?
}
echo "</td>\n";
echo "</tr>\n";
}
}
?>
</tbody>
</table>
?>
<tr>
<th>빈 칸 일괄채우기</th>
<td>
<?=help("상품페이지에 상품요약정보가 포함되어 있어 생략 가능한 경우 선택하십시오.")?>
<label for="null">비어있는 칸을 &quot;<?=$null_text?>&quot;로 채우기</label>
<input type="checkbox" id="null">
</td>
</tr>
</tbody>
</table>
<p class="confirm">
<input type="submit" value="입력">
<input type="button" value="창닫기" onclick="javascript:window.close()">
</p>
<div class="btn_confirm">
<input type="submit" value="입력" class="btn_submit">
<button type="button" onclick="javascript:window.close()">창닫기</button>
</div>
</div>
</form>
<script>