本文整理汇总了PHP中loadHelpers函数的典型用法代码示例。如果您正苦于以下问题:PHP loadHelpers函数的具体用法?PHP loadHelpers怎么用?PHP loadHelpers使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了loadHelpers函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadHelpers
function loadHelpers($helperNames, $path = "*", $type = "include_once")
{
if (is_array($helperNames)) {
foreach ($helperNames as $x => $a) {
$b = loadHelpers($a);
}
} else {
$cachePath = _metaCache("HELPERS", $helperNames);
if (!$cachePath || !file_exists($cachePath)) {
$helperPath = helper_exists($helperNames);
} else {
$helperPath = $cachePath;
}
if (file_exists($helperPath)) {
if ($type == "require_once") {
require_once $helperPath;
} elseif ($type == "require") {
require $helperPath;
} elseif ($type == "include_once") {
include_once $helperPath;
} else {
include $helperPath;
}
} else {
trigger_logikserror("Helper Not Found :: " . $helperNames, E_LOGIKS_ERROR, 404);
}
}
}
示例2: saveFeedback
function saveFeedback()
{
$feedback = array('name' => '', 'email' => '', 'subject' => '', 'message' => '', 'userid' => $_SESSION['SESS_USER_ID'], 'blocked' => 'false', 'dtoc' => date('Y-m-d H:i:s'), 'dtoe' => date('Y-m-d H:i:s'));
foreach ($feedback as $k => $v) {
if (isset($_POST[$k])) {
$feedback[$k] = trim($_POST[$k]);
}
}
$sql = _db()->_insertQ1('feedbacks', $feedback);
$res = _dbQuery($sql);
$id = _db()->insert_id();
if ($res) {
_dbFree($res);
//send email to admin
$mailto = "dawkharrupali@gmail.com";
$mailfrom = "admin@openlogiks.com";
$feedback_content = array("name" => $_REQUEST['name'], "email" => $_REQUEST['email'], "subject" => $_REQUEST['subject'], "message" => $_REQUEST['message']);
$template = _template("feedback_admin", $profile);
loadHelpers('email');
sendMail($mailto, " Feedback", $template, $mailfrom);
return "success";
} else {
return "error";
}
}
示例3: setUpBeforeClass
public static function setUpBeforeClass()
{
if (!defined("PAGE")) {
define("PAGE", "test1/test2");
}
if (!defined("WEBDOMAIN")) {
define("WEBDOMAIN", "default");
}
loadHelpers("urltools");
}
示例4: setUp
public function setUp()
{
parent::setUp();
if (!defined("APPROOT")) {
define("APPROOT", __DIR__ . "/apps/default/");
}
if (!defined("APPS_USERDATA_FOLDER")) {
define("APPS_USERDATA_FOLDER", "userdata/");
}
if (!defined("APPS_CONFIG_FOLDER")) {
define("APPS_CONFIG_FOLDER", "config/");
}
loadHelpers("pathfuncs");
}
示例5: setUp
public function setUp()
{
parent::setUp();
loadHelpers("pwdhash");
}
示例6: explode
}
$allSites = explode(",", $d1['sites']);
if ($d1['sites'] == "*") {
$allSites = getAccessibleSitesArray();
}
if (count($allSites) > 0) {
$_SESSION['SESS_ACCESS_SITES'] = $allSites;
} else {
relink("No Accessible Site Found For Your UserID");
}
if (!in_array($domain, $allSites)) {
relink("Sorry, You [UserID] do not have access to requested site.", $domain);
}
$_ENV['AUTH-DATA'] = array_merge($data, $d1);
$_ENV['AUTH-DATA'] = array_merge($_ENV['AUTH-DATA'], $d2);
loadHelpers("mobility");
$_ENV['AUTH-DATA']['device'] = getUserDeviceType();
$_ENV['AUTH-DATA']['client'] = _server("REMOTE_ADDR");
if (isset($_POST['persistant']) && $_POST['persistant'] == "true") {
$_ENV['AUTH-DATA']['persistant'] = "true";
} else {
$_ENV['AUTH-DATA']['persistant'] = "false";
}
$_ENV['AUTH-DATA']['sitelist'] = $allSites;
checkBlockedUser($data, $domain);
checkBlacklists($data, $domain, $dbLink, $userid);
initializeLogin($userid, $domain, $dbLogLink);
//All Functions Required By Authentication System
function relink($msg, $domain)
{
$_SESSION['SESS_ERROR_MSG'] = $msg;
示例7: exit
<?php
if (!defined('ROOT')) {
exit('No direct script access allowed');
}
checkServiceSession();
loadHelpers("pwdhash");
if (!isset($_REQUEST["type"])) {
$_REQUEST["type"] = "";
}
if ($_REQUEST["type"] == "dialog") {
printDialog();
} elseif ($_REQUEST["type"] == "change") {
changePWD();
} elseif ($_REQUEST["type"] == "generate") {
loadHelpers("pwdgen");
$pwd = generatePasswordY(getConfig("PWD_MIN_LENGTH"), 3);
echo $pwd;
}
exit;
function changePWD()
{
$userid = $_SESSION["SESS_USER_ID"];
$tbl = _dbtable("users", true);
$sql1 = "SELECT pwd FROM {$tbl} WHERE userid='{$userid}'";
$r = _dbQuery($sql1, true);
$ra = _dbData($r);
if (!isset($ra[0])) {
$q = array("code" => "1", "msg" => "Error In Changing Password (1).");
echo json_encode($q);
exit;
示例8: printHeader
function printHeader($ftype, $format, $fname = "file")
{
if (strtolower($ftype) == "download") {
$cntrl = true;
} else {
$cntrl = false;
}
$format = strtolower($format);
loadHelpers("mimes");
header("Cache-Control: private");
header("Pragma: no-cache");
header("Content-Type: " . getMimeTypeFor($format));
if ($cntrl) {
header("Content-Transfer-Encoding: binary");
header("Content-Description: File Transfer");
header("Content-Disposition: attachment; filename={$fname}.{$format}");
header("Content-Type: application/zip");
}
}
示例9: exit
<?php
if (!defined('ROOT')) {
exit('No direct script access allowed');
}
//checkServiceSession();
if (strlen(getConfig("MAIL_ENGINE")) <= 0) {
LoadConfigFile(ROOT . "config/mail.cfg", "CONFIG");
}
$f2 = APPROOT . getConfig("APPS_CONFIG_FOLDER") . "mail.cfg";
if (file_exists($f2)) {
LoadConfigFile($f2, "CONFIG");
}
loadHelpers("email");
if (defined("APPS_CACHE_FOLDER")) {
$destination_path = APPROOT . APPS_CACHE_FOLDER . "mails/";
} else {
$destination_path = ROOT . CACHE_FOLDER . "mails/";
}
$maxFileSize = "4000000";
$attach = null;
$target_path = "";
$fileSize = -1;
if (!file_exists($destination_path)) {
mkdir($destination_path, 0777, true);
}
if (!file_exists($destination_path)) {
//echo "Cache Path Not Found. Can't Send Attachments<br/>";
}
if (isset($_POST['mailto'])) {
$to = $_POST['mailto'];
示例10: setUp
public function setUp()
{
parent::setUp();
loadHelpers("cookies");
loadHelpers("mobility");
}
示例11: logiksRequestPreboot
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"));
}
}
示例12: define
<?php
/*
* This centralizes the logout operation
*
* Author: Bismay Kumar Mohapatra bismay4u@gmail.com
* Author: Kshyana Prava kshyana23@gmail.com
* Version: 1.0
*/
define('ROOT', dirname(__FILE__) . '/');
ini_set('display_errors', 'On');
//Start the flow
require_once 'api/initialize.php';
loadHelpers('cookies');
$domain = SITENAME;
if (isset($_REQUEST['site'])) {
$domain = $_REQUEST['site'];
} elseif (isset($_SESSION['SESS_LOGIN_SITE'])) {
$domain = $_SESSION['SESS_LOGIN_SITE'];
}
loadLogiksApp($domain);
$relink = "";
if (isset($_REQUEST['relink'])) {
$relink = $_REQUEST['relink'];
}
// $dbLogLink=LogDB::singleton()->getLogDBCon();
// $q1=$dbLogLink->_updateQ("lgks_log_login",
// array('logout_time'=>date('Y-m-d H:i:s'), 'status'=>'LOGGED OUT'),
// array(
// "user"=>$_SESSION['SESS_USER_ID'],
// "status"=>"LOGGED IN",
示例13: logiksRequestPreboot
logiksRequestPreboot();
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");
示例14: exit
<?php
if (!defined('ROOT')) {
exit('No direct script access allowed');
}
session_check(true);
_css(array("jquery.tagit"));
_js(array("jquery.tagit", "validator", "jquery.form.min"));
loadHelpers('uicomponents');
loadModule("editor");
loadEditor("cleditor");
if (isset($_REQUEST['refid'])) {
loadModuleLib('api', 'api');
$apiDetails = getApiDetails($_REQUEST['refid']);
} else {
$apiDetails['editable'] = true;
}
if ($apiDetails['editable'] == 'true') {
?>
<style>
.cleditorMain {
height: auto !important;
}
</style>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<form name="apiForm" id="apiForm" class='apiForm' onsubmit="return validateForm('#apiForm');">
<input type="hidden" name="id" id="id" value="<?php
if (isset($apiDetails['id'])) {
示例15: setUpBeforeClass
public static function setUpBeforeClass()
{
define("PAGE", "test1/test2");
loadHelpers("urltools");
}