本文整理汇总了PHP中Forms::isAllowed方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::isAllowed方法的具体用法?PHP Forms::isAllowed怎么用?PHP Forms::isAllowed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::isAllowed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkPermission
/**
*
* Enter description here ...
* @param unknown_type $form
*/
public static function checkPermission($form)
{
if (!Forms::isAllowed($form)) {
echo "Acceso Denegado.";
return false;
}
return true;
}
示例2: isset
<p class="form-title">Listado de Clientes</p>
<?php
if (!Forms::isAllowed(FORM_CUSTOMER_LIST)) {
return;
}
require 'inc/class.customer.php';
require 'inc/class.formatter.php';
$sortBy = isset($_GET['sort_by']) ? $_GET['sort_by'] : "";
$sortOrder = isset($_GET['sort_dir']) ? strtolower($_GET['sort_dir']) : "";
if (!$sortBy || !Customer::isField($sortBy)) {
$sortBy = "name";
}
if (!$sortOrder) {
$sortOrder = "a";
}
$customers = Customer::getAll($sortBy, $sortOrder == "d" ? "DESC" : "ASC");
?>
<table class="default">
<thead>
<tr>
<th style="width:27em"><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_LIST, Forms::getSort($sortBy, Customer::fieldName("name"), $sortOrder));
?>
">Nombre</a></th>
<th style="width:8em"><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_LIST, Forms::getSort($sortBy, Customer::fieldName("nit"), $sortOrder));
?>
">NIT</a></th>
<th><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_LIST, Forms::getSort($sortBy, Customer::fieldName("phone"), $sortOrder));
?>
示例3: array
<tr>
<td class="label">Dirección:</td>
<td><?php
echo $customer->address;
?>
</td>
</tr>
<tr>
<td class="label">E-Mail:</td>
<td><?php
echo $customer->email;
?>
</td>
</tr>
</tbody>
</table>
<br />
<?php
if (Forms::isAllowed(FORM_CUSTOMER_EDIT)) {
$params = array("customer" => "{$customerid}");
echo "<a href='" . Forms::getLink(FORM_CUSTOMER_EDIT, $params) . "' id='edit'>Editar Infomación</a>";
}
}
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#edit').button({
icons: {primary: 'ui-icon-pencil'}
})
})
</script>