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


PHP Vtiger_Utils::checkFileAccess方法代码示例

本文整理汇总了PHP中Vtiger_Utils::checkFileAccess方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Utils::checkFileAccess方法的具体用法?PHP Vtiger_Utils::checkFileAccess怎么用?PHP Vtiger_Utils::checkFileAccess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Vtiger_Utils的用法示例。


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

示例1: __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::checkFileAccess("modules/{$module}/{$module}.php");
     }
     $this->_export_modulexml_file = fopen($this->__getManifestFilePath(), 'w');
     $this->__write("<?xml version='1.0'?>\n");
 }
开发者ID:hardikk,项目名称:HNH,代码行数:13,代码来源:PackageExport.php

示例2: register

 /**
  * Handle event registration for module
  * @param Vtiger_Module Instance of the module to use
  * @param String Name of the Event like vtiger.entity.aftersave, vtiger.entity.beforesave
  * @param String Name of the Handler class (should extend VTEventHandler)
  * @param String File path which has Handler class definition
  * @param String Condition for the event to trigger (default blank)
  */
 static function register($moduleInstance, $eventname, $classname, $filename, $condition = '', $dependent = '[]')
 {
     // Security check on fileaccess, don't die if it fails
     if (Vtiger_Utils::checkFileAccess($filename, false)) {
         $adb = PearDatabase::getInstance();
         $eventsManager = new VTEventsManager($adb);
         $eventsManager->registerHandler($eventname, $filename, $classname, $condition, $dependent);
         $eventsManager->setModuleForHandler($moduleInstance->name, $classname);
         self::log("Registering Event {$eventname} with [{$filename}] {$classname} ... DONE");
     }
 }
开发者ID:yozhi,项目名称:YetiForceCRM,代码行数:19,代码来源:Event.php

示例3: 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::checkFileAccess($filepath, false)) {
         include_once $filepath;
         if (class_exists($modulename)) {
             $instance = new $modulename();
         }
     }
     return $instance;
 }
开发者ID:hardikk,项目名称:HNH,代码行数:19,代码来源:Module.php

示例4:

<?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 ($_REQUEST['module_settings'] == 'true') {
    $targetmodule = $_REQUEST['formodule'];
    $targetSettingPage = "modules/{$targetmodule}/Settings.php";
    if (file_exists($targetSettingPage)) {
        Vtiger_Utils::checkFileAccess($targetSettingPage);
        require_once $targetSettingPage;
    }
} else {
    $modulemanager_uploaddir = 'test/vtlib';
    if ($_REQUEST['module_import'] != '') {
        require_once 'modules/Settings/ModuleManager/Import.php';
        exit;
    } else {
        if ($_REQUEST['module_update'] != '') {
            require_once 'modules/Settings/ModuleManager/Update.php';
            exit;
        } else {
            if ($_REQUEST['module_import_cancel'] == 'true') {
                $uploadfile = $_REQUEST['module_import_file'];
                $uploadfilename = "{$modulemanager_uploaddir}/{$uploadfile}";
开发者ID:hardikk,项目名称:HNH,代码行数:31,代码来源:ModuleManager.php


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