관리자 : #281 상하단이미지삭제, 분류관리 레이아웃 변경작업 완료

This commit is contained in:
nemoluv
2013-08-13 17:08:40 +09:00
parent c228e28401
commit 8ba7c066f1
6 changed files with 86 additions and 90 deletions

View File

@ -289,54 +289,6 @@ $pg_anchor .= '</ul>';
<input type="text" name="ca_include_tail" value="<?php echo $ca['ca_include_tail']; ?>" id="ca_include_tail" class="frm_input" size="60">
</td>
</tr>
<tr>
<th scope="row">상단이미지</th>
<td>
<?php echo help("상품리스트 페이지 상단에 출력하는 이미지입니다."); ?>
<input type="file" name="ca_himg">
<?php
$himg_str = "";
$himg = "{$category_path}/{$ca['ca_id']}_h";
if (file_exists($himg)) {
?>
<label for="ca_himg_del">상단이미지 삭제</label>
<input type="checkbox" name="ca_himg_del" value="1" id="ca_himg_del">
<span class="sit_wimg_himg"></span>
<div id="himg" class="banner_or_img">
<img src="<?php echo G4_DATA_URL; ?>/category/<?php echo $ca['ca_id']; ?>_h" alt="">
<button type="button" class="sit_wimg_close">닫기</button>
</div>
<script>
$('<button type="button" id="ca_himg_view" class="btn_frmline sit_wimg_view">상단이미지 확인</button>').appendTo('.sit_wimg_himg');
</script>
<?php } ?>
</td>
</tr>
<?php if ($himg_str) { echo "<tr><td colspan=4>$himg_str</td></tr>"; } ?>
<tr>
<th scope="row">하단이미지</th>
<td>
<?php echo help("상품리스트 페이지 하단에 출력하는 이미지입니다."); ?>
<input type="file" name="ca_timg">
<?php
$timg_str = "";
$timg = "{$category_path}/{$ca['ca_id']}_t";
if (file_exists($timg)) {
?>
<label for="ca_timg_del">하단이미지 삭제</label>
<input type="checkbox" name="ca_timg_del" value="1" id="ca_timg_del">
<span class="sit_wimg_timg"></span>
<div id="timg" class="banner_or_img">
<img src="<?php echo G4_DATA_URL; ?>/category/<?php echo $ca['ca_id']; ?>_t" alt="">
<button type="button" class="sit_wimg_close">닫기</button>
</div>
<script>
$('<button type="button" id="ca_timg_view" class="btn_frmline sit_wimg_view">하단이미지 확인</button>').appendTo('.sit_wimg_timg');
</script>
<?php } ?>
</td>
</tr>
<?php if ($timg_str) { echo "<tr><td colspan=4>$timg_str</td></tr>"; } ?>
<tr>
<th scope="row">상단내용</th>
<td>

View File

