本文整理汇总了PHP中Forms::checkPermission方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::checkPermission方法的具体用法?PHP Forms::checkPermission怎么用?PHP Forms::checkPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::checkPermission方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Lot
<p class="form-title">Detalle de Lote</p>
<?php
if (!Forms::checkPermission(FORM_LOT_EDIT)) {
return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
require_once 'inc/class.lot.php';
require_once 'inc/class.formatter.php';
$lot = new Lot();
$item = new Item();
$store = new Store();
$lotid = isset($_GET['lot']) && is_numeric($_GET['lot']) ? $_GET['lot'] : 0;
if ($lot->read($lotid)) {
$item->read($lot->itemid);
$store->read($lot->storeid);
}
include 'inc/widget/error.php';
?>
<form method="post">
<table class="form">
<tr>
<td class="label">Lote Nro.:</td>
<td><?php
echo $lot->id;
?>
</td>
</tr>
<tr>
<td class="label">Producto:</td>
<td><?php
示例2:
<p class="form-title">Listado de Compras</p>
<?php
if (!Forms::checkPermission(FORM_PURCHASE_LIST)) {
return;
}
require 'inc/class.purchase.php';
require 'inc/class.formatter.php';
$purchases = Purchase::getAll("`date`", "DESC");
?>
<table class="default">
<thead>
<tr>
<th style="width:8em">Código</th>
<th style="width:8em">Fecha</th>
<th style="width:12em">Proveedor</th>
<th>Estado</th>
<th>Observación</th>
<th style="width:8em">Monto <?php
echo SB_CURRENCY;
?>
</th>
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($purchases as $purchase) {
示例3: isset
<?php
if (!Forms::checkPermission(FORM_USER_DETAIL)) {
return;
}
require 'inc/class.store.php';
require 'inc/class.user.php';
require_once 'inc/class.log.php';
$userid = isset($_GET['user']) && is_numeric($_GET['user']) ? $_GET['user'] : -1;
$user = new User();
$store = new Store();
if (!$user->read($userid)) {
$log = Log::getInstance();
$log->addError("Información de Usuario no disponible");
} else {
if ($user->storeid) {
$store->read($user->storeid);
}
}
?>
<p class="form-title">Información de Usuario</p>
<?php
include 'inc/widget/error.php';
?>
<table class="form">
<tbody>
<tr>
<td class="label">Nombre:</td>
<td><?php
echo $user->firstname;
?>
示例4:
<p class="form-title">Usuarios</p>
<?php
if (!Forms::checkPermission(FORM_USER_LIST)) {
return;
}
require 'inc/class.user.php';
$users = User::getAll();
?>
<table class="default">
<thead>
<tr>
<th style="width:10em">Usuario</th>
<th style="width:15em">Nombre</th>
<th style="width:15em">Apellido</th>
<th style="width:10em">Email</th>
<th style="width:8em">Teléfono</th>
<th>Estado</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($users as $row) {
echo "<tr><td>{$row['username']}</td>" . "<td>{$row['firstname']}</td>" . "<td>{$row['lastname']}</td>" . "<td>{$row['email']}</td>" . "<td>{$row['phone']}</td>" . "<td class='date'>" . ($row['active'] == 1 ? ACTIVE_ON : ACTIVE_OFF) . "</td>" . "<td class='ui-state-default'><a href='index.php?pages=user_detail&user={$row['id']}'>" . ICON_ZOOMIN . "</a></td>" . "<td class='ui-state-default'><a href='index.php?pages=user_edit&user={$row['id']}'>" . ICON_PENCIL . "</a></td></tr>";
}
?>
</tbody>
</table>
<script type="text/javascript">
jQuery(document).ready(function(){
示例5: Lot
<p class="form-title">Detalle de Lote</p>
<?php
if (!Forms::checkPermission(FORM_LOT_DETAIL)) {
return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
require_once 'inc/class.lot.php';
require_once 'inc/class.formatter.php';
$lot = new Lot();
$item = new Item();
$store = new Store();
$lotid = isset($_GET['lot']) && is_numeric($_GET['lot']) ? $_GET['lot'] : 0;
if ($lot->read($lotid)) {
$item->read($lot->itemid);
$store->read($lot->storeid);
}
include 'inc/widget/error.php';
?>
<table class="form">
<tr>
<td class="label">Lote Nro.:</td>
<td><?php
echo $lot->id;
?>
</td>
</tr>
<tr>
<td class="label">Producto:</td>
<td><?php
示例6: isset
<p class="form-title">Listado de Lotes</p>
<?php
if (!Forms::checkPermission(FORM_LOT_LIST)) {
return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
require_once 'inc/class.queries.php';
$itemid = isset($_GET['item']) && is_numeric($_GET['item']) ? $_GET['item'] : "";
$storeid = isset($_GET['store']) && is_numeric($_GET['store']) ? $_GET['store'] : "";
$stores = Store::getAllActive("name");
$lots = Queries::getLotsFromItem($itemid, $storeid);
$item = new Item();
if ($itemid) {
$item->read($itemid);
}
include 'inc/widget/error.php';
?>
<form action="index.php" method="GET">
<input type="hidden" name="pages" value="lot_list"/>
<input type="hidden" name="item" value="<?php
echo $itemid;
?>
"/>
Ver lotes por almacen:
<select name="store">
<option value="">- Todos -</option>
<?php
foreach ($stores as $store) {
echo "<option value='{$store->id}'" . ($store->id == $storeid ? " selected='selected'" : "") . ">{$store->name}</option>";
示例7: isset
<p class="form-title">Modificación de Cliente</p>
<?php
if (!Forms::checkPermission(FORM_CUSTOMER_EDIT)) {
return;
}
require_once 'inc/class.customer.php';
require_once 'inc/class.log.php';
$customerid = isset($_GET['customer']) ? $_GET['customer'] : "";
$log = Log::getInstance();
$customer = new Customer();
if ($customerid) {
$customer->read($customerid);
} else {
$log->addError("Cliente solicitado no es válido.");
}
include 'inc/widget/error.php';
if (!isset($_POST['page']) && $log->isError()) {
return;
}
if (isset($_POST['customerid']) && isset($_POST['page']) && !$log->isError()) {
include 'inc/widget/success.php';
}
?>
<form action="" method="post">
<table class="form">
<tbody>
<tr>
<td class="label">Nombre:</td>
<td><input name="name" type="text" id="name" value="<?php
echo $customer->name;
?>
示例8: isset
<p class="form-title">Registro de Nuevo Usuario</p>
<?php
if (!Forms::checkPermission(FORM_USER_NEW)) {
return;
}
require_once 'inc/class.store.php';
$stores = Store::getAllActive("name", "ASC");
$firstname = isset($_POST['firstname']) ? $_POST['firstname'] : "";
$lastname = isset($_POST['lastname']) ? $_POST['lastname'] : "";
$username = isset($_POST['username']) ? $_POST['username'] : "";
$passwd = isset($_POST['passwd']) ? $_POST['passwd'] : "";
$ci = isset($_POST['ci']) ? $_POST['ci'] : "";
$address = isset($_POST['address']) ? $_POST['address'] : "";
$phone = isset($_POST['phone']) ? $_POST['phone'] : "";
$role = isset($_POST['role']) ? $_POST['role'] : "";
$store = isset($_POST['store']) ? $_POST['store'] : "";
$email = isset($_POST['email']) ? $_POST['email'] : "";
$active = true;
if (isset($_POST['page'])) {
$active = isset($_POST['active']);
}
include 'inc/widget/error.php';
?>
<form action="" method="POST" enctype="multipart/form-data">
<table class="form">
<tbody>
<tr>
<td class="label">Nombre:</td>
<td><input name="firstname" type="text" value="<?php
echo $firstname;
?>
示例9: isset
<p class="form-title">Venta</p>
<?php
if (!Forms::checkPermission(FORM_SELL_EDIT)) {
return;
}
require 'inc/class.sell.php';
require 'inc/class.formatter.php';
$sellid = isset($_GET['sell']) && is_numeric($_GET['sell']) ? $_GET['sell'] : false;
$log = Log::getInstance();
$isValid = true;
if (!$sellid) {
$log->addError("No existen datos de Venta solicitada.");
$isValid = false;
}
$sell = new Sell();
if (!$sell->read($sellid)) {
$log->addError("No existen datos de Venta solicitada.");
$isValid = false;
}
$details = SellDetail::getAll($sellid);
$payments = SellPayment::getAll($sellid);
include 'inc/widget/error.php';
if (isset($_POST['page']) && isset($_POST['sell']) && !$log->isError()) {
include 'inc/widget/success.php';
}
if ($isValid) {
?>
<form action="" method="POST" name="form1">
<table class="form">
<tr>
<td class="label">Venta Nro.:</td>
示例10:
<p class="form-title">Registro de nueva compra</p>
<?php
if (!Forms::checkPermission(FORM_PURCHASE_NEW)) {
return;
}
include 'inc/widget/error.php';
?>
<form method="POST" name="form1" action="">
<input type="hidden" value="<?php
echo FORM_PURCHASE_NEW;
?>
" name="page"/>
<table class="form">
<tr>
<td class="label">Código:</td>
<td><input type="text" size="16" name="code" /> <span class="mandatory">*</span></td>
</tr>
<tr>
<td class="label">Fecha:</td>
<td><input type="text" size="16" name="date" id="date" /> <span class="mandatory">*</span></td>
</tr>
<tr>
<td class="label">Anticipo:</td>
<td><input type="text" size="16" name="prepayment" value="0"/><?php
echo SB_CURRENCY;
?>
</td>
</tr>
<tr>
<td class="label">Proveedor:</td>
<td><input type="text" size="30" name="provider" /> <span class="mandatory">*</span></td>
示例11: isset
<p class="form-title">Registro de Venta</p>
<?php
if (!Forms::checkPermission(FORM_SELL_NEW)) {
return;
}
require_once 'inc/class.session.php';
require_once 'inc/class.store.php';
require_once 'inc/class.lot.php';
require_once 'inc/class.customer.php';
$session = Session::getInstance();
$stores = Store::getAllActive("name", "ASC");
$storeid = isset($_GET['store']) ? $_GET['store'] : "";
$lots = is_numeric($storeid) ? Lot::getAllFromStore($storeid) : array();
include 'inc/widget/error.php';
?>
<form action="" method="GET" name="form1">
<table class="form">
<tr>
<td class="label" style="width:9em">Almacen:</td>
<td>
<input type="hidden" name="pages" value="sell_new"/>
<select id="store_selector" name="store">
<option value="">-Seleccionar Almacen-</option>
<?php
foreach ($stores as $store) {
echo "<option value='{$store->id}'" . ($store->id == $storeid ? " selected='selected'" : "") . ">{$store->name}</option>";
}
?>
</select>
<span class="mandatory">*</span>
</td>
示例12: isset
<p class="form-title">Información de Cliente</p>
<?php
if (!Forms::checkPermission(FORM_CUSTOMER_DETAIL)) {
return;
}
require 'inc/class.customer.php';
require_once 'inc/class.log.php';
$log = Log::getInstance();
$customerid = isset($_GET['customer']) && is_numeric($_GET['customer']) ? $_GET['customer'] : "";
$customer = new Customer();
if ($customerid) {
$customer->read($customerid);
} else {
$log->addError("Cliente solicitado no es válido.");
}
include 'inc/widget/error.php';
if (!$log->isError()) {
?>
<table class="form">
<tbody>
<tr>
<td class="label">Nombre:</td>
<td><?php
echo $customer->name;
?>
</td>
</tr>
<tr>
<td class="label">NIT:</td>
<td><?php
示例13:
<p class="form-title">Listado de Ventas</p>
<?php
if (!Forms::checkPermission(FORM_SELL_LIST)) {
return;
}
require 'inc/class.sell.php';
require 'inc/class.formatter.php';
$selles = Sell::getAll("`date`", "DESC");
?>
<table class="default">
<thead>
<tr>
<th style="width:8em">Venta Nro.</th>
<th style="width:8em">Fecha</th>
<th style="width:12em">Cliente</th>
<th>Estado</th>
<th style="width:8em">Monto <?php
echo SB_CURRENCY;
?>
</th>
<th style="width:8em">Saldo <?php
echo SB_CURRENCY;
?>
</th>
<th colspan="2"> </th>
</tr>
</thead>
<tbody>
<?php
foreach ($selles as $sell) {
示例14: isset
<p class="form-title">Registro de Nuevo Lote</p>
<?php
if (!Forms::checkPermission(FORM_LOT_NEW)) {
return;
}
require_once 'inc/class.item.php';
require_once 'inc/class.store.php';
$db = Database::getInstance();
$itemid = isset($_GET['item']) && is_numeric($_GET['item']) ? $_GET['item'] : "";
$storeid = isset($_GET['store']) && is_numeric($_GET['store']) ? $_GET['store'] : "";
$item = new Item();
$store = new Store();
if ($itemid) {
$item->read($itemid);
}
if ($storeid) {
$store->read($storeid);
}
include 'inc/widget/error.php';
?>
<form action="" method="post">
<table class="form">
<tr>
<td class="label">Nombre:</td>
<td>
<?php
if ($itemid) {
echo "<input type='hidden' name='itemid' value='{$itemid}'/><span>{$item->name}, {$item->type}</span>";
} else {
$items = Item::getAll("name", "");
示例15: isset
<p class="form-title">Datos de Usuario</p>
<?php
if (!Forms::checkPermission(FORM_USER_EDIT)) {
return;
}
require_once 'inc/class.store.php';
require_once 'inc/class.user.php';
require_once 'inc/class.log.php';
$userid = isset($_GET['user']) ? $_GET['user'] : "";
$user = new User();
$stores = Store::getAllActive("name", "ASC");
$log = Log::getInstance();
if ($userid) {
$user->read($userid);
}
include 'inc/widget/error.php';
if (isset($_POST['page']) && isset($_POST['user']) && !$log->isError()) {
include 'inc/widget/success.php';
}
?>
<form action="" method="POST" enctype="multipart/form-data">
<table class="form">
<tbody>
<tr>
<td class="label">Nombre:</td>
<td><input name="firstname" type="text" value="<?php
echo $user->firstname;
?>
" size="60"/> <span class="mandatory">*</span></td>
</tr>
<tr>