Example #1
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
$arr_set = array("base" => true, "header" => "Content-Type: text/html; charset=utf-8");
fn_init($arr_set);
include_once BG_PATH_CONTROL . "advert/alert.class.php";
//载入应用控制器
$ctl_alert = new CONTROL_ALERT();
//初始化应用
switch ($GLOBALS["act_get"]) {
    default:
        $ctl_alert->ctl_show();
        break;
}
Example #2
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(true, true, "Content-Type: text/html; charset=utf-8", true, "ctl", true);
include_once BG_PATH_INC . "is_install.inc.php";
//验证是否已登录
include_once BG_PATH_INC . "is_admin.inc.php";
//验证是否已登录
include_once BG_PATH_CONTROL . "admin/ctl/opt.class.php";
//载入设置控制器
$ctl_opt = new CONTROL_OPT();
//初始化设置对象
switch ($GLOBALS["act_get"]) {
    case "dbconfig":
        $arr_optRow = $ctl_opt->ctl_dbconfig();
        if ($arr_optRow["alert"] != "y040301") {
            header("Location: " . BG_URL_ADMIN . "ctl.php?mod=alert&act_get=show&alert=" . $arr_optRow["alert"]);
            exit;
        }
        break;
    default:
        //基本
Example #3
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(true, true, "Content-type: application/json", true, "ajax", true);
include_once BG_PATH_CONTROL . "admin/ajax/app.class.php";
//载入应用 ajax 控制器
$ajax_app = new AJAX_APP();
//初始化应用对象
switch ($GLOBALS["act_post"]) {
    case "auth":
        $ajax_app->ajax_auth();
        //授权用户
        break;
    case "deauth":
        $ajax_app->ajax_deauth();
        //取消授权用户
        break;
    case "reset":
        $ajax_app->ajax_reset();
        //重置 APP KEY
        break;
    case "submit":
Example #4
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(false, true, "Content-type: image/png", true, "ajax");
include_once BG_PATH_CONTROL . "admin/ctl/seccode.class.php";
//载入验证码类
$ctl_seccode = new CONTROL_SECCODE();
//初始化验证对象
switch ($GLOBALS["act_get"]) {
    case "make":
        $ctl_seccode->ctl_make();
        //生成验证码
        break;
}
Example #5
0
$fn_list = array('fn.database.php', 'fn.users.php', 'fn.catalog.php', 'fn.cms.php', 'fn.cart.php', 'fn.locations.php', 'fn.common.php', 'fn.fs.php', 'fn.images.php', 'fn.init.php', 'fn.control.php', 'fn.search.php', 'fn.promotions.php', 'fn.log.php', 'fn.companies.php', 'fn.addons.php');
$fn_list[] = 'fn.' . strtolower(PRODUCT_EDITION) . '.php';
foreach ($fn_list as $file) {
    require $config['dir']['functions'] . $file;
}
Registry::set('config', $config);
unset($config);
$application = Tygh\Tygh::createApplication();
$application['class_loader'] = $classLoader;
// Register service providers
$application->register(new Tygh\Providers\DatabaseProvider());
$application->register(new \Tygh\Providers\SessionProvider());
register_shutdown_function(array('\\Tygh\\Registry', 'save'));
fn_init_stack(array('fn_init_error_handler'), array('fn_init_unmanaged_addons'));
if (defined('API')) {
    fn_init_stack(array('fn_init_api'));
}
fn_init_stack(array('fn_init_crypt'), array('fn_init_imagine'), array('fn_init_archiver'), array('fn_init_storage'), array('fn_init_ua'));
if (fn_allowed_for('ULTIMATE')) {
    fn_init_stack(array('fn_init_store_params_by_host', &$_REQUEST));
}
fn_init_stack(array(function () use($application) {
    $application['session']->init();
}), array('fn_init_ajax'), array('fn_init_company_id', &$_REQUEST), array('fn_check_cache', $_REQUEST), array('fn_init_settings'), array('fn_init_addons'), array('fn_get_route', &$_REQUEST), array('fn_simple_ultimate', &$_REQUEST));
if (!Registry::get('config.tweaks.disable_localizations') && !fn_allowed_for('ULTIMATE:FREE')) {
    fn_init_stack(array('fn_init_localization', &$_REQUEST));
}
fn_init_stack(array('fn_init_language', &$_REQUEST), array('fn_init_currency', &$_REQUEST), array('fn_init_company_data', $_REQUEST), array('fn_init_full_path', $_REQUEST), array('fn_init_layout', &$_REQUEST), array('fn_init_user'), array('fn_init_templater'));
// Run INIT
fn_init($_REQUEST);
Example #6
0
/* AWE Simple : Airjaws Web Engine Simple Version
   System     : pilot
   pageID	    : engine.php 
   pageName   : system admin   

   date			    editor		  description
   ============	===========	======================================================	
   2015.10.20	  이기현	    init

*/
if (!$AJP) exit(); 
switch ($func) {
	case "DicSrch"			: fn_DicSrch(); 		break; 
	case "Dictionary"		: fn_Dictionary(); 	break; 
	case "init"     		: fn_init();      	break;
	default         		: fn_init();      	break;	
} 


 
/* Dictionary *************************************************/
function fn_Dictionary() {
?>
<h3>Dictionary</h3>
<hr/>
<input type="text" id="dicSrch" value="">
<input type="button" value="조회" onclick="fn_dicSrch()">
<input type="button" value="줄추가" onclick="fn_dicAddRow()">
<input type="button" value="줄삭제" onclick="fn_dicDelRow()">
<table id="tblDic">
	<thead>
Example #7
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(true);
include_once BG_PATH_CONTROL . "install/ctl/alert.class.php";
//载入栏目控制器
$ctl_alert = new CONTROL_ALERT();
//初始化商家
switch ($GLOBALS["act_get"]) {
    case "show":
        $arr_alertRow = $ctl_alert->ctl_show();
        break;
}
Example #8
0
/**
 * Run init functions
 *
 * @param array $request $_REQUEST global variable
 * @return bool always true
 */
function fn_init(&$request)
{
    $stack = Registry::get('init_stack');
    // Cleanup stack
    Registry::set('init_stack', array());
    foreach ($stack as $function_data) {
        $function = array_shift($function_data);
        if (!is_callable($function)) {
            continue;
        }
        $result = call_user_func_array($function, $function_data);
        $status = !empty($result[0]) ? $result[0] : INIT_STATUS_OK;
        $url = !empty($result[1]) ? $result[1] : '';
        $message = !empty($result[2]) ? $result[2] : '';
        $permanent = !empty($result[3]) ? $result[3] : '';
        if ($status == INIT_STATUS_OK && !empty($url)) {
            $redirect_url = $url;
        } elseif ($status == INIT_STATUS_REDIRECT && !empty($url)) {
            $redirect_url = $url;
            break;
        } elseif ($status == INIT_STATUS_FAIL) {
            if (empty($message)) {
                $message = 'Initialization failed in <b>' . (is_array($function) ? implode('::', $function) : $function) . '</b> function';
            }
            throw new InitException($message);
        }
    }
    if (!empty($redirect_url)) {
        if (!defined('CART_LANGUAGE')) {
            fn_init_language($request);
            // we need CART_LANGUAGE in fn_url function that called in fn_redirect
        }
        fn_redirect($redirect_url, true, !empty($permanent));
    }
    $stack = Registry::get('init_stack');
    if (!empty($stack)) {
        // New init functions were added to stack. Execute them
        fn_init($request);
    }
    Debugger::init(true);
    return true;
}
    if (!is_callable($function)) {
        continue;
    }
    $result = call_user_func_array($function, $function_data);
    $status = !empty($result[0]) ? $result[0] : INIT_STATUS_OK;
    $url = !empty($result[1]) ? $result[1] : '';
    $message = !empty($result[2]) ? $result[2] : '';
    if ($status == INIT_STATUS_OK && !empty($url)) {
        $redirect_url = $url;
    } elseif ($status == INIT_STATUS_REDIRECT && !empty($url)) {
        $redirect_url = $url;
        break;
    } elseif ($status == INIT_STATUS_FAIL) {
        if (empty($message)) {
            $message = 'Initiation failed in <b>' . (is_array($function) ? implode('::', $function) : $function) . '</b> function';
        }
        die($message);
    }
}
/* if (!empty($redirect_url)) {
       if (!defined('CART_LANGUAGE')) {
           fn_init_language($request); // we need CART_LANGUAGE in fn_url function that called in fn_redirect
       }
       fn_redirect($redirect_url);
   } */
$stack = Registry::get('init_stack');
if (!empty($stack)) {
    // New init functions were added to stack. Execute them
    fn_init($request);
}
Debugger::init(true);
Example #10
0
<?php

/*-----------------------------------------------------------------
!!!!警告!!!!
以下为系统文件,请勿修改
-----------------------------------------------------------------*/
//不能非法包含或直接执行
if (!defined("IN_BAIGO")) {
    exit("Access Denied");
}
include_once BG_PATH_FUNC . "init.func.php";
//管理员通用
fn_init(true, false, "Content-type: application/json");
include_once BG_PATH_CLASS . "mysqli.class.php";
//载入数据库类
include_once BG_PATH_CONTROL . "api/install.class.php";
//载入商家控制器
$api_install = new API_INSTALL();
//初始化商家
switch ($GLOBALS["act_post"]) {
    case "dbconfig":
        $api_install->api_dbconfig();
        break;
    case "dbtable":
        $api_install->api_dbtable();
        break;
    case "admin":
        $api_install->api_admin();
        break;
    case "over":
        $api_install->api_over();