本文整理汇总了PHP中BigTree::path方法的典型用法代码示例。如果您正苦于以下问题:PHP BigTree::path方法的具体用法?PHP BigTree::path怎么用?PHP BigTree::path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigTree
的用法示例。
在下文中一共展示了BigTree::path方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
$breadcrumb[] = array("link" => "users/tokens/edit/", "title" => "Edit API Token");
$admin->requireLevel(2);
$item = $admin->getAPITokenById(end($path));
$users = $admin->getUsers();
include BigTree::path("admin/modules/users/_nav.php");
?>
<h1><span class="users"></span>Edit API Token</h1>
<div class="form_container">
<form class="module" action="<?php
echo $admin_root;
?>
users/tokens/update/<?php
echo end($path);
?>
/" method="post">
<section>
<fieldset>
<label>Token</label>
<input type="text" name="token" value="<?php
echo htmlspecialchars($item["token"]);
?>
" disabled="disabled" />
</fieldset>
<fieldset>
<label>Associated User</label>
<select name="user">
<?php
foreach ($users as $u) {
?>
示例2:
$.ajax("<?php
echo ADMIN_ROOT;
?>
ajax/pages/order/", { type: "POST", data: { id: "<?php
echo $page["id"];
?>
", sort: $("#pages_<?php
echo $class;
?>
").sortable("serialize") } });
}});
</script>
<?php
}
}
include BigTree::path("admin/modules/pages/_properties.php");
?>
<h3>Subpages</h3>
<?php
$nav_visible = array_merge($admin->getNaturalNavigationByParent($page["id"], 1), $admin->getPendingNavigationByParent($page["id"]));
$nav_hidden = array_merge($admin->getHiddenNavigationByParent($page["id"]), $admin->getPendingNavigationByParent($page["id"], ""));
$nav_archived = $admin->getArchivedNavigationByParent($page["id"]);
if (count($nav_visible) || count($nav_hidden) || count($nav_archived)) {
// Drag Visible Pages
if (count($nav_visible)) {
local_drawPageTree($nav_visible, "Visible", "", "pages", true);
}
// Draw Hidden Pages
if (count($nav_hidden)) {
local_drawPageTree($nav_hidden, "Hidden", "Not Appearing In Navigation", "hidden", false);
}
示例3: foreach
if (file_exists($header)) {
$headers[] = $header;
}
if (file_exists($footer)) {
$footers[] = $footer;
}
}
}
// Draw the headers.
foreach ($headers as $header) {
include $header;
}
// Draw the main page.
include $inc;
// Draw the footers.
$footers = array_reverse($footers);
foreach ($footers as $footer) {
include $footer;
}
} else {
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
define("BIGTREE_404", true);
include BigTree::path("admin/pages/_404.php");
}
// If we have a page, just include it.
} else {
include $inc;
}
$bigtree["content"] = ob_get_clean();
include BigTree::path("admin/layouts/" . $bigtree["layout"] . ".php");
示例4: array
<div class="form_fields">
<?php
$bigtree["html_fields"] = array();
$bigtree["simple_html_fields"] = array();
$bigtree["tabindex"] = 1;
$bigtree["field_namespace"] = uniqid("template_field_");
$bigtree["field_counter"] = 0;
// We alias $bigtree["entry"] to $bigtree["resources"] so that information is in the same place for field types.
$bigtree["entry"] =& $bigtree["resources"];
if (is_array($bigtree["template"]["resources"]) && count($bigtree["template"]["resources"])) {
foreach ($bigtree["template"]["resources"] as $resource) {
$field = array("type" => $resource["type"], "title" => $resource["title"], "subtitle" => $resource["subtitle"], "key" => "resources[" . $resource["id"] . "]", "value" => isset($bigtree["resources"][$resource["id"]]) ? $bigtree["resources"][$resource["id"]] : "", "tabindex" => $bigtree["tabindex"], "options" => $resource["options"]);
BigTreeAdmin::drawField($field);
}
} else {
echo '<p>There are no resources for the selected template.</p>';
}
?>
</div>
<?php
$bigtree["html_editor_width"] = 898;
$bigtree["html_editor_height"] = 365;
include BigTree::path("admin/layouts/_html-field-loader.php");
$bigtree["tinymce_fields"] = array_merge($bigtree["html_fields"], $bigtree["simple_html_fields"]);
?>
<script>
BigTree.TinyMCEFields = <?php
echo json_encode($bigtree["tinymce_fields"]);
?>
;
</script>
示例5: 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");
示例6:
$callout = $admin->getCallout(end($bigtree["path"]));
BigTree::globalizeArray($callout);
$resources = $callout["resources"];
?>
<div class="container">
<form method="post" action="<?php
echo DEVELOPER_ROOT;
?>
callouts/update/" enctype="multipart/form-data" class="module">
<input type="hidden" name="id" value="<?php
echo $callout["id"];
?>
" />
<?php
include BigTree::path("admin/modules/developer/callouts/_form-content.php");
?>
<footer>
<input type="submit" class="button blue" value="Update" />
</footer>
</form>
</div>
<?php
include BigTree::path("admin/modules/developer/callouts/_common-js.php");
?>
<script>
BigTree.localResourceCount = <?php
echo $x;
?>
;
</script>
示例7: end
<?php
$_POST["id"] = $_GET["draft"];
include BigTree::path("admin/ajax/dashboard/approve-change.php");
$admin->growl("Pages", "Published Draft");
BigTree::redirect(ADMIN_ROOT . "pages/revisions/" . end($bigtree["commands"]) . "/");
示例8: isset
<?php
$bigtree["current_page"] = $page;
$bigtree["resources"] = $page["resources"];
// Show the properties section
include BigTree::path("admin/modules/pages/_properties.php");
// Check for a page lock
$force = isset($_GET["force"]) ? $_GET["force"] : false;
$admin->lockCheck("bigtree_pages", $page["id"], "admin/modules/pages/_locked.php", $force);
// Grab template information
$template_data = $cms->getTemplate($page["template"]);
// Audit Trail link
$bigtree["subnav_extras"][] = array("link" => ADMIN_ROOT . "developer/audit/search/?table=bigtree_pages&entry=" . $page["id"], "icon" => "trail", "title" => "View Audit Trail");
// Provide developers a nice handy link for edit/return of this form
if ($admin->Level > 1) {
$bigtree["subnav_extras"][] = array("link" => ADMIN_ROOT . "developer/templates/edit/" . $page["template"] . "/?return=" . $page["id"], "icon" => "setup", "title" => "Edit Current Template in Developer");
}
$bigtree["form_action"] = "update";
include BigTree::path("admin/modules/pages/_form.php");
示例9: foreach
}
}
$package["components"]["tables"][] = $table;
}
$package["sql"][] = "SET foreign_key_checks = 1";
foreach ((array) $files as $file) {
$file = str_replace(SERVER_ROOT, "", $file);
BigTree::copyFile(SERVER_ROOT . $file, SERVER_ROOT . "cache/package/" . $file);
$package["files"][] = $file;
}
// Write the manifest file
$json = version_compare(PHP_VERSION, "5.4.0") >= 0 ? json_encode($package, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : json_encode($package);
file_put_contents(SERVER_ROOT . "cache/package/manifest.json", $json);
// Create the zip
@unlink(SERVER_ROOT . "cache/package.zip");
include BigTree::path("inc/lib/pclzip.php");
$zip = new PclZip(SERVER_ROOT . "cache/package.zip");
$zip->create(BigTree::directoryContents(SERVER_ROOT . "cache/package/"), PCLZIP_OPT_REMOVE_PATH, SERVER_ROOT . "cache/package/");
// Remove the package directory, we do it backwards because the "deepest" files are last
$contents = array_reverse(BigTree::directoryContents(SERVER_ROOT . "cache/package/"));
foreach ($contents as $file) {
@unlink($file);
@rmdir($file);
}
@rmdir(SERVER_ROOT . "cache/package/");
// Store it in the database for future updates
if (sqlrows(sqlquery("SELECT * FROM bigtree_extensions WHERE id = '" . sqlescape($id) . "'"))) {
sqlquery("UPDATE bigtree_extensions SET name = '" . sqlescape($title) . "', version = '" . sqlescape($version) . "', last_updated = NOW(), manifest = '" . sqlescape($json) . "' WHERE id = '" . sqlescape($id) . "'");
} else {
sqlquery("INSERT INTO bigtree_extensions (`id`,`type`,`name`,`version`,`last_updated`,`manifest`) VALUES ('" . sqlescape($id) . "','package','" . sqlescape($title) . "','" . sqlescape($version) . "',NOW(),'" . sqlescape($json) . "')");
}
示例10: stop
function stop($message = "")
{
global $cms, $admin, $www_root, $admin_root, $site, $breadcrumb, $bigtree;
echo $message;
$bigtree["content"] = ob_get_clean();
include BigTree::path("admin/layouts/" . $bigtree["layout"] . ".php");
die;
}
示例11:
<input type="checkbox" name="validation" value="required"<?php
if ($validation == "required") {
?>
checked="checked"<?php
}
?>
/>
<label class="for_checkbox">Required</label>
</fieldset>
<?php
}
if (file_exists(BigTree::path("admin/ajax/developer/field-options/" . $t . ".php"))) {
if ($t == "text" || $t == "textarea" || $t == "upload" || $t == "html" || $t == "list") {
echo "<hr />";
}
include BigTree::path("admin/ajax/developer/field-options/" . $t . ".php");
} else {
if ($t != "text" && $t != "textarea" && ($t = "upload" && $t != "html" && $t != "list" && $t != "time" && $t != "date" && $t != "datetime")) {
?>
<p>This field type does not have any options.</p>
<?php
}
}
?>
<script>
$(".table_select").change(function() {
name = $(this).attr("name");
table = $(this).val();
$(".pop-dependant").each(function(el) {
if ($(this).hasClass(name)) {
if ($(this).hasClass("sort_by")) {
示例12: elseif
if ($_POST["redirect_lower"]) {
$_POST["template"] = "!";
$_POST["external"] = "";
$_POST["new_window"] = "";
} elseif ($_POST["external"]) {
$_POST["template"] = "";
$_POST["new_window"] = isset($_POST["new_window"]) ? $_POST["new_window"] : "";
} else {
$_POST["new_window"] = "";
}
$bigtree["crops"] = array();
$bigtree["errors"] = array();
// Initiate the Storage class for backwards compat.
$upload_service = new BigTreeStorage();
// Parse resources
include BigTree::path("admin/modules/pages/_resource-parse.php");
if ($access_level == "p" && $_POST["ptype"] == "Create & Publish") {
// Let's make it happen.
$page = $admin->createPage($_POST);
$admin->growl("Pages", "Created & Published Page");
} else {
$page = "p" . $admin->createPendingPage($_POST);
$admin->growl("Pages", "Created Page Draft");
}
// Track resource allocation
$admin->allocateResources("pages", $page);
$_SESSION["bigtree_admin"]["form_data"] = array("page" => $page, "return_link" => ADMIN_ROOT . "pages/view-tree/" . $_POST["parent"] . "/", "edit_link" => ADMIN_ROOT . "pages/edit/{$page}/", "errors" => $bigtree["errors"]);
if (count($bigtree["crops"])) {
$_SESSION["bigtree_admin"]["form_data"]["crop_key"] = $cms->cacheUnique("org.bigtreecms.crops", $bigtree["crops"]);
BigTree::redirect(ADMIN_ROOT . "pages/crop/{$page}/");
} elseif (count($bigtree["errors"])) {
示例13:
?>
</section>
<section id="content_tab"<?php
if ($bigtree["form_action"] == "create") {
?>
style="display: none;"<?php
}
?>
>
<?php
include BigTree::path("admin/modules/pages/tabs/content.php");
?>
</section>
<section id="seo_tab" style="display: none;">
<?php
include BigTree::path("admin/modules/pages/tabs/seo.php");
?>
</section>
<footer>
<a href="#" class="next button">Next Step »</a>
<?php
if ($bigtree["form_action"] == "create") {
?>
<input type="submit" name="ptype" value="Create" <?php
if ($bigtree["access_level"] != "p") {
?>
class="blue" <?php
}
?>
/>
示例14:
<?php
$reply_all = true;
include BigTree::path("admin/modules/dashboard/messages/reply.php");
示例15:
?>
"></span></a>
</li>
<?php
}
?>
</ul>
</fieldset>
<fieldset>
<input type="checkbox" name="gbp[enabled]" id="gbp_on" <?php
if (isset($gbp["enabled"]) && $gbp["enabled"]) {
?>
checked="checked" <?php
}
?>
/>
<label class="for_checkbox">Enable Advanced Permissions</label>
</fieldset>
</section>
<?php
include BigTree::path("admin/modules/developer/modules/_gbp.php");
?>
<footer>
<input type="submit" class="button blue" value="Create" />
</footer>
</form>
</div>
<?php
include BigTree::path("admin/modules/developer/modules/_js.php");