Exemplo n.º 1
0
/**
*
* 연혁 출력
*
* @param string $his_id
* @param string $skin_dir
* @return string $content
*/
function history($his_id, $skin_dir = '', $group = null)
{
    global $g5;
    $sql = "select * from `{$g5['history_master_table']}` where his_id = '{$his_id}'";
    $history = sql_fetch($sql);
    if (!$skin_dir) {
        $skin_dir = $history['his_skin'];
    }
    $history_skin_path = get_skin_path('history', $skin_dir);
    $history_skin_url = get_skin_url('history', $skin_dir);
    $sortable = "order by his_item_year " . $history['his_sort'] . ', his_item_month ' . $history['his_sort'] . ', his_item_day ' . $history['his_sort'];
    $histories = array();
    $group_histories = array();
    for ($i = $history['his_start_year'], $y = $history['his_end_year']; $i <= $history['his_end_year'], $y >= $history['his_start_year']; $i++, $y--) {
        $history_item = array();
        $conditions = array("his_item_disable = ''", "his_id = '{$his_id}'");
        if (!is_null($group)) {
            $conditions['group'] = "his_group_id = '{$group}'";
        }
        if ($history['his_sort'] == 'asc') {
            $item_year = $i;
        } else {
            $item_year = $y;
        }
        $conditions[] = "his_item_year = '{$item_year}'";
        $condition = count($conditions) > 0 ? 'where ' . implode(' and ', $conditions) : '';
        $sql = "select * from `{$g5['history_item_table']}` {$condition} {$sortable}";
        $result = sql_query($sql);
        while ($item = sql_fetch_array($result)) {
            switch ($history['his_output_type']) {
                case 'a':
                    $item['date'] = $item['his_item_year'] . '.' . $item['his_item_month'] . '.' . $item['his_item_day'];
                    break;
                case 'y':
                    $item['date'] = '';
                    break;
                case 'm':
                    $item['date'] = $item['his_item_month'];
                    break;
                case 'd':
                    $item['date'] = $item['his_item_month'] . '.' . $item['his_item_day'];
                    break;
                case 'i':
                    $item['date'] = $item['his_item_date'];
                    break;
            }
            $history_item[] = $item;
            $all_history_item[] = $item;
        }
        $histories[$item_year] = $history_item;
    }
    $histories = array_filter($histories);
    ob_start();
    include $history_skin_path . '/history.skin.php';
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
Exemplo n.º 2
0
    $connect_skin_url = get_skin_url('connect', $config['cf_mobile_connect_skin']);
    $faq_skin_path = get_skin_path('faq', $config['cf_mobile_faq_skin']);
    $faq_skin_url = get_skin_url('faq', $config['cf_mobile_faq_skin']);
} else {
    $board_skin_path = get_skin_path('board', $board['bo_skin']);
    $board_skin_url = get_skin_url('board', $board['bo_skin']);
    $member_skin_path = get_skin_path('member', $config['cf_member_skin']);
    $member_skin_url = get_skin_url('member', $config['cf_member_skin']);
    $new_skin_path = get_skin_path('new', $config['cf_new_skin']);
    $new_skin_url = get_skin_url('new', $config['cf_new_skin']);
    $search_skin_path = get_skin_path('search', $config['cf_search_skin']);
    $search_skin_url = get_skin_url('search', $config['cf_search_skin']);
    $connect_skin_path = get_skin_path('connect', $config['cf_connect_skin']);
    $connect_skin_url = get_skin_url('connect', $config['cf_connect_skin']);
    $faq_skin_path = get_skin_path('faq', $config['cf_faq_skin']);
    $faq_skin_url = get_skin_url('faq', $config['cf_faq_skin']);
}
//==============================================================================
// 방문자수의 접속을 남김
include_once G5_BBS_PATH . '/visit_insert.inc.php';
// 일정 기간이 지난 DB 데이터 삭제 및 최적화
include_once G5_BBS_PATH . '/db_table.optimize.php';
// common.php 파일을 수정할 필요가 없도록 확장합니다.
$extend_file = array();
$tmp = dir(G5_EXTEND_PATH);
while ($entry = $tmp->read()) {
    // php 파일만 include 함
    if (preg_match("/(\\.php)\$/i", $entry)) {
        $extend_file[] = $entry;
    }
}
Exemplo n.º 3
0
<?php

