本文整理汇总了PHP中account::GetHistoryText方法的典型用法代码示例。如果您正苦于以下问题:PHP account::GetHistoryText方法的具体用法?PHP account::GetHistoryText怎么用?PHP account::GetHistoryText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::GetHistoryText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ShowReserveText
function ShowReserveText($reserve_id)
{
require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/billing.php";
global $session, $DB;
session_start();
$uid = get_uid(false);
$objResponse = new xajaxResponse();
$info = false;
if ($reserve_id) {
$sql = "\n WITH bill_queue_ammount AS (\n SELECT SUM(CASE WHEN pro_ammount > 0 THEN pro_ammount ELSE ammount END) as ammount, reserve_id FROM bill_queue\n WHERE reserve_id = ?i\n GROUP BY reserve_id\n )\n SELECT 'Список заказов №'|| id ||' на сумму ' || round(bq.ammount, 2) || ' руб' as op_name, id, " . billing::RESERVE_OP_CODE . " as op_code\n FROM bill_reserve\n INNER JOIN bill_queue_ammount as bq ON bq.reserve_id = bill_reserve.id\n WHERE id = ?i AND uid = ?i";
$row = $DB->row($sql, $reserve_id, $reserve_id, $uid);
if ($row && !empty($row['op_name'])) {
$info = account::GetHistoryText($row);
}
}
if ($info) {
$objResponse->assign("res" . $reserve_id, "innerHTML", $info);
}
return $objResponse;
}
示例2: foreach
<td class="b-layout__td b-layout__td_bordbot_3_e6 b-layout__td_padbot_10 b-layout__td_padleft_10 b-layout__td_width_90">
<div class="b-layout__txt b-layout__txt_italic">Сумма, руб.</div>
</td>
<td class="b-layout__td b-layout__td_bordbot_3_e6 b-layout__td_padbot_10 b-layout__td_padleft_10 b-layout__td_width_90">
<div class="b-layout__txt b-layout__txt_italic">Баланс, руб.</div>
</td>
<td class="b-layout__td b-layout__td_bordbot_3_e6 b-layout__td_padbot_10 b-layout__td_padleft_10 b-layout__td_width_240">
<div class="b-layout__txt b-layout__txt_italic">Примечание</div>
</td>
</tr>
<?php
foreach ($history['items'] as $item) {
?>
<?php
$itemName = account::GetHistoryText($item);
$itemText = str_replace('%username%', $_SESSION['login'], $itemText);
?>
<tr class="b-layout__tr">
<td class="b-layout__td b-layout__td_padtb_10 b-layout__td_width_90 b-layout__td_bordbot_e6">
<div class="b-layout__txt b-layout__txt_color_808080 b-layout__txt_fontsize_11"><?php
echo date('d.m.Y', strtotime($item['op_date']));
?>
<br><?php
echo date('H:i', strtotime($item['op_date']));
?>
</div>
</td>
<td class="b-layout__td b-layout__td_padtb_10 b-layout__td_padleft_10 b-layout__td_bordbot_e6">
<div class="b-layout__txt <?php
echo $item['status'] == 'cancel' ? 'b-layout__txt_color_808080' : '';