Exemplo n.º 1
0
if (isset($options['t']) || isset($options['spec'])) {
    $tableId = isset($options['t']) ? $options['t'] : $options['spec'];
} else {
    $tableId = null;
}
if (isset($options['i']) || isset($options['id'])) {
    $id = isset($options['i']) ? $options['i'] : $options['id'];
} else {
    $id = null;
}
$queue = null;
if (isset($options['a']) || isset($options['async'])) {
    if (isset($options['q']) || isset($options['queue'])) {
        $queue = $options['queue'];
    } else {
        $queue = \Tripod\Mongo\Config::getInstance()->getApplyQueueName();
    }
}
$stat = null;
if (isset($options['stat-loader'])) {
    $stat = (require_once $options['stat-loader']);
}
if ($tableId) {
    generateTables($id, $tableId, $storeName, $stat, $queue);
} else {
    foreach (\Tripod\Mongo\Config::getInstance()->getTableSpecifications($storeName) as $tableSpec) {
        generateTables($id, $tableSpec['_id'], $storeName, $stat, $queue);
    }
}
$t->stop();
print "Tables created in " . $t->result() . " secs\n";
Exemplo n.º 2
0
        if (isset($fee_types["collection"])) {
            $xmlTag->H5(JText::_('COM_REOMI_VIEW_FEES_PAGE_COLLECTION_TITLE'))->TABLE(array('class' => 'table table-striped table-hover'), $xmlTag()->THEAD($xmlTag()->TR($xmlTag()->TH(JText::_('COM_ROEMI_VIEW_FEES_TABLE_HEADER_LITERS'))->TH(JText::_('COM_ROEMI_VIEW_FEES_TABLE_HEADER_FEE'))))->TBODY($xmlTag()->__fromArray(generateCollectionTableData($fee_types["collection"]))));
        }
        $xmlTag->BR();
    }
}
function generateBulkTable($bulk_fees, $xmlTag)
{
    if (isset($bulk_fees)) {
        $tableData = array();
        foreach ($bulk_fees as $fee) {
            $tableData[] = XmlTagHelper::formatTableRow(array(XmlTagHelper::formatTableCell((string) $fee->name), XmlTagHelper::formatTableCell(money_format('%n', $fee->fee)), XmlTagHelper::formatTableCell((string) $fee->description)));
        }
        $xmlTag->TABLE(array('class' => 'table table-striped table-hover'), $xmlTag()->TBODY($xmlTag()->__fromArray($tableData)));
    }
}
$xmlTag = new XmlTag();
$xmlTag->H1(JText::_('COM_REOMI_VIEW_FEES_PAGE_TITLE'))->P(JText::_('COM_REOMI_VIEW_FEES_PAGE_DESC'))->BR();
if (isset($this->fees)) {
    setlocale(LC_MONETARY, 'fr_FR.utf8');
    $xmlTag->H2(JText::_('COM_REOMI_VIEW_FEES_PAGE_FEES_TITLE'));
    foreach ($this->fees as $user_name => $containers) {
        $xmlTag->H3(JText::_($user_name));
        generateTables($containers, $xmlTag);
    }
    $xmlTag->H3(JText::_('COM_REOMI_VIEW_FEES_PAGE_BULK_TITLE'));
    generateBulkTable($this->bulk, $xmlTag);
} else {
    $xmlTag->P(JText::_('COM_ROEMI_VIEW_FEES_EMPTY_TABLE_FEES'));
}
echo $xmlTag;