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


PHP BigTree::parsedFilesArray方法代码示例

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


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

示例1: array

<?php

// See if we've hit post_max_size
if (!$_POST["_bigtree_post_check"]) {
    $_SESSION["bigtree_admin"]["post_max_hit"] = true;
    BigTree::redirect($_SERVER["HTTP_REFERER"]);
}
$admin->requireLevel(1);
$item = $admin->getSetting($_POST["id"]);
if ($item["system"] || $item["locked"] && $admin->Level < 2) {
    $admin->growl("Settings", "Access Denied", "error");
} else {
    $bigtree["crops"] = array();
    $bigtree["errors"] = array();
    $bigtree["post_data"] = $_POST;
    $bigtree["file_data"] = BigTree::parsedFilesArray();
    // Pretend like we're a normal field
    $field = array("type" => $item["type"], "title" => $item["title"], "key" => "value", "options" => json_decode($item["options"], true), "ignore" => false, "input" => $bigtree["post_data"]["value"], "file_input" => $bigtree["file_data"]["value"]);
    // Process the input
    $output = BigTreeAdmin::processField($field);
    if (!is_null($output)) {
        $admin->updateSettingValue($_POST["id"], $output);
    }
    $admin->growl("Settings", "Updated Setting");
}
$_SESSION["bigtree_admin"]["form_data"] = array("page" => true, "return_link" => ADMIN_ROOT . "settings/", "edit_link" => ADMIN_ROOT . "settings/edit/" . $_POST["id"] . "/", "errors" => $bigtree["errors"]);
// Track resource allocation
$admin->allocateResources("settings", $_POST["id"]);
if (count($bigtree["crops"])) {
    $_SESSION["bigtree_admin"]["form_data"]["crop_key"] = $cms->cacheUnique("org.bigtreecms.crops", $bigtree["crops"]);
    BigTree::redirect(ADMIN_ROOT . "settings/crop/");
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:update.php

示例2: array

<?php

// Parse the resources
$bigtree["entry"] = array();
$bigtree["template"] = $cms->getTemplate($_POST["template"]);
$bigtree["file_data"] = BigTree::parsedFilesArray("resources");
$bigtree["post_data"] = $_POST["resources"];
// Duplicate vars and $upload_service in for backwards compat.
$data = $_POST["resources"];
$file_data = $_FILES["resources"];
$upload_service = new BigTreeUploadService();
foreach ((array) $bigtree["template"]["resources"] as $resource) {
    unset($value);
    // Backwards compat.
    $field = array();
    $field["key"] = $key = $resource["id"];
    $field["options"] = $options = $resource;
    if (empty($field["options"]["directory"])) {
        $field["options"]["directory"] = $options["directory"] = "files/pages/";
    }
    $field["ignore"] = false;
    $field["input"] = $bigtree["post_data"][$resource["id"]];
    $field["file_input"] = $bigtree["file_data"][$resource["id"]];
    // If we have a customized handler for this data type, run it, otherwise, it's simply the post value.
    $field_type_path = BigTree::path("admin/form-field-types/process/" . $resource["type"] . ".php");
    if (file_exists($field_type_path)) {
        include $field_type_path;
    } else {
        if (is_array($bigtree["post_data"][$field["key"]])) {
            $field["output"] = $bigtree["post_data"][$field["key"]];
        } else {
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:_resource-parse.php


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