• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BigTree类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: _localDrawCalloutLevel

    function _localDrawCalloutLevel($keys, $level)
    {
        global $field;
        foreach ($level as $key => $value) {
            if (is_array($value)) {
                _localDrawCalloutLevel(array_merge($keys, array($key)), $value);
            } else {
                ?>
<input type="hidden" name="<?php 
                echo $field["key"];
                ?>
[<?php 
                echo implode("][", $keys);
                ?>
][<?php 
                echo $key;
                ?>
]" value="<?php 
                echo BigTree::safeEncode($value);
                ?>
" />
<?php 
            }
        }
    }
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:25,代码来源:callouts.php


示例2: _localCleanup

function _localCleanup()
{
    // Remove the package directory, we do it backwards because the "deepest" files are last
    $contents = @array_reverse(BigTree::directoryContents(SERVER_ROOT . "cache/package/"));
    foreach ((array) $contents as $file) {
        @unlink($file);
        @rmdir($file);
    }
    @rmdir(SERVER_ROOT . "cache/package/");
}
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:10,代码来源:unpack.php


示例3: oAuthRedirect

 function oAuthRedirect()
 {
     $this->Settings["token_secret"] = "";
     $response = $this->callAPI("https://api.login.yahoo.com/oauth/v2/get_request_token", "GET", array("oauth_callback" => $this->ReturnURL));
     parse_str($response);
     if ($oauth_callback_confirmed != "true") {
         global $admin;
         $admin->growl("Yahoo BOSS API", "Consumer Key or Secret invalid.", "error");
         BigTree::redirect(ADMIN_ROOT . "developer/geocoding/yahoo-boss/");
     }
     $this->Settings["token_secret"] = $oauth_token_secret;
     BigTree::redirect("https://api.login.yahoo.com/oauth/v2/request_auth?oauth_token={$oauth_token}");
 }
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:13,代码来源:yahoo-boss.php


示例4: __construct

 function __construct($cache = true)
 {
     parent::__construct("bigtree-internal-salesforce-api", "Salesforce API", "org.bigtreecms.api.salesforce", $cache);
     // Set OAuth Return URL
     $this->ReturnURL = ADMIN_ROOT . "developer/services/salesforce/return/";
     // Change things if we're in the test environment.
     if ($this->Settings["test_environment"]) {
         $this->AuthorizeURL = str_ireplace("login.", "test.", $this->AuthorizeURL);
         $this->TokenURL = str_replace("login.", "test.", $this->TokenURL);
     }
     // Get a new access token for this session.
     $this->Connected = false;
     if ($this->Settings["refresh_token"]) {
         $response = json_decode(BigTree::cURL($this->TokenURL, array("grant_type" => "refresh_token", "client_id" => $this->Settings["key"], "client_secret" => $this->Settings["secret"], "refresh_token" => $this->Settings["refresh_token"])), true);
         if ($response["access_token"]) {
             $this->InstanceURL = $response["instance_url"];
             $this->EndpointURL = $this->InstanceURL . "/services/data/v28.0/";
             $this->Settings["token"] = $response["access_token"];
             $this->Connected = true;
         }
     }
 }
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:22,代码来源:salesforce.php


示例5: htmlspecialchars

} else {
    ?>
		<input type="text" disabled="disabled" value="Please select &quot;Other Table&quot;" />
		<?php 
}
?>
	</div>
</fieldset>
<fieldset>
	<label>Sort By</label>
	<div data-name="mtm-sort" class="sort_by pop-dependant mtm-other-table">
		<?php 
if ($data["mtm-other-table"]) {
    ?>
		<select name="mtm-sort"><?php 
    BigTree::getFieldSelectOptions($data["mtm-other-table"], $data["mtm-sort"], true);
    ?>
</select>
		<?php 
} else {
    ?>
		<input type="text" disabled="disabled" value="Please select &quot;Other Table&quot;" />
		<?php 
}
?>
	</div>
</fieldset>
<fieldset>
	<label>List Parser Function</label>
	<input type="text" name="mtm-list-parser" value="<?php 
