-
Notifications
You must be signed in to change notification settings - Fork 0
/
modify_general_settings.php
411 lines (385 loc) · 22.2 KB
/
modify_general_settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<?php
/*
Module developed for the Open Source Content Management System WebsiteBaker (http://websitebaker.org)
Copyright (C) 2007 - 2017, Christoph Marti
LICENCE TERMS:
This module is free software. You can redistribute it and/or modify it
under the terms of the GNU General Public License - version 2 or later,
as published by the Free Software Foundation: http://www.gnu.org/licenses/gpl.html.
DISCLAIMER:
This module is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
require('../../config.php');
// Include WB admin wrapper script
require(WB_PATH.'/modules/admin.php');
// Look for language file
if (LANGUAGE_LOADED) {
require_once(WB_PATH.'/modules/bakery/languages/EN.php');
if (file_exists(WB_PATH.'/modules/bakery/languages/'.LANGUAGE.'.php')) {
require_once(WB_PATH.'/modules/bakery/languages/'.LANGUAGE.'.php');
}
}
// Look for country file
if (LANGUAGE_LOADED) {
if (file_exists(WB_PATH.'/modules/bakery/languages/countries/'.LANGUAGE.'.php')) {
require_once(WB_PATH.'/modules/bakery/languages/countries/'.LANGUAGE.'.php');
}
}
else {
require_once(WB_PATH.'/modules/bakery/languages/countries/EN.php');
}
// Get content of general settings table
$query_settings = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_bakery_general_settings WHERE shop_id = '0'");
$fetch_settings = $query_settings->fetchRow();
// Look for state file
$use_states = false;
if (file_exists(WB_PATH.'/modules/bakery/languages/states/'.stripslashes($fetch_settings['shop_country']).'.php')) {
require_once(WB_PATH.'/modules/bakery/languages/states/'.stripslashes($fetch_settings['shop_country']).'.php');
$use_states = true;
}
?>
<script language="javascript" type="text/javascript">
function mod_bakery_country_reload_b() {
document.getElementsByName("reload")[0].value = "true";
document.modify.submit();
}
function mod_bakery_toggle_stock_mode_b() {
if (document.getElementsByName("stock_mode")[0].value == "text" || document.getElementsByName("stock_mode")[0].value == "img") {
document.getElementById('stock_limit').style.display = 'inline';
} else {
document.getElementById('stock_limit').style.display = 'none';
}
}
</script>
<form name="modify" action="<?php echo WB_URL; ?>/modules/bakery/save_general_settings.php" method="post" style="margin: 0;">
<input type="hidden" name="section_id" value="<?php echo $section_id; ?>" />
<input type="hidden" name="page_id" value="<?php echo $page_id; ?>" />
<input type="hidden" name="reload" value="false" />
<table cellpadding="2" cellspacing="0" border="0" align="center" width="98%">
<tr>
<td colspan="5"><h2><?php echo $MOD_BAKERY['TXT_GENERAL_SETTINGS']; ?></h2></td>
</tr>
<!-- Shop -->
<tr valign="bottom">
<td width="30%" height="32" align="right"><strong><?php echo $MOD_BAKERY['TXT_SHOP'].' '.$MOD_BAKERY['TXT_SETTINGS']; ?>:</strong></td>
<td height="32" colspan="4"> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOP_NAME']; ?>:</td>
<td colspan="4">
<input type="text" name="shop_name" style="width: 98%" maxlength="100" value="<?php echo stripslashes($fetch_settings['shop_name']); ?>" /></td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOP_EMAIL']; ?>:</td>
<td colspan="4">
<input type="text" name="shop_email" style="width: 98%" maxlength="50" value="<?php echo stripslashes($fetch_settings['shop_email']); ?>" /></td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOP'].' '.$TEXT['PAGES_DIRECTORY']; ?>:</td>
<td colspan="4">
<input type="text" name="pages_directory" style="width: 98%" maxlength="20" value="<?php echo stripslashes($fetch_settings['pages_directory']); ?>" /></td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_TAC_URL']; ?>:</td>
<td colspan="4">
<input type="text" name="tac_url" style="width: 98%" maxlength="255" value="<?php echo stripslashes($fetch_settings['tac_url']); ?>" /></td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOP_COUNTRY']; ?>:</td>
<td colspan="4">
<?php
echo "<select name='shop_country' style='width: 98%' onchange='mod_bakery_country_reload_b()'>";
for ($n = 1; $n <= count($MOD_BAKERY['TXT_COUNTRY_NAME']); $n++) {
$country = $MOD_BAKERY['TXT_COUNTRY_NAME'][$n];
$country_code = $MOD_BAKERY['TXT_COUNTRY_CODE'][$n];
echo "<option value='$country_code'";
if ($country_code == stripslashes($fetch_settings['shop_country'])) {
echo ' selected="selected"';
}
echo ">$country</option>\n";
}
echo "</select>"; ?></td>
</tr>
<tr>
<td width="30%" align="right"<?php if (!$use_states) { echo " class='mod_bakery_disabled_b'"; } ?>><?php echo $MOD_BAKERY['TXT_SHOP_STATE']; ?>:</td>
<td colspan="4">
<select name="shop_state"<?php if (!$use_states) { echo " disabled='disabled'"; } ?> style='width: 98%'>
<?php
if ($use_states) {
for ($n = 1; $n <= count($MOD_BAKERY['TXT_STATE_NAME']); $n++) {
$state = $MOD_BAKERY['TXT_STATE_NAME'][$n];
$state_code = $MOD_BAKERY['TXT_STATE_CODE'][$n];
echo "<option value='$state_code'";
if ($state_code == stripslashes($fetch_settings['shop_state'])) {
echo ' selected="selected"';
}
echo ">$state</option>\n";
}
} ?>
</select> </td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_SHIP_ADDRESS']; ?>:</td>
<td colspan="4">
<select name="shipping_form" style="width: 98%">
<option value="none" <?php if ($fetch_settings['shipping_form'] == "none") { echo 'selected="selected"'; } ?> >
<?php echo $TEXT['NONE']; ?></option>
<option value="request" <?php if ($fetch_settings['shipping_form'] == "request") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_FORM_REQUEST']; ?></option>
<option value="hideable" <?php if ($fetch_settings['shipping_form'] == "hideable") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_FORM_HIDEABLE']; ?></option>
<option value="always" <?php if ($fetch_settings['shipping_form'] == "always") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_FORM_ALWAYS']; ?></option>
</select></td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_ADDRESSES']; ?>:</td>
<td colspan="4"><input type="checkbox" name="hide_country" id="hide_country" value="hide" <?php if ($fetch_settings['hide_country'] == 'hide') { echo 'checked="checked"'; } ?> />
<label for="hide_country"><?php echo $MOD_BAKERY['TXT_DOMESTIC_ADDRESSES_HIDE_COUNTRY']; ?></label>
</td>
</tr>
<tr>
<td align="right" valign="top"><?php echo $MOD_BAKERY['TXT_ADDRESS_FORM']; ?>:</td>
<td colspan="4">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="38%"><input type="checkbox" name="company_field" id="company_field" value="show" <?php if ($fetch_settings['company_field'] == 'show') { echo 'checked="checked"'; } ?> />
<label for="company_field"><?php echo $MOD_BAKERY['TXT_SHOW_COMPANY_FIELD']; ?></label></td>
<td><input type="checkbox" name="tax_no_field" id="tax_no_field" value="show" <?php if ($fetch_settings['tax_no_field'] == 'show') { echo 'checked="checked"'; } ?> onclick="javascript: sync_checkboxes(this);" />
<label for="tax_no_field"><?php echo $MOD_BAKERY['TXT_SHOW_TAX_NO_FIELD']; ?></label></td>
</tr>
<tr>
<td><input type="checkbox" name="state_field" id="state_field" value="show" <?php if ($fetch_settings['state_field'] == 'show') { echo 'checked="checked"'; } ?> />
<label for="state_field"><?php echo $MOD_BAKERY['TXT_SHOW_STATE_FIELD']; ?></label></td>
<td><input type="checkbox" name="zip_location" id="zip_location" value="end" <?php if ($fetch_settings['zip_location'] == 'end') { echo 'checked="checked"'; } ?> />
<label for="zip_location"><?php echo $MOD_BAKERY['TXT_SHOW_ZIP_END_OF_ADDRESS']; ?></label></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_RIGHT_OF_REVOCATION']; ?>:</td>
<td colspan="4"><input type="checkbox" name="no_revocation" id="no_revocation" value="e-goods" <?php if ($fetch_settings['no_revocation'] == 'e-goods') { echo 'checked="checked"'; } ?> />
<label for="no_revocation"><?php echo $MOD_BAKERY['TXT_WAIVER_OF_RIGHT_TO_REVOKE']; ?></label>
</td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_CUST_MSG']; ?>:</td>
<td colspan="4">
<input type="checkbox" name="cust_msg" id="cust_msg" value="show" <?php if ($fetch_settings['cust_msg'] == 'show') { echo 'checked="checked"'; } ?> />
<label for="cust_msg"><?php echo $MOD_BAKERY['TXT_SHOW_TEXTAREA']; ?></label>
</tr>
<tr>
<td align="right" valign="top"><?php echo $MOD_BAKERY['TXT_CART']; ?>:</td>
<td colspan="4">
<input type="checkbox" name="skip_cart" id="skip_cart" value="yes" <?php if ($fetch_settings['skip_cart'] == 'yes') { echo 'checked="checked"'; } ?> />
<label for="skip_cart"><?php echo $MOD_BAKERY['TXT_SKIP_CART_AFTER_ADDING_ITEM']; ?></label><br /><span style="margin-left: 22px;">(<?php echo $MOD_BAKERY['TXT_MINICART_STRONGLY_RECOMMENDED']; ?>)</span></td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_SETTINGS']; ?>:</td>
<td colspan="4">
<input type="checkbox" name="display_settings" id="display_settings" value="1" <?php if ($fetch_settings['display_settings'] == '1') { echo 'checked="checked"'; } ?> />
<label for="display_settings"><?php echo $MOD_BAKERY['TXT_DISPLAY_SETTINGS_TO_ADMIN_ONLY']; ?></label></td>
</tr>
<!--<tr>
<td width="25%" align="right"><?php echo $MOD_BAKERY['TXT_USE_CAPTCHA']; ?>:</td>
<td colspan="4">
<input type="checkbox" name="use_captcha" id="use_captcha" value="yes" <?php if ($fetch_settings['use_captcha'] == 'yes') { echo 'checked="checked"'; } ?> />
</tr>-->
<!-- Items -->
<tr valign="bottom">
<td width="30%" height="32" align="right"><strong><?php echo $MOD_BAKERY['TXT_ITEM'].' '.$MOD_BAKERY['TXT_SETTINGS']; ?>:</strong></td>
<td height="32" colspan="4"> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_FREE_DEFINABLE_FIELD']; ?> 1:</td>
<td colspan="4">
<input type="text" name="definable_field_0" style="width: 98%" maxlength="50" value="<?php echo stripslashes($fetch_settings['definable_field_0']); ?>" />
</td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_FREE_DEFINABLE_FIELD']; ?> 2:</td>
<td colspan="4">
<input type="text" name="definable_field_1" style="width: 98%" maxlength="50" value="<?php echo stripslashes($fetch_settings['definable_field_1']); ?>" />
</td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_FREE_DEFINABLE_FIELD']; ?> 3:</td>
<td colspan="4">
<input type="text" name="definable_field_2" style="width: 98%" maxlength="50" value="<?php echo stripslashes($fetch_settings['definable_field_2']); ?>" />
</td>
</tr>
<tr>
<td align="right" valign="top" style="padding-top: 5px;"><?php echo $MOD_BAKERY['TXT_STOCK']; ?>:</td>
<td colspan="4">
<select name="stock_mode" style="width: 98%" onchange="mod_bakery_toggle_stock_mode_b()">
<option value="text" <?php if ($fetch_settings['stock_mode'] == "text") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_STOCK_MODE_TEXT']; ?></option>
<option value="img" <?php if ($fetch_settings['stock_mode'] == "img") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_STOCK_MODE_IMAGE']; ?></option>
<option value="number" <?php if ($fetch_settings['stock_mode'] == "number") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_STOCK_MODE_NUMBER']; ?></option>
<option value="none" <?php if ($fetch_settings['stock_mode'] == "none") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_STOCK_MODE_NONE']; ?></option>
</select>
<br />
<span id="stock_limit" style="display: none;">«<?php echo ucfirst($MOD_BAKERY['TXT_SHORT_OF_STOCK']); ?>»: <input name="stock_limit" type="text" style="width: 25px; text-align: center;" value="<?php echo stripslashes($fetch_settings['stock_limit']); ?>" maxlength="3" /> – 1 <?php echo $MOD_BAKERY['TXT_ITEMS']; ?></span>
</td>
</tr>
<script language="javascript" type="text/javascript">
if (document.getElementsByName("stock_mode")[0].value == "text" || document.getElementsByName("stock_mode")[0].value == "img") {
document.getElementById('stock_limit').style.display = 'inline';
}
</script>
<tr>
<td align="right"> </td>
<td colspan="4">
<input type="checkbox" name="out_of_stock_orders" id="out_of_stock_orders" value="1" <?php if ($fetch_settings['out_of_stock_orders'] == '1') { echo 'checked="checked"'; } ?> />
<label for="out_of_stock_orders"><?php echo $MOD_BAKERY['TXT_ALLOW_OUT_OF_STOCK_ORDERS']; ?></label></td>
</tr>
<!-- Payment -->
<tr valign="bottom">
<td width="30%" height="32" align="right"><strong><?php echo $MOD_BAKERY['TXT_PAYMENT'].' '.$MOD_BAKERY['TXT_SETTINGS']; ?>:</strong></td>
<td height="32" colspan="4"> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOP_CURRENCY']; ?>:</td>
<td colspan="4">
<input type="text" name="shop_currency" style="width: 35px; text-align: center;" value="<?php echo stripslashes($fetch_settings['shop_currency']); ?>" maxlength="3" />
(USD, EUR, CHF, ... > <a href="https://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank">ISO 4217</a>) </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SEPARATOR_FOR']; ?>:</td>
<td colspan="5"><?php echo $MOD_BAKERY['TXT_DECIMAL']; ?>:
<input name="dec_point" type="text" style="width: 10px; text-align: center;" value="<?php echo stripslashes($fetch_settings['dec_point']); ?>" maxlength="1" />
<?php echo $MOD_BAKERY['TXT_GROUP_OF_THOUSANDS']; ?>:
<input name="thousands_sep" type="text" style="width: 10px; text-align: center;" value="<?php echo stripslashes($fetch_settings['thousands_sep']); ?>" maxlength="1" /> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_TAX']; ?>:</td>
<td colspan="4">
<input type="radio" name="tax_by" id="tax_by_country" value="country"<?php if ($fetch_settings['tax_by'] == 'country') { echo ' checked="checked"'; } ?> />
<label for="tax_by_country"><?php echo $MOD_BAKERY['TXT_SHOP_COUNTRY']; ?></label>
<input type="radio" name="tax_by" id="tax_by_state" value="state"<?php if ($fetch_settings['tax_by'] == 'state') { echo ' checked="checked"'; } ?><?php if (!$use_states) { echo " disabled='disabled'"; } ?> />
<label for="tax_by_state"<?php if (!$use_states) { echo " class='mod_bakery_disabled_b'"; } ?>><?php echo $MOD_BAKERY['TXT_SHOP_STATE']; ?></label>
<input type="radio" name="tax_by" id="tax_by_none" value="none"<?php if ($fetch_settings['tax_by'] == 'none') { echo ' checked="checked"'; } ?> />
<label for="tax_by_none"><?php echo $TEXT['NONE']; ?></label> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_TAX_RATE'].' '.$MOD_BAKERY['TXT_ITEM']; ?>:</td>
<td width="13%">
1.<input type="text" name="tax_rate" size="5" maxlength="5" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['tax_rate']); ?>" />%</td>
<td width="13%">
2.<input type="text" name="tax_rate1" size="5" maxlength="5" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['tax_rate1']); ?>" />%</td>
<td width="13%">
3.<input type="text" name="tax_rate2" size="5" maxlength="5" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['tax_rate2']); ?>" />%</td>
<td><input type="checkbox" name="tax_included" id="tax_included" value="included" <?php if ($fetch_settings['tax_included'] == 'included') { echo 'checked="checked"'; } ?> />
<label for="tax_included"><?php echo $MOD_BAKERY['TXT_TAX_INCLUDED']; ?></label>
</td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHOW_TAX_NO_FIELD']; ?>:</td>
<td colspan="4">
<input type="checkbox" name="tax_no_field" id="tax_no_field" value="show" <?php if ($fetch_settings['tax_no_field'] == 'show') { echo 'checked="checked"'; } ?> onclick="javascript: sync_checkboxes(this);" />
</td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_TAX_GROUP']; ?>:</td>
<td colspan="4">
<input type="text" name="tax_group" id="tax_group" value="<?php echo stripslashes($fetch_settings['tax_group']); ?>" style="width: 98%" />
<?php
if (!extension_loaded('soap')) {
echo '<span style="color: red;">To take advantage of the VAT-No check please make sure the <a href="http://php.net/manual/en/book.soap.php" target="_blank">soap extension</a> is loaded.</span>';
}
?>
</td>
</tr>
<!-- Shipping -->
<tr valign="bottom">
<td width="30%" height="32" align="right"><strong><?php echo $MOD_BAKERY['TXT_SHIPPING'].' '.$MOD_BAKERY['TXT_SETTINGS']; ?>:</strong></td>
<td height="32" colspan="4"> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_TAX_RATE'].' '.$MOD_BAKERY['TXT_SHIPPING']; ?>:</td>
<td colspan="4">
<input type="text" name="tax_rate_shipping" size="5" maxlength="5" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['tax_rate_shipping']); ?>" />%</td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_FREE_SHIPPING'].' '.$MOD_BAKERY['TXT_OVER']; ?>:</td>
<td colspan="4">
<input type="text" name="free_shipping" size="8" maxlength="8" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['free_shipping']); ?>" /><?php echo stripslashes($fetch_settings['shop_currency']); ?>
<input type="checkbox" name="free_shipping_msg" id="free_shipping_msg" value="show" <?php if ($fetch_settings['free_shipping_msg'] == 'show') { echo 'checked="checked"'; } ?> />
<label for="free_shipping_msg"><?php echo $MOD_BAKERY['TXT_SHOW_FREE_SHIPPING_MSG']; ?></label></td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_SHIPPING_BASED_ON']; ?>:</td>
<td colspan="4">
<select name="shipping_method">
<option value="flat" <?php if ($fetch_settings['shipping_method'] == "flat") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_FLAT']; ?></option>
<option value="items" <?php if ($fetch_settings['shipping_method'] == "items") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_ITEMS']; ?></option>
<option value="positions" <?php if ($fetch_settings['shipping_method'] == "positions") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_POSITIONS']; ?></option>
<option value="percentage" <?php if ($fetch_settings['shipping_method'] == "percentage") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_PERCENTAGE']; ?></option>
<option value="highest" <?php if ($fetch_settings['shipping_method'] == "highest") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_HIGHEST']; ?></option>
<option value="none" <?php if ($fetch_settings['shipping_method'] == "none") { echo 'selected="selected"'; } ?> >
<?php echo $MOD_BAKERY['TXT_SHIPPING_METHOD_NONE']; ?></option>
</select> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHIPPING'].' '.$MOD_BAKERY['TXT_DOMESTIC']; ?>:</td>
<td width="13%">
<input type="text" name="shipping_domestic" size="6" maxlength="7" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['shipping_domestic']); ?>" /><?php if ($fetch_settings['shipping_method'] != "percentage") { echo stripslashes($fetch_settings['shop_currency']); } else { echo "%"; } ?></td>
<td colspan="3"> </td>
</tr>
<tr>
<td width="30%" align="right"><?php echo $MOD_BAKERY['TXT_SHIPPING'].' '.$MOD_BAKERY['TXT_ABROAD']; ?>:</td>
<td>
<input type="text" name="shipping_abroad" size="6" maxlength="7" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['shipping_abroad']); ?>" /><?php if ($fetch_settings['shipping_method'] != "percentage") { echo stripslashes($fetch_settings['shop_currency']); } else { echo "%"; } ?></td>
<td colspan="3"> </td>
</tr>
<tr>
<td align="right"><?php echo $MOD_BAKERY['TXT_SHIPPING']; ?>:</td>
<td><input type="text" name="shipping_zone" size="6" maxlength="7" style="text-align: right;" value="<?php echo stripslashes($fetch_settings['shipping_zone']); ?>" /><?php if ($fetch_settings['shipping_method'] != "percentage") { echo stripslashes($fetch_settings['shop_currency']); } else { echo "%"; } ?></td>
<td colspan="3">... <?php echo $MOD_BAKERY['TXT_ZONE_COUNTRIES']; ?>:</td>
</tr>
<tr>
<td width="30%" align="right"> </td>
<td> </td>
<td colspan="3">
<?php
$zone_countries = explode(",", stripslashes($fetch_settings['zone_countries']));
echo "<select name='zone_countries[]' size='3' multiple='multiple'>";
for ($n = 1; $n <= count($MOD_BAKERY['TXT_COUNTRY_NAME']); $n++) {
$country = $MOD_BAKERY['TXT_COUNTRY_NAME'][$n];
$country_code = $MOD_BAKERY['TXT_COUNTRY_CODE'][$n];
if ($country_code != stripslashes($fetch_settings['shop_country'])) {
echo "<option value='$country_code'";
if (in_array($country_code, $zone_countries)) {
echo ' selected="selected"';
}
}
echo ">$country</option>\n";
}
echo "</select>"; ?></td>
</tr>
</table>
<br />
<table width="98%" align="center" cellpadding="0" cellspacing="0" class="mod_bakery_submit_row_b">
<tr valign="top">
<td height="30" align="left">
<input name="save" type="submit" value="<?php echo $TEXT['SAVE']; ?>" style="width: 100px; margin-top: 5px;" /></td>
<td height="30" align="right">
<input type="button" value="<?php echo $TEXT['CANCEL']; ?>" onclick="javascript: window.location = '<?php echo ADMIN_URL; ?>/pages/modify.php?page_id=<?php echo $page_id; ?>';" style="width: 100px; margin-top: 5px;" /> </td>
</tr>
</table>
</form>
<?php
// Print admin footer
$admin->print_footer();