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


PHP entry::check_right方法代码示例

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


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

示例1: array

    for ($i = 0; $i < 8; $i++) {
        $r = $right;
        $r['right_num'] = $i;
        $r['right_checked'] = array();
        if ($right['rights'] & pow(2, $i)) {
            $r['right_checked'][] = array();
        }
        $right['right'][$i] = $r;
    }
    return $right;
}
$output->secure();
$entry = new entry();
$entry->get();
$entry->load();
$entry->check_right('rights');
$changed = false;
if (isset($_POST['rights'])) {
    $entry->update_rights($_POST['rights']);
    $changed = true;
}
if (isset($_POST['new_rights'])) {
    $entry->create_rights($_POST['new_rights']);
    $changed = true;
}
if ($changed) {
    redirect('rights.php?id=' . $entry->data['id']);
}
$v['id'] = $entry->id;
$v['entry'] = $entry->format('entry.html');
$rights = rights_of($entry->data['id']);
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:31,代码来源:rights.php

示例2: entry

<?php

/*
 * This file is part of Infoschool - a web based school intranet.
 * Copyright (C) 2006 Maikel Linke
 */
include 'var.php';
$output->secure();
$entry = new entry();
$entry->get();
$entry->load();
$entry->check_right('read');
$entry->load_answers($max_depth, 'read');
$v['entry'] = $entry->format('entry.html');
$v['history'] = $entry->fdata['history'];
$v['answers'] = format_answers($entry);
$content = new tmpl('entry_answers.html', $v);
$output->out($content);
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:18,代码来源:entry.php

示例3: entry

<?php

/*
 * This file is part of Infoschool - a web based school intranet.
 * Copyright (C) 2006 Maikel Linke
 */
include 'var.php';
$output->secure();
$entry = new entry();
$entry->get();
$entry->load();
$entry->check_right('edit');
if (!$entry->right_edit()) {
    redirect('./');
}
if (isset($_POST['entry'])) {
    $entry->update($_POST['entry']);
    redirect('entry.php?id=' . $entry->data['id']);
}
$content = $entry->format('edit.html');
$output->out($content);
开发者ID:BackupTheBerlios,项目名称:infoschool-svn,代码行数:21,代码来源:edit.php


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