<td><input type="text" name="OT_TABLE" value="orders_total"> <small>(eg, orders_total)</small><br><small>This table is dropped, created, then filled</small></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><input type="checkbox" name="DISPLAY_PRICES_WITH_TAX"> <b>Display Prices With Tax Included</b><br><small>Should the tax be added to the SubTotal? (the tax amount is still displayed)</small></td>
</tr>
<tr>
<td colspan="2"><input type="checkbox" name="DISPLAY_MULTIPLE_TAXES"> <b>Display Multiple Tax Groups</b><br><small>If more than one tax rate is used, display the individual values, or as one global tax value?</small></td>
</tr>
<tr>
<td colspan="2"><input type="checkbox" name="DISPLAY_SHIPPING"> <b>Display No/Free Shipping Charges</b><br><small>Display the shipping value if it equals $0.00?</small></td>
tep_db_connect() or die('Unable to connect to database server!');
if (strlen($HTTP_POST_VARS['OT_TABLE']) > 0) {
tep_db_query("drop table if exists " . $HTTP_POST_VARS['OT_TABLE']);
tep_db_query("create table " . $HTTP_POST_VARS['OT_TABLE'] . " ( orders_total_id int unsigned not null auto_increment, orders_id int not null, title varchar(255) not null, text varchar(255) not null, value decimal(8,2) not null, class varchar(32) not null, sort_order int not null, primary key (orders_total_id), key idx_orders_total_orders_id (orders_id))");
}
$i = 0;
$orders_query = tep_db_query("select orders_id, shipping_method, shipping_cost, currency, currency_value from orders");
while ($orders = tep_db_fetch_array($orders_query)) {