Пример #1
0
            <td class="strong noborder right"><?php 
    echo format_currency($gross, $currency);
    ?>
</td>
            <td colspan="1000" class="noborder"></td>
          </tr>

          <tr class="empty noborder">
            <td colspan="1000"></td>
          </tr>

          <tr>
            <th class="xs"><input id="select_all" rel="all" type="checkbox" name="select_all"></th>
            <?php 
    // sort parameter => array (Name, default order)
    renderHeaders(array('name' => array('Customer Name', 'asc'), 'identification' => array('Identification', 'desc'), 'due_amount' => array('Due', 'desc'), 'gross_amount' => array('Total', 'desc')), $sf_data->getRaw('sort'), '@customers');
    ?>
            <th class="noborder"></th>
          </tr>
        </thead>

        <tbody>
          <?php 
    foreach ($customers as $i => $customer) {
        ?>
            <?php 
        $id = $customer->getId();
        $parity = $i % 2 ? 'odd' : 'even';
        ?>
            <tr id="customer-<?php 
        echo $id;
Пример #2
0
/**
 * renderRoute - emmit headers and contents described by the results of executeRoute()
 * renderRoute will calculate the Expires, Cache-Control and Etag for you. 
 * It optionally can gzip the contents as well with the $user_gzip option.
 *
 * @param $route_results
 * @param $use_gzip - if true gzip the output, defaults to false
 * @sideeffects emits headers and sends content to stdout
 * @return always true
 */
function renderRoute($route_results, $use_gzip = false)
{
    if (isset($route_results['HTTP_HEADER'])) {
        $headers = $route_results['HTTP_HEADER'];
    } else {
        $headers = array();
    }
    if (isset($route_results['HTTP_CONTENT'])) {
        $content = $route_results['HTTP_CONTENT'];
        // Set the expiration, cache-content and etag headers
        $headers[] = fmtHeader('Expires: ' . date(DATE_RFC1123, strtotime("+1 year")));
        $headers[] = fmtHeader('Cache-Control: max-age=36000, s-maxage=360000');
        $headers[] = fmtHeader('ETag: ' . md5($content));
    }
    if ($use_gzip) {
        // Add the gzip compression
        $gzipoutput = gzencode($route_results['HTTP_CONTENT'], 6);
        $headers[] = fmtHeader('Content-Encoding: gzip');
        $headers[] = fmtHeader('Content-Length: ' . strlen($gzipoutput));
        renderHeaders($headers);
        echo $gzipoutput;
        return true;
    }
    // Output headers
    renderHeaders($headers);
    // Out put content.
    echo $route_results["HTTP_CONTENT"];
    return true;
}
Пример #3
0
            <td colspan="4" class="strong noborder right"> 
              <?php 
    echo __('%q% products sold for a total of %t%', array('%q%' => $quantity, '%t%' => format_currency($sold, $currency)));
    ?>
            </td>
          </tr>

          <tr class="empty noborder">
            <td colspan="1000"></td>
          </tr>

          <tr>
            <th class="xs"><input id="select_all" rel="all" type="checkbox" name="select_all"></th>
            <?php 
    // sort parameter => array (Name, default order)
    renderHeaders(array('reference' => array('Reference', 'asc'), 'description' => array('Description', 'desc'), 'price' => array('Price', 'desc'), 'quantity' => array('Units', 'desc'), 'sold' => array('Sold', 'desc')), $sf_data->getRaw('sort'), '@products');
    ?>
            
          </tr>
        </thead>

        <tbody>
          <?php 
    foreach ($products as $i => $product) {
        ?>
            <?php 
        $id = $product->getId();
        $parity = $i % 2 ? 'odd' : 'even';
        ?>
            <tr id="product-<?php 
        echo $id;
Пример #4
0
    ?>
</td>
            <td class="strong noborder right"><?php 
    echo format_currency($gross, $currency);
    ?>
</td>
            <td colspan="1000" class="noborder"></td>
          </tr>
          <tr class="empty noborder">
            <td colspan="1000"></td>
          </tr>
          <tr>
            <th class="xs"><input id="select_all" rel="all" type="checkbox" name="select_all"></th>
            <?php 
    // sort parameter => array (Name, default order)
    renderHeaders(array('number' => array('Number', 'desc'), 'customer_name' => array('Customer Name', 'asc'), 'issue_date' => array('Date', 'desc'), 'due_date' => array('Due Date', 'asc'), 'status' => array('Status', 'asc'), 'due_amount' => array('Due', 'desc'), 'gross_amount' => array('Total', 'desc')), $sf_data->getRaw('sort'), '@invoices');
    ?>
            <th class="noborder"></th>
          </tr>
        </thead>

        <tbody>
          <?php 
    foreach ($invoices as $i => $invoice) {
        ?>
            <?php 
        $id = $invoice->getId();
        $parity = $i % 2 ? 'odd' : 'even';
        $closed = $invoice->getStatus() == Invoice::CLOSED;
        ?>
            <tr id="invoice-<?php 
Пример #5
0
      <table id="listing" class="listing">
        <thead>
          <tr class="noborder">
            <td colspan="1000" class="listing-options">
              <?php 
    echo gButton_to_function(__("Delete"), "do_batch('delete')", array('class' => 'batch delete action-clear', 'confirm' => __('Are you sure?')));
    ?>
            </td>
          </tr>

          <tr>
            <th class="check xs"><input type="checkbox" id="select_all" name="select_all" class="checkAll" rel="all" /></th>
            <?php 
    // sort parameter => array (Name, default order)
    renderHeaders(array('series' => array('Series', 'desc'), 'customer_name' => array('Customer Name', 'asc'), 'period_type' => array('Period Type', 'asc'), 'period' => array('Frequency', 'asc'), 'status' => array('Status', 'asc'), 'gross_amount' => array('Total', 'desc')), $sf_data->getRaw('sort'), '@recurring');
    ?>
          </tr>
        </thead>

        <tbody>
          <?php 
    foreach ($pager->getResults() as $i => $invoice) {
        ?>
            <?php 
        $id = $invoice->getId();
        $url = url_for('recurring/show?id=' . $invoice->getId());
        $parity = $i % 2 ? 'odd' : 'even';
        ?>
          <tr id="<?php 
        echo "invoice-{$id}";