當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Redirect::page方法代碼示例

本文整理匯總了PHP中Redirect::page方法的典型用法代碼示例。如果您正苦於以下問題:PHP Redirect::page方法的具體用法?PHP Redirect::page怎麽用?PHP Redirect::page使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Redirect的用法示例。


在下文中一共展示了Redirect::page方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deletePage

function deletePage($key)
{
    global $dbPages;
    global $Language;
    if ($dbPages->delete($key)) {
        Alert::set($Language->g('The page has been deleted successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to delete the page.');
    }
}
開發者ID:joryphillips,項目名稱:bludit,代碼行數:11,代碼來源:edit-page.php

示例2: addPage

function addPage($args)
{
    global $dbPages;
    global $Language;
    // Add the page.
    if ($dbPages->add($args)) {
        Alert::set($Language->g('Page added successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the page.');
    }
}
開發者ID:clstrfcuk,項目名稱:bludit,代碼行數:12,代碼來源:new-page.php

示例3: deletePost

function deletePost($key)
{
    global $dbPosts;
    global $Language;
    if ($dbPosts->delete($key)) {
        // Reindex tags, this function is in 70.posts.php
        reIndexTagsPosts();
        Alert::set($Language->g('The post has been deleted successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to delete the post.');
    }
}
開發者ID:clstrfcuk,項目名稱:bludit,代碼行數:13,代碼來源:edit-post.php

示例4: deletePage

function deletePage($key)
{
    global $dbPages;
    global $Language;
    if ($dbPages->delete($key)) {
        // Call the plugins after post created.
        Theme::plugins('afterPageDelete');
        Alert::set($Language->g('The page has been deleted successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to delete the page.');
    }
}
開發者ID:bayramlielxan,項目名稱:bludit,代碼行數:13,代碼來源:edit-page.php

示例5: addPost

function addPost($args)
{
    global $dbPosts;
    global $Language;
    // Add the page.
    if ($dbPosts->add($args)) {
        // Reindex tags, this function is in 70.posts.php
        reIndexTagsPosts();
        Alert::set($Language->g('Post added successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the post.');
    }
    return false;
}
開發者ID:hxii,項目名稱:bludit,代碼行數:15,代碼來源:new-post.php

示例6: addPage

function addPage($args)
{
    global $dbPages;
    global $Language;
    // Add the page, if the $key is FALSE the creation of the post failure.
    $key = $dbPages->add($args);
    if ($key) {
        // Call the plugins after page created.
        Theme::plugins('afterPageCreate');
        // Alert the user
        Alert::set($Language->g('Page added successfully'));
        Redirect::page('admin', 'manage-pages');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the page.');
    }
}
開發者ID:bayramlielxan,項目名稱:bludit,代碼行數:16,代碼來源:new-page.php

示例7: addPost

function addPost($args)
{
    global $dbPosts;
    global $Language;
    // Page status, published or draft.
    if (isset($args['publish'])) {
        $args['status'] = "published";
    } else {
        $args['status'] = "draft";
    }
    // Add the page.
    if ($dbPosts->add($args)) {
        Alert::set($Language->g('Post added successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the post.');
    }
}
開發者ID:joryphillips,項目名稱:bludit,代碼行數:18,代碼來源:new-post.php

示例8: addPost

function addPost($args)
{
    global $dbPosts;
    global $Language;
    // Add the page, if the $key is FALSE the creation of the post failure.
    $key = $dbPosts->add($args);
    if ($key) {
        // Reindex tags, this function is in 70.posts.php
        reIndexTagsPosts();
        // Call the plugins after post created.
        Theme::plugins('afterPostCreate');
        // Alert for the user
        Alert::set($Language->g('Post added successfully'));
        Redirect::page('admin', 'manage-posts');
    } else {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying to create the post.');
    }
    return false;
}
開發者ID:bayramlielxan,項目名稱:bludit,代碼行數:19,代碼來源:new-post.php

示例9: checkGet

function checkGet($args)
{
    global $Security;
    global $Language;
    global $Login;
    if ($Security->isBlocked()) {
        Alert::set($Language->g('IP address has been blocked') . '<br>' . $Language->g('Try again in a few minutes'));
        return false;
    }
    // Verify User sanitize the input
    if ($Login->verifyUserByToken($args['username'], $args['tokenEmail'])) {
        // Renew the tokenCRFS. This token will be the same inside the session for multiple forms.
        $Security->generateToken();
        Redirect::page('admin', 'dashboard');
        return true;
    }
    // Bruteforce protection, add IP to blacklist.
    $Security->addLoginFail();
    return false;
}
開發者ID:hxii,項目名稱:bludit,代碼行數:20,代碼來源:login-email.php

示例10: restore

 public function restore($file)
 {
     global $Language;
     // get the absolute path to $file
     $serveur = pluginBackup::full_path();
     // redirection
     $zip = new ZipArchive();
     $res = $zip->open($file);
     $removeDir = pluginBackup::removeDir(PATH_CONTENT);
     if ($res === TRUE) {
         $removeDir;
         // Y ESO PARA QUE?
         if (!is_dir(PATH_CONTENT) && (!@mkdir(PATH_CONTENT) || !@chmod(PATH_CONTENT, 0777))) {
         }
         // extract it to the path we determined above
         $zip->extractTo(PATH_CONTENT);
         $zip->close();
         Alert::set($Language->get("Archive is restored!"));
         Redirect::page('admin', 'configure-plugin/pluginBackup');
     } else {
         Alert::set($Language->get("There was a problem to restore the ZIP archive"));
         Redirect::page('admin', 'configure-plugin/pluginBackup');
     }
 }
開發者ID:clstrfcuk,項目名稱:bludit-plugins,代碼行數:24,代碼來源:plugin.php

示例11: defined

<?php

defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Check role
// ============================================================================
if ($Login->role() !== 'admin') {
    Alert::set($Language->g('you-do-not-have-sufficient-permissions'));
    Redirect::page('admin', 'dashboard');
}
// ============================================================================
// Main after POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
// ============================================================================
// Main after POST
// ============================================================================
$themes = buildThemes();
開發者ID:michaelctorres,項目名稱:bludit,代碼行數:20,代碼來源:themes.php

示例12: unset

// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    // Prevent editors to administrate other users.
    if ($Login->role() !== 'admin') {
        $_POST['username'] = $Login->username();
        unset($_POST['role']);
    }
    if (isset($_POST['delete-user-all'])) {
        deleteUser($_POST, true);
    } elseif (isset($_POST['delete-user-associate'])) {
        deleteUser($_POST, false);
    } elseif (!empty($_POST['new-password']) && !empty($_POST['confirm-password'])) {
        setPassword($_POST['username'], $_POST['new-password'], $_POST['confirm-password']);
    } else {
        editUser($_POST);
    }
}
// ============================================================================
// Main after POST
// ============================================================================
if ($Login->role() !== 'admin') {
    $layout['parameters'] = $Login->username();
}
$_user = $dbUsers->getDb($layout['parameters']);
// If the user doesn't exist, redirect to the users list.
if ($_user === false) {
    Redirect::page('admin', 'users');
}
$_user['username'] = $layout['parameters'];
開發者ID:veshinak,項目名稱:bludit,代碼行數:31,代碼來源:edit-user.php

示例13: foreach

// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
$_Plugin = false;
$pluginClassName = $layout['parameters'];
foreach ($plugins['all'] as $P) {
    if ($P->className() == $pluginClassName) {
        $_Plugin = $P;
    }
}
// Check if the plugin exists.
if ($_Plugin === false) {
    Redirect::page('admin', 'plugins');
}
// Check if the plugin has the method form()
if (!method_exists($_Plugin, 'form')) {
    Redirect::page('admin', 'plugins');
}
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $_Plugin->setDb($_POST);
    Alert::set($Language->g('the-changes-have-been-saved'));
}
// ============================================================================
// Main after POST
// ============================================================================
開發者ID:clstrfcuk,項目名稱:bludit,代碼行數:31,代碼來源:configure-plugin.php

示例14: defined

<?php

defined('BLUDIT') or die('Bludit CMS.');
// ============================================================================
// Variables
// ============================================================================
// ============================================================================
// Functions
// ============================================================================
// ============================================================================
// Main before POST
// ============================================================================
// ============================================================================
// POST Method
// ============================================================================
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $token = isset($_POST['token']) ? Sanitize::html($_POST['token']) : false;
    if (!$Security->validateToken($token)) {
        Log::set(__METHOD__ . LOG_SEP . 'Error occurred when trying validate the token. Token ID: ' . $token);
        // Destroy the session.
        Session::destroy();
        // Redirect to login panel.
        Redirect::page('admin', 'login');
    } else {
        unset($_POST['token']);
    }
}
// ============================================================================
// Main after POST
// ============================================================================
開發者ID:roberthchan,項目名稱:bludit,代碼行數:30,代碼來源:99.security.php

示例15: write_shortcode

 public function write_shortcode()
 {
     global $Language;
     # Shortcode file Path
     $shortcodeFile = dirname(__FILE__) . DS . 'shortcodes.php';
     $shortcodes = isset($_POST['shortcodes']) ? $_POST['shortcodes'] : '';
     # Write in file
     file_put_contents($shortcodeFile, $shortcodes);
     # Write finish :)
     Alert::set($Language->get("Shortcodes updated!"));
     Redirect::page('admin', 'configure-plugin/pluginShorcode');
 }
開發者ID:Tetoq,項目名稱:bludit-plugins,代碼行數:12,代碼來源:plugin.php


注:本文中的Redirect::page方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。