Beispiel #1
0
     $goods = preg_replace("/\\'|\"|\\||\\,|\\&|\\;/", "", $row['it_name']);
     $goods_it_id = $row['it_id'];
 }
 $goods_count++;
 // 에스크로 상품정보
 if ($default['de_escrow_use']) {
     if ($i > 0) {
         $good_info .= chr(30);
     }
     $good_info .= "seq=" . ($i + 1) . chr(31);
     $good_info .= "ordr_numb={$od_id}_" . sprintf("%04d", $i) . chr(31);
     $good_info .= "good_name=" . addslashes($row['it_name']) . chr(31);
     $good_info .= "good_cntx=" . $row['ct_qty'] . chr(31);
     $good_info .= "good_amtx=" . $row['ct_price'] . chr(31);
 }
 $image = get_it_image($row['it_id'], 50, 50);
 $it_name = '<b>' . stripslashes($row['it_name']) . '</b>';
 $it_options = print_item_options($row['it_id'], $s_cart_id);
 if ($it_options) {
     $it_name .= '<div class="sod_opt">' . $it_options . '</div>';
 }
 // 복합과세금액
 if ($default['de_tax_flag_use']) {
     if ($row['it_notax']) {
         $comm_free_mny += $sum['price'];
     } else {
         $tot_tax_mny += $sum['price'];
     }
 }
 $point = $sum['point'];
 $sell_price = $sum['price'];
Beispiel #2
0
function get_itemuselist_thumbnail($it_id, $contents, $thumb_width, $thumb_height, $is_create = false, $is_crop = true, $crop_mode = 'center', $is_sharpen = true, $um_value = '80/0.5/3')
{
    global $g5, $config;
    $img = $filename = $alt = "";
    if ($contents) {
        $matches = get_editor_image($contents, false);
        for ($i = 0; $i < count($matches[1]); $i++) {
            // 이미지 path 구함
            $p = parse_url($matches[1][$i]);
            if (strpos($p['path'], '/' . G5_DATA_DIR . '/') != 0) {
                $data_path = preg_replace('/^\\/.*\\/' . G5_DATA_DIR . '/', '/' . G5_DATA_DIR, $p['path']);
            } else {
                $data_path = $p['path'];
            }
            $srcfile = G5_PATH . $data_path;
            if (preg_match("/\\.({$config['cf_image_extension']})\$/i", $srcfile) && is_file($srcfile)) {
                $size = @getimagesize($srcfile);
                if (empty($size)) {
                    continue;
                }
                $filename = basename($srcfile);
                $filepath = dirname($srcfile);
                preg_match("/alt=[\"\\']?([^\"\\']*)[\"\\']?/", $matches[0][$i], $malt);
                $alt = get_text($malt[1]);
                break;
            }
        }
        if ($filename) {
            $thumb = thumbnail($filename, $filepath, $filepath, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);
            if ($thumb) {
                $src = G5_URL . str_replace($filename, $thumb, $data_path);
                $img = '<img src="' . $src . '" width="' . $thumb_width . '" height="' . $thumb_height . '" alt="' . $alt . '">';
            }
        }
    }
    if (!$img) {
        $img = get_it_image($it_id, $thumb_width, $thumb_height);
    }
    return $img;
}
    <section class="sod_fin_list">
        <h2>주문하신 상품</h2>

        <?php 
