PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.27
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.27
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
fluent-cart / app / Services / Renderer / AddressSelectRenderer.php

AddressSelectRenderer.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.27, at app/Services/Renderer/AddressSelectRenderer.php

467 lines 27.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Services\Renderer;
4
5 use FluentCart\App\Services\Localization\LocalizationManager;
6 use FluentCart\Framework\Support\Arr;
7
8 class AddressSelectRenderer
9 {
10 public string $address_type = 'billing';
11 public string $title = '';
12 public array $addresses = [];
13 public array $countries = [];
14 public array $primary_address = [];
15 public string $value = '';
16 public array $requirements_fields = [];
17
18 public function __construct($addresses, $primary_address, $requirements_fields, $address_type)
19 {
20 $this->title = $address_type === 'billing' ? __('Billing Address', 'fluent-cart') : __('Shipping Address', 'fluent-cart');
21 $this->addresses = $addresses;
22 $this->primary_address = $primary_address;
23 $this->requirements_fields = $requirements_fields;
24 $this->address_type = $address_type;
25 $this->countries = LocalizationManager::getInstance()->countries();
26 }
27
28 public function render()
29 {
30 ?>
31 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
32 id="<?php echo esc_attr($this->address_type); ?>_address_wrapper" role="group"
33 aria-labelledby="<?php echo esc_attr($this->address_type); ?>_address_label">
34 <div data-fluent-cart-checkout-page-form-address-select-wrapper="" class="fct_address_wrapper">
35 <?php $this->renderAddressInfo(); ?>
36 <?php $this->renderAddressModal(); ?>
37 </div>
38 </div>
39 <?php
40 }
41
42 public function renderAddressInfo()
43 {
44 $attributes = [
45 'data-fluent-cart-checkout-page-form-address-input' => '',
46 'name' => $this->address_type . '_address_id',
47 'data-required' => 'no',
48 'data-type' => 'input',
49 'id' => $this->address_type . '_address_id',
50 'checked' => 'no',
51 'value' => $this->primary_address['id'],
52 'data-country' => $this->primary_address['country'],
53 'data-state' => $this->primary_address['state'],
54 'type' => 'hidden'
55 ];
56 ?>
57 <label id="<?php echo esc_attr($this->address_type); ?>_address_label" class="sr-only">
58 <?php echo esc_html(ucfirst($this->address_type)); ?> Address
59 </label>
60
61 <input <?php RenderHelper::renderAtts($attributes); ?> aria-labelledby="<?php echo esc_attr($this->address_type); ?>_address_label
62 <?php echo esc_attr($this->address_type); ?>_address_info">
63 <div class="fct_address_info" data-fluent-cart-checkout-page-form-address-info-wrapper
64 id="<?php echo esc_attr($this->address_type); ?>_address_info">
65 <div class="fct_checkout_address_label">
66 <span><?php echo esc_html($this->primary_address['name']); ?></span>
67 <span><?php echo esc_html(Arr::get($this->primary_address, 'phone')); ?></span>
68 </div>
69 <p>
70 <?php if (!empty(Arr::get($this->primary_address, 'label'))): ?>
71 <span> <?php echo esc_html(Arr::get($this->primary_address, 'label')); ?></span>
72 <?php endif; ?>
73 <?php echo esc_html($this->primary_address['formatted_address']['full_address']); ?>
74 </p>
75 </div>
76 <?php
77
78 }
79
80
81 public function renderAddressModal()
82 {
83 ?>
84 <div class="fct_address_modal_wrapper" data-fluent-cart-checkout-page-form-address-modal-wrapper="">
85 <button class="fct_address_modal_open_btn" type="button"
86 data-fluent-cart-checkout-page-form-address-modal-open-button
87 aria-label="<?php echo esc_attr__('Change Address', 'fluent-cart'); ?>">
88 <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 16 16"
89 fill="none">
90 <g clip-path="url(#clip0_3536_3207)">
91 <path
92 d="M9.38263 2.59046C9.87942 2.05222 10.1278 1.78309 10.3918 1.62611C11.0287 1.24734 11.8129 1.23556 12.4604 1.59504C12.7288 1.74403 12.9848 2.00558 13.4969 2.52867C14.0089 3.05176 14.265 3.31331 14.4108 3.58745C14.7627 4.24891 14.7512 5.05002 14.3804 5.70063C14.2267 5.97027 13.9633 6.22401 13.4364 6.7315L7.16725 12.7697C6.16875 13.7314 5.6695 14.2123 5.04554 14.456C4.42158 14.6997 3.73563 14.6818 2.36374 14.6459L2.17708 14.641C1.75943 14.6301 1.55061 14.6246 1.42922 14.4869C1.30783 14.3491 1.3244 14.1364 1.35755 13.7109L1.37555 13.4799C1.46883 12.2825 1.51548 11.6838 1.7493 11.1456C1.98312 10.6075 2.38645 10.1705 3.19311 9.2965L9.38263 2.59046Z"
93 stroke="currentColor" stroke-linejoin="round"></path>
94 <path d="M8.66699 2.66699L13.3337 7.33366" stroke="currentColor" stroke-linejoin="round"></path>
95 <path d="M9.3335 14.667L14.6668 14.667" stroke="currentColor" stroke-linecap="round"
96 stroke-linejoin="round"></path>
97 </g>
98 <defs>
99 <clipPath id="clip0_3536_3207">
100 <rect width="16" height="16" fill="white"></rect>
101 </clipPath>
102 </defs>
103 </svg>
104 <?php echo esc_html__('Change', 'fluent-cart'); ?>
105 </button>
106
107 <div data-fluent-cart-checkout-page-form-address-modal-body="" class="fct_address_modal hidden"
108 data-fluent-cart-address-type="<?php echo esc_attr($this->address_type); ?>" role="dialog" aria-modal="true"
109 aria-labelledby="<?php echo esc_attr($this->address_type); ?>_address_modal_title">
110
111 <div class="fct_address_modal_inner">
112 <div class="fct_address_modal_header">
113 <h4 id="<?php echo esc_attr($this->address_type); ?>_address_modal_title">
114 <?php echo esc_html($this->title); ?>
115 </h4>
116 </div>
117
118 <button class="fct_address_modal_close_btn" type="button"
119 data-fluent-cart-checkout-page-form-address-modal-close-button
120 aria-label="<?php echo esc_attr__('Close', 'fluent-cart'); ?>">
121 <svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
122 <path
123 d="M6.2253 4.81108C5.83477 4.42056 5.20161 4.42056 4.81108 4.81108C4.42056 5.20161 4.42056 5.83477 4.81108 6.2253L10.5858 12L4.81114 17.7747C4.42062 18.1652 4.42062 18.7984 4.81114 19.1889C5.20167 19.5794 5.83483 19.5794 6.22535 19.1889L12 13.4142L17.7747 19.1889C18.1652 19.5794 18.7984 19.5794 19.1889 19.1889C19.5794 18.7984 19.5794 18.1652 19.1889 17.7747L13.4142 12L19.189 6.2253C19.5795 5.83477 19.5795 5.20161 19.189 4.81108C18.7985 4.42056 18.1653 4.42056 17.7748 4.81108L12 10.5858L6.2253 4.81108Z">
124 </path>
125 </svg>
126 </button>
127
128 <div class="fct_address_modal_body">
129 <?php $this->renderAddressSelector(); ?>
130 <?php $this->renderAddAddressForm(); ?>
131 </div>
132
133 <?php $this->renderAddressModalFooter(); ?>
134 </div>
135 </div>
136 </div>
137 <?php
138
139 }
140
141
142 public function renderAddressModalFooter()
143 {
144 ?>
145 <div class="fct_address_modal_footer">
146 <div class="fct_address_add_btn" data-fluent-cart-checkout-page-form-address-show-add-new-modal-button
147 aria-label="<?php echo esc_attr__('Add new address', 'fluent-cart'); ?>">
148 <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
149 <path d="M7 1.6665V12.3332" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
150 stroke-linejoin="round"></path>
151 <path d="M1.6665 7H12.3332" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"
152 stroke-linejoin="round"></path>
153 </svg>
154 <?php echo esc_html__('Add Address', 'fluent-cart'); ?>
155 </div>
156
157 <button class="fct_address_apply_btn" type="button"
158 data-fluent-cart-checkout-page-form-address-modal-apply-button="" data-address-id="1"
159 aria-label="<?php echo esc_attr__('Apply selected address', 'fluent-cart'); ?>">
160 <?php echo esc_html__('Apply', 'fluent-cart'); ?>
161 </button>
162 </div>
163 <?php
164 }
165
166 public function renderAddressSelector()
167 {
168 ?>
169 <div data-fluent-cart-checkout-page-form-address-modal-address-selector-button-wrapper=""
170 class="fct_address_selector_wrapper">
171 <?php if (!empty($this->addresses)):
172 foreach ($this->addresses as $address): ?>
173 <div class="fct_address_selector" data-id="<?php echo esc_attr($address['id']); ?>"
174 data-fluent-cart-checkout-page-form-address-modal-address-selector-button=""
175 data-country="<?php echo esc_attr($address['country']); ?>"
176 data-state="<?php echo esc_attr($address['state']); ?>" role="button" tabindex="0" aria-pressed="false">
177
178 <svg class="fct_address_selector_icon" xmlns="http://www.w3.org/2000/svg" width="28" height="28"
179 viewBox="0 0 28 28" fill="none">
180 <path d="M0 6C0 2.68629 2.68629 0 6 0H28L14 14L0 28V6Z" fill="currentColor"></path>
181 <path d="M5.2915 9.4165L6.89567 11.0207L11.7082 5.979" stroke="white" stroke-width="1.5"
182 stroke-linecap="round" stroke-linejoin="round"></path>
183 </svg>
184
185 <?php if (!empty(Arr::get($address, 'formatted_address.name')) || !empty(Arr::get($address, 'phone'))): ?>
186 <div class="fct_address_selector_label">
187 <?php if (!empty(Arr::get($address, 'formatted_address.name'))): ?>
188 <span><?php echo esc_html(Arr::get($address, 'formatted_address.name')); ?> </span>
189 <?php endif; ?>
190 <?php if (!empty(Arr::get($address, 'phone'))): ?>
191 <span> <?php echo esc_html(Arr::get($address, 'phone')); ?></span>
192 <?php endif; ?>
193 </div>
194 <?php endif; ?>
195
196 <p class="fct_address_selector_info">
197 <?php if (!empty(Arr::get($address, 'label'))): ?>
198 <span> <?php echo esc_html(Arr::get($address, 'label')); ?></span>
199 <?php endif; ?>
200
201 <?php echo esc_html(Arr::get($address, 'formatted_address.full_address')); ?>
202 </p>
203 </div>
204 <?php endforeach; ?>
205 <?php else: ?>
206 <div class="fct_address_selector">
207 <p class="fct_address_selector_info">
208 <?php echo esc_html__('No address found', 'fluent-cart'); ?>
209 </p>
210 </div>
211 <?php endif; ?>
212 </div>
213 <?php
214 }
215
216 public function renderAddAddressForm()
217 {
218 ?>
219 <div class="fct_add_new_address_form" data-fluent-cart-checkout-page-form-address-show-add-new-modal-form-wrapper="">
220 <div id="<?php echo esc_attr($this->address_type); ?>_address_section_section"
221 data-fluent-cart-checkout-page-form-section="" class="fct_checkout_form_section additional-address-field">
222 <div class="fct_form_section_header">
223 <h4 class="fct_form_section_header_label"><?php echo esc_html__('Address', 'fluent-cart'); ?></h4>
224 </div>
225
226 <div class="fct_form_section_body">
227 <div class="fct_checkout_input_group">
228 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
229 id="<?php echo esc_attr($this->address_type); ?>_label_wrapper">
230 <label for="<?php echo esc_attr($this->address_type); ?>_label" class="sr-only">
231 <?php echo esc_html__('Address Label', 'fluent-cart'); ?>
232 </label>
233
234 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_label" autocomplete="label"
235 placeholder="<?php echo esc_html__('e.g Home, Office', 'fluent-cart'); ?>" data-required="yes"
236 data-type="input" id="<?php echo esc_attr($this->address_type); ?>_label" maxlength="15"
237 aria-describedby="<?php echo esc_attr($this->address_type); ?>_label_description">
238
239 <span id="<?php echo esc_attr($this->address_type); ?>_label_description" class="sr-only">
240 <?php echo esc_html__('Maximum 15 characters', 'fluent-cart'); ?>
241 </span>
242
243 </div>
244
245
246 <?php $this->renderNameFields(); ?>
247
248 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
249 id="<?php echo esc_attr($this->address_type); ?>_name_wrapper">
250 <label for="<?php echo esc_attr($this->address_type); ?>_company_name" class="sr-only">
251 <?php echo esc_html__('Company Name', 'fluent-cart'); ?>
252 </label>
253
254 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_company_name"
255 autocomplete="name" placeholder="<?php echo esc_attr__('Company Name', 'fluent-cart'); ?>"
256 data-required="no" data-type="input"
257 id="<?php echo esc_attr($this->address_type); ?>_company_name">
258 </div>
259
260 <?php if (!empty(Arr::get($this->requirements_fields, 'phone'))): ?>
261 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
262 id="<?php echo esc_attr($this->address_type); ?>_phone_wrapper">
263 <label for="<?php echo esc_attr($this->address_type); ?>_phone" class="sr-only">
264 <?php echo esc_html__('Phone Number', 'fluent-cart'); ?>
265 </label>
266
267 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_phone"
268 placeholder="<?php echo esc_html__('Phone number', 'fluent-cart'); ?>" data-required="no"
269 data-type="input" id="<?php echo esc_attr($this->address_type); ?>_phone">
270 </div>
271 <?php endif; ?>
272
273 <?php if (!empty(Arr::get($this->requirements_fields, 'country'))): ?>
274 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
275 id="<?php echo esc_attr($this->address_type); ?>_country_wrapper">
276 <label for="<?php echo esc_attr($this->address_type); ?>_country" class="sr-only">
277 <?php echo esc_html__('Country / Region', 'fluent-cart'); ?>
278 </label>
279
280 <select type="text" name="<?php echo esc_attr($this->address_type); ?>_country"
281 autocomplete="country"
282 data-required="<?php echo Arr::get($this->requirements_fields, 'country') === 'required' ? 'yes' : ''; ?>"
283 data-type="input" id="<?php echo esc_attr($this->address_type); ?>_country"
284 class="hidden-select">
285 <option value="">
286 <?php echo esc_html__('Select a Country', 'fluent-cart'); ?>
287 </option>
288 <?php foreach ($this->countries as $countryCode => $country): ?>
289 <option value="<?php echo esc_attr($countryCode); ?>">
290 <?php echo esc_html($country); ?>
291 </option>
292 <?php endforeach; ?>
293 </select>
294 </div>
295 <?php endif; ?>
296
297 <?php if (!empty(Arr::get($this->requirements_fields, 'address_1'))): ?>
298 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
299 id="<?php echo esc_attr($this->address_type); ?>_address_1_wrapper">
300 <label for="<?php echo esc_attr($this->address_type); ?>_address_1" class="sr-only">
301 <?php echo esc_html__('Street Address', 'fluent-cart'); ?>
302 <?php echo Arr::get($this->requirements_fields, 'address_1') === 'required' ? esc_html__(' (required)', 'fluent-cart') : ''; ?>
303 </label>
304 <?php
305 $placeholder_text = esc_html__('Street Address', 'fluent-cart');
306 if (Arr::get($this->requirements_fields, 'address_1') === 'required') {
307 $placeholder_text .= ' ' . esc_html__('*', 'fluent-cart');
308 }
309 ?>
310 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_address_1"
311 autocomplete="address-line1" placeholder="<?php echo esc_attr($placeholder_text); ?>"
312 data-required="yes" data-type="input" aria-required="true"
313 id="<?php echo esc_attr($this->address_type); ?>_address_1">
314 </div>
315 <?php endif; ?>
316
317 <?php if (!empty(Arr::get($this->requirements_fields, 'address_2'))): ?>
318 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
319 id="<?php echo esc_attr($this->address_type); ?>_address_2_wrapper">
320 <label for="<?php echo esc_attr($this->address_type); ?>_address_2" class="sr-only">
321 <?php echo esc_html__('Apartment, suite, unit, etc.', 'fluent-cart'); ?>
322 </label>
323 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_address_2"
324 autocomplete="address-line2"
325 placeholder="<?php echo esc_html__('Apt, suite, unit', 'fluent-cart'); ?>" data-required="no"
326 data-type="input" id="<?php echo esc_attr($this->address_type); ?>_address_2">
327 </div>
328 <?php endif; ?>
329
330 <?php if (!empty(Arr::get($this->requirements_fields, 'state'))): ?>
331 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
332 id="<?php echo esc_attr($this->address_type); ?>_state_wrapper" style="display: block;">
333 <label for="<?php echo esc_attr($this->address_type); ?>_state" class="sr-only">
334 <?php echo esc_html__('State / Province', 'fluent-cart'); ?>
335 </label>
336
337 <select type="select" name="<?php echo esc_attr($this->address_type); ?>_state"
338 autocomplete="address-level1" data-required="yes" data-type="input"
339 id="<?php echo esc_attr($this->address_type); ?>_state" checked="no" class="hidden-select">
340 <option value=""><?php echo esc_html__('Select a State', 'fluent-cart'); ?></option>
341 </select>
342 </div>
343 <?php endif; ?>
344
345
346 <div id="<?php echo esc_attr($this->address_type); ?>_city_zip_section"
347 data-fluent-cart-checkout-page-form-section=""
348 class="fct_checkout_form_section <?php echo empty(Arr::get($this->requirements_fields, 'postcode')) ? 'full-column' : '' ?>">
349
350 <div class="fct_form_section_body">
351 <div class="fct_checkout_input_group">
352 <?php if (!empty(Arr::get($this->requirements_fields, 'city'))): ?>
353 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
354 id="<?php echo esc_attr($this->address_type); ?>_city_wrapper">
355 <label for="<?php echo esc_attr($this->address_type); ?>_city" class="sr-only">
356 <?php echo esc_html__('City / Town', 'fluent-cart'); ?>
357 </label>
358
359 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_city"
360 autocomplete="address-level2"
361 placeholder="<?php echo esc_html__('City / Town', 'fluent-cart'); ?>"
362 data-required="yes" data-type="input"
363 id="<?php echo esc_attr($this->address_type); ?>_city" aria-required="true">
364 </div>
365 <?php endif; ?>
366 <?php if (!empty(Arr::get($this->requirements_fields, 'postcode'))): ?>
367 <div data-fluent-cart-checkout-page-form-input-wrapper="" class="fct_input_wrapper "
368 id="<?php echo esc_attr($this->address_type); ?>_postcode_wrapper">
369 <label for="<?php echo esc_attr($this->address_type); ?>_postcode" class="sr-only">
370 <?php echo esc_html__('Postcode / ZIP', 'fluent-cart'); ?>
371 </label>
372
373 <input type="text" name="<?php echo esc_attr($this->address_type); ?>_postcode"
374 autocomplete="postal-code"
375 placeholder="<?php echo esc_attr__('Postcode / ZIP', 'fluent-cart'); ?>"
376 data-required="yes" data-type="input"
377 id="<?php echo esc_attr($this->address_type); ?>_postcode" aria-required="true">
378 </div>
379 <?php endif; ?>
380 </div>
381 </div>
382 </div>
383
384 </div>
385 </div>
386 <div class="fct_form_error fct_error_<?php echo esc_attr($this->address_type . '_address_section_section'); ?>"></div>
387 </div>
388 <div class="fct_add_new_address_form_footer">
389
390 <button class="fct_address_cancel_btn" type="button"
391 data-fluent-cart-checkout-page-form-address-show-add-new-modal-cancel-button
392 aria-label="<?php echo esc_attr__('Cancel', 'fluent-cart'); ?>">
393 <?php echo esc_html__('Cancel', 'fluent-cart'); ?>
394 </button>
395
396 <button class="fct_address_submit_btn" type="submit"
397 data-fluent-cart-checkout-page-form-address-show-add-new-modal-submit-button
398 aria-label="<?php echo esc_attr__('Submit', 'fluent-cart'); ?>">
399 <?php echo esc_html__('Submit', 'fluent-cart'); ?>
400 </button>
401 </div>
402 </div>
403 <?php
404 }
405
406
407 public function renderNameFields() {
408
409 $type = esc_attr($this->address_type);
410
411 if (CheckoutFieldsSchema::isFullNameRequired()) : ?>
412 <div class="fct_input_wrapper" id="<?php echo $type; ?>_name_wrapper">
413 <label for="<?php echo $type; ?>_full_name" class="sr-only">
414 <?php echo esc_html__('Full Name', 'fluent-cart'); ?>
415 </label>
416
417 <input
418 type="text"
419 name="<?php echo $type; ?>_full_name"
420 id="<?php echo $type; ?>_full_name"
421 autocomplete="name"
422 placeholder="<?php echo esc_attr__('Full Name', 'fluent-cart'); ?>"
423 data-required="yes"
424 data-type="input"
425 >
426 </div>
427
428 <?php else : ?>
429
430 <div class="fct_input_wrapper" id="<?php echo $type; ?>_first_name_wrapper">
431 <label for="<?php echo $type; ?>_first_name" class="sr-only">
432 <?php echo esc_html__('First Name', 'fluent-cart'); ?>
433 </label>
434
435 <input
436 type="text"
437 name="<?php echo $type; ?>_first_name"
438 id="<?php echo $type; ?>_first_name"
439 autocomplete="given-name"
440 placeholder="<?php echo esc_attr__('First Name', 'fluent-cart'); ?>"
441 data-required="yes"
442 data-type="input"
443 >
444 </div>
445
446 <?php if (CheckoutFieldsSchema::isLastNameEnabled()) : ?>
447 <div class="fct_input_wrapper" id="<?php echo $type; ?>_last_name_wrapper">
448 <label for="<?php echo $type; ?>_last_name" class="sr-only">
449 <?php echo esc_html__('Last Name', 'fluent-cart'); ?>
450 </label>
451
452 <input
453 type="text"
454 name="<?php echo $type; ?>_last_name"
455 id="<?php echo $type; ?>_last_name"
456 autocomplete="family-name"
457 placeholder="<?php echo esc_attr__('Last Name', 'fluent-cart'); ?>"
458 data-required="<?php echo CheckoutFieldsSchema::isLastNameRequired() ? 'yes' : 'no'; ?>"
459 data-type="input"
460 >
461 </div>
462 <?php endif; ?>
463
464 <?php endif;
465 }
466 }
467