本文整理汇总了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']);
示例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);
示例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);