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


PHP admin::ami_group_member方法代碼示例

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


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

示例1: intval

} else {
    $section_id = intval($_POST['section_id']);
}
// $js_back = "javascript: history.go(-1);";
$js_back = ADMIN_URL . '/pages/modify.php?page_id=' . $page_id;
if (!$admin->checkFTAN()) {
    $admin->print_header();
    $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back);
}
// After check print the header
$admin->print_header();
// Get perms
$sql = 'SELECT `admin_groups`,`admin_users` ' . 'FROM `' . TABLE_PREFIX . 'pages` ' . 'WHERE `page_id` = ' . $page_id;
$results = $database->query($sql);
$results_array = $results->fetchRow();
if (!$admin->ami_group_member($results_array['admin_users']) && !$admin->is_group_match($admin->get_groups_id(), $results_array['admin_groups'])) {
    $admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
}
// Get page module
$sql = 'SELECT `module` FROM `' . TABLE_PREFIX . 'sections` ' . 'WHERE `page_id`=' . $page_id . ' AND `section_id`=' . $section_id;
$module = $database->get_one($sql);
if (!$module) {
    $admin->print_error($database->is_error() ? $database->get_error() : $MESSAGE['PAGES_NOT_FOUND']);
}
// Update the pages table
$now = time();
$sql = 'UPDATE `' . TABLE_PREFIX . 'pages` ' . 'SET `modified_when`=' . $now . ', ' . '`modified_by`=' . $admin->get_user_id() . ' ' . 'WHERE `page_id`=' . $page_id;
$database->query($sql);
// Include the modules saving script if it exists
if (file_exists(WB_PATH . '/modules/' . $module . '/save.php')) {
    include_once WB_PATH . '/modules/' . $module . '/save.php';
開發者ID:wyg3958,項目名稱:WebsiteBaker_CommunityEdition,代碼行數:31,代碼來源:save.php

示例2: elseif

                    } elseif ($type == 'languages') {
                        load_language($dir . '/' . $file);
                    }
                }
            }
            closedir($handle);
        }
    }
    $sql = 'DELETE FROM `' . TABLE_PREFIX . 'settings` WHERE `name`=\'FINALIZE_SETUP\'';
    if ($database->query($sql)) {
    }
}
// ---------------------------------------
$msg = '<br />';
// check if it is neccessary to start the uograde-script
if ($admin->ami_group_member('1') && file_exists(WB_PATH . '/upgrade-script.php')) {
    // check if it is neccessary to start the uograde-script
    $oldVersion = '';
    /*
        $oldVersion  = ''.WB_VERSION.(@WB_SP ? : '');
        $newVersion  = ''.VERSION.( @SP ? : '');
    */
    $oldVersion = trim('' . WB_VERSION . '+' . WB_REVISION . '+' . (defined('WB_SP') ? WB_SP : ''), '+');
    $newVersion = trim('' . VERSION . '+' . REVISION . '+' . (defined('SP') ? SP : ''), '+');
    if (version_compare($oldVersion, $newVersion, '<') === true) {
        if (!headers_sent()) {
            header('Location: ' . WB_URL . '/upgrade-script.php');
            exit;
        } else {
            echo "<p style=\"text-align:center;\"> The <strong>upgrade script</strong> could not be start automatically.\n" . "Please click <a style=\"font-weight:bold;\" " . "href=\"" . WB_URL . "/upgrade-script.php\">on this link</a> to start the script!</p>\n";
            exit;
開發者ID:WebsiteBaker-modules,項目名稱:WB-Portable,代碼行數:31,代碼來源:index.php


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