Пример #1
0
                }
                $destfile = G5_PATH . $data_path;
                if (is_file($destfile)) {
                    @unlink($destfile);
                }
            }
            $sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '{$is_id}' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
            sql_query($sql);
            //$alert_msg = "0|삭제 하셨습니다.";
        }
    }
}
if (!$default['de_item_use_use']) {
    update_use_cnt($it_id);
}
update_use_avg($it_id);
if ($move) {
    if ($alert_msg) {
        if ($move == "1") {
            //아이템으로
            alert($alert_msg, './item.php?it_id=' . $it_id . '&ca_id=' . $ca_id . '#itemuse');
        } else {
            if ($move == "3") {
                //내용으로
                alert($alert_msg, './itemuseview.php?is_id=' . $is_id . '&ca_id=' . $ca_id . '&page=' . $page);
            } else {
                //목록으로
                alert($alert_msg, './itemuselist.php?page=' . $page);
            }
        }
    } else {
Пример #2
0
include_once './_common.php';
check_demo();
check_admin_token();
if (!count($_POST['chk'])) {
    alert($_POST['act_button'] . " 하실 항목을 하나 이상 체크하세요.");
}
if ($_POST['act_button'] == "선택수정") {
    auth_check($auth[$sub_menu], 'w');
} else {
    if ($_POST['act_button'] == "선택삭제") {
        auth_check($auth[$sub_menu], 'd');
    } else {
        alert("선택수정이나 선택삭제 작업이 아닙니다.");
    }
}
for ($i = 0; $i < count($_POST['chk']); $i++) {
    $k = $_POST['chk'][$i];
    // 실제 번호를 넘김
    if ($_POST['act_button'] == "선택수정") {
        $sql = "update {$g5['g5_shop_item_use_table']}\r\n                   set is_score   = '{$_POST['is_score'][$k]}',\r\n                       is_confirm = '{$_POST['is_confirm'][$k]}'\r\n                 where is_id      = '{$_POST['is_id'][$k]}' ";
        sql_query($sql);
    } else {
        if ($_POST['act_button'] == "선택삭제") {
            $sql = "delete from {$g5['g5_shop_item_use_table']} where is_id = '{$_POST['is_id'][$k]}' ";
            sql_query($sql);
        }
    }
    update_use_cnt($_POST['it_id'][$k]);
    update_use_avg($_POST['it_id'][$k]);
}
goto_url("./itemuselist.php?sca={$sca}&amp;sst={$sst}&amp;sod={$sod}&amp;sfl={$sfl}&amp;stx={$stx}&amp;page={$page}");
Пример #3
0
            }
            // 이미지복사
            @mkdir(G5_DATA_PATH . '/item/' . $row['it_id'], G5_DIR_PERMISSION);
            @chmod(G5_DATA_PATH . '/item/' . $row['it_id'], G5_DIR_PERMISSION);
            if (copy($item_img_file, G5_DATA_PATH . '/item/' . $row['it_id'] . '/' . $row['it_id'] . '_l' . $idx . '.' . $ext)) {
                @chmod(G5_DATA_PATH . '/item/' . $row['it_id'] . '/' . $row['it_id'] . '_l' . $idx . '.' . $ext, G5_FILE_PERMISSION);
                $sql_common .= $comma . " it_img{$idx} = '" . $row['it_id'] . '/' . $row['it_id'] . '_l' . $idx . '.' . $ext . "' ";
                $idx++;
            }
        }
    }
    sql_query(" INSERT INTO {$g5['g5_shop_item_table']} SET {$sql_common} ");
    // 사용후기의 확인된 건수를 상품테이블에 저장
    update_use_cnt($row['it_id']);
    // 사용후기의 선호도(별) 평균을 상품테이블에 저장
    update_use_avg($row['it_id']);
}
echo '<li>item table 복사</li>' . PHP_EOL;
// order table 복사
$sql = " select * from {$g4['yc4_order_table']} ";
$result = sql_query($sql);
$excl_fld = array('on_uid', 'od_temp_bank', 'od_temp_card', 'od_temp_hp', 'od_temp_point', 'od_receipt_card', 'od_receipt_bank', 'od_receipt_hp', 'od_bank_time', 'od_card_time', 'od_hp_time', 'od_cancel_card', 'od_dc_amount', 'od_refund_amount', 'dl_id', 'od_escrow1', 'od_escrow2', 'od_escrow3', 'od_cash_no', 'od_cash_receipt_no', 'od_cash_app_time', 'od_cash_reg_stat', 'od_cash_reg_desc', 'od_cash_tr_code', 'od_cash_id_info', 'od_cash', 'od_cash_allthegate_gubun_cd', 'od_cash_allthegate_confirm_no', 'od_cash_allthegate_adm_no', 'od_cash_tgcorp_mxissueno', 'od_cash_inicis_noappl', 'od_cash_inicis_pgauthdate', 'od_cash_inicis_pgauthtime', 'od_cash_inicis_tid', 'od_cash_inicis_ruseopt', 'od_cash_receiptnumber', 'od_cash_kspay_revatransactionno');
for ($i = 0; $row = sql_fetch_array($result); $i++) {
    if ($is_euckr) {
        $row = array_map('iconv_utf8', $row);
    }
    $comma = '';
    $sql_common = '';
    foreach ($row as $key => $val) {
        if (in_array($key, $excl_fld)) {
            continue;