本文整理汇总了PHP中Vtiger_Utils::checkFileAccessForInclusion方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Utils::checkFileAccessForInclusion方法的具体用法?PHP Vtiger_Utils::checkFileAccessForInclusion怎么用?PHP Vtiger_Utils::checkFileAccessForInclusion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Utils
的用法示例。
在下文中一共展示了Vtiger_Utils::checkFileAccessForInclusion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __initExport
/**
* Initialize Export
* @access private
*/
function __initExport($languageCode)
{
// Security check to ensure file is withing the web folder.
Vtiger_Utils::checkFileAccessForInclusion("languages/{$languageCode}/Vtiger.php");
$this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w');
$this->__write("<?xml version='1.0'?>\n");
}
示例2: __initExport
/**
* Initialize Export
* @access private
*/
function __initExport($layoutName)
{
// Security check to ensure file is withing the web folder.
Vtiger_Utils::checkFileAccessForInclusion("layouts/{$layoutName}/skins/vtiger/style.less");
$this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w');
$this->__write("<?xml version='1.0'?>\n");
}
示例3: __initExport
/**
* Initialize Export
* @access private
*/
function __initExport($module, $moduleInstance) {
if($moduleInstance->isentitytype) {
// We will be including the file, so do a security check.
Vtiger_Utils::checkFileAccessForInclusion("modules/$module/$module.php");
}
$this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w');
$this->__write("<?xml version='1.0'?>\n");
}
示例4: getClassInstance
/**
* Get instance of the module class.
* @param String Module name
*/
static function getClassInstance($modulename)
{
if ($modulename == 'Calendar') {
$modulename = 'Activity';
}
$instance = false;
$filepath = "modules/{$modulename}/{$modulename}.php";
if (Vtiger_Utils::checkFileAccessForInclusion($filepath, false)) {
checkFileAccessForInclusion($filepath);
include_once $filepath;
if (class_exists($modulename)) {
$instance = new $modulename();
}
}
return $instance;
}
示例5: vtlib_purify
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
include_once 'vtlib/Vtiger/Utils.php';
if (vtlib_purify($_REQUEST['module_settings']) == 'true') {
$targetmodule = vtlib_purify($_REQUEST['formodule']);
$targetSettingPage = "modules/{$targetmodule}/Settings.php";
if (file_exists($targetSettingPage)) {
Vtiger_Utils::checkFileAccessForInclusion($targetSettingPage);
require_once $targetSettingPage;
}
} else {
$modulemanager_uploaddir = 'test/vtlib';
if (vtlib_purify($_REQUEST['module_import']) != '') {
require_once 'modules/Settings/ModuleManager/Import.php';
exit;
} else {
if (vtlib_purify($_REQUEST['module_update']) != '') {
require_once 'modules/Settings/ModuleManager/Update.php';
exit;
} else {
if (vtlib_purify($_REQUEST['module_import_cancel']) == 'true') {
$uploadfile = vtlib_purify($_REQUEST['module_import_file']);
$uploadfilename = "{$modulemanager_uploaddir}/{$uploadfile}";