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


PHP CreateXmlFooter函数代码示例

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


在下文中一共展示了CreateXmlFooter函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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:roman-reva,项目名称:iec,代码行数:52,代码来源:connector.php

示例2: DoResponse

function DoResponse()
{
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = $_GET['CurrentFolder'];
    // Check the current folder syntax (must begin and start with a slash).
    if (!ereg('/$', $sCurrentFolder)) {
        $sCurrentFolder .= '/';
    }
    if (strpos($sCurrentFolder, '/') !== 0) {
        $sCurrentFolder = '/' . $sCurrentFolder;
    }
    // File Upload doesn't have to Return XML, so it must be intercepted before anything.
    if ($sCommand == 'FileUpload') {
        FileUpload($sResourceType, $sCurrentFolder);
        return;
    }
    // Prevent the browser from caching the result.
    // Date in the past
    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    // always modified
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    // HTTP/1.1
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', false);
    // HTTP/1.0
    header('Pragma: no-cache');
    // Set the response format.
    header('Content-Type:text/xml; charset=utf-8');
    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:BackupTheBerlios,项目名称:phpannu-svn,代码行数:49,代码来源:connector.php

示例3: SendError

function SendError($number, $text)
{
    if (isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent']) {
        SendErrorNode($number, $text);
        CreateXmlFooter();
    } else {
        SetXmlHeaders();
        // Create the XML document header
        echo '<?xml version="1.0" encoding="utf-8" ?>';
        echo '<Connector>';
        SendErrorNode($number, $text);
        echo '</Connector>';
    }
    exit;
}
开发者ID:klr2003,项目名称:sourceread,代码行数:15,代码来源:basexml.php

示例4: 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

示例5: 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, '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:omusico,项目名称:isle-web-framework,代码行数:48,代码来源:connector.php

示例6: 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

示例7: SendError

function SendError($number, $text)
{
    if ($_GET['Command'] == 'FileUpload') {
        SendUploadResults($number, "", "", $text);
    }
    if (isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent']) {
        SendErrorNode($number, $text);
        CreateXmlFooter();
    } else {
        SetXmlHeaders();
        // Create the XML document header
        echo '<?xml version="1.0" encoding="utf-8" ?>';
        echo '<Connector>';
        SendErrorNode($number, $text);
        echo '</Connector>';
    }
    exit;
}
开发者ID:cmooony,项目名称:d4d-studio,代码行数:18,代码来源:basexml.php

示例8: ServerMapFolder

function ServerMapFolder($resourceType, $folderPath)
{
    // Get the resource type directory.
    $sResourceTypePath = $GLOBALS["UserFilesDirectory"] . strtolower($resourceType) . '/';
    // Ensure that the directory exists.
    $sErrorMsg = CreateServerFolder($sResourceTypePath);
    if ($sErrorMsg != '') {
        if (isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent']) {
            SendErrorNode(1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})");
            CreateXmlFooter();
            exit;
        } else {
            SendError(1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})");
        }
    }
    // Return the resource type directory combined with the required path.
    return $sResourceTypePath . RemoveFromStart($folderPath, '/');
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:18,代码来源:io.php

示例9: 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

示例10: switch

}
if (substr($sCurrentFolder, 0, 1) !== '/') {
    $sCurrentFolder = '/' . $sCurrentFolder;
}
// Execute the required command.
switch ($sCommand) {
    case 'FileUpload':
        FileUpload($sCurrentFolder);
        break;
    case 'DeleteFile':
        CreateXmlHeader('DeleteFile', $sCurrentFolder);
        DeleteFile($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    case 'GetFoldersAndFiles':
        CreateXmlHeader('GetFoldersAndFiles', $sCurrentFolder);
        GetFoldersAndFiles($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    case 'CreateFolder':
        CreateXmlHeader('CreateFolder', $sCurrentFolder);
        CreateFolder($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
    default:
    case 'GetFolders':
        CreateXmlHeader('GetFolders', $sCurrentFolder);
        GetFolders($sCurrentFolder, $sType);
        CreateXmlFooter();
        break;
}
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:31,代码来源:connector.php

示例11: DoResponse

    $GLOBALS["UserFilesPath"] = $Config['UserFilesPath'];
} else {
    if (isset($_GET['ServerPath'])) {
        $GLOBALS["UserFilesPath"] = $_GET['ServerPath'];
    } else {
        $GLOBALS["UserFilesPath"] = '/userfiles/';
    }
}
if (!ereg('/$', $GLOBALS["UserFilesPath"])) {
    $GLOBALS["UserFilesPath"] .= '/';
}
if (strlen($Config['UserFilesAbsolutePath']) > 0) {
    $GLOBALS["UserFilesDirectory"] = $Config['UserFilesAbsolutePath'];
    if (!ereg('/$', $GLOBALS["UserFilesDirectory"])) {
        $GLOBALS["UserFilesDirectory"] .= '/';
    }
} else {
    // Map the "UserFiles" path to a local directory.
    $GLOBALS["UserFilesDirectory"] = GetRootPath() . $GLOBALS["UserFilesPath"];
}
DoResponse();
function DoResponse()
{
    if (!isset($_GET['Command']) || !isset($_GET['Type']) || !isset($_GET['CurrentFolder'])) {
        return;
    }
    // Get the main request informaiton.
    $sCommand = $_GET['Command'];
    $sResourceType = $_GET['Type'];
    $sCurrentFolder = $_GET['CurrentFolder'];
    // Check if it is an allowed type.
    if (!in_array($sResourceType, array('File', 'Image', 'Flash', 'Media'))) {
        return;
    }
    // Check the current folder syntax (must begin and start with a slash).
    if (!ereg('/$', $sCurrentFolder)) {
        $sCurrentFolder .= '/';
    }
    if (strpos($sCurrentFolder, '/') !== 0) {
        $sCurrentFolder = '/' . $sCurrentFolder;
    }
    // Check for invalid folder paths (..)
    if (strpos($sCurrentFolder, '..')) {
        SendError(102, "");
    }
开发者ID:reflectiondigital,项目名称:Stresslesstests,代码行数:45,代码来源:connector.php


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