当前位置: 首页>>代码示例>>PHP>>正文


PHP fn_init函数代码示例

本文整理汇总了PHP中fn_init函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_init函数的具体用法?PHP fn_init怎么用?PHP fn_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fn_init函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exit

<?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;
}
开发者ID:baigoStudio,项目名称:baigoADS,代码行数:22,代码来源:alert.php

示例2: exit

<?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:
        //基本
开发者ID:itviewer,项目名称:baigoSSO,代码行数:31,代码来源:opt.php

示例3: exit

<?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":
开发者ID:itviewer,项目名称:baigoSSO,代码行数:31,代码来源:app.php

示例4: exit

<?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;
}
开发者ID:itviewer,项目名称:baigoSSO,代码行数:23,代码来源:seccode.php

示例5: array

$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);
开发者ID:ambient-lounge,项目名称:site,代码行数:30,代码来源:init.php

示例6: switch

/* 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>
开发者ID:airjaws,项目名称:awes,代码行数:31,代码来源:pilot.engine.php

示例7: exit

<?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;
}
开发者ID:itviewer,项目名称:baigoSSO,代码行数:22,代码来源:alert.php

示例8: fn_init

/**
 * 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;
}
开发者ID:ambient-lounge,项目名称:site,代码行数:48,代码来源:fn.init.php

示例9: call_user_func_array

    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);
开发者ID:peterquentin,项目名称:cscart_cli_scripts,代码行数:31,代码来源:cli_lib.php

示例10: exit

<?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();
开发者ID:itviewer,项目名称:baigoSSO,代码行数:31,代码来源:install.php


注:本文中的fn_init函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。