if (!defined('_GNUBOARD_')) {
    exit;
}
// 개별 페이지 접근 불가
$qa_skin_path = get_skin_path('qa', G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']);
$qa_skin_url = get_skin_url('qa', G5_IS_MOBILE ? $qaconfig['qa_mobile_skin'] : $qaconfig['qa_skin']);
if (G5_IS_MOBILE) {
    // 모바일의 경우 설정을 따르지 않는다.
    include_once './_head.php';
    echo conv_content($qaconfig['qa_mobile_content_head'], 1);
} else {
    if ($qaconfig['qa_include_head']) {
        @(include $qaconfig['qa_include_head']);
    } else {
        include './_head.php';
    }
    echo conv_content($qaconfig['qa_content_head'], 1);
}
Exemplo n.º 4
0
$dst[] = $default['de_admin_company_addr'];
$src[] = "/{{운영자명}}|{{관리자명}}/";
$dst[] = $default['de_admin_name'];
$src[] = "/{{운영자e-mail}}|{{관리자e-mail}}/i";
$dst[] = $default['de_admin_email'];
$src[] = "/{{정보관리책임자명}}/";
$dst[] = $default['de_admin_info_name'];
$src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i";
$dst[] = $default['de_admin_info_email'];
$str = preg_replace($src, $dst, $str);
// 스킨경로
if (trim($co['co_skin']) == '') {
    $co['co_skin'] = 'basic';
}
$content_skin_path = get_skin_path('content', $co['co_skin']);
$content_skin_url = get_skin_url('content', $co['co_skin']);
$skin_file = $content_skin_path . '/content.skin.php';
if ($is_admin) {
    echo '<div class="ctt_admin"><a href="' . G5_ADMIN_URL . '/contentform.php?w=u&amp;co_id=' . $co_id . '" class="btn_admin">내용 수정</a></div>';
}
?>

<?php 
if (is_file($skin_file)) {
    $himg = G5_DATA_PATH . '/content/' . $co_id . '_h';
    if (file_exists($himg)) {
        // 상단 이미지
        echo '<div id="ctt_himg" class="ctt_img"><img src="' . G5_DATA_URL . '/content/' . $co_id . '_h" alt=""></div>';
    }
    include $skin_file;
    $timg = G5_DATA_PATH . '/content/' . $co_id . '_t';
Exemplo n.º 5
0
Arquivo: tag.php Projeto: peb317/gbamn
                    sql_query("update {$g5['apms_tag']} set cnt = '{$cnt['cnt']}' where id = '{$row['id']}'", false);
                }
            }
            $go_url = './tag.php';
            goto_url($go_url);
        }
    }
}
// Page ID
$pid = $pid ? $pid : 'tag';
$at = apms_page_thema($pid);
if (!defined('THEMA_PATH')) {
    include_once G5_LIB_PATH . '/apms.thema.lib.php';
}
$tag_skin_path = get_skin_path('tag', G5_IS_MOBILE ? $config['as_mobile_tag_skin'] : $config['as_tag_skin']);
$tag_skin_url = get_skin_url('tag', G5_IS_MOBILE ? $config['as_mobile_tag_skin'] : $config['as_tag_skin']);
$g5['title'] = '태그박스';
include_once G5_PATH . '/head.php';
$skin_path = $tag_skin_path;
$skin_url = $tag_skin_url;
// 검색결과
if ($q || $stx) {
    $q = $stx ? $stx : $q;
    $q = strip_tags($q);
    $q = get_search_string($q);
    // 특수문자 제거
    $op1 = '';
    // 검색어를 구분자로 나눈다. 여기서는 공백
    $s = explode(',', strip_tags($q));
    // 검색필드를 구분자로 나눈다. 여기서는 +
    $field = array('tag');