Example #1
0
 * 	autoformat 		Use toTitle/UCWORDS or not
 *	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");
Example #2
0
/*
 * This file contains the Request Routing logic for Logiks Framework.
 *
 * Author: Bismay Kumar Mohapatra bismay4u@gmail.com
 * Author: Kshyana Prava kshyana23@gmail.com
 * Version: 1.1
 */
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;
Example #3
0
function checkBlacklists($data, $domain, $dbLink, $userid)
{
    $ls = new LogiksSecurity();
    if ($ls->isBlacklisted("login", $domain)) {
        relink("You are currently Blacklisted On Server, Please contact Site Admin.", $domain);
    } else {
        return false;
    }
}