本文整理汇总了PHP中Recipe::havePermission方法的典型用法代码示例。如果您正苦于以下问题:PHP Recipe::havePermission方法的具体用法?PHP Recipe::havePermission怎么用?PHP Recipe::havePermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Recipe
的用法示例。
在下文中一共展示了Recipe::havePermission方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: if
echo $smellyfish_base_uri;
?>
editAll.php">
<? if (strlen($cat) != 0) {?>
<input type="hidden" name="cat" value="<?php
echo $cat;
?>
">
<? } ?>
<p>
<table border="0" cellpadding="2" cellspacing="0">
<? $bg = FALSE; ?>
<? foreach ($all as $r) { ?>
<? include("recipe_line.php"); ?>
<? } ?>
<? if (Recipe::havePermission("CHANGE")) { ?>
<tr>
<td colspan="5">
<input type="submit" value="<?php
echo Text::getText("Save");
?>
">
</td>
</tr>
<? } ?>
</table>
</p>
</form>
<? } else { ?>
<? if ($c == NULL) { ?>
<?php
示例2: if
?>
</a>
</td>
</tr>
<tr class="navitem">
<td class="navitem">
<a href="<?php
echo $smellyfish_base_uri;
?>
search.php"><?php
echo Text::getText("Search");
?>
</a>
</td>
</tr>
<? if (Recipe::havePermission("ADD")) { ?>
<tr class="navitem">
<td class="navitem">
<a href="<?php
echo $smellyfish_base_uri;
?>
add.php"><?php
echo Text::getText("Add");
?>
</a>
</td>
</tr>
<? } ?>
<tr class="navitem">
<td class="navitem">
<a href="<?php
示例3: if
echo $r->getId();
?>
"><?php
echo Text::getText("Print");
?>
</a>
<? if (Recipe::havePermission("CHANGE")) { ?>
<a href="editkupu.php?id=<?php
echo $r->getId();
?>
"><?php
echo Text::getText("Edit");
?>
</a>
<? } ?>
<? if (Recipe::havePermission("DELETE")) { ?>
<a href="delete.php?id=<?php
echo $r->getId();
?>
" onClick="return confirm('<?php
echo Text::getText("ConfirmDelete");
?>
')"><?php
echo Text::getText("Delete");
?>
</a>
<? } ?>
</td>
</tr>
</table>
</p>
示例4: include
$r->setSteps($_REQUEST['steps']);
$cat = $_REQUEST['cat'];
if (strlen($cat) > 0) {
$c = Category::getById($cat);
$r->setCategory($c);
}
if (!Recipe::havePermission("ADD")) {
$errMsg=Text::getText("You are not allowed to add recipes.");
include("error.php");
exit;
}
$action = $_REQUEST['action'];
if ($action == "save" && Recipe::havePermission("ADD")) {
if ($_REQUEST['title'] != "") {
if ($_FILES['photo']['size'] != 0) {
$filename = $_FILES['photo']['name'];
$extension = strrchr($filename, '.');
if ($extension != ".jpg") {
$r->insert();
header("Location: edit.php?id=".$r->getId()."&err=OnlyJpegFiles");
} else {
$r->hasPhoto(TRUE);
$r->insert();
$r->setPhoto($_FILES['photo']['tmp_name'], $extension);
header("Location: view.php?id=".$r->getId());
}
} else {
$r->insert();