function init()
 {
     if (argv(1) === 'json') {
         $data = get_site_info();
         json_return_and_die($data);
     }
 }
Exemple #2
0
function add_lang()
{
    global $smarty, $lang;
    $chinese_name = post('chinese_name');
    $foreign_name = post('foreign_name');
    $pack_name = post('pack_name');
    $short_name = post('short_name');
    $index_entrance = post('index_entrance');
    $admin_entrance = post('admin_entrance');
    if ($chinese_name != '' && $foreign_name != '' && $pack_name != '' && $index_entrance != '' && $admin_entrance != '' && $index_entrance != 'index.php' && $admin_entrance != 'admin.php') {
        $var_value = $pack_name . '{v}' . $index_entrance . '{v}' . $admin_entrance . '{v}' . $chinese_name . '{v}' . $foreign_name;
        $obj = new varia();
        $obj->add_var_value('languages', $var_value);
        $site = get_site_info();
        $obj->add_var_value('site_title', $site['title'], $pack_name);
        $obj->add_var_value('site_name', $site['name'], $pack_name);
        $obj->add_var_value('site_record', $site['record'], $pack_name);
        $obj->add_var_value('site_tech', $site['tech'], $pack_name);
        $obj->add_var_value('site_keywords', $site['keywords'], $pack_name);
        $obj->add_var_value('site_description', $site['description'], $pack_name);
        $obj->add_var_value('notice', '', $pack_name, true);
        $obj->add_var_value('service_code', '', $pack_name, true);
        $obj->add_var_value('user_agreement', '', $pack_name, true);
        $obj = new channel();
        $obj->set_where('cha_original = 0');
        $list = $obj->get_list();
        for ($i = 0; $i < count($list); $i++) {
            $obj->clear_value();
            $obj->set_value('cha_lang', $pack_name);
            $obj->set_value('cha_code', $list[$i]['cha_code']);
            $obj->set_value('cha_name', $list[$i]['cha_name']);
            $obj->set_value('cha_original', $list[$i]['cha_original']);
            $obj->add();
        }
        if (!file_exists('languages/' . $pack_name)) {
            copy_dir('languages/' . S_LANG, 'languages/' . $pack_name);
        }
        if (S_MULTILINGUAL) {
            $file = file_get_contents('admin/index.txt');
            $file = str_replace('{$pack_name}', $pack_name, $file);
            $file = str_replace('{$index_entrance}', $index_entrance, $file);
            $file = str_replace('{$admin_entrance}', $admin_entrance, $file);
            file_put_contents($index_entrance, $file);
            $file = file_get_contents('admin/admin.txt');
            $file = str_replace('{$pack_name}', $pack_name, $file);
            $file = str_replace('{$index_entrance}', $index_entrance, $file);
            $file = str_replace('{$admin_entrance}', $admin_entrance, $file);
            file_put_contents($admin_entrance, $file);
        }
        $info_text = '添加语言成功';
    } else {
        $info_text = '的输入不合法,添加语言失败';
    }
    $smarty->assign('info_text', $info_text);
    $smarty->assign('link_text', $lang['return_list']);
    $smarty->assign('link_href', url(array('channel' => 'file', 'mod' => 'lang_lists')));
}
 public function __construct()
 {
     if ($GLOBALS['distribution_cfg']['OSS_TYPE'] && $GLOBALS['distribution_cfg']['OSS_TYPE'] == "ES_FILE") {
         logger::write($GLOBALS['distribution_cfg']['OSS_DOMAIN'] . "/es_file.php");
         global $syn_image_ci;
         global $curl_param;
         //global $syn_image_idx;
         $syn_image_idx = 0;
         $syn_image_ci = curl_init($GLOBALS['distribution_cfg']['OSS_DOMAIN'] . "/es_file.php");
         curl_setopt($syn_image_ci, CURLOPT_RETURNTRANSFER, true);
         curl_setopt($syn_image_ci, CURLOPT_SSL_VERIFYPEER, false);
         curl_setopt($syn_image_ci, CURLOPT_SSL_VERIFYHOST, false);
         curl_setopt($syn_image_ci, CURLOPT_NOPROGRESS, true);
         curl_setopt($syn_image_ci, CURLOPT_HEADER, false);
         curl_setopt($syn_image_ci, CURLOPT_POST, TRUE);
         curl_setopt($syn_image_ci, CURLOPT_TIMEOUT, 1);
         curl_setopt($syn_image_ci, CURLOPT_TIMECONDITION, 1);
         $curl_param['username'] = $GLOBALS['distribution_cfg']['OSS_ACCESS_ID'];
         $curl_param['password'] = $GLOBALS['distribution_cfg']['OSS_ACCESS_KEY'];
         $curl_param['act'] = 2;
     }
     $GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
     $GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
     $GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
     $GLOBALS['dynamic_cache'] = $GLOBALS['cache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
     $GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
     $GLOBALS['dynamic_avatar_cache'] = $GLOBALS['cache']->get("AVATAR_DYNAMIC_CACHE");
     //头像的动态缓存
     //输出导航菜单
     $nav_list = get_nav_list();
     $nav_list = init_nav_list($nav_list);
     foreach ($nav_list as $k => $v) {
         $nav_list[$k]['sub_nav'] = init_nav_list($v['sub_nav']);
     }
     $GLOBALS['tmpl']->assign("nav_list", $nav_list);
     //输出在线客服与时间
     if (app_conf("ONLINE_QQ") != "") {
         $qq = unserialize(app_conf("ONLINE_QQ"));
         $GLOBALS['tmpl']->assign("online_qq", $qq);
     }
     //输出页面的标题关键词与描述
     $GLOBALS['tmpl']->assign("site_info", get_site_info());
     //输出系统文章
     $system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
     $GLOBALS['tmpl']->assign("system_article", $system_article['list']);
     //输出帮助
     $deal_help = get_help();
     $GLOBALS['tmpl']->assign("deal_help", $deal_help);
     if (MODULE_NAME == "acate" && ACTION_NAME == "index" || MODULE_NAME == "article" && ACTION_NAME == "index" || MODULE_NAME == "cate" && ACTION_NAME == "index" || MODULE_NAME == "comment" && ACTION_NAME == "index" || MODULE_NAME == "help" && ACTION_NAME == "index" || MODULE_NAME == "link" && ACTION_NAME == "index" || MODULE_NAME == "mobile" && ACTION_NAME == "index" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "list_notice" || MODULE_NAME == "rec" && ACTION_NAME == "rhot" || MODULE_NAME == "rec" && ACTION_NAME == "rnew" || MODULE_NAME == "rec" && ACTION_NAME == "rbest" || MODULE_NAME == "rec" && ACTION_NAME == "rsale" || MODULE_NAME == "score" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "fav" || MODULE_NAME == "space" && ACTION_NAME == "fans" || MODULE_NAME == "space" && ACTION_NAME == "focus" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "pick" || MODULE_NAME == "sys" && ACTION_NAME == "index" || MODULE_NAME == "sys" && ACTION_NAME == "list_notice" || MODULE_NAME == "vote" && ACTION_NAME == "index") {
         set_gopreview();
     }
 }
 public function index()
 {
     // 获取可访问站点
     $sites = logic('site')->getAccessibleSites();
     // 获取顶部可访问菜单
     $top_menu = logic('Menu')->getAccessibleTopMenu();
     $seo = get_site_seo_info();
     $role = model('Role')->find(session('user_info.role_id'));
     $_SESSION['user_info']['name'] = $role['name'];
     $site_info = get_site_info($this->siteid);
     $this->assign('seo', $seo);
     $this->assign('sites', $sites);
     $this->assign('site_info', $site_info);
     $this->assign('top_menu', $top_menu);
     $this->assign('user_info', session('user_info'));
     $this->display();
 }
 public function index()
 {
     // 菜单显示自定义方式
     $model = D("Menu");
     if ($_SESSION[C('ADMIN_AUTH_KEY')]) {
         $top_menu = $model->where(array('siteid' => $this->siteid, 'pid' => 0, 'status' => 1))->order('sort desc, id asc')->select();
         $sites = D('Site')->select();
     } else {
         $top_menu = $model->table(C("DB_PREFIX") . 'access as access, ' . C("DB_PREFIX") . 'node as node')->where("node.pid = 0 and node.status = 1 and node.id = access.node_id and access.role_id = {$_SESSION['user_info']['role_id']} and access.siteid=" . $this->siteid)->order('node.sort desc, node.id asc')->select();
         $sites = M()->table(C("DB_PREFIX") . 'access as access, ' . C("DB_PREFIX") . 'site as site')->where("access.siteid = site.id and access.role_id = {$_SESSION['user_info']['role_id']}")->group('access.siteid')->select();
     }
     $site_info = get_site_info(get_siteid());
     $this->assign('sites', $sites);
     $this->assign('site_info', $site_info);
     $this->assign('top_menu', $top_menu);
     $this->assign('user_info', $_SESSION['user_info']);
     $this->display('Admin:index');
 }
 public function __construct()
 {
     $GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
     $GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
     $GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
     $GLOBALS['dynamic_cache'] = $GLOBALS['fcache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
     $GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
     $GLOBALS['dynamic_avatar_cache'] = $GLOBALS['fcache']->get("AVATAR_DYNAMIC_CACHE");
     //头像的动态缓存
     //输出导航菜单
     $nav_list = get_nav_list();
     $nav_list = init_nav_list($nav_list);
     foreach ($nav_list as $k => $v) {
         $nav_list[$k]['sub_nav'] = init_nav_list($v['sub_nav']);
     }
     $GLOBALS['tmpl']->assign("nav_list", $nav_list);
     //输出在线客服与时间
     if (app_conf("ONLINE_QQ") != "") {
         $qq = unserialize(app_conf("ONLINE_QQ"));
         $GLOBALS['tmpl']->assign("online_qq", $qq);
     }
     //输出页面的标题关键词与描述
     $GLOBALS['tmpl']->assign("site_info", get_site_info());
     //输出系统文章
     $system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
     $GLOBALS['tmpl']->assign("system_article", $system_article['list']);
     //输出帮助
     $deal_help = get_help();
     $GLOBALS['tmpl']->assign("deal_help", $deal_help);
     //输出热门关键词
     $hot_kw = app_conf("SHOP_SEARCH_KEYWORD");
     $hot_kw = preg_split("/[ ,]/i", $hot_kw);
     $GLOBALS['tmpl']->assign("hot_kw", $hot_kw);
     if (MODULE_NAME == "acate" && ACTION_NAME == "index" || MODULE_NAME == "article" && ACTION_NAME == "index" || MODULE_NAME == "cate" && ACTION_NAME == "index" || MODULE_NAME == "comment" && ACTION_NAME == "index" || MODULE_NAME == "help" && ACTION_NAME == "index" || MODULE_NAME == "link" && ACTION_NAME == "index" || MODULE_NAME == "mobile" && ACTION_NAME == "index" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "list_notice" || MODULE_NAME == "rec" && ACTION_NAME == "rhot" || MODULE_NAME == "rec" && ACTION_NAME == "rnew" || MODULE_NAME == "rec" && ACTION_NAME == "rbest" || MODULE_NAME == "rec" && ACTION_NAME == "rsale" || MODULE_NAME == "score" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "fav" || MODULE_NAME == "space" && ACTION_NAME == "fans" || MODULE_NAME == "space" && ACTION_NAME == "focus" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "pick" || MODULE_NAME == "sys" && ACTION_NAME == "index" || MODULE_NAME == "sys" && ACTION_NAME == "list_notice" || MODULE_NAME == "vote" && ACTION_NAME == "index") {
         set_gopreview();
     }
 }
Exemple #7
0
    <!-- BEGIN META -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="your,keywords">
    <meta name="description" content="Short explanation about this website">


    <?php
    //kill the back button on log out
    $this->output->set_header('Last-Modified:'.gmdate('D, d M Y H:i:s').'GMT');
    $this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate');
    $this->output->set_header('Cache-Control: post-check=0, pre-check=0',false);
    $this->output->set_header('Pragma: no-cache');
    ?>

    <title><?=isset($pagetitle)?$pagetitle:get_site_info('sitename')?></title>
    <script src="<?=base_url()?>assets/js/libs/jquery/jquery-1.11.2.min.js"></script>

    <script src="<?=base_url()?>assets/js/libs/jquery/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="<?=base_url()?>assets_backend/js/plugins/jquery/jquery-ui.min.js"></script>
    <script type="text/javascript" src="<?=base_url()?>assets_backend/js/plugins/bootstrap/bootstrap.min.js"></script>
    <!-- END PLUGINS -->

    <!--CUSTOM STUPH HERE GUYS--->
    <script src="<?= base_url() ?>assets_backend/js/jquery.ui.position.js" type="text/javascript"></script>
    <script src="<?= base_url() ?>assets_backend/js/jquery.contextMenu.js" type="text/javascript"></script>
    <script src="<?= base_url() ?>assets_backend/js/screen.js" type="text/javascript"></script>
    <script src="<?= base_url() ?>assets_backend/css/prettify/prettify.js" type="text/javascript"></script>


    <link href="<?= base_url() ?>assets_backend/css/jquery.contextMenu.css" rel="stylesheet" type="text/css"/>
Exemple #8
0
function dt_main_page($print = true)
{
    return get_site_info('main_page', $print);
}
<?php

require_once 'common.php';
filter_injection($_REQUEST);
if (!file_exists(APP_ROOT_PATH . 'public/runtime/app/')) {
    mkdir(APP_ROOT_PATH . 'public/runtime/app/', 0777);
}
$GLOBALS['tmpl']->assign("site_info", get_site_info());
//输出根路径
$GLOBALS['tmpl']->assign("APP_ROOT", APP_ROOT);
//输出语言包的js
if (!file_exists(get_real_path() . "public/runtime/app/lang.js")) {
    $str = "var LANG = {";
    foreach ($lang as $k => $lang_row) {
        $str .= "\"" . $k . "\":\"" . str_replace("nbr", "\\n", addslashes($lang_row)) . "\",";
    }
    $str = substr($str, 0, -1);
    $str .= "};";
    @file_put_contents(get_real_path() . "public/runtime/app/lang.js", $str);
}
//会员自动登录及输出
$cookie_uname = es_cookie::get("user_name") ? es_cookie::get("user_name") : '';
$cookie_upwd = es_cookie::get("user_name") ? es_cookie::get("user_pwd") : '';
if ($cookie_uname != '' && $cookie_upwd != '' && !es_session::get("user_info")) {
    require_once APP_ROOT_PATH . "system/libs/user.php";
    auto_do_login_user($cookie_uname, $cookie_upwd);
}
if (strim($_REQUEST['ctl']) == "uc_invest" || strim($_REQUEST['ctl']) == "uc_deal") {
    $r_user_name = strim($_REQUEST['user_name']);
    $r_user_pwd = strim($_REQUEST['user_pwd']);
    if ($r_user_name != '' && $r_user_pwd != '') {
 public function edit_content()
 {
     $result = false;
     $modelid = $this->modelid;
     $contentid = intval($_POST['contentid']);
     $data = $_POST['info'];
     $data['relation'] = array2string($data['relation']);
     require FIELDS_PATH . 'content_input.class.php';
     $content_input = new \content_input($this->modelid);
     $inputinfo = $content_input->get($data);
     $systeminfo = $this->parse_field($inputinfo['system']);
     $systeminfo['siteid'] = get_siteid();
     if ($data['inputtime'] && !is_numeric($data['inputtime'])) {
         $systeminfo['inputtime'] = strtotime($data['inputtime']);
     } elseif (!$data['inputtime']) {
         $systeminfo['inputtime'] = time();
     } else {
         $systeminfo['inputtime'] = $data['inputtime'];
     }
     if ($data['islink'] == 1) {
         $systeminfo['url'] = $_POST['linkurl'];
         $systeminfo['url'] = str_replace(array('select ', ')', '\\', '#', "'"), ' ', $systeminfo['url']);
     } else {
         $siteinfo = get_site_info(get_siteid());
         $url = U(C("DEFAULT_GROUP") . '/Content/show@' . $siteinfo['url'], 'catid=' . $systeminfo['catid'] . '&id=' . $contentid);
         // $url = U('Content/show','catid='.$systeminfo['catid'].'&id='.$contentid);
         $systeminfo['url'] = $url;
     }
     // 开启事务
     $this->startTrans();
     if ($result = $this->where("id = %d", $contentid)->save($systeminfo) !== false) {
         // 附表
         $this->trueTableName = $this->trueTableName . "_data";
         $this->set_field();
         $content_data = $this->parse_field($inputinfo['model']);
         if ($this->where("id = %d", $contentid)->save($content_data) === false) {
             $this->rollback();
             return false;
         }
         // 发布到推荐位
         $position_model = D('PositionData');
         if ($position_model->where(array("id" => $contentid, "modelid" => $modelid))->delete() === false) {
             $this->rollback();
             return false;
         }
         if ($systeminfo['posids']) {
             foreach ($data['posids'] as $key => $posid) {
                 if ($posid > 0) {
                     $position_data[] = array('id' => $contentid, 'catid' => $systeminfo['catid'], 'posid' => $posid, 'modelid' => $modelid, 'module' => 'content', 'thumb' => $systeminfo['thumb'], 'siteid' => $systeminfo['siteid'], 'listorder' => $contentid, 'data' => var_export(array('title' => $systeminfo['title'], 'url' => $url, 'description' => $systeminfo['description'], 'inputtime' => $systeminfo['inputtime']), true));
                 }
             }
             if (!empty($position_data)) {
                 if (D("PositionData")->addAll($position_data) === false) {
                     $this->rollback();
                     return false;
                 }
             }
         }
         // END 发布到推荐位
         $this->commit();
     } else {
         $this->rollback();
     }
     return $result;
 }
Exemple #11
0
               placeholder="">
        <label for="large3">Facebook</label>
    </div>
    <div class="form-group">
        <input value="<?= get_site_info('twitter') ?>" type="text" class="form-control input-lg" id="social_twitter"
               placeholder="">
        <label for="default3">Twitter</label>
    </div>
    <div class="form-group">
        <input value="<?= get_site_info('google_plus') ?>" type="text" class="form-control input-lg" id="social_google"
               placeholder="">
        <label for="small3">Google Plus</label>
    </div>

    <div class="form-group">
        <input value="<?= get_site_info('youtube') ?>" type="text" class="form-control input-lg" id="social_youtube"
               placeholder="">
        <label for="small3">Youtube</label>
    </div>

    <button id="save_social_info" type="button" class="btn ink-reaction btn-raised btn-primary">Save</button>
</form>

<script>
    $(document).ready(function () {
        $('#save_social_info').click(function () {

            $('#social_msg').html('<img src="<?=base_url()?>images/ajax-loader.gif">');
            var site_facebook = $('#social_facebook').val();
            var site_google = $('#social_google').val();
            var site_youtube = $('#social_youtube').val();
Exemple #12
0
 function init()
 {
     $data = get_site_info();
     json_return_and_die($data);
 }
Exemple #13
0
function module_site_set()
{
    global $smarty;
    $smarty->assign('site', get_site_info());
}
        <input value="<?= get_site_info('address') ?>" type="text" class="form-control input-lg" id="site_address"
               placeholder="">
        <label for="small3">Site Address</label>
    </div>
    <div class="form-group">
        <input value="<?= get_site_info('map') ?>" type="text" class="form-control input-lg" id="site_map"
               placeholder="">
        <label for="small3">Google Maps</label>
    </div>
    <div class="form-group">
        <input value="<?= get_site_info('tel') ?>" type="text" class="form-control input-lg" id="site_tel"
               placeholder="">
        <label for="small3">Telephone</label>
    </div>
    <div class="form-group">
        <input value="<?= get_site_info('fax') ?>" type="text" class="form-control input-lg" id="site_fax"
               placeholder="">
        <label for="small3">Fax</label>
    </div>

    <button type="button" id="save_contact_info" class="btn ink-reaction btn-raised btn-primary">Save</button>
</form>


<script>
    $(document).ready(function () {
        $('#save_contact_info').click(function () {

            $('#contact_msg').html('<img src="<?=base_url()?>images/ajax-loader.gif">');
            var site_name = $('#site_name').val();
            var site_email = $('#site_email').val();
 public function template($field, $value, $fieldinfo)
 {
     $sitelist = get_site_info();
     $default_style = $sitelist[$this->siteid]['default_style'];
     $template = \Org\Util\Form::select_template($default_style, 'content', $value, 'name="info[' . $field . ']" id="' . $field . '"', 'show');
     return $template;
 }
 /**
  * print layout based on controller class and function
  * @return string view layout
  */
 function view()
 {
     $CI =& get_instance();
     if (isset($CI->layout) && $CI->layout == 'none') {
         return;
     }
     // set data
     $dir = $CI->router->directory;
     $class = $CI->router->fetch_class();
     $method = $CI->router->fetch_method();
     $method = $method == 'index' ? $class : $method;
     $data = isset($CI->data) ? $CI->data : array();
     $data['current_controller'] = base_url() . $dir . $class . '/';
     $page_info = $this->GetPageInfoByFile($class);
     $id_auth_menu = $page_info['id_auth_menu'];
     $data['base_url'] = base_url();
     $data['current_url'] = current_url();
     if (isset($_SESSION['ADM_SESS'])) {
         $data['ADM_SESSION'] = $_SESSION['ADM_SESS'];
     }
     $data['flash_message'] = $CI->session->flashdata('flash_message');
     $data['persistent_message'] = $CI->session->userdata('persistent_message');
     $data['auth_sess'] = $CI->session->userdata('ADM_SESS');
     $data['site_setting'] = get_sitesetting();
     $data['site_info'] = get_site_info();
     $data['page_title'] = isset($data['page_title']) ? $data['page_title'] : $page_info['menu'];
     $menus = $this->MenusData();
     $data['left_menu'] = $this->PrintLeftMenu($menus, $class);
     $data['save_button_text'] = 'Save';
     $data['cancel_button_text'] = 'Cancel';
     $breadcrumbs = $this->Breadcrumbs($id_auth_menu);
     $breadcrumbs[] = array('text' => '<i class="fa fa-dashboard"></i> Dashboard', 'url' => site_url('dashboard'), 'class' => '');
     array_multisort($breadcrumbs, SORT_ASC, SORT_NUMERIC);
     if (isset($data['breadcrumbs'])) {
         $breadcrumbs[] = $data['breadcrumbs'];
     }
     $data['breadcrumbs'] = $breadcrumbs;
     if (isset($data['template'])) {
         $data['content'] = $CI->load->view(TEMPLATE_DIR . '/' . $data['template'], $data, true);
     } else {
         $data['content'] = $CI->load->view(TEMPLATE_DIR . '/' . $class . '/' . $method, $data, true);
     }
     if (isset($CI->layout)) {
         $layout = TEMPLATE_DIR . '/layout/' . $CI->layout;
     } elseif ($CI->input->is_ajax_request()) {
         $layout = TEMPLATE_DIR . '/layout/blank';
     } else {
         $layout = TEMPLATE_DIR . '/layout/default';
     }
     $CI->load->view($layout, $data);
 }
Exemple #17
0
function siteinfo_json_init(&$a)
{
    $data = get_site_info();
    json_return_and_die($data);
}