Merge branch 'master' of github.com:gnuboard/yc4s

This commit is contained in:
whitedot
2013-07-01 14:55:49 +09:00
6 changed files with 125 additions and 61 deletions

View File

@ -297,15 +297,19 @@ $pg_anchor .= '</ul>';
<?php <?php
$himg_str = ""; $himg_str = "";
$himg = "{$category_path}/{$ca['ca_id']}_h"; $himg = "{$category_path}/{$ca['ca_id']}_h";
if (file_exists($himg)) if (file_exists($himg)) {
{
echo "<input type=checkbox name=ca_himg_del value='1'>삭제";
$himg_str = "<img src='".G4_DATA_URL."/category/{$ca['ca_id']}_h' border=0>";
//$size = getimagesize($himg);
//echo "<img src='$g4[admin_path]/img/icon_viewer.gif' border=0 align=absmiddle onclick=\"imageview('himg', $size[0], $size[1]);\">";
//echo "<div id='himg' style='left:0; top:0; z-index:+1; display:none; position:absolute;'><img src='$himg' border=1></div>";
}
?> ?>
<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> </td>
</tr> </tr>
<?php if ($himg_str) { echo "<tr><td colspan=4>$himg_str</td></tr>"; } ?> <?php if ($himg_str) { echo "<tr><td colspan=4>$himg_str</td></tr>"; } ?>
@ -315,16 +319,21 @@ $pg_anchor .= '</ul>';
<?php echo help("상품리스트 페이지 하단에 출력하는 이미지입니다."); ?> <?php echo help("상품리스트 페이지 하단에 출력하는 이미지입니다."); ?>
<input type="file" name="ca_timg"> <input type="file" name="ca_timg">
<?php <?php
$timg_str = ""; $timg_str = "";
$timg = "{$category_path}/{$ca['ca_id']}_t"; $timg = "{$category_path}/{$ca['ca_id']}_t";
if (file_exists($timg)) { if (file_exists($timg)) {
echo "<input type=checkbox name=ca_timg_del value='1'>삭제";
$timg_str = "<img src='".G4_DATA_URL."/category/{$ca['ca_id']}_t' border=0>";
//$size = getimagesize($timg);
//echo "<img src='$g4[admin_path]/img/icon_viewer.gif' border=0 align=absmiddle onclick=\"imageview('timg', $size[0], $size[1]);\"><input type=checkbox name=ca_timg_del value='1'>삭제";
//echo "<div id='timg' style='left:0; top:0; z-index:+1; display:none; position:absolute;'><img src='$timg' border=1></div>";
}
?> ?>
<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> </td>
</tr> </tr>
<?php if ($timg_str) { echo "<tr><td colspan=4>$timg_str</td></tr>"; } ?> <?php if ($timg_str) { echo "<tr><td colspan=4>$timg_str</td></tr>"; } ?>
@ -391,6 +400,41 @@ $pg_anchor .= '</ul>';
</form> </form>
<script> <script>
<?php if ($w == 'u') { ?>
$(".banner_or_img").addClass("sit_wimg");
$(function() {
$(".sit_wimg_view").bind("click", function() {
var sit_wimg_id = $(this).attr("id").split("_");
var $img_display = $("#"+sit_wimg_id[1]);
$img_display.toggle();
if($img_display.is(":visible")) {
$(this).text($(this).text().replace("확인", "닫기"));
} else {
$(this).text($(this).text().replace("닫기", "확인"));
}
var $img = $("#"+sit_wimg_id[1]).children("img");
var width = $img.width();
var height = $img.height();
if(width > 700) {
var img_width = 700;
var img_height = Math.round((img_width * height) / width);
$img.width(img_width).height(img_height);
}
});
$(".sit_wimg_close").bind("click", function() {
var $img_display = $(this).parents(".banner_or_img");
var id = $img_display.attr("id");
$img_display.toggle();
var $button = $("#ca_"+id+"_view");
$button.text($button.text().replace("닫기", "확인"));
});
});
<?php } ?>
function fcategoryformcheck(f) function fcategoryformcheck(f)
{ {
if (f.w.value == "") { if (f.w.value == "") {

View File

@ -70,6 +70,8 @@ $sql_common = " ca_skin = '$ca_skin',
ca_explan_html = '$ca_explan_html', ca_explan_html = '$ca_explan_html',
ca_head_html = '$ca_head_html', ca_head_html = '$ca_head_html',
ca_tail_html = '$ca_tail_html', ca_tail_html = '$ca_tail_html',
ca_mobile_head_html = '$ca_mobile_head_html',
ca_mobile_tail_html = '$ca_mobile_tail_html',
ca_include_head = '$ca_include_head', ca_include_head = '$ca_include_head',
ca_include_tail = '$ca_include_tail', ca_include_tail = '$ca_include_tail',
ca_mb_id = '$ca_mb_id', ca_mb_id = '$ca_mb_id',

View File

@ -984,44 +984,6 @@ $(function(){
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>
<?php if ($w == 'u') { ?>
<script>
$(".banner_or_img").addClass("sit_wimg");
$(function() {
$(".sit_wimg_view").bind("click", function() {
var sit_wimg_id = $(this).attr("id").split("_");
var $img_display = $("#"+sit_wimg_id[1]);
var $img = $("#"+sit_wimg_id[1]);
var width = $img_display.width();
var height = $img_display.height();
if(width > 700) {
var img_width = 700;
var img_height = Math.round((img_width * height) / width);
$img_display.children("img").width(img_width).height(img_height);
}
$img_display.toggle();
if($img_display.is(":visible")) {
$(this).text($(this).text().replace("확인", "닫기"));
} else {
$(this).text($(this).text().replace("닫기", "확인"));
}
});
$(".sit_wimg_close").bind("click", function() {
var $img_display = $(this).parents(".banner_or_img");
var id = $img_display.attr("id");
$img_display.toggle();
var $button = $("#it_"+id+"_view");
$button.text($button.text().replace("닫기", "확인"));
});
});
</script>
<?php } ?>
</section> </section>
<div class="btn_confirm"> <div class="btn_confirm">
@ -1331,7 +1293,14 @@ $(function(){
?> ?>
<label for="it_himg_del">상단이미지 삭제</label> <label for="it_himg_del">상단이미지 삭제</label>
<input type="checkbox" name="it_himg_del" value="1" id="it_himg_del"> <input type="checkbox" name="it_himg_del" value="1" id="it_himg_del">
<div class="banner_or_img"><img src="<?php echo G4_DATA_URL; ?>/item/<?php echo $it['it_id']; ?>_h" alt=""></div> <span class="sit_wimg_himg"></span>
<div id="himg" class="banner_or_img">
<img src="<?php echo G4_DATA_URL; ?>/item/<?php echo $it['it_id']; ?>_h" alt="">
<button type="button" class="sit_wimg_close">닫기</button>
</div>
<script>
$('<button type="button" id="it_himg_view" class="btn_frmline sit_wimg_view">상단이미지 확인</button>').appendTo('.sit_wimg_himg');
</script>
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
@ -1345,9 +1314,16 @@ $(function(){
$timg = G4_DATA_PATH."/item/{$it['it_id']}_t"; $timg = G4_DATA_PATH."/item/{$it['it_id']}_t";
if (file_exists($timg)) { if (file_exists($timg)) {
?> ?>
<label for="it_timg_del">삭제</label> <label for="it_timg_del">하단이미지 삭제</label>
<input type="checkbox" name="it_timg_del" value="1" id="it_timg_del"> <input type="checkbox" name="it_timg_del" value="1" id="it_timg_del">
<div class="banner_or_img"><img src="<?php echo G4_DATA_URL; ?>/item/<?php echo $it['it_id']; ?>_t" alt=""></div> <span class="sit_wimg_timg"></span>
<div id="timg" class="banner_or_img">
<img src="<?php echo G4_DATA_URL; ?>/item/<?php echo $it['it_id']; ?>_t" alt="">
<button type="button" class="sit_wimg_close">닫기</button>
</div>
<script>
$('<button type="button" id="it_timg_view" class="btn_frmline sit_wimg_view">하단이미지 확인</button>').appendTo('.sit_wimg_timg');
</script>
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
@ -1414,6 +1390,41 @@ $(function(){
<script> <script>
var f = document.fitemform; var f = document.fitemform;
<?php if ($w == 'u') { ?>
$(".banner_or_img").addClass("sit_wimg");
$(function() {
$(".sit_wimg_view").bind("click", function() {
var sit_wimg_id = $(this).attr("id").split("_");
var $img_display = $("#"+sit_wimg_id[1]);
$img_display.toggle();
if($img_display.is(":visible")) {
$(this).text($(this).text().replace("확인", "닫기"));
} else {
$(this).text($(this).text().replace("닫기", "확인"));
}
var $img = $("#"+sit_wimg_id[1]).children("img");
var width = $img.width();
var height = $img.height();
if(width > 700) {
var img_width = 700;
var img_height = Math.round((img_width * height) / width);
$img.width(img_width).height(img_height);
}
});
$(".sit_wimg_close").bind("click", function() {
var $img_display = $(this).parents(".banner_or_img");
var id = $img_display.attr("id");
$img_display.toggle();
var $button = $("#it_"+id+"_view");
$button.text($button.text().replace("닫기", "확인"));
});
});
<?php } ?>
function codedupcheck(id) function codedupcheck(id)
{ {
if (!id) { if (!id) {

View File

@ -181,6 +181,10 @@ if ($_FILES['it_img10']['name']) {
$it_img10 = it_img_upload($_FILES['it_img10']['tmp_name'], $_FILES['it_img10']['name'], $it_img_dir.'/'.$it_id); $it_img10 = it_img_upload($_FILES['it_img10']['tmp_name'], $_FILES['it_img10']['name'], $it_img_dir.'/'.$it_id);
} }
// 상, 하단 이미지 업로드
if ($_FILES['it_himg']['name']) upload_file($_FILES['it_himg']['tmp_name'], $it_id . "_h", G4_DATA_PATH.'/item');
if ($_FILES['it_timg']['name']) upload_file($_FILES['it_timg']['tmp_name'], $it_id . "_t", G4_DATA_PATH.'/item');
if ($w == "" || $w == "u") if ($w == "" || $w == "u")
{ {
// 다음 입력을 위해서 옵션값을 쿠키로 한달동안 저장함 // 다음 입력을 위해서 옵션값을 쿠키로 한달동안 저장함

View File

@ -144,6 +144,7 @@ $pg_anchor = '<ul class="anchor">
<ul id="sodr_ul"> <ul id="sodr_ul">
<?php <?php
$chk_cnt = 0;
for($i=0; $row=sql_fetch_array($result); $i++) { for($i=0; $row=sql_fetch_array($result); $i++) {
// 상품이미지 // 상품이미지
$image = get_it_image($row['it_id'], 50, 50); $image = get_it_image($row['it_id'], 50, 50);
@ -197,7 +198,7 @@ $pg_anchor = '<ul class="anchor">
<tr> <tr>
<td class="td_chk"> <td class="td_chk">
<label for="ct_opt_chk_<?php echo $i.$k; ?>" class="sound_only"><?php echo $opt['ct_option']; ?></label> <label for="ct_opt_chk_<?php echo $i.$k; ?>" class="sound_only"><?php echo $opt['ct_option']; ?></label>
<input type="checkbox" name="ct_chk[]" id="ct_opt_chk_<?php echo $i.$k; ?>" value="<?php echo $opt['ct_id']; ?>"> <input type="checkbox" name="ct_chk[]" id="ct_chk_<?php echo $chk_cnt; ?>" value="<?php echo $opt['ct_id']; ?>">
</td> </td>
<td><?php echo $opt['ct_option']; ?></td> <td><?php echo $opt['ct_option']; ?></td>
<td class="td_smallmng"><?php echo $opt['ct_status']; ?></td> <td class="td_smallmng"><?php echo $opt['ct_status']; ?></td>
@ -210,6 +211,7 @@ $pg_anchor = '<ul class="anchor">
<td class="td_smallmng"><?php echo get_yn($opt['ct_stock_use']); ?></td> <td class="td_smallmng"><?php echo get_yn($opt['ct_stock_use']); ?></td>
</tr> </tr>
<?php <?php
$chk_cnt++;
} }
?> ?>
</tbody> </tbody>
@ -225,6 +227,7 @@ $pg_anchor = '<ul class="anchor">
</ul> </ul>
<div class="btn_list"> <div class="btn_list">
<input type="hidden" name="chk_cnt" value="<?php echo $chk_cnt; ?>">
<input type="submit" name="act_button" value="주문" onclick="document.pressed=this.value"> <input type="submit" name="act_button" value="주문" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="상품준비중" onclick="document.pressed=this.value"> <input type="submit" name="act_button" value="상품준비중" onclick="document.pressed=this.value">
<input type="submit" name="act_button" value="배송중" onclick="document.pressed=this.value"> <input type="submit" name="act_button" value="배송중" onclick="document.pressed=this.value">

View File

@ -53,9 +53,9 @@ if ($is_admin)
include G4_SHOP_PATH.'/navigation1.inc.php'; include G4_SHOP_PATH.'/navigation1.inc.php';
// 상단 이미지 // 상단 이미지
$himg = G4_DATA_URL.'/category/'.$ca_id.'_h'; $himg = G4_DATA_PATH.'/category/'.$ca_id.'_h';
if (file_exists($himg)) { if (file_exists($himg)) {
echo '<div id="sct_himg" class="sct_img"><img src="'.$himg.'" alt=""></div>'; echo '<div id="sct_himg" class="sct_img"><img src="'.G4_DATA_URL.'/category/'.$ca_id.'_h" alt=""></div>';
} }
// 상단 HTML // 상단 HTML