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


PHP IsAllowedCommand函数代码示例

本文整理汇总了PHP中IsAllowedCommand函数的典型用法代码示例。如果您正苦于以下问题:PHP IsAllowedCommand函数的具体用法?PHP IsAllowedCommand怎么用?PHP IsAllowedCommand使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: DoResponse

function DoResponse()
{
    global $Config;
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'Команда "' . $sCommand . '" недоступна');
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Неверный тип');
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
        case 'FileDelete':
            if ($Config['Delete']) {
                FileDelete($sResourceType, $sCurrentFolder, $sCommand);
            }
            break;
        case 'FolderDelete':
            if ($Config['Delete']) {
                FolderDelete($sResourceType, $sCurrentFolder, $sCommand);
            }
            break;
    }
    CreateXmlFooter();
    exit;
}
开发者ID:Moro3,项目名称:duc,代码行数:52,代码来源:connector.php

示例2: DoResponse

function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = urlencode($_GET['Command']);
    $sResourceType = urlencode($_GET['Type']);
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'FileBrowserError_Command' . ';;' . $sCommand);
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'FileBrowserError_Type' . ';;' . $sResourceType);
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    if ($sCommand == 'GetDwfckNs') {
        GetDwfckNs();
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
        case 'UnlinkFile':
            UnlinkFile($sResourceType, $sCurrentFolder, $sCommand, $_GET['file']);
            break;
    }
    CreateXmlFooter();
    exit;
}
开发者ID:violetfish,项目名称:ckgedit,代码行数:48,代码来源:connector.php

示例3: DoResponse

function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
        return ;

    // Get the main request informaiton.
    $sCommand        = $_GET['Command'] ;
    $sResourceType    = $_GET['Type'] ;
    $sCurrentFolder    = GetCurrentFolder() ;

    // Check if it is an allowed command
    if ( ! IsAllowedCommand( $sCommand ) )
        SendError( 1, 'The "' . $sCommand . '" command isn\'t allowed' ) ;

    // Check if it is an allowed type.
    if ( !IsAllowedType( $sResourceType ) )
        SendError( 1, 'Invalid type specified' ) ;

    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ( $sCommand == 'FileUpload' )
    {
        FileUpload( $sResourceType, $sCurrentFolder, $sCommand ) ;
        return ;
    }

    CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;

    // Execute the required command.
    switch ( $sCommand )
    {
        case 'GetFolders' :
            GetFolders( $sResourceType, $sCurrentFolder ) ;
            break ;
        case 'GetFoldersAndFiles' :
            GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
            break ;
        case 'CreateFolder' :
            CreateFolder( $sResourceType, $sCurrentFolder ) ;
            break ;
    }

    CreateXmlFooter() ;

    exit ;
}
开发者ID:noikiy,项目名称:mdwp,代码行数:48,代码来源:connector.php

示例4: DoResponse

function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    //require_once(GetRootPath() . '\\conlive_8_12\\site\\config\\project.php');
    //$con = new Project();
    $f = fopen("cok2.txt", "w");
    fprintf($f, $_SESSION['em']);
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    // Check if it is an allowed command
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'The "' . $sCommand . '" command isn\'t allowed');
    }
    // Check if it is an allowed type.
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Invalid type specified');
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    // Execute the required command.
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
开发者ID:aazhbd,项目名称:ArtCms,代码行数:45,代码来源:connector.php

示例5: DoResponse

function DoResponse()
{
    if (!isset($_GET)) {
        global $_GET;
    }
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = GetCurrentFolder();
    if (!IsAllowedCommand($sCommand)) {
        SendError(1, 'The "' . $sCommand . '" command isn\'t allowed');
    }
    if (!IsAllowedType($sResourceType)) {
        SendError(1, 'Invalid type specified');
    }
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder, $sCommand);
        return;
    }
    CreateXmlHeader($sCommand, $sResourceType, $sCurrentFolder);
    switch ($sCommand) {
        case 'GetFolders':
            GetFolders($sResourceType, $sCurrentFolder);
            break;
        case 'GetFoldersAndFiles':
            GetFoldersAndFiles($sResourceType, $sCurrentFolder);
            break;
        case 'CreateFolder':
            CreateFolder($sResourceType, $sCurrentFolder);
            break;
    }
    CreateXmlFooter();
    exit;
}
开发者ID:ziyou-liu,项目名称:jiesi,代码行数:36,代码来源:connector.php

示例6: SendError

 *
 * == END LICENSE ==
 *
 * This is the "File Uploader" for PHP.
 */
require './config.php';
require './util.php';
require './io.php';
require './commands.php';
require './phpcompat.php';
function SendError($number, $text)
{
    SendUploadResults($number, '', '', $text);
}
// Check if this uploader has been enabled.
if (!$Config['Enabled']) {
    SendUploadResults('1', '', '', 'This file uploader is disabled. Please check the "editor/filemanager/connectors/php/config.php" file');
}
$sCommand = 'QuickUpload';
// The file type (from the QueryString, by default 'File').
$sType = isset($_GET['Type']) ? $_GET['Type'] : 'File';
$sCurrentFolder = GetCurrentFolder();
// Is enabled the upload?
if (!IsAllowedCommand($sCommand)) {
    SendUploadResults('1', '', '', 'The ""' . $sCommand . '"" command isn\'t allowed');
}
// Check if it is an allowed type.
if (!IsAllowedType($sType)) {
    SendUploadResults(1, '', '', 'Invalid type specified');
}
FileUpload($sType, $sCurrentFolder, $sCommand);
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:31,代码来源:upload.php


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