当前位置: 首页>>代码示例>>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;未经允许,请勿转载。