@ -2,18 +2,6 @@
$sub_menu = '400200';
include_once('./_common.php');
if ($img = $_FILES['ca_himg']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("상단 이미지가 gif, jpg, png 파일이 아닙니다.");
}
}
if ($img = $_FILES['ca_timg']['name']) {
if (!preg_match("/\.(gif|jpg|png)$/i", $img)) {
alert("하단 이미지가 gif, jpg, png 파일이 아닙니다.");
}
}
if ($file = $_POST['ca_include_head']) {
if (!preg_match("/\.(php|htm[l]?)$/i", $file)) {
alert("상단 파일 경로가 php, html 파일이 아닙니다.");
@ -52,9 +40,6 @@ $g4['category_path'] = G4_DATA_PATH."/category";
if ($ca_image1_del) @unlink("{$g4['category_path']}/{$ca_id}_1");
if ($ca_image0_del) @unlink("{$g4['category_path']}/{$ca_id}_0");
if ($ca_himg_del) @unlink("{$g4['category_path']}/{$ca_id}_h");
if ($ca_timg_del) @unlink("{$g4['category_path']}/{$ca_id}_t");
$sql_common = " ca_skin = '$ca_skin',
ca_mobile_skin = '$ca_mobile_skin',
ca_img_width = '$ca_img_width',
@ -152,9 +137,6 @@ $qstr = "page=$page&amp;sort1=$sort1&amp;sort2=$sort2";
if ($w == "" || $w == "u")
{
if ($_FILES['ca_himg']['name']) upload_file($_FILES['ca_himg']['tmp_name'], $ca_id."_h", $g4['category_path']);
if ($_FILES['ca_timg']['name']) upload_file($_FILES['ca_timg']['tmp_name'], $ca_id."_t", $g4['category_path']);
goto_url("./categoryform.php?w=u&amp;ca_id=$ca_id&amp;$qstr");
} else {
goto_url("./categorylist.php?$qstr");

View File

@ -107,13 +107,21 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
<table class="frm_basic">
<thead>
<tr>
<th scope="col">분류<br>코드</th>
<th scope="col">분류명</th>
<th scope="col" rowspan="2">분류<br>코드</th>
<th scope="col" rowspan="2">분류명</th>
<th scope="col">출력스킨</th>
<th scope="col">출력이미지폭<br>(픽셀)</th>
<th scope="col">출력이미지높이<br>(픽셀)</th>
<th scope="col">1줄당<br>이미지 수</th>
<th scope="col">이미지<br>줄 수</th>
<th scope="col" rowspan="2">관리</th>
</tr>
<tr>
<th scope="col">회원아이디</th>
<th scope="col">판매<br>가능</th>
<th scope="col">기본재고</th>
<th scope="col">본인인증</th>
<th scope="col">성인인증</th>
<th scope="col">판매가능</th>
<th scope="col">상품수</th>
<th scope="col">관리</th>
</tr>
</thead>
<tbody>
@ -134,8 +142,8 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$class = '';
}
$s_level = '<label for="ca_name_'.$i.'" '.$class.'><span class="sound_only">'.$p_ca_name.'</span>'.($level+1).'단 분류</label>';
$s_level_input_size = 40 - $level *5; // 하위 분류일 수록 입력칸 넓이 작아짐 - 지운아빠 2013-04-02
$s_level = '<label for="ca_name_'.$i.'" '.$class.'><span class="sound_only">'.$p_ca_name.''.($level+1).'단 분류</span></label>';
$s_level_input_size = 25 - $level *2; // 하위 분류일 수록 입력칸 넓이 작아짐 - 지운아빠 2013-04-02
if ($level+2 < 6) $s_add = '<a href="./categoryform.php?ca_id='.$row['ca_id'].'&amp;'.$qstr.'">추가</a> '; // 분류는 5단계까지만 가능
else $s_add = '';
@ -152,30 +160,74 @@ if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
$row1 = sql_fetch($sql1);
?>
<tr>
<td class="td_num">
<td class="td_code" rowspan="2">
<input type="hidden" name="ca_id[<?php echo $i; ?>]" value="<?php echo $row['ca_id']; ?>">
<a href="<?php echo G4_SHOP_URL; ?>/list.php?ca_id=<?php echo $row['ca_id']; ?>"><?php echo $row['ca_id']; ?></a>
</td>
<td class="td_scate"><?php echo $s_level; ?> <input type="text" name="ca_name[<?php echo $i; ?>]" value="<?php echo get_text($row['ca_name']); ?>" id="ca_name_<?php echo $i; ?>" required class="frm_input required" size="<?php echo $s_level_input_size; ?>"></td>
<td class="td_scate" rowspan="2"><?php echo $s_level; ?> <input type="text" name="ca_name[<?php echo $i; ?>]" value="<?php echo get_text($row['ca_name']); ?>" id="ca_name_<?php echo $i; ?>" required class="frm_input required" size="<?php echo $s_level_input_size; ?>"></td>
<td class="td_scate_admin">
<?php if ($is_admin == 'super') {?>
<label for="ca_mb_id<?php echo $i; ?>" class="sound_only">회원아이디</label>
<input type="text" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>" id="ca_mb_id<?php echo $i; ?>" class="frm_input" size="10" maxlength="20">
<?php } else { ?>
<input type="hidden" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>">
<?php echo $row['ca_mb_id']; ?>
<?php } ?>
<label for="ca_skin<?php echo $i; ?>" class="sound_only">출력스킨</label>
<select id="ca_skin<?php echo $i; ?>" name="ca_skin[<?php echo $i; ?>]">
<?php echo get_list_skin_options("^list.[^\.]+\.skin\.php", G4_SHOP_SKIN_PATH, $row['ca_skin']); ?>
</select>
</td>
<td class="td_chk"><input type="checkbox" name="ca_use[<?php echo $i; ?>]" value="1" <?php echo ($row['ca_use'] ? "checked" : ""); ?>></td>
<td class="td_bignum"><input type="text" name="ca_stock_qty[<?php echo $i; ?>]" value="<?php echo $row['ca_stock_qty']; ?>" class="frm_input" size="6" style="text-align:right"></td>
<td class="td_num"><a href="./itemlist.php?sca=<?php echo $row['ca_id']; ?>"><?php echo $row1['cnt']; ?></a></td>
<td class="td_mng">
<td class="td_output">
<label for="ca_out_width<?php echo $i; ?>" class="sound_only">출력이미지 폭</label>
<input type="text" name="ca_img_width[<?php echo $i; ?>]" value="<?php echo get_text($row['ca_img_width']); ?>" id="ca_out_width<?php echo $i; ?>" required class="required frm_input" size="3" > <span class="sound_only">픽셀</span>
</td>
<td class="td_output">
<label for="ca_img_height<?php echo $i; ?>" class="sound_only">출력이미지 높이</label>
<input type="text" name="ca_img_height[<?php echo $i; ?>]" value="<?php echo $row['ca_img_height']; ?>" id="ca_img_height<?php echo $i; ?>" required class="required frm_input" size="3" > <span class="sound_only">픽셀</span>
</td>
<td class="td_imgline">
<label for="ca_lineimg_num<?php echo $i; ?>" class="sound_only">1줄당 이미지 수</label>
<input type="text" name="ca_list_mod[<?php echo $i; ?>]" size="3" value="<?php echo $row['ca_list_mod']; ?>" id="ca_lineimg_num<?php echo $i; ?>" required class="required frm_input"> <span class="sound_only">개</span>
</td>
<td class="td_imgline">
<label for="ca_imgline_num<?php echo $i; ?>" class="sound_only">이미지 줄 수</label>
<input type="text" name="ca_list_row[<?php echo $i; ?>]" value='<?php echo $row['ca_list_row']; ?>' id="ca_imgline_num<?php echo $i; ?>" required class="required frm_input" size="3"> <span class="sound_only">줄</span>
</td>
<td class="td_mng" rowspan="2">
<?php echo $s_add; ?>
<?php echo $s_vie; ?>
<?php echo $s_upd; ?>
<?php echo $s_del; ?>
</td>
</tr>
<tr>
<td class="td_scate_admin">
<?php if ($is_admin == 'super') {?>
<label for="ca_mb_id<?php echo $i; ?>" class="sound_only">회원아이디</label>
<input type="text" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>" id="ca_mb_id<?php echo $i; ?>" class="frm_input" size="15" maxlength="20">
<?php } else { ?>
<input type="hidden" name="ca_mb_id[<?php echo $i; ?>]" value="<?php echo $row['ca_mb_id']; ?>">
<?php echo $row['ca_mb_id']; ?>
<?php } ?>
</td>
<td class="td_confirm">
<input type="checkbox" name="ca_hp_cert_use[<?php echo $i; ?>]" value="1" id="ca_hp_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_hp_cert_use_yes<?php echo $i; ?>">사용</label>
<!-- <input type="radio" name="ca_hp_cert_use[<?php echo $i; ?>]" value="1" id="ca_hp_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_hp_cert_use_yes<?php echo $i; ?>">사용함</label>
<input type="radio" name="ca_hp_cert_use[<?php echo $i; ?>]" value="0" id="ca_hp_cert_use_no<?php echo $i; ?>" <?php if(!$row['ca_hp_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_hp_cert_use_no<?php echo $i; ?>">사용안함</label> -->
</td>
<td class="td_confirm">
<input type="checkbox" name="ca_adult_cert_use[<?php echo $i; ?>]" value="1" id="ca_adult_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_cert_use_yes<?php echo $i; ?>">사용</label>
<!-- <input type="radio" name="ca_adult_cert_use[<?php echo $i; ?>]" value="1" id="ca_adult_cert_use_yes<?php echo $i; ?>" <?php if($row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_cert_use_yes<?php echo $i; ?>">사용함</label>
<input type="radio" name="ca_adult_cert_use[<?php echo $i; ?>]" value="0" id="ca_adult_cert_use_no<?php echo $i; ?>" <?php if(!$row['ca_adult_cert_use']) echo 'checked="checked"'; ?>>
<label for="ca_adult_cert_use_no<?php echo $i; ?>">사용안함</label> -->
</td>
<td class="td_possible">
<input type="checkbox" name="ca_use[<?php echo $i; ?>]" value="1" id="ca_use<?php echo $i; ?>" <?php echo ($row['ca_use'] ? "checked" : ""); ?>>
<label for="ca_use<?php echo $i; ?>">판매</label>
</td>
<td class="td_amount"><a href="./itemlist.php?sca=<?php echo $row['ca_id']; ?>"><?php echo $row1['cnt']; ?></a></td>
</tr>
<?php }
if ($i == 0) echo "<tr><td colspan=\"7\" class=\"empty_table\">자료가 한 건도 없습니다.</td></tr>\n";
?>

View File

@ -19,7 +19,14 @@ for ($i=0; $i<count($_POST['ca_id']); $i++)
$sql = " update {$g4['shop_category_table']}
set ca_name = '{$_POST['ca_name'][$i]}',
ca_mb_id = '{$_POST['ca_mb_id'][$i]}',
ca_img_width = '{$_POST['ca_img_width'][$i]}',
ca_list_mod = '{$_POST['ca_list_mod'][$i]}',
ca_hp_cert_use = '{$_POST['ca_hp_cert_use'][$i]}',
ca_use = '{$_POST['ca_use'][$i]}',
ca_skin = '{$_POST['ca_skin'][$i]}',
ca_img_height = '{$_POST['ca_img_height'][$i]}',
ca_list_row = '{$_POST['ca_list_row'][$i]}',
ca_adult_cert_use = '{$_POST['ca_adult_cert_use'][$i]}',
ca_stock_qty = '{$_POST['ca_stock_qty'][$i]}'
where ca_id = '{$_POST['ca_id'][$i]}' ";
sql_query($sql);

View File

@ -197,9 +197,12 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
#sodr_total th {width:125px}
/* 분류관리 목록 */
.cate_list_lbl {display:inline-block;padding-left:15px;background:url('../adm/shop_admin/img/icon_reply.gif') 0 2px no-repeat}
.td_scate {text-align:right}
.td_scate_admin {text-align:center}
.cate_list_lbl {display:inline-block;width:13px;height:13px;background:url('../adm/shop_admin/img/icon_reply.gif') 0 0 no-repeat}
.td_code {width:60px}
.td_scate {padding-right:15px;text-align:right;vertical-align:top;}
.td_scate_admin {width:130px}
.td_output, .td_confirm {width:90px;text-align:center}
.td_imgline, .td_amount, .td_possible {width:70px;text-align:center}
/* 분류 추가/수정 */
.frm_ca_id {display:inline-block;margin:0 10px 0 0;font-weight:bold}

View File

@ -414,4 +414,4 @@ if(!sql_query(" select od_tax_mny from {$g4['shop_order_table']} limit 1 ", fals
ADD `od_vat_mny` INT(11) NOT NULL DEFAULT '0' AFTER `od_tax_mny`,
ADD `od_free_mny` INT(11) NOT NULL DEFAULT '0' AFTER `od_vat_mny` ", true);
}
?>
?>