コード例 #1
0
function processItems($items, $dttm, $isCargo = false, $parentFlag = 0)
{
    $totalCost = 0;
    foreach ($items as $item) {
        $totalCost += processItem($item, $dttm, $isCargo, $parentFlag);
        if (@is_array($item['items'])) {
            $itemContainerFlag = $item['flag'];
            $totalCost += processItems($item['items'], $dttm, true, $itemContainerFlag);
        }
    }
    return $totalCost;
}
コード例 #2
0
ファイル: gbank.php プロジェクト: Sajaki/addons
$content .= border($borderstyle, 'start');
// Create the Header of the table
$content .= "<table bgcolor='#1f1e1d' colspan='" . $row_columns . "' border='0' cellspacing='2' cellpadding='2'>";
// Process each category sorted on $display_order from conf.php
foreach ($display_order as $CategoryID) {
    // Check if we want to see Emtpy Categories OR if the category has items
    if ($show_empty || isset($itemsarray[$CategoryID])) {
        // Show the Column Header for this Category
        $content .= "<tr><th colspan='" . $row_columns . "' class='membersHeader'>" . $wordings[$roster_conf['roster_lang']]['bankitem_' . $CategoryID] . "</th></tr>";
        $count = 0;
        // Again check if we actually have items in the Category before displaying them
        if (isset($itemsarray[$CategoryID])) {
            $content .= "<tr class=\"membersRow1\">";
            foreach ($itemsarray[$CategoryID] as $itemid => $itemdetail) {
                // Display the icon for the item
                $content .= processItem($itemid, $CategoryID);
                $count++;
                if ($count == $row_columns) {
                    $content .= "</tr><tr>";
                    $count = 0;
                }
            }
            for ($i = $count; $i < $row_columns; $i++) {
                $content .= "<td></td>";
            }
            $content .= "</tr>";
        }
    }
}
// If no items are returned in the $itemsarray
if (!$itemsarray) {