testmodus / admin / includes / modules / customers_edit.php @ 1
Historie | Anzeigen | Annotieren | Download (26,7 KB)
1 |
<?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 |
if (ACCOUNT_GENDER == 'true') { |
89 |
?>
|
90 |
<tr>
|
91 |
<td class="dataTableConfig col-left"><?php echo ENTRY_GENDER; ?></td> |
92 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_gender_error == true) ? ' col-error' : ''); ?>"> |
93 |
<?php
|
94 |
if ($error == true) { |
95 |
if ($entry_gender_error == true) { |
96 |
echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender).' '.ENTRY_GENDER_ERROR; |
97 |
} else {
|
98 |
echo get_customers_gender($cInfo->customers_gender); |
99 |
echo xtc_draw_hidden_field('customers_gender', $cInfo->customers_gender); |
100 |
} |
101 |
} else {
|
102 |
echo xtc_draw_pull_down_menu('customers_gender', get_customers_gender(), $cInfo->customers_gender); |
103 |
} |
104 |
?>
|
105 |
</td>
|
106 |
|
107 |
</tr>
|
108 |
<?php
|
109 |
} |
110 |
echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
111 |
?>
|
112 |
<td class="dataTableConfig col-left"><?php echo ENTRY_CID; ?></td> |
113 |
<td class="dataTableConfig col-single-right bg_notice"> |
114 |
<?php
|
115 |
echo xtc_draw_input_field('customers_cid', $cInfo->customers_cid, 'maxlength="32"', false); |
116 |
?>
|
117 |
</td>
|
118 |
|
119 |
</tr>
|
120 |
<tr>
|
121 |
<td class="dataTableConfig col-left"><?php echo ENTRY_FIRST_NAME; ?></td> |
122 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_firstname_error == true) ? ' col-error' : ''); ?>"> |
123 |
<?php
|
124 |
if ($error == true) { |
125 |
if ($entry_firstname_error == true) { |
126 |
echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"').' '.ENTRY_FIRST_NAME_ERROR; |
127 |
} else {
|
128 |
echo $cInfo->customers_firstname.xtc_draw_hidden_field('customers_firstname', $cInfo->customers_firstname); |
129 |
} |
130 |
} else {
|
131 |
echo xtc_draw_input_field('customers_firstname', $cInfo->customers_firstname, 'maxlength="32"', true); |
132 |
} |
133 |
?>
|
134 |
</td>
|
135 |
|
136 |
</tr>
|
137 |
<tr>
|
138 |
<td class="dataTableConfig col-left"><?php echo ENTRY_LAST_NAME; ?></td> |
139 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_lastname_error == true) ? ' col-error' : ''); ?>"> |
140 |
<?php
|
141 |
if ($error == true) { |
142 |
if ($entry_lastname_error == true) { |
143 |
echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"').' '.ENTRY_LAST_NAME_ERROR; |
144 |
} else {
|
145 |
echo $cInfo->customers_lastname.xtc_draw_hidden_field('customers_lastname', $cInfo->customers_lastname); |
146 |
} |
147 |
} else {
|
148 |
echo xtc_draw_input_field('customers_lastname', $cInfo->customers_lastname, 'maxlength="32"', true); |
149 |
} |
150 |
?>
|
151 |
</td>
|
152 |
|
153 |
</tr>
|
154 |
<?php
|
155 |
if (ACCOUNT_DOB == 'true') { |
156 |
echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
157 |
?>
|
158 |
<td class="dataTableConfig col-left"><?php echo ENTRY_DATE_OF_BIRTH; ?></td> |
159 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_date_of_birth_error == true) ? ' col-error' : ''); ?>"> |
160 |
<?php
|
161 |
if ($error == true) { |
162 |
if ($entry_date_of_birth_error == true) { |
163 |
echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"').' '.ENTRY_DATE_OF_BIRTH_ERROR; |
164 |
} else {
|
165 |
echo xtc_date_short($cInfo->customers_dob).xtc_draw_hidden_field('customers_dob', xtc_date_short($cInfo->customers_dob)); |
166 |
} |
167 |
} else {
|
168 |
echo xtc_draw_input_field('customers_dob', xtc_date_short($cInfo->customers_dob), 'maxlength="10"', true); |
169 |
} |
170 |
?>
|
171 |
</td>
|
172 |
|
173 |
</tr>
|
174 |
<?php
|
175 |
} |
176 |
echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
177 |
?>
|
178 |
<td class="dataTableConfig col-left"><?php echo ENTRY_EMAIL_ADDRESS; ?></td> |
179 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_email_address_error == true) ? ' col-error' : ''); ?>"> |
180 |
<?php
|
181 |
if ($error == true) { |
182 |
if ($entry_email_address_error == true) { |
183 |
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; |
184 |
} elseif ($entry_email_address_check_error == true) { |
185 |
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; |
186 |
} elseif ($entry_email_address_exists == true) { |
187 |
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; |
188 |
} else {
|
189 |
echo $cInfo->customers_email_address.xtc_draw_hidden_field('customers_email_address', $cInfo->customers_email_address); |
190 |
} |
191 |
} else {
|
192 |
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); |
193 |
} |
194 |
?>
|
195 |
</td>
|
196 |
|
197 |
</tr>
|
198 |
</table>
|
199 |
</div>
|
200 |
<?php
|
201 |
if (ACCOUNT_COMPANY == 'true') { |
202 |
?>
|
203 |
<div class="formAreaTitle"><span class="title"><?php echo CATEGORY_COMPANY; ?></span></div> |
204 |
<div class="formAreaC"> |
205 |
<table class="tableConfig borderall"> |
206 |
<tr>
|
207 |
<td class="dataTableConfig col-left"><?php echo ENTRY_COMPANY; ?></td> |
208 |
<td class="dataTableConfig col-single-right"> |
209 |
<?php
|
210 |
echo xtc_draw_input_field('entry_company', $cInfo->entry_company, 'maxlength="64"'); |
211 |
?>
|
212 |
</td>
|
213 |
|
214 |
</tr>
|
215 |
<?php
|
216 |
if(ACCOUNT_COMPANY_VAT_CHECK == 'true'){ |
217 |
if ($action == 'edit' && $cInfo->customers_vat_id != '') { |
218 |
switch ($cInfo->customers_vat_id_status) { |
219 |
case '0' : |
220 |
$entry_vat_error_text = TEXT_VAT_FALSE; |
221 |
break;
|
222 |
case '1' : |
223 |
$entry_vat_error_text = TEXT_VAT_TRUE; |
224 |
break;
|
225 |
case '8' : |
226 |
$entry_vat_error_text = TEXT_VAT_UNKNOWN_COUNTRY; |
227 |
break;
|
228 |
case '94' : |
229 |
$entry_vat_error_text = TEXT_VAT_INVALID_INPUT; |
230 |
break;
|
231 |
case '95' : |
232 |
$entry_vat_error_text = TEXT_VAT_SERVICE_UNAVAILABLE; |
233 |
break;
|
234 |
case '96' : |
235 |
$entry_vat_error_text = TEXT_VAT_MS_UNAVAILABLE; |
236 |
break;
|
237 |
case '97' : |
238 |
$entry_vat_error_text = TEXT_VAT_TIMEOUT; |
239 |
break;
|
240 |
case '98' : |
241 |
$entry_vat_error_text = TEXT_VAT_SERVER_BUSY; |
242 |
break;
|
243 |
case '99' : |
244 |
$entry_vat_error_text = TEXT_VAT_NO_PHP5_SOAP_SUPPORT; |
245 |
break;
|
246 |
} |
247 |
} |
248 |
echo ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? '<tr style="display:none;">' : '<tr>'; |
249 |
?>
|
250 |
<td class="dataTableConfig col-left"><?php echo ENTRY_VAT_ID; ?></td> |
251 |
<td class="dataTableConfig col-single-right"> |
252 |
<?php
|
253 |
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text; |
254 |
/*
|
255 |
if ($error == true) {
|
256 |
if ($entry_vat_error == true) {
|
257 |
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"').' '.$entry_vat_error_text;
|
258 |
} else {
|
259 |
echo $cInfo->customers_vat_id.xtc_draw_hidden_field('customers_vat_id');
|
260 |
}
|
261 |
} else {
|
262 |
echo xtc_draw_input_field('customers_vat_id', $cInfo->customers_vat_id, 'maxlength="32"');
|
263 |
}
|
264 |
*/
|
265 |
?>
|
266 |
</td>
|
267 |
</tr>
|
268 |
<?php
|
269 |
} |
270 |
?>
|
271 |
</table>
|
272 |
</div>
|
273 |
<?php
|
274 |
} |
275 |
?>
|
276 |
|
277 |
<div class="formAreaTitle"><span class="title"><?php echo CATEGORY_ADDRESS; ?></span></div> |
278 |
<div class="formAreaC"> |
279 |
<table class="tableConfig borderall"> |
280 |
<tr>
|
281 |
<td class="dataTableConfig col-left"><?php echo ENTRY_STREET_ADDRESS; ?></td> |
282 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_street_address_error == true) ? ' col-error' : ''); ?>"> |
283 |
<?php
|
284 |
if ($error == true) { |
285 |
if ($entry_street_address_error == true) { |
286 |
echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"').' '.ENTRY_STREET_ADDRESS_ERROR; |
287 |
} else {
|
288 |
echo $cInfo->entry_street_address.xtc_draw_hidden_field('entry_street_address', $cInfo->entry_street_address); |
289 |
} |
290 |
} else {
|
291 |
echo xtc_draw_input_field('entry_street_address', $cInfo->entry_street_address, 'maxlength="64"', true); |
292 |
} |
293 |
?>
|
294 |
</td>
|
295 |
|
296 |
</tr>
|
297 |
<?php
|
298 |
if (ACCOUNT_SUBURB == 'true') { |
299 |
?>
|
300 |
<tr>
|
301 |
<td class="dataTableConfig col-left"><?php echo ENTRY_SUBURB; ?></td> |
302 |
<td class="dataTableConfig col-single-right"> |
303 |
<?php
|
304 |
echo xtc_draw_input_field('entry_suburb', $cInfo->entry_suburb, 'maxlength="32"'); |
305 |
?>
|
306 |
</td>
|
307 |
|
308 |
</tr>
|
309 |
<?php
|
310 |
} |
311 |
?>
|
312 |
<tr>
|
313 |
<td class="dataTableConfig col-left"><?php echo ENTRY_POST_CODE; ?></td> |
314 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_post_code_error == true) ? ' col-error' : ''); ?>"> |
315 |
<?php
|
316 |
if ($error == true) { |
317 |
if ($entry_post_code_error == true) { |
318 |
echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"').' '.ENTRY_POST_CODE_ERROR; |
319 |
} else {
|
320 |
echo $cInfo->entry_postcode.xtc_draw_hidden_field('entry_postcode', $cInfo->entry_postcode); |
321 |
} |
322 |
} else {
|
323 |
echo xtc_draw_input_field('entry_postcode', $cInfo->entry_postcode, 'maxlength="8"', true); |
324 |
} |
325 |
?>
|
326 |
</td>
|
327 |
|
328 |
</tr>
|
329 |
<tr>
|
330 |
<td class="dataTableConfig col-left"><?php echo ENTRY_CITY; ?></td> |
331 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_city_error == true) ? ' col-error' : ''); ?>"> |
332 |
<?php
|
333 |
if ($error == true) { |
334 |
if ($entry_city_error == true) { |
335 |
echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"').' '.ENTRY_CITY_ERROR; |
336 |
} else {
|
337 |
echo $cInfo->entry_city.xtc_draw_hidden_field('entry_city', $cInfo->entry_city); |
338 |
} |
339 |
} else {
|
340 |
echo xtc_draw_input_field('entry_city', $cInfo->entry_city, 'maxlength="32"', true); |
341 |
} |
342 |
?>
|
343 |
</td>
|
344 |
|
345 |
</tr>
|
346 |
|
347 |
<tr>
|
348 |
<td class="dataTableConfig col-left"><?php echo ENTRY_COUNTRY; ?></td> |
349 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_country_error == true) ? ' col-error' : ''); ?>"> |
350 |
<?php
|
351 |
if ($error == true) { |
352 |
if ($entry_country_error == true) { |
353 |
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"').' '.ENTRY_COUNTRY_ERROR; |
354 |
} else {
|
355 |
echo xtc_get_country_name($cInfo->entry_country_id).xtc_draw_hidden_field('entry_country_id', $cInfo->entry_country_id); |
356 |
} |
357 |
} else {
|
358 |
echo xtc_draw_pull_down_menu('entry_country_id', xtc_get_countries('',1), $cInfo->entry_country_id, 'style="width:250px"'); |
359 |
} |
360 |
?>
|
361 |
</td>
|
362 |
</tr>
|
363 |
<?php
|
364 |
if (ACCOUNT_STATE == 'true') { |
365 |
?>
|
366 |
<tr id="states"> |
367 |
<td class="dataTableConfig col-left"><?php echo ENTRY_STATE; ?></td> |
368 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_state_error == true) ? ' col-error' : ''); ?>" id="entry_state"> |
369 |
<?php
|
370 |
$entry_state = xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state); |
371 |
if ($error == true) { |
372 |
if ($entry_state_error == true) { |
373 |
if ($entry_state_has_zones == true) { |
374 |
$zones_array = array (); |
375 |
$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"); |
376 |
while ($zones_values = xtc_db_fetch_array($zones_query)) { |
377 |
$zones_array[] = array ('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']); |
378 |
} |
379 |
echo xtc_draw_pull_down_menu('entry_state', $zones_array ,'', 'style="width:250px"').' '.ENTRY_STATE_ERROR; |
380 |
} else {
|
381 |
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; |
382 |
} |
383 |
} else {
|
384 |
echo $entry_state.xtc_draw_hidden_field('entry_zone_id', $cInfo->entry_zone_id).xtc_draw_hidden_field('entry_state', $cInfo->entry_state); |
385 |
} |
386 |
} else {
|
387 |
echo xtc_draw_input_field('entry_state', xtc_get_zone_code($cInfo->entry_country_id, $cInfo->entry_zone_id, $cInfo->entry_state)); |
388 |
} |
389 |
?>
|
390 |
</td>
|
391 |
</tr>
|
392 |
<?php
|
393 |
} |
394 |
?>
|
395 |
|
396 |
</table>
|
397 |
</div>
|
398 |
<?php
|
399 |
if ($cInfo->customers_default_address_id == $cInfo->address_book_id) { |
400 |
?>
|
401 |
|
402 |
<div class="formAreaTitle"><span class="title"><?php echo CATEGORY_CONTACT; ?></span></div> |
403 |
|
404 |
<?php
|
405 |
} |
406 |
$style = ($cInfo->customers_default_address_id != $cInfo->address_book_id) ? ' style="display:none;"' : ''; |
407 |
?>
|
408 |
<div class="formAreaC"<?php $style;?>> |
409 |
<table class="tableConfig borderall"> |
410 |
<tr>
|
411 |
<td class="dataTableConfig col-left"><?php echo ENTRY_TELEPHONE_NUMBER; ?></td> |
412 |
<td class="dataTableConfig col-single-right<?php echo (($error == true && $entry_telephone_error == true) ? ' col-error' : ''); ?>"> |
413 |
<?php
|
414 |
if ($error == true) { |
415 |
if ($entry_telephone_error == true) { |
416 |
echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"').' '.ENTRY_TELEPHONE_NUMBER_ERROR; |
417 |
} else {
|
418 |
echo $cInfo->customers_telephone.xtc_draw_hidden_field('customers_telephone', $cInfo->customers_telephone); |
419 |
} |
420 |
} else {
|
421 |
echo xtc_draw_input_field('customers_telephone', $cInfo->customers_telephone, 'maxlength="32"', (ACCOUNT_TELEPHONE_OPTIONAL == 'false')); |
422 |
} |
423 |
?>
|
424 |
</td>
|
425 |
|
426 |
</tr>
|
427 |
<tr>
|
428 |
<td class="dataTableConfig col-left"><?php echo ENTRY_FAX_NUMBER; ?></td> |
429 |
<td class="dataTableConfig col-single-right"> |
430 |
<?php
|
431 |
if ($processed == true) { |
432 |
echo $cInfo->customers_fax.xtc_draw_hidden_field('customers_fax', $cInfo->customers_fax); |
433 |
} else {
|
434 |
echo xtc_draw_input_field('customers_fax', $cInfo->customers_fax, 'maxlength="32"'); |
435 |
} |
436 |
?>
|
437 |
</td>
|
438 |
|
439 |
</tr>
|
440 |
</table>
|
441 |
</div>
|
442 |
<?php
|
443 |
if ($cInfo->customers_default_address_id == $cInfo->address_book_id) { |
444 |
?>
|
445 |
|
446 |
<div class="formAreaTitle"><span class="title"><?php echo CATEGORY_OPTIONS; ?></span></div> |
447 |
<div class="formAreaC"> |
448 |
<table class="tableConfig borderall"> |
449 |
<tr>
|
450 |
<td class="dataTableConfig col-left"><?php echo ENTRY_PAYMENT_UNALLOWED; ?></td> |
451 |
<td class="dataTableConfig col-single-right"> |
452 |
<?php
|
453 |
echo xtc_cfg_checkbox_unallowed_module('payment', 'payment_unallowed', $cInfo->payment_unallowed); |
454 |
?>
|
455 |
</td>
|
456 |
</tr>
|
457 |
<tr>
|
458 |
<td class="dataTableConfig col-left"><?php echo ENTRY_SHIPPING_UNALLOWED; ?></td> |
459 |
<td class="dataTableConfig col-single-right"> |
460 |
<?php
|
461 |
echo xtc_cfg_checkbox_unallowed_module('shipping', 'shipping_unallowed', $cInfo->shipping_unallowed); |
462 |
?>
|
463 |
</td>
|
464 |
</tr>
|
465 |
<tr>
|
466 |
<td class="dataTableConfig col-left"><?php echo ENTRY_NEW_PASSWORD; ?></td> |
467 |
<td class="dataTableConfig col-single-right bg_notice<?php echo (($error == true && $entry_password_error == true) ? ' col-error' : ''); ?>"> |
468 |
<?php
|
469 |
if ($error == true) { |
470 |
if ($entry_password_error == true) { |
471 |
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; |
472 |
} else {
|
473 |
echo xtc_draw_password_field('customers_password', $cInfo->customers_password, false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"'); |
474 |
} |
475 |
} else {
|
476 |
echo xtc_draw_password_field('customers_password', '', false, 'autocomplete="off" readonly="readonly" onfocus="this.removeAttribute(\'readonly\');" onblur="this.setAttribute(\'readonly\', \'readonly\');"'); |
477 |
} |
478 |
?>
|
479 |
</td>
|
480 |
</tr>
|
481 |
<?php
|
482 |
if (ACTIVATE_GIFT_SYSTEM=='true') { |
483 |
?>
|
484 |
<tr>
|
485 |
<td class="dataTableConfig col-left"><?php echo TABLE_HEADING_AMOUNT; ?></td> |
486 |
<td class="dataTableConfig col-single-right"> |
487 |
<?php echo $xtPrice->xtcFormatCurrency($cInfo->amount).xtc_draw_hidden_field('amount', $cInfo->amount); |
488 |
/*
|
489 |
if ($processed == true) {
|
490 |
echo $cInfo->amount.xtc_draw_hidden_field('amount', $cInfo->amount);
|
491 |
} else {
|
492 |
echo xtc_draw_input_field('amount', $cInfo->amount);
|
493 |
}
|
494 |
*/
|
495 |
?>
|
496 |
</td>
|
497 |
</tr>
|
498 |
<?php
|
499 |
} |
500 |
?>
|
501 |
<tr>
|
502 |
<?php
|
503 |
include(DIR_WS_MODULES . FILENAME_CUSTOMER_MEMO); |
504 |
?>
|
505 |
</tr>
|
506 |
</table>
|
507 |
</div>
|
508 |
<?php
|
509 |
} |
510 |
?>
|
511 |
|
512 |
<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> |
513 |
|
514 |
</form>
|
515 |
</div>
|
516 |
|
517 |
<?php require(DIR_WS_INCLUDES . 'javascript/jquery.entry_state.js.php'); ?> |
518 |
<script>
|
519 |
$(document).ready(function () {
|
520 |
create_states($('select[name="entry_country_id"]').val(), 'entry_state');
|
521 |
|
522 |
$('select[name="entry_country_id"]').change(function() {
|
523 |
create_states($(this).val(), 'entry_state');
|
524 |
});
|
525 |
});
|
526 |
</script>
|