echo htmlspecialchars($data["mtm-list-parser"]);
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:many-to-many.php


示例6: foreach

foreach ((array) $p["field_types"] as $type) {
    if ($type) {
        if (file_exists(SERVER_ROOT . "custom/admin/form-field-types/draw/{$type}.php")) {
            $p["files"][] = SERVER_ROOT . "custom/admin/form-field-types/draw/{$type}.php";
        }
        if (file_exists(SERVER_ROOT . "custom/admin/form-field-types/process/{$type}.php")) {
            $p["files"][] = SERVER_ROOT . "custom/admin/form-field-types/process/{$type}.php";
        }
        if (file_exists(SERVER_ROOT . "custom/admin/ajax/developer/field-options/{$type}.php")) {
            $p["files"][] = SERVER_ROOT . "custom/admin/ajax/developer/field-options/{$type}.php";
        }
    }
}
// Make sure we have no dupes
$p["module_groups"] = array_unique($p["module_groups"]);
$p["modules"] = array_unique($p["modules"]);
$p["templates"] = array_unique($p["templates"]);
$p["callouts"] = array_unique($p["callouts"]);
$p["settings"] = array_unique($p["settings"]);
$p["feeds"] = array_unique($p["feeds"]);
$p["field_types"] = array_unique($p["field_types"]);
$p["files"] = array_unique($p["files"]);
$p["tables"] = array_unique($p["tables"]);
// Sort them to make them easier to read
foreach ($p as &$part) {
    if (is_array($part)) {
        asort($part);
    }
}
BigTree::redirect(DEVELOPER_ROOT . "packages/build/files/");
开发者ID:jzxyouok,项目名称:BigTree-CMS,代码行数:30,代码来源:save-components.php


示例7: update

 function update($id, $fields, $values = false, $ignore_cache = false)
 {
     $id = sqlescape($id);
     // Turn a key => value array into pairs
     if ($values === false && is_array($fields)) {
         $values = $fields;
         $fields = array_keys($fields);
     }
     // Multiple columns to update
     if (is_array($fields)) {
         $query_parts = array();
         foreach ($fields as $key) {
             $val = current($values);
             if (is_array($val)) {
                 $val = BigTree::json(BigTree::translateArray($val));
             } else {
                 $val = BigTreeAdmin::autoIPL($val);
             }
             $query_parts[] = "`{$key}` = '" . sqlescape($val) . "'";
             next($values);
         }
         sqlquery("UPDATE `" . $this->Table . "` SET " . implode(", ", $query_parts) . " WHERE id = '{$id}'");
         // Single column to update
     } else {
         if (is_array($values)) {
             $val = json_encode(BigTree::translateArray($values));
         } else {
             $val = BigTreeAdmin::autoIPL($values);
         }
         sqlquery("UPDATE `" . $this->Table . "` SET `{$fields}` = '" . sqlescape($val) . "' WHERE id = '{$id}'");
     }
     if (!$ignore_cache) {
         BigTreeAutoModule::recacheItem($id, $this->Table);
     }
 }
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:35,代码来源:modules.php


示例8: array

<?php

$bigtree["report"] = BigTreeAutoModule::getReport($bigtree["module_action"]["report"]);
$bigtree["form"] = BigTreeAutoModule::getRelatedFormForReport($bigtree["report"]);
$bigtree["view"] = $bigtree["report"]["view"] ? BigTreeAutoModule::getView($bigtree["report"]["view"]) : BigTreeAutoModule::getRelatedViewForReport($bigtree["report"]);
if ($admin->Level > 1) {
    $bigtree["subnav_extras"][] = array("link" => ADMIN_ROOT . "developer/modules/reports/edit/" . $bigtree["report"]["id"] . "/?return=front", "icon" => "setup", "title" => "Edit in Developer");
}
$action = $bigtree["commands"][0];
if ($action == "csv") {
    include BigTree::path("admin/auto-modules/reports/csv.php");
} elseif ($action == "view") {
    include BigTree::path("admin/auto-modules/reports/view.php");
} else {
    include BigTree::path("admin/auto-modules/reports/filter.php");
}
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:16,代码来源:report.php