$st_count1 = $st_count2 = 0;
$custom_cancel = false;
$sql = " select it_id, it_name, cp_price, ct_send_cost, it_sc_type\r\n                    from {$g5['g5_shop_cart_table']}\r\n                    where od_id = '{$od_id}'\r\n                    group by it_id\r\n                    order by ct_id ";
$result = sql_query($sql);
?>
        <ul id="sod_list_inq" class="sod_list">
            <?php 
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $image_width = 50;
    $image_height = 50;
    $image = get_it_image($row['it_id'], 50, 50, '', '', $row['it_name']);
    // 옵션항목
    $sql = " select ct_id, it_name, ct_option, ct_qty, ct_price, ct_point, ct_status, io_type, io_price\r\n                            from {$g5['g5_shop_cart_table']}\r\n                            where od_id = '{$od_id}'\r\n                              and it_id = '{$row['it_id']}'\r\n                            order by io_type asc, ct_id asc ";
    $res = sql_query($sql);
    // 합계금액 계산
    $sql = " select SUM(IF(io_type = 1, (io_price * ct_qty), ((ct_price + io_price) * ct_qty))) as price,\r\n                                SUM(ct_qty) as qty\r\n                            from {$g5['g5_shop_cart_table']}\r\n                            where it_id = '{$row['it_id']}'\r\n                              and od_id = '{$od_id}' ";
    $sum = sql_fetch($sql);
    // 배송비
    switch ($row['ct_send_cost']) {
        case 1:
            $ct_send_cost = '착불';
            break;
        case 2:
            $ct_send_cost = '무료';
            break;
        default:
    set_session("ss_token", "");
} else {
    alert_close("메일 발송시 오류가 발생하였습니다.");
    exit;
}
// 상품
$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '{$it_id}' ";
$it = sql_fetch($sql);
if (!$it['it_id']) {
    alert("등록된 상품이 아닙니다.");
}
$subject = stripslashes($subject);
$content = nl2br(stripslashes($content));
$from_name = get_text($member['mb_name']);
$from_email = $member['mb_email'];
$it_id = $it['it_id'];
$it_name = $it['it_name'];
$it_mimg = get_it_image($it_id, $default['de_mimg_width'], $default['de_mimg_height']);
ob_start();
include G5_SHOP_PATH . '/mail/itemrecommend.mail.php';
$content = ob_get_contents();
ob_end_clean();
mailer($from_name, $from_email, $to_email, $subject, $content, 1);
echo "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">";
?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script language="JavaScript">
alert("메일을 전달하였습니다");
window.close();
</script>
Beispiel #5
0
					<label for="ct_chk_<?php 
    echo $i;
    ?>
" class="sound_only">상품</label>
					<input type="checkbox" name="ct_chk[<?php 
    echo $i;
    ?>
]" value="1" id="ct_chk_<?php 
    echo $i;
    ?>
" checked="checked">
				</td>
				<td class="text-center">
					<div class="item-img">
						<?php 
    echo get_it_image($item[$i]['it_id'], 100, 100);
    ?>
						<div class="item-type">
							<?php 
    echo $item[$i]['pt_it'];
    ?>
						</div>
					</div>
				</td>
				<td>
					<input type="hidden" name="it_id[<?php 
    echo $i;
    ?>
]" value="<?php 
    echo $item[$i]['it_id'];
    ?>
Beispiel #6
0
    echo $row['is_id'];
    ?>
">
            <input type="hidden" name="it_id[<?php 
    echo $i;
    ?>
]" value="<?php 
    echo $row['it_id'];
    ?>
">
        </td>
        <td><a href="<?php 
    echo $href;
    ?>
"><?php 
    echo get_it_image($row['it_id'], 50, 50);
    echo cut_str($row['it_name'], 30);
    ?>
</a></td>
        <td class="td_name"><?php 
    echo $name;
    ?>
</td>
        <td class="sit_use_subject">
            <a href="#" class="use_href" onclick="return false;" target="<?php 
    echo $i;
    ?>
"><?php 
    echo get_text($row['is_subject']);
    ?>
</a>
Beispiel #7
0
        </thead>
        <tbody>
        <?php 
$sql = " select b.it_id, b.it_name, b.it_use from {$g5['g5_shop_event_item_table']} a\n                   left join {$g5['g5_shop_item_table']} b on (a.it_id=b.it_id)\n                  where a.ev_id = '{$ev_id}'\n                  order by b.it_id desc ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $href = G5_SHOP_URL . '/item.php?it_id=' . $row['it_id'];
    ?>
        <tr>
            <td>
                <a href="<?php 
    echo $href;
    ?>
" target="_blank">
                    <?php 
    echo get_it_image($row['it_id'], 40, 40);
    ?>
                    <?php 
    echo cut_str(stripslashes($row['it_name']), 60, "&#133");
    ?>
                </a>
            </td>
            <td class="td_boolean"><?php 
    echo $row['it_use'] ? "사용" : "미사용";
    ?>
</td>
            <td class="td_mngsmall"><a href="javascript:del('./itemeventwindel.php?ev_id=<?php 
    echo $ev_id;
    ?>
&amp;it_id=<?php 
    echo $row['it_id'];
