Example #1
0
if ($total_count > 0) {
    ?>
<ul id="theme_list">
    <?php 
    for ($i = 0; $i < $total_count; $i++) {
        $info = get_theme_info($theme[$i]);
        $name = get_text($info['theme_name']);
        if ($info['screenshot']) {
            $screenshot = '<img src="' . $info['screenshot'] . '" alt="' . $name . '">';
        } else {
            $screenshot = '<img src="' . G5_ADMIN_URL . '/img/theme_img.jpg" alt="">';
        }
        if ($config['cf_theme'] == $theme[$i]) {
            $btn_active = '<span class="theme_sl theme_sl_use">사용중</span><button type="button" class="theme_sl theme_deactive" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '">사용안함</button>';
        } else {
            $tconfig = get_theme_config_value($theme[$i], 'set_default_skin');
            if ($tconfig['set_default_skin']) {
                $set_default_skin = 'true';
            } else {
                $set_default_skin = 'false';
            }
            $btn_active = '<button type="button" class="theme_sl theme_active" data-theme="' . $theme[$i] . '" ' . 'data-name="' . $name . '" data-set_default_skin="' . $set_default_skin . '">테마적용</button>';
        }
        ?>
    <li>
        <div class="tmli_if">
            <?php 
        echo $screenshot;
        ?>
            <div class="tmli_tit">
                <p><?php 
Example #2
0
                $keys = array('de_shop_skin', 'de_shop_mobile_skin');
                $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
                $i = 0;
                foreach ($keys as $val) {
                    if ($tconfig[$val]) {
                        $data[$val] = preg_match('#^theme/.+$#', $tconfig[$val]) ? $tconfig[$val] : 'theme/' . $tconfig[$val];
                        $i++;
                    }
                }
                if ($i == 0) {
                    $data['error'] = '적용할 쇼핑몰 스킨 설정이 없습니다.';
                }
            } else {
                if ($type == 'shop_img_size') {
                    $keys = array('shop_default_image_width', 'shop_default_image_height');
                    $tconfig = get_theme_config_value($config['cf_theme'], implode(',', $keys));
                    $i = 0;
                    foreach ($keys as $val) {
                        if ($tconfig[$val]) {
                            $data[$val] = (int) preg_replace('#[^0-9]#', '', $tconfig[$val]);
                            $i++;
                        }
                    }
                    if ($i == 0) {
                        $data['error'] = '적용할 쇼핑몰 이미지 기본 사이즈 설정이 없습니다.';
                    }
                }
            }
        }
    }
}
Example #3
0
$arr_mode = array('index', 'list', 'view');
$mode = substr(strip_tags($_GET['mode']), 0, 20);
if (!in_array($mode, $arr_mode)) {
    $mode = 'index';
}
$qstr_index = '&amp;mode=index';
$qstr_list = '&amp;mode=list';
$qstr_view = '&amp;mode=view';
$qstr_device = '&amp;mode=' . $mode . '&amp;device=' . (G5_IS_MOBILE ? 'pc' : 'mobile');
$sql = " select bo_table, wr_parent from {$g5['board_new_table']} order by bn_id desc limit 1 ";
$row = sql_fetch($sql);
$bo_table = $row['bo_table'];
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '{$bo_table}' ");
$write_table = $g5['write_prefix'] . $bo_table;
// theme.config.php 미리보기 게시판 스킨이 설정돼 있다면
$tconfig = get_theme_config_value($theme, 'set_default_skin, preview_board_skin, preview_mobile_board_skin');
if ($mode == 'list' || $mode == 'view') {
    if ($tconfig['preview_board_skin']) {
        $board['bo_skin'] = 'theme/' . $tconfig['preview_board_skin'];
    }
    if ($tconfig['preview_mobile_board_skin']) {
        $board['bo_mobile_skin'] = 'theme/' . $tconfig['preview_mobile_board_skin'];
    }
}
// 스킨경로
if (G5_IS_MOBILE) {
    $board_skin_path = get_skin_path('board', $board['bo_mobile_skin']);
    $board_skin_url = get_skin_url('board', $board['bo_mobile_skin']);
    $member_skin_path = get_skin_path('member', $config['cf_mobile_member_skin']);
    $member_skin_url = get_skin_url('member', $config['cf_mobile_member_skin']);
    $new_skin_path = get_skin_path('new', $config['cf_mobile_new_skin']);
$theme_dir = get_theme_dir();
if ($_POST['type'] == 'reset') {
    $sql = " update {$g5['config_table']} set cf_theme = '' ";
    sql_query($sql);
    die('');
}
if (!in_array($theme, $theme_dir)) {
    die('선택하신 테마가 설치되어 있지 않습니다.');
}
// 테마적용
$sql = " update {$g5['config_table']} set cf_theme = '{$theme}' ";
sql_query($sql);
// 테마 설정 스킨 적용
if ($_POST['set_default_skin'] == 1) {
    $keys = 'set_default_skin, cf_member_skin, cf_mobile_member_skin, cf_new_skin, cf_mobile_new_skin, cf_search_skin, cf_mobile_search_skin, cf_connect_skin, cf_mobile_connect_skin, cf_faq_skin, cf_mobile_faq_skin, qa_skin, qa_mobile_skin';
    $tconfig = get_theme_config_value($theme, $keys);
    if ($tconfig['set_default_skin']) {
        $sql_common = array();
        $qa_sql_common = array();
        foreach ($tconfig as $key => $val) {
            if (preg_match('#^qa_.+$#', $key)) {
                if ($val) {
                    if (!preg_match('#^theme/.+$#', $val)) {
                        $val = 'theme/' . $val;
                    }
                    $qa_sql_common[] = " {$key} = '{$val}' ";
                }
                continue;
            }
            if (!isset($config[$key])) {
                continue;
Example #5
0
    define('_SHOP_', true);
}
$qstr_index = '&amp;mode=index';
$qstr_list = '&amp;mode=list';
$qstr_view = '&amp;mode=view';
$qstr_shop = '&amp;mode=shop';
$qstr_ca_list = '&amp;mode=ca_list';
$qstr_item = '&amp;mode=item';
$qstr_device = '&amp;mode=' . $mode . '&amp;device=' . (G5_IS_MOBILE ? 'pc' : 'mobile');
$sql = " select bo_table, wr_parent from {$g5['board_new_table']} order by bn_id desc limit 1 ";
$row = sql_fetch($sql);
$bo_table = $row['bo_table'];
$board = sql_fetch(" select * from {$g5['board_table']} where bo_table = '{$bo_table}' ");
$write_table = $g5['write_prefix'] . $bo_table;
// theme.config.php 미리보기 게시판 스킨이 설정돼 있다면
$tconfig = get_theme_config_value($theme);
if ($mode == 'list' || $mode == 'view') {
    if ($tconfig['preview_board_skin']) {
        $board['bo_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_board_skin']) ? $tconfig['preview_board_skin'] : 'theme/' . $tconfig['preview_board_skin'];
    }
    if ($tconfig['preview_mobile_board_skin']) {
        $board['bo_mobile_skin'] = preg_match('#^theme/.+$#', $tconfig['preview_mobile_board_skin']) ? $tconfig['preview_mobile_board_skin'] : 'theme/' . $tconfig['preview_mobile_board_skin'];
    }
}
// 스킨경로
if (G5_IS_MOBILE) {
    $board_skin_path = get_skin_path('board', $board['bo_mobile_skin']);
    $board_skin_url = get_skin_url('board', $board['bo_mobile_skin']);
    $member_skin_path = get_skin_path('member', $config['cf_mobile_member_skin']);
    $member_skin_url = get_skin_url('member', $config['cf_mobile_member_skin']);
    $new_skin_path = get_skin_path('new', $config['cf_mobile_new_skin']);