コード例 #1
0
ファイル: whos_online.php プロジェクト: laiello/hotel-os
        session_decode($session_data_country);
        session_decode($session_data_zone);
        session_decode($session_data_cart);
        if (PHP_VERSION < 4) {
            $broken_cart = $cart;
            $cart = new shoppingCart();
            $cart->unserialize($broken_cart);
        }
        if (is_object($cart)) {
            $products = $cart->get_products();
            for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
                $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']);
            }
            if (sizeof($products) > 0) {
                $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1'));
                $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency));
            } else {
                $contents[] = array('text' => '&nbsp;');
            }
        }
    }
}
if (tep_not_null($heading) && tep_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
コード例 #2
0
// BODY: <tr> sections with recovered cart data
?>
    <tr>
        <td colspan=9 valign="bottom"><hr width="100%" size="1" color="#800000" noshade></td>
       </tr>
    <tr class="main">
      <td align="right" valign="center" colspan=4 class="main"><b><?php 
echo TOTAL_RECOVERED;
?>
&nbsp;</b></font></td>
      <td align=left colspan=3 class="main"><b><?php 
echo $rc_cnt ? round($custknt / $rc_cnt * 100, 2) : 0;
?>
%</b></font></td>
      <td class="main" align="right"><b><?php 
echo $currencies->format(round($total_recovered, 2));
?>
</b></font></td>
      <td class="main">&nbsp;</td>
    </tr>
Done!
    </table>
<!-- body_text_eof //-->
  </td>
 </tr>
</table>
<!-- body_eof //-->

<?php 
require 'includes/oos_footer.php';
?>
コード例 #3
0
ファイル: invoice.php プロジェクト: zenmagick/zencart
?>
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_TOTAL_EXCLUDING_TAX;
?>
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
?>
</td>
      </tr>
<?php 
$decimals = $currencies->get_decimal_places($order->info['currency']);
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
    if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
        $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    } else {
        $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    }
    echo '      <tr class="dataTableRow">' . "\n" . '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
        for ($j = 0; $j < $k; $j++) {
            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
            if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
            }
            if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
                echo TEXT_INFO_ATTRIBUTE_FREE;
            }
            echo '</i></small></nobr>';
        }
コード例 #4
0
            ?>
</strong></td>
      </tr>
<?php 
            //_TODO make this into a do/while loop so that the final sub_total values can be displayed
            while (!$payment->EOF) {
                if ($current_type != strtoupper($payment->fields['payment_type'])) {
                    // print subtotal line & count for type
                    ?>
      <tr class="dataTableRowUnique" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">
        <td class="dataTableContent" colspan="3" align="left"><strong><?php 
                    echo sprintf(TABLE_SUB_COUNT, $so->full_type($current_type)) . $sub_count;
                    ?>
</strong></td>
        <td class="dataTableContent" colspan="4" align="right"><strong><?php 
                    echo sprintf(TABLE_SUB_TOTAL, $so->full_type($current_type)) . $currencies->format($sub_total);
                    ?>
</strong></td>
      </tr>
<?php 
                    // reset type values for the next one
                    $current_type = strtoupper($payment->fields['payment_type']);
                    $num_of_types++;
                    $sub_total = 0;
                    $sub_count = 0;
                    ?>
      <tr>
        <td colspan="7" class="dataTableContent" align="center"><strong><?php 
                    echo zen_draw_separator() . $so->full_type($current_type) . zen_draw_separator();
                    ?>
</strong></td>
コード例 #5
0
    echo TABLE_HEADING_PRICE_NO_TAX;
    ?>
</td>
        <td class="dataTableHeadingContent" align="right" width="20%"><?php 
    echo TABLE_HEADING_TOTAL_NO_TAX;
    ?>
</td>
        <?php 
}
?>
      </tr>
<?php 
$decimals = $currencies->get_decimal_places($order->info['currency']);
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
    if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
        $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    } else {
        $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    }
    echo '      <tr class="dataTableRow">' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
        for ($j = 0; $j < $k; $j++) {
            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
            if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
            }
            if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
                echo TEXT_INFO_ATTRIBUTE_FREE;
            }
            echo '</i></small></nobr>';
        }
コード例 #6
0
ファイル: invoice.php プロジェクト: pcchynoweth/oscommerce2
echo TABLE_HEADING_TOTAL_EXCLUDING_TAX;
?>
</td>
        <td class="dataTableHeadingContent" align="right"><?php 
echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
?>
</td>
      </tr>
<?php 
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
    echo '      <tr class="dataTableRow">' . "\n" . '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
        for ($j = 0; $j < $k; $j++) {
            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
            if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
            }
            echo '</i></small></nobr>';
        }
    }
    echo '        </td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    echo '        <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax'], true) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
    echo '      </tr>' . "\n";
}
?>
      <tr>
        <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php 
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    echo '          <tr>' . "\n" . '            <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" . '            <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" . '          </tr>' . "\n";
}
コード例 #7
0
ファイル: linkpoint_review.php プロジェクト: R-Future/zencart
        ?>
</td>

                <td class="dataTableContent">
                  <?php 
        echo 'Credit Card Server Time: <strong>' . ($customers->fields['transaction_response_time'] == '' ? 'Not Connected' : $customers->fields['transaction_response_time']) . '</strong>';
        ?>
                </td>
                <td class="dataTableContent">
                  <?php 
        echo 'This Server Time: <strong>' . $customers->fields['date_added'] . '</strong>';
        ?>
                </td>
                <td class="dataTableContent" align="right" style="color:red;">
                  <?php 
        echo $currencies->format($customers->fields['chargetotal']);
        ?>
                </td>
                <td class="dataTableContent" align="center">
                  <?php 
        echo zen_date_short($info->fields['date_account_created']);
        ?>
                </td>
                <td class="dataTableContent" align="right">
                </td>
              </tr>
              <tr class="dataTableRow">
                <td class="dataTableContent" colspan="4">
                  <?php 
        echo ($customers->fields['transaction_result'] != 'APPROVED' ? '<span class="alert">' . $customers->fields['transaction_result'] . '</span>' : $customers->fields['transaction_result']) . '<br />' . $customers->fields['cc_number'] . '<br />' . 'Expires: ' . $customers->fields['cc_expire'] . '<br />' . $customers->fields['lp_trans_num'] . '<br />' . $customers->fields['transaction_reference_number'] . '<br />' . ($customers->fields['avs_response'] != 'YYYM' ? '<span class="alert">' . $customers->fields['avs_response'] . '</span>' : $customers->fields['avs_response']) . ' ' . ($customers->fields['r_error'] != '' ? '<span class="alert">' . $customers->fields['r_error'] . '</span>' : '') . '<br />' . $customers->fields['transaction_time'];
        ?>