示例9:

<?php

if ($_SERVER["HTTP_REFERER"] != ADMIN_ROOT . "users/profile/") {
    ?>
<div class="container">
	<section>
		<p>To update your profile, please access your  <a href="<?php 
    echo ADMIN_ROOT;
    ?>
users/profile/">Profile</a> page directly.</p>
	</section>
</div>
<?php 
} else {
    if ($_POST["password"] && !$admin->validatePassword($_POST["password"])) {
        $_SESSION["bigtree_admin"]["update_profile"] = $_POST;
        $admin->growl("Users", "Invalid Password", "error");
        BigTree::redirect(ADMIN_ROOT . "users/profile/");
    }
    $admin->updateProfile($_POST);
    $admin->growl("Users", "Updated Profile");
    BigTree::redirect(ADMIN_ROOT . "dashboard/");
}
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:23,代码来源:update.php


示例10: json_decode

$table = $_POST["table"];
$type = $_POST["type"];
$options = json_decode(str_replace(array("\r", "\n"), array('\\r', '\\n'), $_POST["data"]), true);
$filter = isset($options["filter"]) ? $options["filter"] : "";
?>
<div style="width: 450px;">
	<fieldset>
		<label>Filter Function <small>(function name only, <a href="http://www.bigtreecms.org/docs/dev-guide/modules/advanced-techniques/view-filters/" target="_blank">learn more</a>)</small></label>
		<input type="text" name="filter" value="<?php 
echo htmlspecialchars($filter);
?>
" />
	</fieldset>
	<?php 
$path = BigTree::path("admin/ajax/developer/view-options/" . $type . ".php");
if (file_exists($path)) {
    include $path;
}
?>
</div>