Beispiel #8
0
    for ($k = 0; $row2 = sql_fetch_array($result2); $k++) {
        if ($k == 0) {
            $options .= '<ul' . $options_ul . '>' . PHP_EOL;
        }
        $price_plus = '';
        if ($row2['io_price'] >= 0) {
            $price_plus = '+';
        }
        $options .= '<li' . $options_li . '>' . $row2['ct_option'] . ' (' . $price_plus . display_price($row2['io_price']) . ') ' . $row2['ct_qty'] . '개</li>' . PHP_EOL;
    }
    if ($k > 0) {
        $options .= '</ul>';
    }
    $list[$i]['g_dir'] = G5_URL;
    $list[$i]['it_id'] = $row['it_id'];
    $list[$i]['it_simg'] = get_it_image($row['it_id'], 70, 70);
    $list[$i]['it_name'] = $row['it_name'];
    $list[$i]['it_origin'] = $row['it_origin'];
    $list[$i]['it_opt'] = $options;
    $list[$i]['ct_price'] = $row['ct_price'];
    $list[$i]['stotal_price'] = $sum['price'];
    $list[$i]['stotal_point'] = $sum['point'];
    $ttotal_price += $list[$i]['stotal_price'];
    $ttotal_point += $list[$i]['stotal_point'];
}
//------------------------------------------------------------------------------
// 배송비가 있다면 총계에 더한다
if ($od_send_cost) {
    $ttotal_price += $od_send_cost;
}
// 추가배송비가 있다면 총계에 더한다
Beispiel #9
0
 private function latest_item_assign($where, $cnt = 5, $cut_name = 100, $orderby = '', $width = 120)
 {
     global $g5, $eb;
     if (!$orderby) {
         $orderby = " it_time desc ";
     }
     $sql = "select * from {$g5['g5_shop_item_table']} where {$where} order by {$orderby} limit {$cnt}";
     $result = sql_query($sql, false);
     for ($i = 0; $row = sql_fetch_array($result); $i++) {
         $list[$i] = $row;
         $list[$i]['it_name'] = conv_subject($row['it_name'], $cut_name, '…');
         $list[$i]['href'] = G5_SHOP_URL . "/item.php?it_id={$row['it_id']}";
         $list[$i]['datetime'] = $row['it_time'];
         $list[$i]['img'] = get_it_image($row['it_id'], $width, 0, true);
         $list[$i]['star_score'] = get_star_image($row['it_id']);
     }
     return $list;
 }
Beispiel #10
0
		<th scope="col"><span>쿠폰</span></th>
		<th scope="col"><span>소계</span></th>
		<th scope="col"><span>포인트</span></th>
		<th scope="col"><span class="last">배송비</span></th>
	</tr>
	<?php 
for ($i = 0; $i < count($item); $i++) {
    ?>
		<tr<?php 
    echo $i == 0 ? ' class="tr-line"' : '';
    ?>
>
			<td class="text-center">
				<div class="item-img">
					<?php 
    echo get_it_image($item[$i]['it_id'], 70, 70);
    ?>
					<div class="item-type"><?php 
    echo $item[$i]['pt_it'];
    ?>
</div>
				</div>
			</td>
			<td>
				<input type="hidden" name="it_id[<?php 
    echo $i;
    ?>
]"    value="<?php 
    echo $item[$i]['hidden_it_id'];
    ?>