コード例 #8
0
 }
 if ($customers_status['customers_status_public'] == '1') {
     echo ', public ';
 }
 echo '</b></td>';
 if ($customers_status['customers_status_show_price'] == '1') {
     echo '<td class="smallText" align="left">&euro;';
     if ($customers_status['customers_status_show_price_tax'] == '0') {
         echo '+';
     }
 } else {
     echo '<td class="smallText" align="left"> ';
 }
 echo '</td>';
 echo '<td class="smallText" align="right">' . $customers_status['customers_status_discount'] . '%</td>';
 echo '<td class="dataTableContent" align="center">' . $currencies->format($customers_status['customers_status_ot_minimum']) . '</td>';
 echo '<td class="dataTableContent" align="right">' . $customers_status['customers_status_ot_discount'] . '%</td>';
 echo '<td class="dataTableContent" align="center">';
 if ($customers_status['customers_status_qty_discounts'] == '1') {
     echo ENTRY_YES;
 } else {
     echo ENTRY_NO;
 }
 echo '</td>';
 echo "\n";
 ?>
             <td class="dataTableContent" align="right"><?php 
 if (isset($cInfo) && is_object($cInfo) && $customers_status['customers_status_id'] == $cInfo->customers_status_id) {
     echo oos_image(OOS_IMAGES . 'icon_arrow_right.gif', '');
 } else {
     echo '<a href="' . oos_href_link_admin($aFilename['customers_status'], 'page=' . $_GET['page'] . '&cID=' . $customers_status['customers_status_id']) . '">' . oos_image(OOS_IMAGES . 'icon_information.gif', IMAGE_ICON_INFO) . '</a>';
コード例 #9
0
    }
    ?>
              <tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='hand'" onmouseout="this.className='dataTableRow'" onclick="document.location.href='<?php 
    echo oos_href_link_admin($aFilename['customers'], 'search=' . $customers['customers_lastname'], 'NONSSL');
    ?>
'">
                <td class="dataTableContent"><?php 
    echo $rows;
    ?>
.</td>
                <td class="dataTableContent"><?php 
    echo '<a href="' . oos_href_link_admin($aFilename['customers'], 'search=' . $customers['customers_lastname'], 'NONSSL') . '">' . $customers['customers_firstname'] . ' ' . $customers['customers_lastname'] . '</a>';
    ?>
</td>
                <td class="dataTableContent" align="right"><?php 
    echo $currencies->format($customers['ordersum']);
    ?>
&nbsp;</td>
              </tr>
<?php 
    // Move that ADOdb pointer!
    $customers_result->MoveNext();
}
?>
            </table></td>
          </tr>
          <tr>
            <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="smallText" valign="top"><?php 
echo $customers_split->display_count($customers_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS);
コード例 #10
0
                                                WHERE c.customers_id NOT IN ( SELECT distinct(o.customers_id) FROM $orderstable o )");
  $customers_result_numrows = $customers_result_numrows->RecordCount();


  $customers_result = $dbconn->Execute($customers_sql_raw);
  while ($customers = $customers_result->fields) {
    $rows++;

    if (strlen($rows) < 2) {
      $rows = '0' . $rows;
    }
?>
              <tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='hand'" onmouseout="this.className='dataTableRow'" onclick="document.location.href='<?php echo oos_href_link_admin($aFilename['customers'], 'search=' . $customers['customers_lastname'], 'NONSSL'); ?>'">
                <td class="dataTableContent"><?php echo $rows; ?>.</td>
                <td class="dataTableContent"><?php echo '<a href="' . oos_href_link_admin($aFilename['customers'], 'search=' . $customers['customers_lastname'], 'NONSSL') . '">' . $customers['customers_firstname'] . ' ' . $customers['customers_lastname'] . '</a>'; ?></td>
                <td class="dataTableContent" align="right"><?php echo $currencies->format($customers['ordersum']); ?>&nbsp;</td>
              </tr>
<?php
    // Move that ADOdb pointer!
    $customers_result->MoveNext();
  }

?>
            </table></td>
          </tr>
          <tr>
            <td colspan="3"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td>
                <td class="smallText" align="right"><?php echo $customers_split->display_links($customers_result_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?>&nbsp;</td>
              </tr>
コード例 #11
0
ファイル: categories.php プロジェクト: severnaya99/Sg-2010
            $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]);
            $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]);
            $pInfo->short_description = tep_db_prepare_input($short_description[$languages[$i]['id']]);
            $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]);
        }
        ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
        echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name;
        ?>
</td>
            <td class="pageHeading" align="right"><?php 
        echo $currencies->format($pInfo->products_price);
        ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
        echo tep_draw_separator('pixel_trans.gif', '1', '10');
        ?>
