testmodus / admin / includes / modules / customers_edit.php @ 3
Historie | Anzeigen | Annotieren | Download (27,2 KB)
1 | 1 | root | <?php
|
---|---|---|---|
2 | /*-------------------------------------------------------------
|
||
3 | $Id: customers_edit.php 13419 2021-02-09 15:13:48Z GTB $
|
||
4 | |||
5 | modified eCommerce Shopsoftware
|
||
6 | http://www.modified-shop.org
|
||
7 | |||
8 | Copyright (c) 2009 - 2013 [www.modified-shop.org]
|
||
9 | --------------------------------------------------------------
|
||
10 | Released under the GNU General Public License
|
||
11 | --------------------------------------------------------------*/
|
||
12 | |||
13 | defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' ); |
||
14 | |||
15 | |||
16 | if (isset($_GET['edit']) && $_GET['edit'] != '') { |
||
17 | $check = "a.address_book_id = '". (int) $_GET['edit']."'"; |
||
18 | $customers_default_address_id_checkbox = xtc_draw_checkbox_field('primary', 'on', false); |
||
19 | } else {
|
||
20 | $check = "c.customers_default_address_id = a.address_book_id"; |
||
21 | } |
||
22 | |||
23 | if (!isset($cInfo) || !is_object($cInfo)) { |
||
24 | $customers_query = xtc_db_query("SELECT c.customers_id, |
||
25 | c.customers_cid,
|
||
26 | c.customers_vat_id,
|
||
27 | c.customers_vat_id_status,
|
||
28 | c.customers_status,
|
||
29 | c.customers_dob,
|
||
30 | c.customers_email_address,
|
||
31 | c.customers_default_address_id,
|
||
32 | c.customers_telephone,
|
||
33 | c.customers_fax,
|
||
34 | c.member_flag,
|
||
35 | c.payment_unallowed,
|
||
36 | c.shipping_unallowed,
|
||
37 | a.address_book_id,
|
||
38 | a.entry_gender AS customers_gender,
|
||
39 | a.entry_firstname AS customers_firstname,
|
||
40 | a.entry_lastname AS customers_lastname,
|
||
41 | a.entry_company,
|
||
42 | a.entry_street_address,
|
||
43 | a.entry_suburb,
|
||
44 | a.entry_postcode,
|
||
45 | a.entry_city,
|
||
46 | a.entry_state,
|
||
47 | a.entry_country_id,
|
||
48 | a.entry_zone_id,
|
||
49 | cgc.amount
|
||
50 | FROM ".TABLE_CUSTOMERS." c |
||
51 | LEFT JOIN ".TABLE_ADDRESS_BOOK." a |
||
52 | ON ".$check." |
||
53 | AND a.customers_id = c.customers_id
|
||
54 | LEFT JOIN ".TABLE_COUPON_GV_CUSTOMER." cgc |
||
55 | ON c.customers_id = cgc.customer_id
|
||
56 | WHERE c.customers_id = '".(int)$_GET['cID']."'" |
||
57 | ); |
||
58 | $customers = xtc_db_fetch_array($customers_query); |
||
59 | if (xtc_db_num_rows($customers_query) != 0) { |
||
60 | $cInfo = new objectInfo($customers); |
||
61 | } |
||
62 | } |
||
63 | $newsletter_array = array (array ('id' => '1', 'text' => ENTRY_NEWSLETTER_YES), array ('id' => '0', 'text' => ENTRY_NEWSLETTER_NO)); |
||
64 | |||
65 | require_once(DIR_FS_CATALOG.DIR_WS_CLASSES.'xtcPrice.php'); |
||
66 | $xtPrice = new xtcPrice(DEFAULT_CURRENCY,$cInfo->customers_status); |
||
67 | ?>
|
||
68 | <div class="pageHeadingImage"><?php echo xtc_image(DIR_WS_ICONS.'heading/icon_customers.png'); ?></div> |
||
69 | <div class="flt-l"> |
||
70 | <div class="pageHeading"><?php echo $cInfo->customers_lastname.' '.$cInfo->customers_firstname; ?></div> |
||
71 | <div class="main pdg2"><?php echo BOX_HEADING_CUSTOMERS; ?></div> |
||
72 | </div>
|
||
73 | <div class="clear"></div> |
||
74 | <div class="div_box mrg5"> |
||
75 | <div class="customers-groups"> |
||
76 | <div class="flt-l"><?php if ($customers_statuses_id_array[$cInfo->customers_status]['csa_image'] != '') { echo xtc_image(DIR_WS_CATALOG.DIR_WS_ICONS . $customers_statuses_id_array[$cInfo->customers_status]['csa_image'], ''); } ?></div> |
||
77 | <div class="main" style="margin:12px 0;"><b><?php echo HEADING_TITLE_STATUS .':</b> ' . $customers_statuses_id_array[$cInfo->customers_status]['text'] ; ?></div> |
||
78 | </div>
|
||
79 | <div class="clear"></div> |
||
80 | <?php echo xtc_draw_form('customers', FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action')) . 'action=update', 'post') . |
||
81 | xtc_draw_hidden_field('customers_default_address_id', $cInfo->customers_default_address_id) . |
||
82 | xtc_draw_hidden_field('address_book_id', $cInfo->address_book_id) . |
||
83 | xtc_draw_hidden_field('customers_status', $cInfo->customers_status); ?> |
||
84 | <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_PERSONAL; ?></span></div> |
||
85 | <div class="formAreaC"> |
||
86 | <table class="tableConfig borderall"> |
||
87 | <?php
|
||
88 | 2 | root | |
89 | <?php |
||
90 | # TESTMODUS
|
||
91 | if($_GET['cID'] == $_SESSION['customer_id']){ |
||
92 | ?>
|
||
93 | <tr>
|
||
94 | <td class="dataTableConfig col-left">Testmodus (IP):</td> |
||
95 | <td class="dataTableConfig col-single-right"> |
||
96 | <?php
|
||
97 | echo xtc_draw_checkbox_field('ip_testmodus', 1, ($cInfo->ip_testmodus == $_SERVER['REMOTE_ADDR'])); |
||
98 | ?>
|
||
99 | </td>
|
||
100 | </tr>
|
||
101 | <?php
|
||
102 | } |
||
103 | ?>
|
||
104 | |||
105 | |||
106 | 1 | root | if (ACCOUNT_GENDER == 'true') { |
107 | ?>
|
||
108 | <tr>
|
||
109 | <td class="dataTableConfig col-left"><?php echo ENTRY_GENDER; ?></td> |
||
110 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_gender_error == true) ? ' col-error' : ''); ?>"> |
||
111 | <?php
|
||
112 | if ($error == true) { |
||
113 | if ($entry_gender_error == true) { |
||
114 | echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender).' '.ENTRY_GENDER_ERROR; |
||
115 | } else {
|
||
116 | echo get_customers_gender($cInfo->customers_gender); |
||
117 | echo xtc_draw_hidden_field('customers_gender', $cInfo->customers_gender); |
||
118 | } |
||
119 | } else {
|
||
120 | echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender); |
||
121 | } |
||
122 | ?>
|
||
123 | </td>
|
||
124 | |||
125 | </tr>
|
||
126 | <?php
|
||
127 | } |
||
128 | echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
||
129 | ?>
|
||
130 | <td class="dataTableConfig col-left"><?php echo ENTRY_CID; ?></td> |
||
131 | <td class="dataTableConfig col-single-right bg_notice"> |
||
132 | <?php
|
||
133 | echo xtc_draw_input_field('customers_cid', $cInfo->customers_cid, 'maxlength="32"', false); |
||
134 | ?>
|
||
135 | </td>
|
||
136 | |||
137 | </tr>
|
||
138 | <tr>
|
||
139 | <td class="dataTableConfig col-left"><?php echo ENTRY_FIRST_NAME; ?></td> |
||
140 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_firstname_error == true) ? ' col-error' : ''); ?>"> |
||
141 | <?php
|
||
142 | if ($error == true) { |
||
143 | if ($entry_firstname_error == true) { |
||
144 | echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"').' '.ENTRY_FIRST_NAME_ERROR; |
||
145 | } else {
|
||
146 | echo $cInfo->customers_firstname.xtc_draw_hidden_field('customers_firstname', $cInfo->customers_firstname); |
||
147 | } |
||
148 | } else {
|
||
149 | echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true); |
||
150 | } |
||
151 | ?>
|
||
152 | </td>
|
||
153 | |||
154 | </tr>
|
||
155 | <tr>
|
||
156 | <td class="dataTableConfig col-left"><?php echo ENTRY_LAST_NAME; ?></td> |
||
157 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_lastname_error == true) ? ' col-error' : ''); ?>"> |
||
158 | <?php
|
||
159 | if ($error == true) { |
||
160 | if ($entry_lastname_error == true) { |
||
161 | echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"').' '.ENTRY_LAST_NAME_ERROR; |
||
162 | } else {
|
||
163 | echo $cInfo->customers_lastname.xtc_draw_hidden_field('customers_lastname', $cInfo->customers_lastname); |
||
164 | } |
||
165 | } else {
|
||
166 | echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true); |
||
167 | } |
||
168 | ?>
|
||
169 | </td>
|
||
170 | |||
171 | </tr>
|
||
172 | <?php
|
||
173 | if (ACCOUNT_DOB == 'true') { |
||
174 | echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
||
175 | ?>
|
||
176 | <td class="dataTableConfig col-left"><?php echo ENTRY_DATE_OF_BIRTH; ?></td> |
||
177 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_date_of_birth_error == true) ? ' col-error' : ''); ?>"> |
||
178 | <?php
|
||
179 | if ($error == true) { |
||
180 | if ($entry_date_of_birth_error == true) { |
||
181 | echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"').' '.ENTRY_DATE_OF_BIRTH_ERROR; |
||
182 | } else {
|
||
183 | echo xtc_date_short($cInfo->customers_dob).xtc_draw_hidden_field('customers_dob', xtc_date_short($cInfo->customers_dob)); |
||
184 | } |
||
185 | } else {
|
||
186 | echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"', true); |
||
187 | } |
||
188 | ?>
|
||
189 | </td>
|
||
190 | |||
191 | </tr>
|
||
192 | <?php
|
||
193 | } |
||
194 | echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
||
195 | ?>
|
||
196 | <td class="dataTableConfig col-left"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> |
||
197 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_email_address_error == true) ? ' col-error' : ''); ?>"> |
||
198 | <?php
|
||
199 | if ($error == true) { |
||
200 | if ($entry_email_address_error == true) { |
||
201 | echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_ERROR; |
||
202 | } elseif ($entry_email_address_check_error == true) { |
||
203 | echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_CHECK_ERROR; |
||
204 | } elseif ($entry_email_address_exists == true) { |
||
205 | echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"').' '.ENTRY_EMAIL_ADDRESS_ERROR_EXISTS; |
||
206 | } else {
|
||
207 | echo $cInfo->customers_email_address.xtc_draw_hidden_field('customers_email_address', $cInfo->customers_email_address); |
||
208 | } |
||
209 | } else {
|
||
210 | echo xtc_draw_input_field('customers_email_address', $cInfo->customers_email_address, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');" maxlength="96"', true); |
||
211 | } |
||
212 | ?>
|
||
213 | </td>
|
||
214 | |||
215 | </tr>
|
||
216 | </table>
|
||
217 | </div>
|
||
218 | <?php
|
||
219 | if (ACCOUNT_COMPANY == 'true') { |
||
220 | ?>
|
||
221 | <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_COMPANY; ?></span></div> |
||
222 | <div class="formAreaC"> |
||
223 | <table class="tableConfig borderall"> |
||
224 | <tr>
|
||
225 | <td class="dataTableConfig col-left"><?php echo ENTRY_COMPANY; ?></td> |
||
226 | <td class="dataTableConfig col-single-right"> |
||
227 | <?php
|
||
228 | echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="64"'); |
||
229 | ?>
|
||
230 | </td>
|
||
231 | |||
232 | </tr>
|
||
233 | <?php
|
||
234 | if(ACCOUNT_COMPANY_VAT_CHECK == 'true'){ |
||
235 | if ($action == 'edit' && $cInfo->customers_vat_id != '') { |
||
236 | switch ($cInfo->customers_vat_id_status) { |
||
237 | case '0' : |
||
238 | $entry_vat_error_text = TEXT_VAT_FALSE; |
||
239 | break;
|
||
240 | case '1' : |
||
241 | $entry_vat_error_text = TEXT_VAT_TRUE; |
||
242 | break;
|
||
243 | case '8' : |
||
244 | $entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY; |
||
245 | break;
|
||
246 | case '94' : |
||
247 | $entry_vat_error_text = TEXT_VAT_INVALID_INPUT; |
||
248 | break;
|
||
249 | case '95' : |
||
250 | $entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE; |
||
251 | break;
|
||
252 | case '96' : |
||
253 | $entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE; |
||
254 | break;
|
||
255 | case '97' : |
||
256 | $entry_vat_error_text = TEXT_VAT_TIMEOUT; |
||
257 | break;
|
||
258 | case '98' : |
||
259 | $entry_vat_error_text = TEXT_VAT_SERVER_BUSY; |
||
260 | break;
|
||
261 | case '99' : |
||
262 | $entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT; |
||
263 | break;
|
||
264 | } |
||
265 | } |
||
266 | echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
||
267 | ?>
|
||
268 | <td class="dataTableConfig col-left"><?php echo ENTRY_VAT_ID; ?></td> |
||
269 | <td class="dataTableConfig col-single-right"> |
||
270 | <?php
|
||
271 | echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text; |
||
272 | /*
|
||
273 | if ($error == true) {
|
||
274 | if ($entry_vat_error == true) {
|
||
275 | echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text;
|
||
276 | } else {
|
||
277 | echo $cInfo->customers_vat_id.xtc_draw_hidden_field('customers_vat_id');
|
||
278 | }
|
||
279 | } else {
|
||
280 | echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"');
|
||
281 | }
|
||
282 | */
|
||
283 | ?>
|
||
284 | </td>
|
||
285 | </tr>
|
||
286 | <?php
|
||
287 | } |
||
288 | ?>
|
||
289 | </table>
|
||
290 | </div>
|
||
291 | <?php
|
||
292 | } |
||
293 | ?>
|
||
294 | |||
295 | <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_ADDRESS; ?></span></div> |
||
296 | <div class="formAreaC"> |
||
297 | <table class="tableConfig borderall"> |
||
298 | <tr>
|
||
299 | <td class="dataTableConfig col-left"><?php echo ENTRY_STREET_ADDRESS; ?></td> |
||
300 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_street_address_error == true) ? ' col-error' : ''); ?>"> |
||
301 | <?php
|
||
302 | if ($error == true) { |
||
303 | if ($entry_street_address_error == true) { |
||
304 | echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"').' '.ENTRY_STREET_ADDRESS_ERROR; |
||
305 | } else {
|
||
306 | echo $cInfo->entry_street_address.xtc_draw_hidden_field('entry_street_address', $cInfo->entry_street_address); |
||
307 | } |
||
308 | } else {
|
||
309 | echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true); |
||
310 | } |
||
311 | ?>
|
||
312 | </td>
|
||
313 | |||
314 | </tr>
|
||
315 | <?php
|
||
316 | if (ACCOUNT_SUBURB == 'true') { |
||
317 | ?>
|
||
318 | <tr>
|
||
319 | <td class="dataTableConfig col-left"><?php echo ENTRY_SUBURB; ?></td> |
||
320 | <td class="dataTableConfig col-single-right"> |
||
321 | <?php
|
||
322 | echo xtc_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"'); |
||
323 | ?>
|
||
324 | </td>
|
||
325 | |||
326 | </tr>
|
||
327 | <?php
|
||
328 | } |
||
329 | ?>
|
||
330 | <tr>
|
||
331 | <td class="dataTableConfig col-left"><?php echo ENTRY_POST_CODE; ?></td> |
||
332 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_post_code_error == true) ? ' col-error' : ''); ?>"> |
||
333 | <?php
|
||
334 | if ($error == true) { |
||
335 | if ($entry_post_code_error == true) { |
||
336 | echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"').' '.ENTRY_POST_CODE_ERROR; |
||
337 | } else {
|
||
338 | echo $cInfo->entry_postcode.xtc_draw_hidden_field('entry_postcode', $cInfo->entry_postcode); |
||
339 | } |
||
340 | } else {
|
||
341 | echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true); |
||
342 | } |
||
343 | ?>
|
||
344 | </td>
|
||
345 | |||
346 | </tr>
|
||
347 | <tr>
|
||
348 | <td class="dataTableConfig col-left"><?php echo ENTRY_CITY; ?></td> |
||
349 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_city_error == true) ? ' col-error' : ''); ?>"> |
||
350 | <?php
|
||
351 | if ($error == true) { |
||
352 | if ($entry_city_error == true) { |
||
353 | echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"').' '.ENTRY_CITY_ERROR; |
||
354 | } else {
|
||
355 | echo $cInfo->entry_city.xtc_draw_hidden_field('entry_city', $cInfo->entry_city); |
||
356 | } |
||
357 | } else {
|
||
358 | echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true); |
||
359 | } |
||
360 | ?>
|
||
361 | </td>
|
||
362 | |||
363 | </tr>
|
||
364 | |||
365 | <tr>
|
||
366 | <td class="dataTableConfig col-left"><?php echo ENTRY_COUNTRY; ?></td> |
||
367 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_country_error == true) ? ' col-error' : ''); ?>"> |
||
368 | <?php
|
||
369 | if ($error == true) { |
||
370 | if ($entry_country_error == true) { |
||
371 | echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"').' '.ENTRY_COUNTRY_ERROR; |
||
372 | } else {
|
||
373 | echo xtc_get_country_name($cInfo->entry_country_id).xtc_draw_hidden_field('entry_country_id', $cInfo->entry_country_id); |
||
374 | } |
||
375 | } else {
|
||
376 | echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"'); |
||
377 | } |
||
378 | ?>
|
||
379 | </td>
|
||
380 | </tr>
|
||
381 | <?php
|
||
382 | if (ACCOUNT_STATE == 'true') { |
||
383 | ?>
|
||
384 | <tr id="states"> |
||
385 | <td class="dataTableConfig col-left"><?php echo ENTRY_STATE; ?></td> |
||
386 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_state_error == true) ? ' col-error' : ''); ?>" id="entry_state"> |
||
387 | <?php
|
||
388 | $entry_state = xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state); |
||
389 | if ($error == true) { |
||
390 | if ($entry_state_error == true) { |
||
391 | if ($entry_state_has_zones == true) { |
||
392 | $zones_array = array (); |
||
393 | $zones_query = xtc_db_query("SELECT zone_name FROM ".TABLE_ZONES." WHERE zone_country_id = '".xtc_db_input($cInfo->entry_country_id)."' order by zone_name"); |
||
394 | while ($zones_values = xtc_db_fetch_array($zones_query)) { |
||
395 | $zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); |
||
396 | } |
||
397 | echo xtc_draw_pull_down_menu('entry_state', $zones_array ,'', 'style="width:250px"').' '.ENTRY_STATE_ERROR; |
||
398 | } else {
|
||
399 | echo xtc_draw_input_field('entry_state', xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)).' '.ENTRY_STATE_ERROR; |
||
400 | } |
||
401 | } else {
|
||
402 | echo $entry_state.xtc_draw_hidden_field('entry_zone_id', $cInfo->entry_zone_id).xtc_draw_hidden_field('entry_state', $cInfo->entry_state); |
||
403 | } |
||
404 | } else {
|
||
405 | echo xtc_draw_input_field('entry_state', xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)); |
||
406 | } |
||
407 | ?>
|
||
408 | </td>
|
||
409 | </tr>
|
||
410 | <?php
|
||
411 | } |
||
412 | ?>
|
||
413 | |||
414 | </table>
|
||
415 | </div>
|
||
416 | <?php
|
||
417 | if ($cInfo->customers_default_address_id == $cInfo->address_book_id) { |
||
418 | ?>
|
||
419 | |||
420 | <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_CONTACT; ?></span></div> |
||
421 | |||
422 | <?php
|
||
423 | } |
||
424 | $style = ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? ' style="display:none;"' : ''; |
||
425 | ?>
|
||
426 | <div class="formAreaC"<?php $style;?>> |
||
427 | <table class="tableConfig borderall"> |
||
428 | <tr>
|
||
429 | <td class="dataTableConfig col-left"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> |
||
430 | <td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_telephone_error == true) ? ' col-error' : ''); ?>"> |
||
431 | <?php
|
||
432 | if ($error == true) { |
||
433 | if ($entry_telephone_error == true) { |
||
434 | echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"').' '.ENTRY_TELEPHONE_NUMBER_ERROR; |
||
435 | } else {
|
||
436 | echo $cInfo->customers_telephone.xtc_draw_hidden_field('customers_telephone', $cInfo->customers_telephone); |
||
437 | } |
||
438 | } else {
|
||
439 | echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', (ACCOUNT_TELEPHONE_OPTIONAL == 'false')); |
||
440 | } |
||
441 | ?>
|
||
442 | </td>
|
||
443 | |||
444 | </tr>
|
||
445 | <tr>
|
||
446 | <td class="dataTableConfig col-left"><?php echo ENTRY_FAX_NUMBER; ?></td> |
||
447 | <td class="dataTableConfig col-single-right"> |
||
448 | <?php
|
||
449 | if ($processed == true) { |
||
450 | echo $cInfo->customers_fax.xtc_draw_hidden_field('customers_fax', $cInfo->customers_fax); |
||
451 | } else {
|
||
452 | echo xtc_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"'); |
||
453 | } |
||
454 | ?>
|
||
455 | </td>
|
||
456 | |||
457 | </tr>
|
||
458 | </table>
|
||
459 | </div>
|
||
460 | <?php
|
||
461 | if ($cInfo->customers_default_address_id == $cInfo->address_book_id) { |
||
462 | ?>
|
||
463 | |||
464 | <div class="formAreaTitle"><span class="title"><?php echo CATEGORY_OPTIONS; ?></span></div> |
||
465 | <div class="formAreaC"> |
||
466 | <table class="tableConfig borderall"> |
||
467 | <tr>
|
||
468 | <td class="dataTableConfig col-left"><?php echo ENTRY_PAYMENT_UNALLOWED; ?></td> |
||
469 | <td class="dataTableConfig col-single-right"> |
||
470 | <?php
|
||
471 | echo xtc_cfg_checkbox_unallowed_module('payment', 'payment_unallowed', $cInfo->payment_unallowed); |
||
472 | ?>
|
||
473 | </td>
|
||
474 | </tr>
|
||
475 | <tr>
|
||
476 | <td class="dataTableConfig col-left"><?php echo ENTRY_SHIPPING_UNALLOWED; ?></td> |
||
477 | <td class="dataTableConfig col-single-right"> |
||
478 | <?php
|
||
479 | echo xtc_cfg_checkbox_unallowed_module('shipping', 'shipping_unallowed', $cInfo->shipping_unallowed); |
||
480 | ?>
|
||
481 | </td>
|
||
482 | </tr>
|
||
483 | <tr>
|
||
484 | <td class="dataTableConfig col-left"><?php echo ENTRY_NEW_PASSWORD; ?></td> |
||
485 | <td class="dataTableConfig col-single-right bg_notice<?php echo (($error == true && $entry_password_error == true) ? ' col-error' : ''); ?>"> |
||
486 | <?php
|
||
487 | if ($error == true) { |
||
488 | if ($entry_password_error == true) { |
||
489 | echo xtc_draw_password_field('customers_password', $cInfo->customers_password, false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"').' '.ENTRY_PASSWORD_ERROR; |
||
490 | } else {
|
||
491 | echo xtc_draw_password_field('customers_password', $cInfo->customers_password, false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"'); |
||
492 | } |
||
493 | } else {
|
||
494 | echo xtc_draw_password_field('customers_password', '', false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"'); |
||
495 | } |
||
496 | ?>
|
||
497 | </td>
|
||
498 | </tr>
|
||
499 | <?php
|
||
500 | if (ACTIVATE_GIFT_SYSTEM=='true') { |
||
501 | ?>
|
||
502 | <tr>
|
||
503 | <td class="dataTableConfig col-left"><?php echo TABLE_HEADING_AMOUNT; ?></td> |
||
504 | <td class="dataTableConfig col-single-right"> |
||
505 | <?php echo $xtPrice->xtcFormatCurrency($cInfo->amount).xtc_draw_hidden_field('amount', $cInfo->amount); |
||
506 | /*
|
||
507 | if ($processed == true) {
|
||
508 | echo $cInfo->amount.xtc_draw_hidden_field('amount', $cInfo->amount);
|
||
509 | } else {
|
||
510 | echo xtc_draw_input_field('amount', $cInfo->amount);
|
||
511 | }
|
||
512 | */
|
||
513 | ?>
|
||
514 | </td>
|
||
515 | </tr>
|
||
516 | <?php
|
||
517 | } |
||
518 | ?>
|
||
519 | <tr>
|
||
520 | <?php
|
||
521 | include(DIR_WS_MODULES . FILENAME_CUSTOMER_MEMO); |
||
522 | ?>
|
||
523 | </tr>
|
||
524 | </table>
|
||
525 | </div>
|
||
526 | <?php
|
||
527 | } |
||
528 | ?>
|
||
529 | |||
530 | <div class="main mrg5"><input type="submit" class="button" onclick="this.blur();" value="<?php echo BUTTON_UPDATE; ?>"><?php echo ' <a class="button" onclick="this.blur();" href="' . xtc_href_link(FILENAME_CUSTOMERS, xtc_get_all_get_params(array('action', 'edit'))) .'">' . BUTTON_CANCEL . '</a>'; ?></div> |
||
531 | |||
532 | </form>
|
||
533 | </div>
|
||
534 | |||
535 | <?php require(DIR_WS_INCLUDES . 'javascript/jquery.entry_state.js.php'); ?> |
||
536 | <script>
|
||
537 | $(document).ready(function () {
|
||
538 | create_states($('select[name="entry_country_id"]').val(), 'entry_state');
|
||
539 | |||
540 | $('select[name="entry_country_id"]').change(function() {
|
||
541 | create_states($(this).val(), 'entry_state');
|
||
542 | });
|
||
543 | });
|
||
544 | </script> |