<script>
	BigTree.localTable = false;
	
	$(".table_select").change(function() {
		x = 0;
		BigTree.localTable = $(this).val();
		
		$(this).parents("fieldset").nextAll("fieldset").each(function() {
			div = $(this).find("div");
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:30,代码来源:load-view-options.php


示例11: oAuthRefreshToken

 function oAuthRefreshToken()
 {
     $r = json_decode(BigTree::cURL($this->TokenURL, array("client_id" => $this->Settings["key"], "client_secret" => $this->Settings["secret"], "refresh_token" => $this->Settings["refresh_token"], "grant_type" => "refresh_token")));
     if ($r->access_token) {
         $this->Settings["token"] = $r->access_token;
         $this->Settings["expires"] = strtotime("+" . $r->expires_in . " seconds");
     }
 }
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:8,代码来源:flickr.php


示例12: array

<?php

//!BigTree Warnings
$warnings = array();
$writable_directories = array("cache/", "custom/inc/modules/", "custom/admin/ajax/developer/field-options/", "custom/admin/form-field-types/draw/", "custom/admin/form-field-types/process/", "templates/routed/", "templates/basic/", "templates/callouts/", "site/files/");
foreach ($writable_directories as $directory) {
    if (!BigTree::isDirectoryWritable(SERVER_ROOT . $directory)) {
        $warnings[] = array("parameter" => "Directory Permissions Error", "rec" => "Make " . SERVER_ROOT . $directory . " writable.", "status" => "bad");
    }
}
// Go through every module form and look for uploads, make sure the directories exist and are writable.
$forms = array_merge($admin->getModuleForms(), $admin->getModuleEmbedForms());
foreach ($forms as $form) {
    foreach (array_filter((array) $form["fields"]) as $key => $data) {
        if ($data["directory"]) {
            if (!BigTree::isDirectoryWritable(SITE_ROOT . $data["directory"])) {
                $warnings[] = array("parameter" => "Directory Permissions Error", "rec" => "Make " . SITE_ROOT . $data["directory"] . " writable.", "status" => "bad");
            }
        }
    }
}
// Search all content for links to the admin.
$bad = $admin->getPageAdminLinks();
foreach ($bad as $f) {
    $warnings[] = array("parameter" => "Bad Admin Links", "rec" => 'Remove links to Admin on <a href="' . ADMIN_ROOT . 'pages/edit/' . $f["id"] . '/">' . $f["nav_title"] . '</a>', "status" => "ok");
}
if (!file_exists(SITE_ROOT . "favicon.ico")) {
    $warnings[] = array("parameter" => "Missing Favicon", "rec" => "Create a favicon and place it in the /site/ root.", "status" => "ok");
}
//!Server Parameters
$mysql = extension_loaded('mysql') || extension_loaded("mysqli") ? "good" : "bad";
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:status.php


示例13: foreach

    }
    ?>
	<?php 
    foreach ($list as $option) {
        ?>
	<option value="<?php 
        echo BigTree::safeEncode($option["value"]);
        ?>
"<?php 
        if ($field["value"] == $option["value"]) {
            ?>
 selected="selected"<?php 
        }
        if ($option["access_level"]) {
            ?>
 data-access-level="<?php 
            echo $option["access_level"];
            ?>
"<?php 
        }
        ?>
><?php 
        echo BigTree::safeEncode(BigTree::trimLength(strip_tags($option["description"]), 100));
        ?>
</option>
	<?php 
    }
    ?>
</select>
<?php 
}
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:list.php


示例14: array_filter

<?php

// Check whether our database is running the latest revision of BigTree or not.
$current_revision = $cms->getSetting("bigtree-internal-revision");
if ($current_revision < BIGTREE_REVISION && $admin->Level > 1) {
    BigTree::redirect(DEVELOPER_ROOT . "upgrade/database/");
}
// Check for newer versions of BigTree
$ignored_all = true;
if (!$_COOKIE["bigtree_admin"]["deferred_update"]) {
    $updates = array_filter((array) @json_decode(BigTree::cURL("http://www.bigtreecms.org/ajax/version-check/?current_version=" . BIGTREE_VERSION, false, array(CURLOPT_CONNECTTIMEOUT => 1, CURLOPT_TIMEOUT => 5)), true));
    // See if we've ignored these updates
    $ignorable = array();
    foreach ($updates as $update) {
        if (!$_COOKIE["bigtree_admin"]["ignored_update"][$update["version"]]) {
            $ignored_all = false;
        }
        $ignorable[] = $update["version"];
    }
}
// If we're ignoring updates through config, still ignore them
if (!empty($bigtree["config"]["ignore_admin_updates"])) {
    $ignored_all = true;
}
// Updates are available and we didn't ignore them
if (!$ignored_all && count($updates)) {
    ?>
<div class="container">
	<summary><h2>Update Available</h2></summary>
	<section>
		<p>You are currently running BigTree <?php 
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:default.php


示例15: foreach

BigTree::globalizeArray($view);
?>
<div class="table" id="" class="image_list">
	<summary><h2>Search Results</h2></summary>
	<header>
		<span class="view_column">Click an image to edit it.</span>
	</header>
	<section>
		<ul id="image_list_<?php 
echo $view["id"];
?>
" class="image_list">
			<?php 
foreach ($items as $item) {
    if ($options["preview_prefix"]) {
        $preview_image = BigTree::prefixFile($item[$options["image"]], $options["preview_prefix"]);
    } else {
        $preview_image = $item[$options["image"]];
    }
    ?>
			<li id="row_<?php 
    echo $item["id"];
    ?>
">
				<a class="image" href="<?php 
    echo $view["edit_url"] . $item["id"];
    ?>
/"><img src="<?php 
    echo $preview_image;
    ?>
" alt="" /></a>
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:images.php


示例16: json_decode

<?php

// Prevent including files outside feed-options
$type = BigTree::cleanFile($_POST["type"]);
$table = $_POST["table"];
$data = json_decode(str_replace(array("\r", "\n"), array('\\r', '\\n'), $_POST["data"]), true);
$path = BigTree::path("admin/ajax/developer/feed-options/{$type}.php");
if (file_exists($path)) {
    include $path;
}
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:10,代码来源:load-feed-options.php


示例17: is_array

// Modified Photo Gallery to add Attribution and Link attributes
$photos = is_array($field["value"]) ? $field["value"] : array();
$max = count($photos);
$current = 0;
$button_options = htmlspecialchars(json_encode(array("minWidth" => $field["options"]["min_width"], "minHeight" => $field["options"]["min_height"])));
?>
<div class="photo_gallery_widget" id="<?php 
echo $field["id"];
?>
">
	<ul>
		<?php 
foreach ($photos as $photo) {
    if ($field["options"]["preview_prefix"]) {
        $preview_image = BigTree::prefixFile($photo["image"], $field["options"]["preview_prefix"]);
    } else {
        $preview_image = $photo["image"];
    }
    ?>
		<li>
			<figure>
				<img src="<?php 
    echo $preview_image;
    ?>
" alt="" />
			</figure>
			<input type="hidden" name="<?php 
    echo $field["key"];
    ?>
[<?php 
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:30,代码来源:photo-gallery.php


示例18: count

<?php

BigTree::globalizeArray($_SESSION["bigtree_admin"]["form_data"]);
?>
<div class="container">
	<section>
		<div class="alert">
			<span></span>
			<p>Your submission had <?php 
echo count($errors);
?>
 error<?php 
if (count($errors) != 1) {
    ?>
s<?php 
}
?>
.</p>
		</div>
		<div class="table error_table">
			<header>
				<span class="view_column field">Field</span>
				<span class="view_column error">Error</span>
			</header>
			<ul>
				<?php 
foreach ($errors as $error) {
    ?>
				<li>
					<section class="view_column field"><?php 
    echo $error["field"];
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:error.php


示例19:

<?php

$setting = $admin->getSetting($_POST["id"]);
if ($setting["locked"]) {
    $admin->requireLevel(2);
} else {
    $admin->requireLevel(1);
}
$title = $setting["title"];
$value = $setting["value"];
$key = $setting["id"];
?>
<div style="width: 460px;">
	<input type="hidden" name="setting-id" value="<?php 
echo $_POST["id"];
?>
" />
	<?php 
if ($setting["description"]) {
    ?>
	<p><?php 
    echo $setting["description"];
    ?>
</p>
	<?php 
}
?>
	<?php 
include BigTree::path("admin/form-field-types/draw/" . $setting["type"] . ".php");
?>
</div>
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:edit-module-setting.php


示例20: unlink

         $sizes = BigTree::getThumbnailSizes($first_copy, $thumb["width"], $thumb["height"]);
         if (!BigTree::imageManipulationMemoryAvailable($first_copy, $sizes[3], $sizes[4], $iwidth, $iheight)) {
             $error = "Image uploaded is too large for the server to manipulate. Please upload a smaller version of this image.";
             unlink($first_copy);
         }
     }
 }
 if (!$error) {
     // Now let's make the thumbnails we need for the image manager
     $thumbs = array();
     $pinfo = BigTree::pathInfo($file_name);
     // Create a bunch of thumbnails
     foreach ($thumbnails_to_create as $key => $thumb) {
         if ($iwidth > $thumb["width"] || $iheight > $thumb["height"]) {
             $temp_thumb = SITE_ROOT . "files/" . uniqid("temp-") . $itype_exts[$itype];
             BigTree::createThumbnail($first_copy, $temp_thumb, $thumb["width"], $thumb["height"]);
             if ($key == "bigtree_internal_list") {
                 list($twidth, $theight) = getimagesize($temp_thumb);
                 $margin = floor((100 - $theight) / 2);
             }
             if ($replacing) {
                 $file = $storage->replace($temp_thumb, $thumb["prefix"] . $pinfo["basename"], "files/resources/");
             } else {
                 $file = $storage->store($temp_thumb, $thumb["prefix"] . $pinfo["basename"], "files/resources/");
             }
             $thumbs[$key] = $file;
         }
     }
     // Upload the original to the proper place.
     if ($replacing) {
         $file = $storage->replace($first_copy, $file_name, "files/resources/");
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:upload.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Billrun_Factory类代码示例发布时间:2022-05-23
下一篇:
PHP Bids类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap