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


PHP BigTree::redirect方法代码示例

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


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

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

示例2: end

<?php

$page = end($bigtree["path"]);
$page_data = $cms->getPendingPage($page);
$admin->deletePage($page);
BigTree::redirect(ADMIN_ROOT . "pages/view-tree/" . $page_data["parent"] . "/");
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:6,代码来源:delete.php

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

示例4: end

<?php

$item = $admin->getSetting(end($bigtree["path"]));
if ($item["system"]) {
    $admin->growl("Developer", "Access Denied", "error");
    BigTree::redirect(DEVELOPER_ROOT . "settings/");
} else {
    $success = $admin->updateSetting(end($bigtree["path"]), $_POST);
    if ($success) {
        $admin->growl("Developer", "Updated Setting");
        BigTree::redirect(DEVELOPER_ROOT . "settings/");
    } else {
        $_SESSION["bigtree_admin"]["developer"]["setting_data"] = $_POST;
        $_SESSION["bigtree_admin"]["developer"]["error"] = "The ID you specified is already in use by another Setting.";
        BigTree::redirect(DEVELOPER_ROOT . "settings/edit/" . end($bigtree["path"]) . "/");
    }
}
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:17,代码来源:update.php

示例5: oAuthRedirect

 function oAuthRedirect()
 {
     $this->Settings["token_secret"] = "";
     $admin = new BigTreeAdmin();
     $r = $this->callAPI("http://www.flickr.com/services/oauth/request_token", "GET", array("oauth_callback" => $this->ReturnURL));
     parse_str($r);
     if ($oauth_callback_confirmed) {
         $this->Settings["token"] = $oauth_token;
         $this->Settings["token_secret"] = $oauth_token_secret;
         header("Location: http://www.flickr.com/services/oauth/authorize?perms=delete&oauth_token=" . $oauth_token);
         die;
     } else {
         $admin->growl($oauth_problem, "Flickr API", "error");
         BigTree::redirect(ADMIN_ROOT . "developer/services/flickr/");
     }
 }
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:16,代码来源:flickr.php

示例6: is_array

        }
        $use_cases = is_array($type["use_cases"]) ? sqlescape(json_encode($type["use_cases"])) : sqlescape($type["use_cases"]);
        $self_draw = $type["self_draw"] ? "'on'" : "NULL";
        sqlquery("INSERT INTO bigtree_field_types (`id`,`name`,`use_cases`,`self_draw`) VALUES ('" . sqlescape($type["id"]) . "','" . sqlescape($type["name"]) . "','{$use_cases}',{$self_draw})");
    }
}
// Import files
foreach ($json["files"] as $file) {
    BigTree::copyFile(SERVER_ROOT . "cache/package/{$file}", SERVER_ROOT . $file);
}
// Run SQL
foreach ($json["sql"] as $sql) {
    sqlquery($sql);
}
// Empty view cache
sqlquery("DELETE FROM bigtree_module_view_cache");
// 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/");
// Clear module class cache and field type cache.
@unlink(SERVER_ROOT . "cache/bigtree-module-class-list.json");
@unlink(SERVER_ROOT . "cache/bigtree-form-field-types.json");
sqlquery("INSERT INTO bigtree_extensions (`id`,`type`,`name`,`version`,`last_updated`,`manifest`) VALUES ('" . sqlescape($json["id"]) . "','package','" . sqlescape($json["title"]) . "','" . sqlescape($json["version"]) . "',NOW(),'" . sqlescape(json_encode($json)) . "')");
sqlquery("SET foreign_key_checks = 1");
$admin->growl("Developer", "Installed Package");
BigTree::redirect(DEVELOPER_ROOT . "packages/install/complete/");
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:30,代码来源:process.php

示例7: array

<?php

BigTree::globalizePOSTVars();
$fields = array();
foreach ($_POST["type"] as $key => $val) {
    $field = json_decode(str_replace(array("\r", "\n"), array('\\r', '\\n'), $_POST["options"][$key]), true);
    $field["type"] = $val;
    $field["title"] = htmlspecialchars($_POST["titles"][$key]);
    $field["subtitle"] = htmlspecialchars($_POST["subtitles"][$key]);
    $fields[$key] = $field;
}
$admin->updateModuleForm(end($bigtree["path"]), $title, $table, $fields, $preprocess, $callback, $default_position, $return_view, $return_url, $tagging);
$action = $admin->getModuleActionForForm(end($bigtree["path"]));
$admin->growl("Developer", "Updated Module Form");
if ($_POST["return_page"]) {
    BigTree::redirect($_POST["return_page"]);
} else {
    BigTree::redirect(DEVELOPER_ROOT . "modules/edit/" . $action["module"] . "/");
}
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:19,代码来源:update.php

示例8: makeSecure

 function makeSecure()
 {
     if (!$_SERVER["HTTPS"]) {
         BigTree::redirect("https://" . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"], "301");
     }
     $this->Secure = true;
 }
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:7,代码来源:cms.php

示例9:

		<a class="button blue" href="<?php 
    echo $page_link . $page_vars;
    ?>
">Try Again</a>
		<a class="button" href="<?php 
    echo DEVELOPER_ROOT;
    ?>
extensions/">Return to Extensions List</a>
	</footer>
</div>
<?php 
} else {
    // If we're not using local install and the config settings only allow for HTTPS logins, redirect
    $secure = !empty($_SERVER["HTTPS"]) && $_SERVER['HTTPS'] !== "off" || $_SERVER["SERVER_PORT"] == 443;
    if ($updater->Method != "Local" && $bigtree["config"]["force_secure_login"] && !$secure) {
        BigTree::redirect(str_replace("http://", "https://", $page_link) . "check-file/" . $page_vars);
    }
    ?>
<form method="post" action="<?php 
    echo $page_link;
    ?>
process/<?php 
    echo $page_vars;
    ?>
">
	<div class="container">
		<summary><h2>Upgrade Extension</h2></summary>
		<section>
			<?php 
    if ($updater->Method == "Local") {
        ?>
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:check-file.php

示例10:

<?php

$admin->deletePageDraft(end($bigtree["path"]));
BigTree::redirect(ADMIN_ROOT . "pages/edit/" . $page . "/");
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:4,代码来源:revert-change.php

示例11: array_reverse

        }
        // Draw the main page.
        include $bigtree["routed_inc"];
        // Draw the footers.
        $bigtree["routed_footers"] = array_reverse($bigtree["routed_footers"]);
        foreach ($bigtree["routed_footers"] as $footer) {
            include $footer;
        }
    } elseif ($bigtree["page"]["template"]) {
        if ($extension) {
            include SERVER_ROOT . "extensions/{$extension}/templates/basic/{$template}.php";
        } else {
            include SERVER_ROOT . "templates/basic/" . $bigtree["page"]["template"] . ".php";
        }
    } else {
        BigTree::redirect($bigtree["page"]["external"]);
    }
    // Check for standard sitemap
} else {
    if ($bigtree["path"][0] == "sitemap" && !$bigtree["path"][1]) {
        include SERVER_ROOT . "templates/basic/_sitemap.php";
        // We've got a 404, check for old routes or throw one.
    } else {
        // Let's check if it's in the old routing table.
        $cms->checkOldRoutes($bigtree["path"]);
        // It's not, it's a 404.
        if ($cms->handle404($_GET["bigtree_htaccess_url"])) {
            include SERVER_ROOT . "templates/basic/_404.php";
        }
    }
}
开发者ID:kalle0045,项目名称:BigTree-CMS,代码行数:31,代码来源:router.php

