Пример #1
0
    require_once 'bootlogiks.php';
    logiksRequestPreboot();
    include_once 'commons.php';
    require_once 'configurator.php';
    loadConfigs([ROOT . "config/basic.cfg", ROOT . "config/php.cfg", ROOT . "config/system.cfg", ROOT . "config/developer.cfg", ROOT . "config/errorlog.cfg", ROOT . "config/security.cfg", ROOT . "config/folders.cfg", ROOT . "config/others.cfg", ROOT . "config/xtras.cfg", ROOT . "config/framework.cfg", ROOT . "config/appPage.cfg"]);
    define('SiteLocation', 'http' . (isset($GLOBALS['LOGIKS']["_SERVER"]['HTTPS']) ? 's' : '') . '://' . "{$GLOBALS['LOGIKS']["_SERVER"]['HTTP_HOST']}/" . InstallFolder);
    if (PRINT_PHP_HEADERS) {
        header("X-Powered-By: " . Framework_Title . " [" . Framework_Site . "]", false);
    }
    require_once ROOT . "api/libs/errorLogs/boot.php";
    LogiksConfig::fixPHPINIConfigs();
    logiksRequestBoot();
    include_once ROOT . "api/libs/logiksCache/boot.php";
    include_once ROOT . "api/libs/loaders/boot.php";
    include_once ROOT . "api/system.php";
    include_once ROOT . "api/security.php";
    include_once ROOT . "api/app.php";
    include_once ROOT . "api/libs/logiksUser/boot.php";
    include_once ROOT . "api/libs/logiksTemplate/boot.php";
    include_once ROOT . "api/libs/logiksPages/boot.php";
    loadHelpers(array("urltools", "hooks", "mobility", "outputbuffer", "shortfuncs"));
    $initialized = true;
    runHooks("postinit");
    $_SESSION['SESS_ACTIVE_SITE'] = SITENAME;
    if (!defined("APPS_NAME")) {
        define("APPS_NAME", getConfig("APPS_NAME"));
    }
    if (!defined("APPS_VERS")) {
        define("APPS_VERS", getConfig("APPS_VERS"));
    }
}
Пример #2
0
include_once SERVICE_ROOT . "ServiceAuthEngine.inc";
include_once SERVICE_ROOT . "api.php";
include_once ROOT . "api/configurator.php";
loadConfigs([ROOT . "config/basic.cfg", ROOT . "config/php.cfg", ROOT . "config/system.cfg", ROOT . "config/developer.cfg", ROOT . "config/services.cfg", ROOT . "config/errorlog.cfg", ROOT . "config/security.cfg", ROOT . "config/others.cfg", ROOT . "config/xtras.cfg", ROOT . "config/folders.cfg"]);
LogiksConfig::fixPHPINIConfigs();
define('SiteLocation', 'http' . (_server('HTTPS') ? 's' : '') . '://' . "{_server('HTTP_HOST')}/" . InstallFolder);
require_once ROOT . "api/libs/errorLogs/boot.php";
logiksServiceBoot();
header("X-Powered-By: Logiks [http://openlogiks.org]", false);
header("SESSION-KEY:" . session_id(), false);
header("Access-Control-Allow-Origin:*");
//Origin
//Access-Control-Allow-Methods:OPTIONS,GET,POST,PUT,DELETE
//Access-Control-Allow-Headers:Content-Type, Authorization, X-Requested-With
//header("Access-Control-Allow-Headers", "access-control-allow-origin, accept, access-control-allow-methods, access-control-allow-headers, x-random-shit");
//header("X-Powered-By: ".Framework_Title." [".Framework_Site."]",false);
//print_r($GLOBALS['LOGIKS']["_SERVER"]);exit();
include_once ROOT . "api/libs/logiksCache/boot.php";
include_once ROOT . "api/libs/loaders/boot.php";
include_once ROOT . "api/system.php";
include_once ROOT . "api/security.php";
include_once ROOT . "api/app.php";
include_once ROOT . "api/libs/logiksUser/boot.php";
include_once ROOT . "api/libs/logiksTemplate/boot.php";
include_once SERVICE_ROOT . "ServiceController.inc";
_envData("SESSION", 'SERVICE', true);
_envData("SESSION", 'SESS_ACTIVE_SITE', SITENAME);
ini_set("error_reporting", getConfig("SERVICE_ERROR_REPORTING"));
loadHelpers(array("urltools", "hooks", "mobility", "formatprint", "shortfuncs"));
runHooks("serviceInit");
Пример #3
0
 function loadLogiksBootEngines()
 {
     if (function_exists("runHooks")) {
         runHooks("enginesStart");
     }
     //Optional Data Components
     include_once ROOT . "api/libs/logiksDB/boot.php";
     include_once ROOT . "api/libs/logiksUser/boot.php";
     //initiate the database connection for core database
     //include_once ROOT. "api/libs/logiksORM/boot.php";	//Optional
     //include_once ROOT. "api/libs/uiComponents/boot.php";	//Optional
     $status = getConfig("APPS_STATUS");
     switch ($status) {
         case 'development':
             /*
              * Enable Debug mode
              */
             if (isset($_GET['debug']) && $_GET['debug'] == "true") {
                 ini_set('display_errors', 1);
                 error_reporting(1);
                 if (!defined("MASTER_DEBUG_MODE")) {
                     define("MASTER_DEBUG_MODE", true);
                 }
             }
             break;
         case 'staging':
             break;
         case 'production':
             break;
     }
     loadModule("core", true);
     loadModule(SITENAME, true);
     if (function_exists("runHooks")) {
         runHooks("enginesRunning");
     }
 }
