本文整理汇总了PHP中item::getItems方法的典型用法代码示例。如果您正苦于以下问题:PHP item::getItems方法的具体用法?PHP item::getItems怎么用?PHP item::getItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item
的用法示例。
在下文中一共展示了item::getItems方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_form_html
function get_form_html($form_id, $id)
{
ob_start();
?>
<div id="head_div" style="height: 150px;
width: 320px; background-color: #ECECEC;
border-radius: 5px;margin-left: auto;display: none; ">
</div>
<div style="margin-top: 10px; background-color:transparent;padding-bottom: 30px;">
<style>
div#purchace_items td, div#purchace_items th{
border: 1px solid #21ACD7;
}
div#purchace_items tbody td{
padding: 5px 0 5px 5px;
}
div#purchace_items tbody td input,div#purchace_items tbody td select{
padding: 0;
border: 0;
margin: 0;
height: 100%;
width: 100%;
background-color: transparent;
}
</style>
<input type="text" id="search" placeholder="Enter Search Key here..." style="width: 100%; margin-left: 0px;" onkeyup="search()" />
<style>
img#search{
position: relative;
height: 20px;
width: 20px;
float: right;
top: -29px;
right: 10px;
}
</style>
<img id="search" src="../ui/images/search.png" onclick="search()" />
<div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">
<table id="items_table" style="border-collapse: collapse; width: 100%;
background-color: #fff; border-radius: 10px; color: #21ACD7;">
<thead style="text-align: center;">
<tr status="not_selected">
<th>
#
</th>
<th>
ID
</th>
<th>
ITEM NAME
</th>
<th>
ITEM CODE
</th>
<th style="">
MRP
</th>
<th style="">
UNIT
</th>
<th style="">
PURCHACE RATE
</th>
<th style="">
TAX
</th>
<th style="">
DISCOUNT(%)
</th>
</tr>
</thead>
<tbody style="padding-left: 3px; text-align: center; ">
<?php
$item = new item();
$items = $item->getItems();
$i = 0;
if ($items == NULL || sizeof($items) == 0) {
echo '<tr><td colspan="8"> No Item Found </td></tr>';
} else {
foreach ($items as $item) {
?>
<tr id="<?php
echo $item->id;
?>
" onclick="select_row(this)">
<td style="text-align: center;"><?php
echo ++$i;
?>
</td>
<td id="item_id"><?php
echo 'ITEM-' . $item->id;
?>
</td>
<td id="item_name"><?php
echo $item->item_name;
?>
</td>
//.........这里部分代码省略.........
示例2: get_form_html
function get_form_html($form_id, $id)
{
ob_start();
?>
<style>
.field_name{
width: 20%;
}
.field{
width: 50%;
}
.field input{
width: 100%;
margin-left: 0px;
}
.field .parent{
padding: 0px 0px;
}
.field select{
width: 100%;
}
</style>
<div id="head_div" style="padding: 5px 0; background-color: #ECECEC; color: #21ACD7;
border-radius: 5px;margin-left: auto; text-align: center; ">
ID : PURCHACE - <input style="padding: 0 0 0 5px;" onchange="load_purchace()" type="number" id="purchace_id" />
</div>
<div style="margin-top: 10px; background-color:transparent;padding-bottom: 100px;">
<form action="#" method="post" onsubmit="return false" class="action_form" operation="update" >
<table style="width:100%;">
<tr>
<td class="field_name">
<font>VENDOR</font>
</td>
<td class="field">
<div class="parent">
<input id="wendor_id" required disabled="disabled" autocomplete="off" style="border: 0;" />
</div>
</td>
</tr>
<tr>
<td class="field_name">
<font>BILL NUMBER</font>
</td>
<td class="field">
<div class="parent">
<input type="text" disabled="disabled" id="bill_number" />
</div>
</td>
</tr>
<tr>
<td colspan="2">
<style>
div#purchace_items td{
border: 1px solid #21ACD7;
}
div#purchace_items tbody td{
padding: 5px 0 5px 5px;
}
div#purchace_items tbody td input,div#purchace_items tbody td select{
padding: 0;
border: 0;
margin: 0;
height: 100%;
width: 100%;
background-color: transparent;
}
</style>
<div id="purchace_items" style="width: 100%; padding: 10px 0; color: #21ACD7;">
<table id="items_table" style="border-collapse: collapse; width: 100%;
background-color: #fff; border-radius: 10px; color: #21ACD7;">
<thead style="text-align: center;">
<tr>
<td>
#
</td>
<td>
ITEM
</td>
<td style="width: 17%;">
QUANTITY
</td>
<td style="width: 17%;">
RATE
</td>
<td style="width: 17%;">
TOTAL
</td>
<td style="width: 10%;">
DELETE
</td>
</tr>
</thead>
<tbody style="padding-left: 3px;">
<datalist id="items">
<?php
$item = new item();
$items = array();
$items = $item->getItems();
foreach ($items as $item) {
echo '<option id="' . $item->id . '"' . 'purchace_rate="' . $item->purchace_rate . '"' . ' value="' . $item->item_name . ' - ' . $item->item_code . ' ( ID : ' . $item->id . ' )" >' . $item->item_name . ' - ' . $item->item_code . ' ( ID : ' . $item->id . ' )' . '</option>';
//.........这里部分代码省略.........