示例12: elseif

    } else {
        $redirect_url = ADMIN_ROOT . $bigtree["module"]["route"] . "/" . $redirect_append;
    }
    // If we specify a specific return URL...
} elseif ($bigtree["form"]["return_url"]) {
    $redirect_url = $bigtree["form"]["return_url"] . $redirect_append;
    // Otherwise just go back to the main module landing.
} else {
    $redirect_url = ADMIN_ROOT . $bigtree["module"]["route"] . "/" . $redirect_append;
}
// If we've specified a preview URL in our module and the user clicked Save & Preview, return to preview page.
if ($_POST["_bigtree_preview"]) {
    $admin->ungrowl();
    $redirect_url = $view["preview_url"] . $edit_id . "/?bigtree_preview_return=" . urlencode($bigtree["form_root"] . $edit_id . "/");
}
// If there's a callback function for this module, let's get'r'done.
if ($bigtree["form"]["callback"]) {
    call_user_func($bigtree["form"]["callback"], $edit_id, $item, $did_publish);
}
// Track resource allocation
$admin->allocateResources($bigtree["module"]["id"], $edit_id);
// Put together saved form information for the error or crop page in case we need it.
$edit_action = BigTreeAutoModule::getEditAction($bigtree["module"]["id"], $bigtree["form"]["id"]);
$_SESSION["bigtree_admin"]["form_data"] = array("view" => $view, "id" => $edit_id, "return_link" => $redirect_url, "edit_link" => ADMIN_ROOT . $bigtree["module"]["route"] . "/" . $edit_action["route"] . "/{$edit_id}/", "errors" => $bigtree["errors"], "crops" => $bigtree["crops"]);
if (count($bigtree["crops"])) {
    BigTree::redirect($bigtree["form_root"] . "crop/");
} elseif (count($bigtree["errors"])) {
    BigTree::redirect($bigtree["form_root"] . "error/");
} else {
    BigTree::redirect($redirect_url);
}
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:31,代码来源:process.php

示例13: unset

    $group = $admin->createModuleGroup($group_new, "on");
} else {
    $group = $group_existing;
}
$id = $admin->createModule($name, $group, $class, $table, $gbp, $icon, $route);
// Route was incorrect if we failed
if (!$id) {
    $_POST["group_existing"] = $group;
    unset($_POST["group_new"]);
    $_SESSION["bigtree_admin"]["saved"] = $_POST;
    $admin->growl("Developer", "Invalid Route");
    BigTree::redirect(DEVELOPER_ROOT . "modules/add/?error=route");
}
if (!$table) {
    $admin->growl("Developer", "Created Module");
    BigTree::redirect(DEVELOPER_ROOT . "modules/");
}
?>
<div class="container">
	<section>
		<h3><?php 
echo htmlspecialchars($name);
?>
</h3>
		<p>If you plan on programming this module manually, you can leave now. Otherwise, click the continue button below to setup the module's landing view.</p>
	</section>
	<footer>
		<a href="<?php 
echo DEVELOPER_ROOT;
?>
modules/views/add/?new_module=true&module=<?php 
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:31,代码来源:create.php

示例14: json_decode

$package = $admin->getPackage($bigtree["commands"][0]);
$j = json_decode($package["manifest"], true);
$_SESSION["bigtree_admin"]["developer"]["package"] = array("id" => $j["id"], "version" => $j["version"], "compatibility" => $j["compatibility"], "title" => $j["title"], "description" => $j["description"], "keywords" => implode(", ", $j["keywords"]), "author" => $j["author"], "files" => array(), "modules" => array(), "templates" => array(), "callouts" => array(), "settings" => array(), "feeds" => array(), "field_types" => array(), "tables" => array());
foreach ($j["components"] as $k => $v) {
    if ($k == "tables") {
        $tables = array();
        foreach ($v as $table) {
            $_SESSION["bigtree_admin"]["developer"]["package"]["tables"][] = "{$table}#structure";
        }
    } else {
        foreach ($v as $item) {
            $_SESSION["bigtree_admin"]["developer"]["package"][$k][] = $item["id"];
        }
    }
}
foreach ($j["licenses"] as $l => $d) {
    if (isset($available_licenses["Open Source"][$l])) {
        $_SESSION["bigtree_admin"]["developer"]["package"]["licenses"][] = $l;
    } elseif (isset($available_licenses["Closed Source"][$l])) {
        $_SESSION["bigtree_admin"]["developer"]["package"]["license"] = $l;
    } else {
        $_SESSION["bigtree_admin"]["developer"]["package"]["license_name"] = $l;
        $_SESSION["bigtree_admin"]["developer"]["package"]["license_url"] = $d;
    }
}
foreach ($j["files"] as $file) {
    $_SESSION["bigtree_admin"]["developer"]["package"]["files"][] = SERVER_ROOT . $file;
}
BigTree::redirect(DEVELOPER_ROOT . "packages/build/details/");
开发者ID:kurt-planet,项目名称:BigTree-CMS,代码行数:29,代码来源:edit.php

示例15:

<?php

BigTree::redirect("view-tree/0/");
开发者ID:matthisamoto,项目名称:Graphfan,代码行数:3,代码来源:default.php


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