Пример #4
0
 */
if (!defined('ROOT')) {
    exit('No direct script access allowed');
}
if (!defined("BASEPATH")) {
    //Load the app.cfg and app Config Folder
    loadLogiksApp(SITENAME);
    loadLogiksBootEngines();
    $security = new LogiksSecurity();
    $security->checkPageRequest();
    $device = getUserDeviceType();
    $routerPage = getConfig("APPS_ROUTER");
    if (strlen($routerPage) <= 0) {
        trigger_error("Site <b>'" . SITENAME . "'</b> Does Not Have ROUTER Defined.", E_USER_ERROR);
    }
    //$routerDir=ROOT.API_FOLDER."libs/routers/";
    //$routerFile="{$routerDir}{$routerPage}.php";
    $routerFiles = array(APPROOT . "{$routerPage}.php", APPROOT . "router.php", ROOT . API_FOLDER . "libs/routers/{$routerPage}.php");
    $routerLoaded = false;
    foreach ($routerFiles as $rfile) {
        if (file_exists($rfile)) {
            $routerLoaded = true;
            runHooks("startup");
            include_once $rfile;
            break;
        }
    }
    if (!$routerLoaded) {
        trigger_error("Site <b>'" . SITENAME . "'</b> Does Not Have ROUTER Defined.", E_USER_ERROR);
    }
}
Пример #5
0
 *	debug 			Enable debug mode or not
 *	cache 			To use cache or not
 *	stype 			Type of command (py, php, etc.)
 */
