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


PHP admin::checkFTAN方法代碼示例

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


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

示例1: dirname

// Print admin header
if (!defined('WB_PATH')) {
    require dirname(dirname(__DIR__)) . '/config.php';
}
if (!class_exists('admin', false)) {
    require WB_PATH . '/framework/class.admin.php';
}
// suppress to print the header, so no new FTAN will be set
if (!$bAdvanced) {
    $admin = new admin('Settings', 'settings_basic', false);
} else {
    $admin = new admin('Settings', 'settings_advanced', false);
}
// Create a javascript back link
$js_back = ADMIN_URL . '/settings/index.php?advanced=' . $bAdvanced;
if (!$admin->checkFTAN()) {
    $admin->print_header();
    $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back);
}
$admin->print_header();
$TOKENS = unserialize($_SESSION['TOKENS']);
$array = $_POST;
ksort($array);
$aInputs = array();
$aOutputs = array();
$sql = 'SELECT `name`, `value` FROM `' . TABLE_PREFIX . 'settings` ' . 'ORDER BY `name`';
if ($oSettings = $database->query($sql)) {
    while ($aSetting = $oSettings->fetchRow(MYSQLI_ASSOC)) {
        $aOutputs['_POST'][$aSetting['name']] = $aSetting['value'];
    }
}
開發者ID:WebsiteBaker-modules,項目名稱:WB-Portable,代碼行數:31,代碼來源:save.php

示例2: dirname

 * @requirements    PHP 5.3.6 and higher
 * @version         $Id: save_droplet.php 1503 2011-08-18 02:18:59Z Luisehahne $
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb_svn/wb280/tags/2.8.3/wb/modules/droplets/save_droplet.php $
 * @lastmodified    $Date: 2011-08-18 04:18:59 +0200 (Do, 18. Aug 2011) $
 *
 */
require dirname(dirname(dirname(__DIR__))) . '/config.php';
if (!class_exists('admin', false)) {
    require WB_PATH . '/framework/class.admin.php';
}
// Include WB admin wrapper script
$admintool_link = ADMIN_URL . '/admintools/index.php';
$ToolUrl = ADMIN_URL . '/admintools/tool.php?tool=droplets';
$admin = new admin('admintools', 'admintools', false);
$droplet_id = intval($admin->checkIDKEY('droplet_id', false, 'post'));
if (!$admin->checkFTAN() || !$droplet_id) {
    $admin->print_header();
    $admin->print_error($droplet_id . ' ) ' . $MESSAGE['GENERIC_SECURITY_ACCESS'], $ToolUrl);
}
$admin->print_header();
// Validate all fields
if ($admin->get_post('title') == '') {
    $admin->print_error($MESSAGE['GENERIC_FILL_IN_ALL'] . ' ( Droplet Name )', $ToolUrl);
} else {
    $title = $admin->add_slashes($admin->get_post('title'));
    $active = (int) $admin->get_post('active');
    $admin_view = (int) $admin->get_post('admin_view');
    $admin_edit = (int) $admin->get_post('admin_edit');
    $show_wysiwyg = (int) $admin->get_post('show_wysiwyg');
    $description = $admin->add_slashes($admin->get_post('description'));
    $tags = array('<?php', '?>', '<?');
開發者ID:WebsiteBaker-modules,項目名稱:WB-Portable,代碼行數:31,代碼來源:save_droplet.php


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