">
Beispiel #11
0
    for ($k = 0; $k < count($item[$i]['opt']); $k++) {
        ?>
			<?php 
        if ($k == 0) {
            ?>
				<tr<?php 
            echo $i == 0 ? ' class="tr-line"' : '';
            ?>
>
					<td class="text-center" rowspan="<?php 
            echo $item[$i]['rowspan'];
            ?>
">
						<div class="item-img">
							<?php 
            echo get_it_image($item[$i]['it_id'], 50, 50);
            ?>
							<div class="item-type"><?php 
            echo $item[$i]['pt_it'];
            ?>
</div>
						</div>
					</td>
					<td colspan="7"><a href="./item.php?it_id=<?php 
            echo $item[$i]['it_id'];
            ?>
"><strong><?php 
            echo $item[$i]['it_name'];
            ?>
</strong></a></td>
				</tr>
Beispiel #12
0
    </section>

    <section id="smb_my_wish">
        <h2><a href="<?php 
echo G5_SHOP_URL;
?>
/wishlist.php">최근 위시리스트</a></h2>

        <ul>
            <?php 
$sql = " select *\n                       from {$g5['g5_shop_wish_table']} a,\n                            {$g5['g5_shop_item_table']} b\n                      where a.mb_id = '{$member['mb_id']}'\n                        and a.it_id  = b.it_id\n                      order by a.wi_id desc\n                      limit 0, 3 ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $image_w = 50;
    $image_h = 50;
    $image = get_it_image($row['it_id'], $image_w, $image_h, true);
    $list_left_pad = $image_w + 10;
    ?>

            <li style="padding-left:<?php 
    echo $list_left_pad + 10;
    ?>
px">
                <div class="wish_img"><?php 
    echo $image;
    ?>
</div>
                <div class="wish_info">
                    <a href="./item.php?it_id=<?php 
    echo $row['it_id'];
    ?>
        $iq_answer = '답변이 등록되지 않았습니다.';
        $is_answer = false;
    }
    if ($i == 0) {
        echo '<ol>';
    }
    ?>
    <li>

        <div class="sqa_img">
            <a href="<?php 
    echo $it_href;
    ?>
">
                <?php 
    echo get_it_image($row['it_id'], 70, 70);
    ?>
                <span><?php 
    echo $row['it_name'];
    ?>
</span>
            </a>
        </div>

        <section class="sqa_section">
            <h2><?php 
    echo $iq_subject;
    ?>
</h2>

            <dl class="sqa_dl">
Beispiel #14
0
        <div class="tbl_head01 tbl_wrap">
            <table>
            <thead>
            <tr>
                <th scope="col">이미지</th>
                <th scope="col">상품명</th>
                <th scope="col">보관일시</th>
            </tr>
            </thead>
            <tbody>
            <?php 
$sql = " select *\n                       from {$g5['g5_shop_wish_table']} a,\n                            {$g5['g5_shop_item_table']} b\n                      where a.mb_id = '{$member['mb_id']}'\n                        and a.it_id  = b.it_id\n                      order by a.wi_id desc\n                      limit 0, 3 ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $image = get_it_image($row['it_id'], 70, 70, true);
    ?>

            <tr>
                <td class="smb_my_img"><?php 
    echo $image;
    ?>
</td>
                <td><a href="./item.php?it_id=<?php 
    echo $row['it_id'];
    ?>
"><?php 
    echo stripslashes($row['it_name']);
    ?>
</a></td>
                <td class="td_datetime"><?php 
Beispiel #15
0
    die('<p>분류를 선택하시거나 제목 또는 상품명을 입력하신 후 검색하여 주십시오.</p>');
}
$sql = " select ca_id, it_id, it_name, it_price\n           from {$g5['g5_shop_item_table']}\n          where it_id <> '{$it_id}' ";
if ($ca_id) {
    $sql .= " and ( ca_id like '{$ca_id}%' or ca_id2 like '{$ca_id}%' or ca_id3 like '{$ca_id}%' ) ";
}
if ($it_name) {
    $sql .= " and it_name like '%{$it_name}%' ";
}
$sql .= " order by ca_id, it_name ";
$result = sql_query($sql);
$list = '';
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    $sql2 = " select count(*) as cnt from {$g5['g5_shop_item_relation_table']} where it_id = '{$it_id}' and it_id2 = '{$row['it_id']}' ";
    $row2 = sql_fetch($sql2);
    if ($row2['cnt']) {
        continue;
    }
    $it_name = get_it_image($row['it_id'], 50, 50) . ' ' . $row['it_name'];
    $list .= '<li class="list_res">';
    $list .= '<input type="hidden" name="re_it_id[]" value="' . $row['it_id'] . '">';
    $list .= '<div class="list_item">' . $it_name . '</div>';
    $list .= '<div class="list_item_btn"><button type="button" class="add_item btn_frmline">추가</button></div>';
    $list .= '</li>' . PHP_EOL;
}
if ($list) {
    $list = '<ul>' . $list . '</ul>';
} else {
    $list = '<p>등록된 자료가 없습니다.';
}
echo $list;
Beispiel #16
0
        <?php 
    $tv_tot_count = 0;
    $k = 0;
    for ($i = 1; $i <= $tv_idx; $i++) {
        $tv_it_idx = $tv_idx - ($i - 1);
        $tv_it_id = get_session("ss_tv[{$tv_it_idx}]");
        $rowx = sql_fetch(" select it_id, it_name from {$g5['g5_shop_item_table']} where it_id = '{$tv_it_id}' ");
        if (!$rowx['it_id']) {
            continue;
        }
        if ($tv_tot_count % $tv_div['img_length'] == 0) {
            $k++;
        }
        $it_name = get_text($rowx['it_name']);
        $img = get_it_image($tv_it_id, $tv_div['img_width'], $tv_div['img_height'], $tv_it_id, '', $it_name);
        if ($tv_tot_count == 0) {
            echo '<ul id="stv_ul">' . PHP_EOL;
        }
        echo '<li class="stv_item c' . $k . '">' . PHP_EOL;
        echo $img;
        echo '<br>';
        echo cut_str($it_name, 10, '') . PHP_EOL;
        echo '</li>' . PHP_EOL;
        $tv_tot_count++;
    }
    if ($tv_tot_count > 0) {
        echo '</ul>' . PHP_EOL;
    }
    ?>
