Exemplo n.º 1
0
<?php

require_once '../class.tpl.php';
$tpl = new tpl();
$tpl->assign(array('hello' => 'Hello', 'world' => 'World'));
$tpl->display('index.tpl');
Exemplo n.º 2
0
<?php

/*
	Created by ANDRAS Zoltan Gyarfas azolee@gmail.com in 2015
*/
include_once './core/init.php';
global $header;
global $page;
$page = array("title" => "", "header" => "", "nav" => "", "content" => "");
$contentManager = Page::instance();
$urlPath = trim(filter_input(INPUT_GET, "path", FILTER_SANITIZE_STRING), "/");
global $url;
$url = $contentManager->getUrlDetails($urlPath);
$contentManager->generatePage($url);
$page['content'] = $contentManager->getPageContent();
$page['title'] = $contentManager->getPageTitle();
$m = $contentManager->loadNav();
if (!empty($m)) {
    $page = array_merge($m, $page);
}
if (file_exists(TEMPLATES . DS . $contentManager->getPageTemplate())) {
    echo tpl::display($page, TEMPLATES . DS . $contentManager->getPageTemplate());
}
Exemplo n.º 3
0
//当前语言下的栏目
@set_time_limit(0);
if ($action == 'htm') {
    include 'template/admin_htm_index.html';
} elseif ($action == 'index') {
    //生成首页
    //global $lang,$_confing,$_index,$language,$tpl;
    if (!$_confing['web_html'][0]) {
        err('<span style="color:red">请先开启【' . $lang . '】语言的html生成</span>');
    }
    $index_url = get_index_url($lang);
    //设定访问的语言
    ob_start();
    $index_focus = "focus";
    $index_fl = $index_url ? CMS_PATH . 'index.html' : CMS_PATH . 'index_' . $lang . '.html';
    $tpl->display('index');
    creat_html($index_fl);
    $index_fl = $index_url ? CMS_SELF . 'index.html' : CMS_SELF . 'index_' . $lang . '.html';
    err('首页生成完成【<a target="_blank" href="' . $index_fl . '">浏览' . $lang . '语言首页</a>】');
    //栏目生成界面
} elseif ($action == 'cate') {
    global $lang;
    if (file_exists(DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php')) {
        include DATA_PATH . 'cache_cate/cate_list_' . $lang . '.php';
    }
    include 'template/admin_htm_cate.html';
    //生成栏目
} elseif ($action == 'cate_htm') {
    if (!$_confing['web_html'][0]) {
        err('<span style="color:red">请先开启【' . $lang . '】语言的html生成</span>');
    }
Exemplo n.º 4
0
            $api->set($arr_u_group[4][$i], "");
        } else {
            // или показываем
            $api->set($arr_u_group[1][$i], "");
            $api->set($arr_u_group[4][$i], "");
        }
    } else {
        // проверяем на вхождение
        if ($arr_s !== false) {
            // если найдено, то скрываем контент
            $api->set($arr_u_group[1][$i], "");
            $api->set($arr_u_group[3][$i], "");
            $api->set($arr_u_group[4][$i], "");
        } else {
            // или показываем
            $api->set($arr_u_group[1][$i], "");
            $api->set($arr_u_group[4][$i], "");
        }
    }
    $i++;
}
unset($i);
unset($value);
#   USER GROUP HIDE AND
#############################################
$copy = '<a href="http://apps-system.ru/" target="_blank" style="position: fixed; bottom: 1px; right: 10px; font-size: 10px; color: #7888A0;">&copy; 2015-2016 apps-system.ru</a>
<!-- powered by apps-system.ru -->';
$api->set("</body>", $copy . PHP_EOL . "</body>");
$tpl->set("{content}", $api->give());
$tpl->display();