Beispiel #1
0
<?php

$sub_menu = "100280";
include_once './_common.php';
if ($is_admin != 'super') {
    alert('최고관리자만 접근 가능합니다.');
}
// 테마 필드 추가
if (!isset($config['cf_theme'])) {
    sql_query(" ALTER TABLE `{$g5['config_table']}`\n                    ADD `cf_theme` varchar(255) NOT NULL DEFAULT '' AFTER `cf_title` ", true);
}
$theme = get_theme_dir();
if ($config['cf_theme'] && in_array($config['cf_theme'], $theme)) {
    array_unshift($theme, $config['cf_theme']);
}
$theme = array_values(array_unique($theme));
$total_count = count($theme);
// 설정된 테마가 존재하지 않는다면 cf_theme 초기화
if ($config['cf_theme'] && !in_array($config['cf_theme'], $theme)) {
    sql_query(" update {$g5['config_table']} set cf_theme = '' ");
}
$g5['title'] = "테마설정";
include_once './admin.head.php';
?>

<script src="<?php 
echo G5_ADMIN_URL;
?>
/theme.js"></script>

<p class="theme_p">설치된 테마 : <?php 
Beispiel #2
0
function get_parts_skin_file_uri()
{
    //define( 'FS_METHOD', 'direct' );
    define('MERGED_CSS', '_merged_.css');
    $skin_file = get_pearts_base_skin();
    if (!$skin_file) {
        return;
    }
    //パーツスキンじゃないときは
    $skin_arr = explode('/', $skin_file);
    array_pop($skin_arr);
    //CSSファイル名の除去
    $skin_dir = implode('/', $skin_arr);
    //var_dump(get_theme_local_dir());
    //スキンファイルをローカルパスに変換
    $skin_local_file = str_replace(get_theme_dir(), get_theme_local_dir(), $skin_file);
    //URLをローカルパスに変換
    $skin_local_dir = str_replace(get_theme_dir(), get_theme_local_dir(), $skin_dir);
    //ディレクトリ内の全てのCSSファイルを取得
    //var_dump($skin_local_dir);
    $all_files = get_file_list($skin_local_dir . '/');
    //var_dump($all_files);
    //利用するパーツスキンファイルを取得
    $skin_pearts_local_files = array();
    foreach ($all_files as $pathname) {
        $pathname = str_replace('\\', '/', $pathname);
        if (preg_match('/\\.css$/i', $pathname, $matches)) {
            //フォルダ名の正規表現が[a-zA-Z\-_]+のとき
            //結合ファイルの時は読み込まない
            if (preg_match('/\\/_merged_\\.css$/i', $pathname, $m)) {
                continue;
            }
            //スキンのstyle.cssは先頭にするため読み込まない
            if (!preg_match('/\\/style\\.css$/i', $pathname, $m)) {
                $skin_pearts_local_files[] = $pathname;
            }
        }
    }
    //文字列順に並び替え
    sort($skin_pearts_local_files, SORT_STRING);
    //先頭にstyle.cssを追加
    $skin_pearts_local_files = array_merge(array($skin_local_file), $skin_pearts_local_files);
    //var_dump($skin_pearts_local_files);
    //パーツスキンファイルを開いて全てまとめる
    $merged_css_text = '';
    foreach ($skin_pearts_local_files as $pathname) {
        if (WP_Filesystem()) {
            //WP_Filesystemの初期化
            global $wp_filesystem;
            //$wp_filesystemオブジェクトの呼び出し
            //コメントで位置を表示するためのファイル名取得
            $comment_file_name = str_replace($skin_local_dir . '/', '', $pathname);
            $css = $wp_filesystem->get_contents($pathname);
            //ファイルの読み込み
            $merged_css_text .= "/****************************\r\n" . "** File:" . $comment_file_name . "\r\n" . "****************************/\r\n" . $css . "\r\n";
            //CSSの結合
        }
    }
    //var_dump($merged_css_text);
    $merged_css_file = $skin_local_dir . '/' . MERGED_CSS;
    if (WP_Filesystem()) {
        //WP_Filesystemの初期化
        global $wp_filesystem;
        //$wp_filesystemオブジェクトの呼び出し
        $wp_filesystem->put_contents($merged_css_file, $merged_css_text, 0644);
    }
    if (!file_exists($merged_css_file)) {
        return;
    }
    //ファイルが存在しないときnull
    return str_replace(get_theme_local_dir(), get_theme_dir(), $merged_css_file);
    //成功した時はファイルパスを渡す
}
Beispiel #3
0
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Review System</title>

    <!-- Bootstrap -->
    <link href="<?php 
echo get_theme_dir();
?>
assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php 
echo get_theme_dir();
?>
assets/css/style.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
Beispiel #4
0
/**
 * Function is responsible for defining the default system pathes
 */
function system_pathes()
{
    add_view_path(get_theme_dir());
    add_view_path(INCLUDES . "views");
}
Beispiel #5
0
require_once INCLUDES . "functions.php";
require_once INCLUDES . "path.php";
require_once INCLUDES . "factory.php";
require_once INCLUDES . "application.php";
require_once INCLUDES . "router.php";
require_once INCLUDES . "set.php";
require_once INCLUDES . "string.php";
require_once INCLUDES . "files.php";
require_once INCLUDES . "compression.php";
require_once INCLUDES . "database" . DS . "database.php";
require_once INCLUDES . "database" . DS . "table.php";
/**
 * Initializing the system
 * 
 * This is generally for internal calls only.
 */
do_action('system');
/**
 * Loading the theme functions
 * 
 * Making sure that we load the themes functions file as soon as possible.
 */
if (file_exists($functions = get_theme_dir() . 'functions.php')) {
    require_once $functions;
}
/**
 * Stylesheets
 * 
 * default system styles
 */
register_stylesheet('five-includes/views/style.css');