本文整理汇总了PHP中order::table_row_name方法的典型用法代码示例。如果您正苦于以下问题:PHP order::table_row_name方法的具体用法?PHP order::table_row_name怎么用?PHP order::table_row_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类order
的用法示例。
在下文中一共展示了order::table_row_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ucfirst
function list_orders_pos($output = 'orders_list', $orderid = 0, $mods = false)
{
if ($this->is_empty()) {
return 1;
}
global $tpl;
$tmp = '
<table class="receipt-table">';
$tpl->append($output, $tmp);
if (!$orderid) {
$tmp = '
<thead>
<tr>
<th scope=col>' . ucfirst(phr('NUMBER_ABBR')) . '</th>
<th scope=col>' . ucfirst(phr('NAME')) . '</th>
<th scope=col> </th>
<th scope=col>' . ucfirst(phr('PRIORITY_ABBR')) . '</th>
<th scope=col>' . ucfirst(phr('PRICE')) . '</th>
<th scope=col> </th>
<th scope=col> </th>
<th scope=col> </th>
</tr>
</thead>';
$tpl->append($output, $tmp);
} else {
$tmp = '
<thead>
<tr height="10px">
<th colspan="9"><font size="-2">' . ucfirst(phr('LAST_OPERATION')) . '</font></th>
</tr>
</thead>';
$tpl->append($output, $tmp);
}
$tmp = '
<tbody>';
$tpl->append($output, $tmp);
$query = "SELECT * FROM `orders` WHERE `sourceid`='" . $this->id . "'";
if ($orderid && $mods) {
$query .= " AND `associated_id`='" . $orderid . "'";
} elseif ($orderid && !$mods) {
$query .= " AND `id`='" . $orderid . "'";
}
if (!get_conf(__FILE__, __LINE__, "orders_show_deleted")) {
$query .= " AND `deleted`='0'";
}
$query .= " ORDER BY priority ASC, associated_id ASC, dishid DESC, id ASC";
$res = common_query($query, __FILE__, __LINE__);
if (!$res) {
return mysql_errno();
}
while ($arr = mysql_fetch_array($res)) {
$ord = new order($arr['id']);
$dishnames[] = $ord->table_row_name($arr);
unset($ord);
}
$res = common_query($query, __FILE__, __LINE__);
if (!$res) {
return mysql_errno();
}
while ($arr = mysql_fetch_array($res)) {
$ord = new order($arr['id']);
$tmp = $ord->table_row_pos($arr);
$tpl->append($output, $tmp);
unset($ord);
}
$class = COLOR_TABLE_TOTAL;
// prints a line with the grand total
$tmp = '
<tr>
<td> </td>
<td><strong>' . ucfirst(phr('TOTAL')) . '</strong></td>
<td> </td>
<td> </td>
<td><strong>' . $this->total() . '</strong></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>';
if (!$orderid) {
$tpl->append($output, $tmp);
}
// prints a line with the grand total
$tmp = '
</tbody>
</table>';
if ($orderid) {
$tpl->append($output, $tmp);
}
return 0;
}