if (defined('ROOT')) {
    exit('Only Direct Access Is Allowed');
}
define('ROOT', dirname(dirname(__FILE__)) . '/');
require_once ROOT . 'services/initialize.php';
if (!isset($_REQUEST['scmd'])) {
    trigger_logikserror(901, E_USER_ERROR);
    exit;
}
loadAppServices(SITENAME);
loadLogiksBootEngines();
//Check blacklists, bots, and others
$security = new LogiksSecurity();
$security->checkServiceRequest();
runHooks("serviceStart");
$ctrl = new ServiceController();
//loads the parameters into the service controller
$ctrl->setupRequest($_REQUEST);
//access_control, privilege_model, APIKEY check
if ($ctrl->checkRequest()) {
    //checks cache and if required executes the scmd and prints the output
    $ctrl->executeRequest();
} else {
    trigger_logikserror(905, E_USER_ERROR);
}
runHooks("serviceStop");
Пример #6
0
    relink("Sorry, You [UserID] do not have access to requested site.", $domain);
}
$_ENV['AUTH-DATA'] = array_merge($data, $accessData);
$_ENV['AUTH-DATA'] = array_merge($_ENV['AUTH-DATA'], $privilegeData);
loadHelpers("mobility");
$_ENV['AUTH-DATA']['device'] = getUserDeviceType();
$_ENV['AUTH-DATA']['client'] = _server("REMOTE_ADDR");
if (isset($_POST['persistant']) && $_POST['persistant']) {
    $_ENV['AUTH-DATA']['persistant'] = "true";
} else {
    $_ENV['AUTH-DATA']['persistant'] = "false";
}
$_ENV['AUTH-DATA']['sitelist'] = $allSites;
$_ENV['AUTH-DATA']['groups'] = $groupData;
checkBlacklists($data, $domain, $dbLink, $userid);
runHooks("postAuth");
initializeLogin($userid, $domain);
//All Functions Required By Authentication System
function relink($msg, $domain)
{
    _log("Login Attempt Failed", "login", LogiksLogger::LOG_ALERT, ["userid" => $_POST['userid'], "site" => $domain, "device" => getUserDeviceType(), "client_ip" => $_SERVER['REMOTE_ADDR'], "msg" => $msg]);
    $_SESSION['SESS_ERROR_MSG'] = $msg;
    $onerror = "";
    if (ALLOW_LOGIN_RELINKING || ALLOW_LOGIN_RELINKING) {
        if (isset($_REQUEST['onerror'])) {
            $onerror = $_REQUEST['onerror'];
        }
    }
    if (ALLOW_MAUTH) {
        if (isset($_POST['mauth']) && $_POST['mauth'] == "authkey") {
            echo "ERROR:{$msg}";
Пример #7
0
 function loadLogiksBootEngines()
 {
     if (function_exists("runHooks")) {
         runHooks("enginesStart");
     }
     //Optional Data Components
     include_once ROOT . "api/libs/logiksDB/boot.php";
     include_once ROOT . "api/libs/logiksUser/boot.php";
     $status = getConfig("APPS_STATUS");
     switch ($status) {
         case 'development':
             ini_set('display_errors', 'On');
             error_reporting(1);
             if (!defined("MASTER_DEBUG_MODE")) {
                 define("MASTER_DEBUG_MODE", true);
             }
             break;
         case 'staging':
             if (isset($_GET['debug']) && $_GET['debug'] == "true") {
                 ini_set('display_errors', 'On');
                 error_reporting(1);
                 if (!defined("MASTER_DEBUG_MODE")) {
                     define("MASTER_DEBUG_MODE", true);
                 }
             }
             break;
         case 'production':
             break;
     }
     if (getConfig("LOGIKS_OPTIONAL")) {
         loadLogiksOptional();
     }
     loadModule("core", true);
     loadModule(SITENAME, true);
     if (function_exists("runHooks")) {
         runHooks("enginesRunning");
     }
 }
Пример #8
0
/**
 * Smarty plugin
 *
 * @package    Smarty
 * @subpackage PluginsFunction
 * @author		Bismay Kumar Mohaptra
 */
function smarty_function_hook($params)
{
    runHooks($params['src']);
}
Пример #9
0
 function loadLogiksBootEngines()
 {
     if (function_exists("runHooks")) {
         runHooks("enginesStart");
     }
     //Optional Data Components
     include_once ROOT . "api/libs/logiksDB/boot.php";
     include_once ROOT . "api/libs/logiksUser/boot.php";
     //initiate the database connection for core database
     //include_once ROOT. "api/libs/logiksORM/boot.php";	//Optional
     //include_once ROOT. "api/libs/uiComponents/boot.php";	//Optional
     loadModule("core", true);
     loadModule(SITENAME, true);
     if (function_exists("runHooks")) {
         runHooks("enginesRunning");
     }
 }