Beispiel #17
0
 // 에스크로 상품정보
 if ($default['de_escrow_use']) {
     if ($i > 0) {
         $good_info .= chr(30);
     }
     $good_info .= "seq=" . ($i + 1) . chr(31);
     $good_info .= "ordr_numb={$od_id}_" . sprintf("%04d", $i) . chr(31);
     $good_info .= "good_name=" . addslashes($row['it_name']) . chr(31);
     $good_info .= "good_cntx=" . $row['ct_qty'] . chr(31);
     $good_info .= "good_amtx=" . $row['ct_price'] . chr(31);
 }
 $a1 = '<strong>';
 $a2 = '</strong>';
 $image_width = 80;
 $image_height = 80;
 $image = get_it_image($row['it_id'], $image_width, $image_height);
 $it_name = $a1 . stripslashes($row['it_name']) . $a2;
 $it_options = print_item_options($row['it_id'], $s_cart_id);
 if ($it_options) {
     $it_name .= '<div class="sod_opt">' . $it_options . '</div>';
 }
 // 복합과세금액
 if ($default['de_tax_flag_use']) {
     if ($row['it_notax']) {
         $comm_free_mny += $sum['price'];
     } else {
         $tot_tax_mny += $sum['price'];
     }
 }
 $point = $sum['point'];
 $sell_price = $sum['price'];
Beispiel #18
0
        <?php 
$sql = " select a.wi_id, a.wi_time, b.* from {$g5['g5_shop_wish_table']} a left join {$g5['g5_shop_item_table']} b on ( a.it_id = b.it_id ) ";
$sql .= " where a.mb_id = '{$member['mb_id']}' order by a.wi_id desc ";
$result = sql_query($sql);
for ($i = 0; $row = mysql_fetch_array($result); $i++) {
    $out_cd = '';
    $sql = " select count(*) as cnt from {$g5['g5_shop_item_option_table']} where it_id = '{$row['it_id']}' and io_type = '0' ";
    $tmp = sql_fetch($sql);
    if ($tmp['cnt']) {
        $out_cd = 'no';
    }
    $it_price = get_price($row);
    if ($row['it_tel_inq']) {
        $out_cd = 'tel_inq';
    }
    $image = get_it_image($row['it_id'], 70, 70);
    ?>

        <tr>
            <td class="td_chk">
                <?php 
    // 품절검사
    if (is_soldout($row['it_id'])) {
        ?>
                품절
                <?php 
    } else {
        //품절이 아니면 체크할수 있도록한다
        ?>
                <label for="chk_it_id_<?php 
        echo $i;
Beispiel #19
0
         echo "<div id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
     } else {
         echo "<div id=\"smt_{$this->type}\" class=\"sct smt_50\">\n";
     }
     echo "<ul class=\"sct_ul sct_ul_first\">\n";
 }
 if ($i > 1 && $i % $this->list_mod == 1) {
     echo "</ul>\n";
     echo "<ul class=\"sct_ul\">\n";
 }
 echo "<li class=\"sct_li{$sct_last}\" style=\"width:{$this->img_width}px\">";
 if ($this->href) {
     echo "<div class=\"sct_img\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
 }
 if ($this->view_it_img) {
     echo get_it_image($row['it_id'], $this->img_width, $this->img_height, '', '', stripslashes($row['it_name'])) . "\n";
 }
 if ($this->href) {
     echo "</a></div>\n";
 }
 if ($this->view_it_icon) {
     echo "<div class=\"sct_icon\">" . item_icon($row) . "</div>\n";
 }
 if ($this->view_it_id) {
     echo "<div class=\"sct_id\">&lt;" . stripslashes($row['it_id']) . "&gt;</div>\n";
 }
 if ($this->href) {
     echo "<div class=\"sct_txt\"><a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
 }
 if ($this->view_it_name) {
     echo stripslashes($row['it_name']) . "\n";
Beispiel #20
0
		<tr>
			<th scope="row">이미지</th>
			<th scope="row">상품명</th>
			<th scope="row">상태</th>
			<th scope="row">수량</th>
			<th scope="row">배송</th>
			<th scope="row">배송비</th>
		</tr>
		<tbody>
		<?php 
for ($i = 0; $i < count($item); $i++) {
    ?>
			<tr>
				<td align="center">
					<?php 
    echo get_it_image($item[$i]['it_id'], 40, 40);
    ?>
				</td>
				<td>
					<a href="<?php 
    echo G5_SHOP_URL;
    ?>
/item.php?it_id=<?php 
    echo $item[$i]['it_id'];
    ?>
" target="_blank">
						<?php 
    echo stripslashes($item[$i]['it_name']);
    ?>
					</a>
					<div class="it-options" style="margin-top:4px;">