本文整理汇总了PHP中Forms::getLink方法的典型用法代码示例。如果您正苦于以下问题:PHP Forms::getLink方法的具体用法?PHP Forms::getLink怎么用?PHP Forms::getLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Forms
的用法示例。
在下文中一共展示了Forms::getLink方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lot_add
function lot_add()
{
$session = Session::getInstance();
if (!$session->checkLogin()) {
return false;
}
$lot = new Lot();
$lot->itemid = isset($_POST['itemid']) && is_numeric($_POST['itemid']) ? $_POST['itemid'] : 0;
$lot->storeid = isset($_POST['storeid']) && is_numeric($_POST['storeid']) ? $_POST['storeid'] : 0;
$lot->boxes = isset($_POST['box']) ? $_POST['box'] : 0;
$lot->units = isset($_POST['units']) ? $_POST['units'] : 0;
$lot->stock = isset($_POST['stock']) ? $_POST['stock'] : 0;
$lot->active = isset($_POST['active']) ? $_POST['active'] : 0;
$lot->cost = isset($_POST['costo']) ? $_POST['costo'] : 0;
$lot->costMar = isset($_POST['tmar']) ? $_POST['tmar'] : 0;
$lot->costTer = isset($_POST['tter']) ? $_POST['tter'] : 0;
$lot->costAdu = isset($_POST['aduana']) ? $_POST['aduana'] : 0;
$lot->costBank = isset($_POST['tbank']) ? $_POST['tbank'] : 0;
$lot->costLoad = isset($_POST['cade']) ? $_POST['cade'] : 0;
$lot->costOther = isset($_POST['other']) ? $_POST['other'] : 0;
$lot->price = isset($_POST['pricef']) ? $_POST['pricef'] : 0;
$lot->gloss = isset($_POST['notes']) ? $_POST['notes'] : '';
if ($lot->add()) {
header("location:" . Forms::getLink(FORM_LOT_DETAIL, array("lot" => $lot->id)));
}
return false;
}
示例2: customer_add
function customer_add()
{
$customer = new Customer();
$customer->name = isset($_POST['name']) ? $_POST['name'] : "";
$customer->address = isset($_POST['address']) ? $_POST['address'] : "";
$customer->phone = isset($_POST['phone']) ? $_POST['phone'] : "";
$customer->cell = isset($_POST['cell']) ? $_POST['cell'] : "";
$customer->active = isset($_POST['active']) ? $_POST['active'] : 0;
$customer->email = isset($_POST['email']) ? $_POST['email'] : "";
$customer->nit = isset($_POST['nit']) ? $_POST['nit'] : "";
if ($customer->add()) {
$params = array("customer" => $customer->id);
header("location: " . Forms::getLink(FORM_CUSTOMER_DETAIL, $params));
exit;
}
return false;
}
示例3: array
echo $lot['price'];
?>
</td>
<td style="padding-left:1em"><?php
echo $lot['active'] == 1 ? ACTIVE_ON : ACTIVE_OFF;
?>
</td>
<td class="ui-state-default"><a href="<?php
echo Forms::getLink(FORM_LOT_DETAIL, array("lot" => $lot['id']));
?>
" title="Ver"><?php
echo ICON_ZOOMIN;
?>
</a></td>
<td class="ui-state-default"><a href="<?php
echo Forms::getLink(FORM_LOT_EDIT, array("lot" => $lot['id']));
?>
" title="Editar"><?php
echo ICON_PENCIL;
?>
</a></td>
</tr>
<?php
}
?>
</tbody>
<tfoot>
<?php
$res = $db->query("SELECT dl.idalmacen, " . "SUM(dl.stock) stock " . "FROM " . TBL_LOT . " dl INNER JOIN " . TBL_ITEM . " di ON dl.itemid=di.id " . "WHERE di.id={$itemid} AND dl.active=1 " . ($storeid ? "AND dl.idalmacen={$storeid} " : "") . "GROUP BY dl.idalmacen");
$stockTotal = 0;
while ($row = $db->getRow($res, 0)) {
示例4: foreach
foreach ($items as $item) {
$titem = "";
if ($item->type == 'Dvd-cd') {
$titem = "multiple";
} else {
if ($item->type == 'Estuches') {
$titem = "normal";
} else {
$titem = "stnd";
}
}
?>
<tr>
<?php
$urlLotNew = Forms::getLink(FORM_LOT_NEW, array("item" => $item->id, "store" => $store->id));
$urlLotList = Forms::getLink(FORM_LOT_LIST, array("item" => $item->id, "store" => $store->id));
?>
<td><a href="index.php?pages=modify&item=<?php
echo $titem;
?>
&id=<?php
echo $item->id;
?>
"><?php
echo $item->name;
?>
</a></td>
<td><?php
echo $item->type;
?>
</td>
示例5:
?>
</td>
<td style="padding-left:1em"><?php
echo $customer->active == 1 ? ICON_ACTIVE : ICON_INACTIVE;
?>
</td>
<td><?php
echo Formatter::text($customer->address);
?>
</td>
<td class="ui-state-default"><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_DETAIL, $params);
?>
"><?php
echo ICON_ZOOMIN;
?>
</a></td>
<td class="ui-state-default"><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_EDIT, $params);
?>
"><?php
echo ICON_PENCIL;
?>
</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
示例6:
<ul>
<?php
if (Forms::isAllowed(FORM_CUSTOMER_NEW)) {
?>
<li><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_NEW);
?>
">Nuevo</a></li>
<?php
}
?>
<?php
if (Forms::isAllowed(FORM_CUSTOMER_LIST)) {
?>
<li><a href="<?php
echo Forms::getLink(FORM_CUSTOMER_LIST);
?>
">Listado</a></li>
<?php
}
?>
</ul>
</li>
<li><a href="#">Ventas</a>
<ul>
<li><a href="index.php?pages=sell_new">Nuevo</a></li>
<li><a href="index.php?pages=sell_list">Listado</a></li>
<li><a href="index.php?pages=sell_outstanding">Por Cobrar</a></li>
</ul>
</li>
<li><a href="process_login.php">Salir</a></li>
示例7: 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>