</td>
      </tr>
      <tr>
        <td class="main"><?php 
        echo tep_image(DIR_WS_CATALOG_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->short_description;
        ?>
コード例 #12
0
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><b><?php 
    echo TEXT_AFFILIATE_PAYMENT;
    ?>
</b></td>
                <td class="main">&nbsp;<?php 
    echo $currencies->format($payments['affiliate_payment_total']);
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><b><?php 
    echo TEXT_AFFILIATE_BILLED;
    ?>
</b></td>
                <td class="main">&nbsp;<?php 
コード例 #13
0
    ?>
 method="post"><?php 
    if ($form_action == 'update') {
        echo zen_draw_hidden_field('specials_id', $_GET['sID']);
    }
    ?>
        <td><br><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_SPECIALS_PRODUCT;
    ?>
&nbsp;</td>
            <td class="main">
          <!-- change by wushh 20101111  -->
          <?php 
    echo isset($sInfo->products_name) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : '<input type="text" name="products_id" id="products_id">';
    echo zen_draw_hidden_field('products_price', isset($sInfo->products_price) ? $sInfo->products_price : '');
    ?>
          </td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_SPECIALS_SPECIAL_PRICE;
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo zen_draw_input_field('specials_price', isset($sInfo->specials_new_products_price) ? $sInfo->specials_new_products_price : '');
    echo zen_draw_hidden_field('products_priced_by_attribute', $sInfo->products_priced_by_attribute);
    echo zen_draw_hidden_field('update_products_id', $sInfo->products_id);
    ?>
</td>
コード例 #14
0
ファイル: featured.php プロジェクト: zenmagick/zencart
      <tr>
      <?php 
    echo zen_draw_form('new_featured', FILENAME_FEATURED, zen_get_all_get_params(array('action', 'info', 'fID')) . 'action=' . $form_action . '&go_back=' . $_GET['go_back']);
    if ($form_action == 'update') {
        echo zen_draw_hidden_field('featured_id', $_GET['fID']);
    }
    ?>
        <td><br><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_FEATURED_PRODUCT;
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo isset($fInfo->products_name) ? $fInfo->products_name . ' <small>(' . $currencies->format($fInfo->products_price) . ')</small>' : zen_draw_products_pull_down('products_id', 'size="15" style="font-size:12px"', $featured_array, true, $_GET['add_products_id'], true);
    echo zen_draw_hidden_field('products_price', isset($fInfo->products_price) ? $fInfo->products_price : '');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_FEATURED_AVAILABLE_DATE;
    ?>
&nbsp;</td>
            <td class="main"><script>StartDate.writeControl(); StartDate.dateFormat="<?php 
    echo DATE_FORMAT_SPIFFYCAL;
    ?>
";</script></td>
          </tr>
          <tr>
コード例 #15
0
ファイル: Packing-Slip.php プロジェクト: digideskio/oscmax2
 $pdf->addText($x += PRICING_COLUMN_SIZES, $pos, TABLE_HEADER_FONT_SIZE, '');
 $pos -= PRODUCT_TABLE_BOTTOM_MARGIN;
 if ($truncated_str) {
     change_color(PRODUCT_LISTING_BKGD_COLOR);
     $pdf->filledRectangle(LEFT_MARGIN, $pos - PRODUCT_TABLE_ROW_HEIGHT, PRODUCT_TABLE_HEADER_WIDTH, PRODUCT_TABLE_ROW_HEIGHT);
     $pos = $pos - PRODUCT_TABLE_ROW_HEIGHT + PRODUCT_TABLE_BOTTOM_MARGIN;
     change_color(GENERAL_FONT_COLOR);
     $reset_x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN;
     $pdf->addText($reset_x, $pos, TABLE_HEADER_FONT_SIZE, $truncated_str);
     $pos -= PRODUCT_TABLE_BOTTOM_MARGIN;
 }
 if (($k = sizeof($order->products[$i]['attributes'])) > 0) {
     for ($j = 0; $j < $k; $j++) {
         $attrib_string = '<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
         if ($order->products[$i]['attributes'][$j]['price'] != '0') {
             $attrib_string .= ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
         }
         $attrib_string .= '</i>';
         change_color(PRODUCT_LISTING_BKGD_COLOR);
         $pdf->filledRectangle(LEFT_MARGIN, $pos - PRODUCT_TABLE_ROW_HEIGHT, PRODUCT_TABLE_HEADER_WIDTH, PRODUCT_TABLE_ROW_HEIGHT);
         $pos = $pos - PRODUCT_TABLE_ROW_HEIGHT + PRODUCT_TABLE_BOTTOM_MARGIN;
         change_color(GENERAL_FONT_COLOR);
         $reset_x = LEFT_MARGIN + PRODUCT_TABLE_LEFT_MARGIN;
         if (PRODUCT_ATTRIBUTES_TEXT_WRAP) {
             $wrapped_str = $pdf->addTextWrap($reset_x, $pos, PRODUCTS_COLUMN_SIZE, PRODUCT_ATTRIBUTES_FONT_SIZE, $attrib_string);
         } else {
             $pdf->addText($reset_x, $pos, PRODUCT_ATTRIBUTES_FONT_SIZE, $attrib_string);
         }
         $pos -= PRODUCT_TABLE_BOTTOM_MARGIN;
         if ($wrapped_str) {
             change_color(PRODUCT_LISTING_BKGD_COLOR);
コード例 #16
0
                                                                          '" . date("Y-m-d H:i:s", time()) . "')");
                     $insert_id = $dbconn->Insert_ID();

                     $coupon_email_tracktable = $oostable['coupon_email_track'];
                     $insert_result = $dbconn->Execute("INSERT INTO $coupon_email_tracktable
                                                   (coupon_id,
                                                    customer_id_sent,
                                                    sent_firstname,
                                                    emailed_to,
                                                    date_sent) VALUES ('" . $insert_id ."',
                                                                       '0',
                                                                       'Admin',
                                                                       '" . $email_address . "',
                                                                       '" . date("Y-m-d H:i:s", time()) . "' )");

                     $email_text .= sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" .
                                    sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" .
                                    EMAIL_GV_LINK . oos_catalog_link($aCatalogPage['gv_redeem'], 'gv_no=' . $coupon_code) .
                                    "\n\n";
                   }
                   if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
                     $coupon_id = NEW_SIGNUP_DISCOUNT_COUPON;

                     $couponstable = $oostable['coupons'];
                     $sql = "SELECT coupon_id coupon_type, coupon_code, coupon_amount
                             FROM $couponstable
                             WHERE coupon_id = '" . $coupon_id . "'";
                     $coupon_result = $dbconn->Execute($sql);
                     $coupon = $coupon_result->fields;

                     $coupons_descriptiontable = $oostable['coupons_description'];
コード例 #17
0
        ?>
</td>
                  <td class="dataTableContent hidden-xs"><?php 
        echo $customers['customers_email_address'];
        ?>
</td>
                  <td class="dataTableContent hidden-xs hidden-sm"><?php 
        echo xtc_get_country_name($customers['entry_country_id']);
        ?>
</td>
                  <?php 
        if ($umsatz['ordersum'] != '') {
            ?>
                  <td class="dataTableContent hidden-xs hidden-sm"><?php 
            if ($umsatz['ordersum'] > 0) {
                echo $currencies->format($umsatz['ordersum']);
            }
            ?>
</td>
                  <?php 
        } else {
            ?>
                  <td class="dataTableContent hidden-xs hidden-sm"> --- </td>
                  <?php 
        }
        ?>
                  <td class="dataTableContent hidden-xs hidden-sm" align="left"><?php 
        echo $customers_statuses_id_array[$customers['customers_status']]['text'] . ' (' . $customers['customers_status'] . ')';
        ?>
</td><?php 
        php;
コード例 #18
0
function draw_packing_slip_order($order, &$pdf)
{
    global $db;
    require_once DIR_WS_CLASSES . 'currencies.php';
    $currencies = new currencies();
    // prepare order-status pulldown list
    $orders_statuses = array();
    $orders_status_array = array();
    $orders_status = $db->Execute("select orders_status_id, orders_status_name\n                from " . TABLE_ORDERS_STATUS . "\n                where language_id = '" . (int) $_SESSION['languages_id'] . "'");
    while (!$orders_status->EOF) {
        $orders_statuses[] = array('id' => $orders_status->fields['orders_status_id'], 'text' => $orders_status->fields['orders_status_name'] . ' [' . $orders_status->fields['orders_status_id'] . ']');
        $orders_status_array[$orders_status->fields['orders_status_id']] = $orders_status->fields['orders_status_name'];
        $orders_status->MoveNext();
    }
    /* display order information header */
    $pdf->SetFont('Arial', 'B', 6);
    /* order object doesn't include orderid.  added id to info so we can retrieve it here */
    $pdf->Cell(120, 14, ENTRY_ORDER_ID . $order->info['id']);
    $pdf->Cell(236, 14, ENTRY_DATE_PURCHASED . ' ' . zen_date_long($order->info['date_purchased']));
    $pdf->MultiCell(220, 14, ENTRY_PAYMENT_METHOD . ' ' . $order->info['payment_method']);
    $pdf->SetFont('Arial', '', 10);
    if (TAX_ID_NUMBER != '') {
        $pdf->SetFillColor(180, 180, 180);
        $pdf->Cell(30, 14, TABLE_HEADING_QTY, 1, 0, '', 1);
        $pdf->Cell(160, 14, TABLE_HEADING_PRODUCTS, 1, 0, '', 1);
        $pdf->Cell(160, 14, TABLE_HEADING_PRODUCTS_MODEL, 1, 0, '', 1);
        $pdf->Cell(60, 14, TABLE_HEADING_TAX, 1, 0, '', 1);
        $pdf->Cell(78, 14, TABLE_HEADING_PRICE_NO_TAX, 1, 0, 'R', 1);
        $pdf->MultiCell(78, 14, TABLE_HEADING_TOTAL_NO_TAX, 1, 'R', 1);
    } else {
        $pdf->SetFillColor(180, 180, 180);
        $pdf->Cell(25, 14, TABLE_HEADING_QTY, 1, 0, '', 1);
        $pdf->Cell(120, 14, TABLE_HEADING_PRODUCTS, 1, 0, '', 1);
        $pdf->Cell(120, 14, TABLE_HEADING_PRODUCTS_MODEL, 1, 0, '', 1);
        $pdf->Cell(40, 14, TABLE_HEADING_TAX, 1, 0, 'R', 1);
        $pdf->Cell(68, 14, TABLE_HEADING_PRICE_EXCLUDING_TAX, 1, 0, 'R', 1);
        $pdf->Cell(68, 14, TABLE_HEADING_PRICE_INCLUDING_TAX, 1, 0, 'R', 1);
        $pdf->Cell(68, 14, TABLE_HEADING_TOTAL_EXCLUDING_TAX, 1, 0, 'R', 1);
        $pdf->MultiCell(68, 14, TABLE_HEADING_TOTAL_INCLUDING_TAX, 1, 'R', 1);
    }
    $pdf->SetFillColor(256, 256, 256);
    if (TAX_ID_NUMBER != '') {
        /* draw order items in table when tax ID number is NOT null*/
        for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
            /* BEGIN update (Loose Chicken Software Development, david@loosechicken.com 01-03-2011) */
            /* break attributes onto new lines */
            $prod_name = $order->products[$i]['name'];
            $prod_attrs = array();
            if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
                for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
                    $prod_attrs[] = $order->products[$i]['attributes'][$j]['option'] . ': ' . zen_output_string_protected($order->products[$i]['attributes'][$j]['value']);
                }
            }
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* Find height of model and Product names */
            $h_model = $pdf->MultiCellHeight(160, 14, $order->products[$i]['model'], 'LRT', 'L', 1);
            $h = $h_model;
            $h_product_name = $pdf->MultiCellHeight(160, 14, $prod_name, 'LRT', 'L', 1);
            $h = $h_product_name > $h ? $h_product_name : $h;
            /* If cells would be too tall, force a page break */
            if ($pdf->y + $h > $pdf->PageBreakTrigger) {
                $pdf->AddPage();
            }
            /* Get current y, to use with $h_product_name later when placing attributes */
            $y_top = $pdf->getY();
            /* END add (Loose Chicken Software Development 01-07-2011) */
            $pdf->Cell(30, 14, $order->products[$i]['qty'], 'LRT', 0, '', 1);
            /* BEGIN update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * Changed Cell to MultiCell for the test wrapping. 
             * Because MultiCell doesn't leave the cursor in the right place:
             * Retrived cursor before drawing cell, and placed it afterward base on origal location and cell width 
             */
            $y = $pdf->getY();
            $x = $pdf->getX();
            $pdf->MultiCell(160, 14, $prod_name, 'LRT', 'L', 1);
            $max_y = $pdf->getY();
            $pdf->setXY($x + 160, $y);
            $y = $pdf->getY();
            $x = $pdf->getX();
            $pdf->MultiCell(160, 14, $order->products[$i]['model'], 'LRT', 'L', 1);
            $max_y = $pdf->getY() > $max_y ? $pdf->getY() : $max_y;
            $pdf->setXY($x + 160, $y);
            /* END update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            $pdf->Cell(60, 14, ENTRY_NO_TAX, 'LRT', 0, '', 1);
            $pdf->Cell(78, 14, $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);
            $pdf->MultiCell(78, 14, $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 'R', 1);
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * Draw cell borders in case model or product name wrapped and thus would leave blank
             * spaces on the other cells. (This must be transparent so the cells are not overritten)
             */
            $x = $pdf->GetX();
            $y = $pdf->GetY();
            if ($max_y > $y) {
                $h = $max_y - $y;
                $pdf->Cell(30, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(160, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(160, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(60, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(78, $h, '', 'LR', 0, '', 0);
                $pdf->MultiCell(78, $h, '', 'LR', 'J', 0);
                $pdf->setXY($x, $y);
            }
            $max_y_page = $pdf->PageNo();
            /* Place attributes below product_name */
            $pdf->setXY($x, $y_top + $h_product_name);
            /* END add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            $pdf->SetFont('Arial', '', 8);
            $pdf->SetTextColor(40, 40, 40);
            foreach ($prod_attrs as $prod_attr) {
                $pdf->Cell(30, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(160, 10, '  - ' . $prod_attr, 'LR', 0, '', 1);
                $pdf->Cell(160, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(60, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(78, 10, '', 'LR', 0, '', 1);
                $pdf->MultiCell(78, 10, '', 'LR', 'J', 1);
            }
            $x = $pdf->GetX();
            $y = $pdf->GetY();
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * If after drawing the attributes the cursor is not as low as after drawing 
             * the model and product name lower the cursor for the drawing of the bottom line 
             */
            if ($max_y > $y && $max_y_page == $pdf->PageNo()) {
                $y = $max_y;
            }
            /* END add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            $pdf->Line($x, $y, $x + 30 + 160 + 160 + 60 + 78 + 78, $y);
            $pdf->SetTextColor(0, 0, 0);
            $pdf->SetFont('Arial', '', 10);
            /* END modification (Loose Chicken Software Development 01-03-2011) */
        }
    } else {
        /* draw order items in table  when tax ID number IS null*/
        for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
            /* BEGIN update (Loose Chicken Software Development, david@loosechicken.com 01-03-2011) */
            /* break attributes onto new lines */
            $prod_name = $order->products[$i]['name'];
            $prod_attrs = array();
            if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
                for ($j = 0, $k = sizeof($order->products[$i]['attributes']); $j < $k; $j++) {
                    $prod_attrs[] = $order->products[$i]['attributes'][$j]['option'] . ': ' . zen_output_string_protected($order->products[$i]['attributes'][$j]['value']);
                }
            }
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* Find height of model and Product names */
            $h_model = $pdf->MultiCellHeight(120, 14, $order->products[$i]['model'], 'LRT', 'L', 1);
            $h = $h_model;
            $h_product_name = $pdf->MultiCellHeight(120, 14, $prod_name, 'LRT', 'L', 1);
            $h = $h_product_name > $h ? $h_product_name : $h;
            /* If cells would be too tall, force a page break */
            if ($pdf->y + $h > $pdf->PageBreakTrigger) {
                $pdf->AddPage();
            }
            /* Get current y, to use with $h_product_name later when placing attributes */
            $y_top = $pdf->getY();
            /* END add (Loose Chicken Software Development 01-07-2011) */
            $pdf->Cell(25, 14, $order->products[$i]['qty'], 'LRT', 0, '', 1);
            /* BEGIN update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * Changed Cell to MultiCell for the test wrapping. 
             * Because MultiCell doesn't leave the cursor in the right place:
             * Retrived cursor before drawing cell, and placed it afterward base on origal location and cell width 
             */
            $y = $pdf->getY();
            $x = $pdf->getX();
            $pdf->MultiCell(120, 14, $prod_name, 'LRT', 'L', 1);
            $max_y = $pdf->getY();
            $pdf->setXY($x + 120, $y);
            $y = $pdf->getY();
            $x = $pdf->getX();
            $pdf->MultiCell(120, 14, $order->products[$i]['model'], 'LRT', 'L', 1);
            $max_y = $pdf->getY() > $max_y ? $pdf->getY() : $max_y;
            $pdf->setXY($x + 120, $y);
            /* END update (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /*$pdf->Cell(40, 14, zen_display_tax_value($order->products[$i]['tax']) . '%', 'LRT', 0, 'R', 1);     
                      
            	     $pdf->Cell(68, 14, $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);     
                      
            	   
            	    $pdf->Cell(68, 14, $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1);
            		
            		
            		
                       $pdf->Cell(68, 14, $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 0, 'R', 1); 
            		
            		
            		    
                       $pdf->MultiCell(68, 14, $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), 'LRT', 'R', 1);
                                */
            $pdf->Cell(40, 14, html_entity_decode(zen_display_tax_value($order->products[$i]['tax']) . '%', ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
            if ($order->info['currency'] == 'EUR') {
                $f1 = str_replace('&euro;', '€', $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']));
                $pdf->Cell(68, 14, html_entity_decode($f1), 'LRT', 'R', 1);
            } else {
                $pdf->Cell(68, 14, html_entity_decode($currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
            }
            if ($order->info['currency'] == 'EUR') {
                $f2 = str_replace('&euro;', '€', $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']));
                $pdf->Cell(68, 14, html_entity_decode($f2), 'LRT', 'R', 1);
            } else {
                $pdf->Cell(68, 14, html_entity_decode($currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
            }
            if ($order->info['currency'] == 'EUR') {
                $f3 = str_replace('&euro;', '€', $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']));
                $pdf->Cell(68, 14, html_entity_decode($f3), 'LRT', 'R', 1);
            } else {
                $pdf->Cell(68, 14, html_entity_decode($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 0, 'R', 1);
            }
            if ($order->info['currency'] == 'EUR') {
                $f = str_replace('&euro;', '€', $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']));
                $pdf->MultiCell(68, 14, html_entity_decode($f), 'LRT', 'R', 1);
            } else {
                $pdf->MultiCell(68, 14, html_entity_decode($currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']), ENT_QUOTES, "ISO-8859-15"), 'LRT', 'R', 1);
            }
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * Draw cell borders in case model or product name wrapped and thus would leave blank
             * spaces on the other cells. (This must be transparent so the cells are not overritten)
             */
            $x = $pdf->GetX();
            $y = $pdf->GetY();
            if ($max_y > $y) {
                $h = $max_y - $y;
                $pdf->Cell(25, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(120, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(120, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(40, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(68, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(68, $h, '', 'LR', 0, '', 0);
                $pdf->Cell(68, $h, '', 'LR', 0, '', 0);
                $pdf->MultiCell(68, $h, '', 'LR', 'J', 0);
                $pdf->setXY($x, $y);
            }
            $max_y_page = $pdf->PageNo();
            /* Place attributes below product_name */
            $pdf->setXY($x, $y_top + $h_product_name);
            /* END add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            $pdf->SetFont('Arial', '', 8);
            $pdf->SetTextColor(40, 40, 40);
            foreach ($prod_attrs as $prod_attr) {
                $pdf->Cell(25, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(120, 10, '  - ' . $prod_attr, 'LR', 0, '', 1);
                $pdf->Cell(120, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(40, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(68, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(68, 10, '', 'LR', 0, '', 1);
                $pdf->Cell(68, 10, '', 'LR', 0, '', 1);
                $pdf->MultiCell(68, 10, '', 'LR', 'J', 1);
            }
            $x = $pdf->GetX();
            $y = $pdf->GetY();
            /* BEGIN add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            /* 
             * If after drawing the attributes the cursor is not as low as after drawing 
             * the model and product name lower the cursor for the drawing of the bottom line 
             */
            if ($max_y > $y && $max_y_page == $pdf->PageNo()) {
                $y = $max_y;
            }
            /* END add (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
            $pdf->Line($x, $y, $x + 25 + 120 + 120 + 40 + 68 + 68 + 68 + 68, $y);
            $pdf->SetTextColor(0, 0, 0);
            $pdf->SetFont('Arial', '', 10);
            /* END modification (Loose Chicken Software Development 01-03-2011) */
        }
    }
    /* order cost summary */
    $pdf->Ln();
    for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
        $title = strip_tags($order->totals[$i]['title']);
        $text = strip_tags($order->totals[$i]['text']);
        /* $pdf->Cell(516, 14, $title, 0, 0, 'R');             
           $pdf->MultiCell(50, 14, $text, 0, 'R'); */
        $pdf->Cell(516, 14, html_entity_decode($title, ENT_QUOTES, "ISO-8859-15"), 0, 0, 'R');
        //echo substr($text,0,5);
        if (substr($text, 0, 5) == '&euro') {
            $a = str_replace('&euro;', '€', $text);
            $pdf->MultiCell(50, 14, html_entity_decode($a, ENT_QUOTES, "ISO-8859-15"), 0, 0, 'R');
        } else {
            $pdf->MultiCell(50, 14, html_entity_decode($text, ENT_QUOTES, "ISO-8859-15"), 0, 0, 'R');
        }
    }
    /* order balance */
    /*$orders_balance = $db->Execute("select orders_id , balance_due
    				from " . TABLE_ORDERS . "
    					where orders_id = '" . zen_db_input($order->info['id']) . "'
    					order by orders_id");
    		$balance_due = $orders_balance->fields['balance_due'];*/
    $pdf->SetFont('Arial', 'B', '');
    require_once DIR_WS_CLASSES . 'super_order.php';
    $so = new super_order($order->info['id']);
    $pdf->Cell(516, 14, 'Amount Paid: ', 0, 0, 'R');
    // $pdf->MultiCell(50, 14, $currencies->format($so->amount_applied), 0, 'R');
    //  $pdf->MultiCell(50, 14, $currencies->format($balance_due), 0, 'R');
    // $pdf->MultiCell(50, 14, $currencies->format($so->balance_due), 0, 'R');
    $var1 = substr($currencies->format($so->amount_applied), 0, 5);
    if ($var1 == '&euro') {
        $pdf->MultiCell(50, 14, '€' . $so->amount_applied, 0, 'R');
    } else {
        $pdf->MultiCell(50, 14, html_entity_decode($currencies->format($so->amount_applied), ENT_QUOTES, "ISO-8859-15"), 0, 'R');
    }
    $pdf->Cell(516, 14, 'Balance Due:', 0, 0, 'R');
    $var = substr($currencies->format($so->balance_due), 0, 5);
    if ($var == '&euro') {
        $pdf->MultiCell(50, 14, '€' . $so->balance_due, 0, 'R');
    } else {
        $pdf->MultiCell(50, 14, html_entity_decode($currencies->format($so->balance_due), ENT_QUOTES, "ISO-8859-15"), 0, 'R');
    }
    //$pdf->SetFont('Arial','', 7);
    if (ORDER_COMMENTS_PACKING_SLIP > 0) {
        $pdf->Ln();
        $pdf->SetFillColor(180, 180, 180);
        $pdf->SetFont('Arial', 'B', 10);
        $pdf->MultiCell(576, 14, 'Order Comments & Status', 'B');
        $pdf->SetFont('Arial', '', 7);
        $pdf->SetFillColor(256, 256, 256);
        $orders_history = $db->Execute("select orders_status_id, date_added, customer_notified, comments\n                    from " . TABLE_ORDERS_STATUS_HISTORY . "\n                    where orders_id = '" . zen_db_input($order->info['id']) . "' and customer_notified >= 0\n                    order by date_added");
        $count_comments = 0;
        if ($orders_history->RecordCount() >= 1 && ORDER_COMMENTS_PACKING_SLIP == 1) {
            while (!$orders_history->EOF) {
                if ($orders_history->fields['comments'] != '' && strpos($orders_history->fields['comments'], 'PayPal status:') === false) {
                    $count_comments++;
                    $pdf->Cell(120, 14, zen_datetime_short($orders_history->fields['date_added']));
                    $pdf->MultiCell(456, 14, $orders_status_array[$orders_history->fields['orders_status_id']]);
                    $pdf->Cell(27, 14, '', 0, 0, '', 1);
                    /* BEGIN modify (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
                    /* removed function zen_db_output, which was converting output into html code */
                    //$pdf->MultiCell(549, 14, (zen_db_output($orders_history->fields['comments'])), 'B');
                    $pdf->MultiCell(549, 14, $orders_history->fields['comments'], 'B');
                    /* END modify (Loose Chicken Software Development, david@loosechicken.com 01-07-2011) */
                    $pdf->SetLineWidth(0.5);
                    $pdf->Line(18, $pdf->GetY(), 594, $pdf->GetY());
                }
                $orders_history->MoveNext();
                /*if (ORDER_COMMENTS_PACKING_SLIP == 1 && $count_comments >= 1) {
                     break;
                  } */
            }
        }
        if ($count_comments == 0) {
            $pdf->MultiCell(576, 14, TEXT_NO_ORDER_HISTORY, 'B');
        }
    }
}
コード例 #19
0
ファイル: gv_queue.php プロジェクト: digideskio/oscmax2
require 'includes/application_top.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$action = isset($_GET['action']) ? $_GET['action'] : '';
if ($action == 'confirmrelease' && isset($_GET['gid'])) {
    $gv_query = tep_db_query("select release_flag from " . TABLE_COUPON_GV_QUEUE . " where unique_id='" . $_GET['gid'] . "'");
    $gv_result = tep_db_fetch_array($gv_query);
    if ($gv_result['release_flag'] == 'N') {
        $gv_query = tep_db_query("select customer_id, amount from " . TABLE_COUPON_GV_QUEUE . " where unique_id='" . $_GET['gid'] . "'");
        if ($gv_resulta = tep_db_fetch_array($gv_query)) {
            $gv_amount = $gv_resulta['amount'];
            //Let's build a message object using the email class
            $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . $gv_resulta['customer_id'] . "'");
            $mail = tep_db_fetch_array($mail_query);
            $message = TEXT_REDEEM_COUPON_MESSAGE_HEADER;
            $message .= sprintf(TEXT_REDEEM_COUPON_MESSAGE_AMOUNT, $currencies->format($gv_amount));
            $message .= TEXT_REDEEM_COUPON_MESSAGE_BODY;
            $message .= TEXT_REDEEM_COUPON_MESSAGE_FOOTER;
            $mimemessage = new email(array('X-Mailer: osCmax Mailer'));
            // add the message to the object
            $mimemessage->add_text($message);
            $mimemessage->build_message();
            $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, TEXT_REDEEM_COUPON_SUBJECT);
            $gv_amount = $gv_resulta['amount'];
            $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id='" . $gv_resulta['customer_id'] . "'");
            $customer_gv = false;
            $total_gv_amount = 0;
            if ($gv_result = tep_db_fetch_array($gv_query)) {
                $total_gv_amount = $gv_result['amount'];
                $customer_gv = true;
            }
コード例 #20
0
ファイル: products.php プロジェクト: BackupTheBerlios/oos-svn
        echo oos_image(OOS_SHOP_IMAGES . 'flags/' . $languages[$i]['iso_639_2'] . '.gif', $languages[$i]['name']) . '&nbsp;' . $pInfo->products_name;
        ?>
</td>
<?php 
        $oosPrice = $pInfo->products_price;
        if (OOS_PRICE_IS_BRUTTO == '1' && ($_GET['read'] == 'only' || $action != 'new_product_preview')) {
            $oosPriceNetto = round($oosPrice, TAX_DECIMAL_PLACES);
            $tax_ratestable = $oostable['tax_rates'];
            $tax_result = $dbconn->Execute("SELECT tax_rate FROM {$tax_ratestable} WHERE tax_class_id = '" . $pInfo->products_tax_class_id . "' ");
            $tax = $tax_result->fields;
            $oosPrice = $oosPrice * ($tax[tax_rate] + 100) / 100;
        }
        $oosPrice = round($oosPrice, TAX_DECIMAL_PLACES);
        ?>
      <td class="pageHeading" align="right"><?php 
        echo $currencies->format($oosPrice);
        ?>
</td>
          </tr>
          <tr>
            <td colspan="2" class="main" align="right"><?php 
        echo TEXT_PRODUCTS_DISCOUNT_ALLOWED . ' ' . number_format($products_discount_allowed, 2);
        ?>
%</td>
          </tr>
<?php 
        include 'includes/categories_discounts_price.php';
        ?>
        </table></td>
      </tr>
      <tr>
コード例 #21
0
            }
            $coupon_description_result = $dbconn->Execute("SELECT coupon_name\n                                                 FROM " . $oostable['coupons_description'] . "\n                                                 WHERE coupon_id = '" . $cc_list['coupon_id'] . "'\n                                                   AND coupon_languages_id = '" . intval($_SESSION['language_id']) . "'");
            $coupon_desc = $coupon_description_result->fields;
            ?>
                <td class="dataTableContent"><?php 
            echo $coupon_desc['coupon_name'];
            ?>
</td>
                <td class="dataTableContent" align="center">
<?php 
            if ($cc_list['coupon_type'] == 'P') {
                echo $cc_list['coupon_amount'] . '%';
            } elseif ($cc_list['coupon_type'] == 'S') {
                echo TEXT_FREE_SHIPPING;
            } else {
                echo $currencies->format($cc_list['coupon_amount']);
            }
            ?>
            &nbsp;</td>
                <td class="dataTableContent" align="center"><?php 
            echo $cc_list['coupon_code'];
            ?>
</td>
                <td class="dataTableContent" align="right"><?php 
            if (isset($cInfo) && is_object($cInfo) && $cc_list['coupon_id'] == $cInfo->coupon_id) {
                echo oos_image(OOS_IMAGES . 'icon_arrow_right.gif');
            } else {
                echo '<a href="' . oos_href_link_admin($aFilename['coupon_admin'], 'page=' . $_GET['page'] . '&cID=' . $cc_list['coupon_id']) . '">' . oos_image(OOS_IMAGES . 'icon_information.gif', IMAGE_ICON_INFO) . '</a>';
            }
            ?>
&nbsp;</td>
コード例 #22
0
    ?>
</td>
		<td class="itemdata" valign="top"><?php 
    echo $order->products[$i]['model'];
    ?>
</td>
		<td class="itemdata" valign="top"><?php 
    echo $order->products[$i]['name'];
    ?>
</td>
		<td class="itemdata" valign="top" align="center"><?php 
    echo $order->products[$i]['qty'];
    ?>
</td>
		<td class="itemdata" align="right" valign="top"><b><?php 
    echo $currencies->format($order->products[$i]['price'], true, $order->info['currency'], $order->info['currency_value']);
    ?>
</b></td>
		<td class="itemdata" align="right" valign="top"><b><?php 
    echo $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    ?>
</b></td>
	  </tr>
<?php 
}
?>
	  <tr>
		<td class="itemtotal" align="right" colspan="6"><table border="0" cellspacing="0" cellpadding="2">
<?php 
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
    ?>
コード例 #23
0
ファイル: gv_mail.php プロジェクト: BackupTheBerlios/oos-svn
         break;
     default:
         $customers_email_address = oos_db_prepare_input($_POST['customers_email_address']);
         $customerstable = $oostable['customers'];
         $mail_result = $dbconn->Execute("SELECT customers_firstname, customers_lastname, customers_email_address FROM {$customerstable} WHERE customers_email_address = '" . oos_db_input($customers_email_address) . "'");
         $mail_sent_to = $_POST['customers_email_address'];
         if (isset($_POST['email_to']) && !empty($_POST['email_to'])) {
             $mail_sent_to = $_POST['email_to'];
         }
         break;
 }
 if ($action == 'send_email_to_user' && $_POST['customers_email_address'] && !$_POST['back_x']) {
     while ($mail = $mail_result->fields) {
         $id1 = oos_create_coupon_code($mail['customers_email_address']);
         $message = $_POST['message'];
         $message .= "\n\n" . TEXT_GV_WORTH . $currencies->format($_POST['amount']) . "\n\n";
         $message .= TEXT_TO_REDEEM;
         $message .= TEXT_WHICH_IS . $id1 . TEXT_IN_CASE . "\n\n";
         $message .= OOS_HTTP_SERVER . OOS_SHOP . 'index.php?page=' . $aCatalogPage['gv_redeem'] . '&gv_no=' . $id1 . "\n\n";
         $message .= TEXT_OR_VISIT . OOS_HTTP_SERVER . OOS_SHOP . TEXT_ENTER_CODE;
         //Let's build a message object using the email class
         $send_mail = new PHPMailer();
         $send_mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/';
         $sLang = isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en';
         $send_mail->SetLanguage($sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/');
         $send_mail->CharSet = CHARSET;
         $send_mail->IsMail();
         $send_mail->From = $from_mail ? $from_mail : STORE_OWNER_EMAIL_ADDRESS;
         $send_mail->FromName = $from_name ? $from_name : STORE_OWNER;
         $send_mail->Mailer = EMAIL_TRANSPORT;
         // Add smtp values if needed
コード例 #24
0
ファイル: store_credit.php プロジェクト: happyxlq/lt_svn
            <tr>
              <td class="main"><?php 
    echo ENTRY_BALANCE;
    ?>
</td>
              <td class="main">
              <?
                if($cInfo->amount==null || is_nan($cInfo->amount)) $cInfo->amount = 0;
                $str_balance = "".($cInfo->amount);
                echo $currencies->format($str_balance); 
              ?>
              </td>
              <td class="main">&nbsp;</td>
              <td class="main">Pending Rewards: </td>
              <td class="main"><?php 
    echo $currencies->format($_GET['pending']);
    ?>
</td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
    echo zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . zen_href_link(FILENAME_STORE_CREDIT, zen_get_all_get_params(array('action')), 'NONSSL') . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
コード例 #25
0
                }
                ?>
          <tr class="paymentRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" <?php 
                echo 'onclick="popupWindow(\'' . zen_href_link(FILENAME_SUPER_PAYMENTS, 'oID=' . $so->oID . '&payment_mode=payment&index=' . $so->payment[$a]['index'] . '&action=update', $request_type) . '\', \'scrollbars=yes,resizable=yes,width=400,height=300,screenX=150,screenY=100,top=100,left=150\')"';
                ?>
>
            <td class="paymentContent" align="left"><?php 
                echo $so->payment[$a]['number'];
                ?>
</td>
            <td class="paymentContent" align="left"><?php 
                echo $so->payment[$a]['name'];
                ?>
</td>
            <td class="paymentContent" align="right"><strong><?php 
                echo $currencies->format($so->payment[$a]['amount']);
                ?>
</strong></td>
            <td class="paymentContent" align="center"><?php 
                echo $so->full_type($so->payment[$a]['type']);
                ?>
</td>
            <td class="paymentContent" align="center"><?php 
                echo zen_datetime_short($so->payment[$a]['posted']);
                ?>
</td>
            <td class="paymentContent" align="center"><?php 
                echo zen_datetime_short($so->payment[$a]['modified']);
                ?>
</td>
            <td align="right"><?php 
コード例 #26
0
              <td class="dataTableHeadingContent" align="right"  colspan="1"  width="10%" nowrap><?php 
    echo TABLE_HEADING_TOTAL;
    ?>
</td>
            </tr>
<?php 
    foreach ($custid as $cid) {
        unset($email);
        $query1 = tep_db_query("select cb.products_id pid,\n                                    cb.customers_basket_quantity qty,\n                                    cb.customers_basket_date_added bdate,\n                                    cus.customers_firstname fname,\n                                    cus.customers_lastname lname,\n                                    cus.customers_email_address email\n                          from      " . TABLE_CUSTOMERS_BASKET . " cb,\n                                    " . TABLE_CUSTOMERS . " cus\n                          where     cb.customers_id = cus.customers_id  and\n                                    cus.customers_id = '" . $cid . "'\n                          order by  cb.customers_basket_date_added desc ");
        $knt = mysql_num_rows($query1);
        for ($i = 0; $i < $knt; $i++) {
            $inrec = tep_db_fetch_array($query1);
            // set new cline and curcus
            if ($lastcid != $cid) {
                if ($lastcid != "") {
                    $cline .= "\n\t\t\t  <tr>\n\t\t\t\t <td class='dataTableContent' align='right' colspan='6' nowrap><b>" . TABLE_CART_TOTAL . "</b>" . $currencies->format($tprice) . "</td>\n\t\t\t  </tr>\n";
                    echo $cline;
                }
                $cline = "<tr> <td class='dataTableContent' align='left' colspan='6' nowrap><a href='" . tep_href_link(FILENAME_CUSTOMERS, 'search=' . $inrec['lname'], 'NONSSL') . "'>" . $inrec['fname'] . " " . $inrec['lname'] . "</a>" . $customer . "</td></tr>";
                $tprice = 0;
            }
            $lastcid = $cid;
            // get the shopping cart
            $query2 = tep_db_query("select   p.products_price price,\n\t\t\t\t\t\t\t\t\t\t p.products_tax_class_id taxclass,\n\t\t\t\t\t\t\t\t\t\t p.products_model model,\n                                         pd.products_name name\n                                 from    " . TABLE_PRODUCTS . " p,\n                                         " . TABLE_PRODUCTS_DESCRIPTION . " pd,\n                                         " . TABLE_LANGUAGES . " l\n                                 where   p.products_id = '" . $inrec['pid'] . "' and\n                                         pd.products_id = p.products_id and\n                                         pd.language_id = " . (int) $languages_id);
            $inrec2 = tep_db_fetch_array($query2);
            $sprice = tep_get_products_special_price($inrec['pid']);
            if ($sprice < 1) {
                $sprice = $inrec2['price'];
            }
            // Some users may want to include taxes in the pricing, allow that. NOTE HOWEVER that we don't have a good way to get individual tax rates based on customer location yet!
            if (RCS_INCLUDE_TAX_IN_PRICES == 'true') {
コード例 #27
0
        $contents[] = array('align' => 'center', 'text' => '<br />' . ($remove_currency ? '<a href="' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '">' . oos_image_swap_button('delete', 'delete_off.gif', IMAGE_DELETE) . '</a>' : '') . ' <a href="' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
        break;
    default:
        if (isset($cInfo) && is_object($cInfo)) {
            $heading[] = array('text' => '<b>' . $cInfo->title . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a href="' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '">' . oos_image_swap_button('edit', 'edit_off.gif', IMAGE_EDIT) . '</a> <a href="' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '">' . oos_image_swap_button('delete', 'delete_off.gif', IMAGE_DELETE) . '</a>');
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_TITLE . ' ' . $cInfo->title);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . ' ' . $cInfo->symbol_left);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . ' ' . $cInfo->symbol_right);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_DECIMAL_POINT . ' ' . $cInfo->decimal_point);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . ' ' . $cInfo->thousands_point);
            $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . ' ' . $cInfo->decimal_places);
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_LAST_UPDATED . ' ' . oos_date_short($cInfo->last_updated));
            $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . ' ' . number_format($cInfo->value, 8));
            $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_EXAMPLE . '<br />' . $currencies->format('30', false, DEFAULT_CURRENCY) . ' = ' . $currencies->format('30', true, $cInfo->code));
        }
        break;
}
if (oos_is_not_null($heading) && oos_is_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
コード例 #28
0
     $temp_string .= ENTRY_REQUEST_FORM_PRODUCT_CODE_SHORT . ' ' . ${'code_' . $i} . "\n";
 }
 if (tep_not_null(${'model_' . $i})) {
     $temp_string .= ($HTTP_GET_VARS['action'] == 'process_foreign_products' ? ENTRY_REQUEST_FORM_PRODUCT_MODEL : ENTRY_REQUEST_FORM_BOOK_MODEL) . ' ' . ${'model_' . $i} . "\n";
 }
 if (tep_not_null(${'manufacturer_' . $i})) {
     $temp_string .= ($HTTP_GET_VARS['action'] == 'process_foreign_products' ? ENTRY_REQUEST_FORM_PRODUCT_MANUFACTURER : ENTRY_REQUEST_FORM_BOOK_MANUFACTURER) . ' ' . ${'manufacturer_' . $i} . "\n";
 }
 if (tep_not_null(${'year_' . $i})) {
     $temp_string .= ENTRY_REQUEST_FORM_PRODUCT_YEAR . ' ' . ${'year_' . $i} . "\n";
 }
 if (tep_not_null(${'url_' . $i})) {
     $temp_string .= ENTRY_REQUEST_FORM_PRODUCT_URL_SHORT . ' ' . ${'url_' . $i} . "\n";
 }
 if (tep_not_null(${'price_' . $i})) {
     $temp_string .= ($HTTP_GET_VARS['action'] == 'process_foreign_products' ? ENTRY_REQUEST_FORM_PRODUCT_PRICE : ENTRY_REQUEST_FORM_BOOK_PRICE) . ' ' . (tep_not_null(${'currency_' . $i}) ? $currencies->format(${'price_' . $i}, false, ${'currency_' . $i}) : ${'price_' . $i}) . "\n";
 }
 if ($HTTP_GET_VARS['action'] == 'process_foreign_books' || $HTTP_GET_VARS['action'] == 'process_foreign_products') {
     $temp_string .= ENTRY_REQUEST_FORM_PRODUCT_QTY . ' ' . $qty . "\n";
 }
 if ((int) $product_check['products_id'] > 0) {
     $temp_string .= sprintf(ENTRY_REQUEST_FORM_PRODUCT_EXISTS, $product_check['products_name'], $currencies->format($product_check['products_price'], true, $product_check['products_currency']));
     if ($product_check['products_currency'] != ${'currency_' . $i}) {
         $temp_string .= ' (' . $currencies->format($product_check['products_price'], true, ${'currency_' . $i}) . ')';
     }
     $temp_string .= "\n";
 }
 $temp_string .= "\n";
 if (tep_not_null(trim($temp_string))) {
     $enquiry .= $k . '. ' . $temp_string;
     $k++;
コード例 #29
0
        session_decode($session_data_cart);
        if (PHP_VERSION < 4) {
            $broken_cart = $cart;
            $cart = new shoppingCart();
            $cart->unserialize($broken_cart);
        }
        if (is_object($_SESSION['cart'])) {
            $contents[] = array('text' => $full_name . ' - ' . $ip_address . '<br />' . $info);
            $products = $_SESSION['cart']->get_products();
            for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
                $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_product_path($products[$i]['id']) . '&pID=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>');
                // cPath=23&pID=74
            }
            if (sizeof($products) > 0) {
                $contents[] = array('text' => zen_draw_separator('pixel_black.gif', '100%', '1'));
                $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($_SESSION['cart']->show_total(), true, $_SESSION['currency']));
            } else {
                $contents[] = array('text' => TEXT_EMPTY_CART);
            }
        }
    }
}
if (zen_not_null($heading) && zen_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
コード例 #30
0
ファイル: coupon_admin.php プロジェクト: eosc/EosC-2.3
            $coupon_description_query = tep_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_list['coupon_id'] . "' and language_id = '" . $languages_id . "'");
            $coupon_desc = tep_db_fetch_array($coupon_description_query);
            ?>
                <td class="dataTableContent"><?php 
            echo $coupon_desc['coupon_name'];
            ?>
</td>
                <td class="dataTableContent" align="center">
<?php 
            if ($cc_list['coupon_type'] == 'P') {
                // not floating point value, don't display decimal info
                echo ($cc_list['coupon_amount'] == round($cc_list['coupon_amount']) ? number_format($cc_list['coupon_amount']) : number_format($cc_list['coupon_amount'], 2)) . '%';
            } elseif ($cc_list['coupon_type'] == 'S') {
                echo TEXT_FREE_SHIPPING;
            } else {
                echo $currencies->format($cc_list['coupon_amount']);
            }
            ?>
            &nbsp;</td>
                <td class="dataTableContent" align="center"><?php 
            echo $cc_list['coupon_code'];
            ?>
</td>
                <td class="dataTableContent" align="center">
<?php 
            if ($cc_list['coupon_active'] == 'Y') {
                echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=N&cid=' . $cc_list['coupon_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
            } else {
                echo '<a href="' . tep_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=Y&cid=' . $cc_list['coupon_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>&nbsp;&nbsp;' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
            }
            ?>