default.php
5 days ago
default_details.php
5 days ago
default_details_calendar.php
5 days ago
default_details_calendar_modal.php
5 days ago
default_details_contact.php
5 days ago
default_details_employee.php
5 days ago
default_details_notifications.php
5 days ago
default_details_visibility.php
5 days ago
default_fields.php
5 days ago
default_workdays.php
5 days ago
default_workdays_import.php
5 days ago
default_workdays_import_sample.php
5 days ago
default_workdays_import_upload.php
5 days ago
default_workdays_modal.php
5 days ago
index.html
5 days ago
default_workdays.php
588 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package VikAppointments |
| 4 | * @subpackage core |
| 5 | * @author E4J s.r.l. |
| 6 | * @copyright Copyright (C) 2021 E4J s.r.l. All Rights Reserved. |
| 7 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 | * @link https://vikwp.com |
| 9 | */ |
| 10 | |
| 11 | // No direct access |
| 12 | defined('ABSPATH') or die('No script kiddies please!'); |
| 13 | |
| 14 | $vik = VAPApplication::getInstance(); |
| 15 | |
| 16 | $config = VAPFactory::getConfig(); |
| 17 | |
| 18 | $wdLayout = new JLayoutFile('blocks.card'); |
| 19 | |
| 20 | $date = JFactory::getDate(); |
| 21 | |
| 22 | ?> |
| 23 | |
| 24 | <div class="row-fluid"> |
| 25 | |
| 26 | <!-- LEFT --> |
| 27 | |
| 28 | <div class="span6"> |
| 29 | |
| 30 | <!-- WEEKLY --> |
| 31 | |
| 32 | <div class="row-fluid"> |
| 33 | <div class="span12"> |
| 34 | <?php |
| 35 | $help = $vik->createPopover(array( |
| 36 | 'title' => JText::translate('VAPWDLEGENDLABEL1'), |
| 37 | 'content' => JText::sprintf('VAPWDLEGENDTITLE1', JHtml::fetch('date', 'now', 'l')), |
| 38 | )); |
| 39 | |
| 40 | echo $vik->openFieldset(JText::translate('VAPWDLEGENDLABEL1') . $help); |
| 41 | ?> |
| 42 | |
| 43 | <div class="vap-cards-container cards-workdays" id="cards-workdays-week"> |
| 44 | |
| 45 | <?php |
| 46 | for ($i = 1; $i <= 7; $i++) |
| 47 | { |
| 48 | $k = $i % 7; |
| 49 | |
| 50 | // get existing working times for this day of the week |
| 51 | $wd_list = isset($this->worktimeWeek[$k]) ? $this->worktimeWeek[$k] : array(); |
| 52 | ?> |
| 53 | <div class="vap-card-fieldset up-to-2" id="weekday-fieldset-<?php echo $i; ?>" data-day="<?php echo $k; ?>"> |
| 54 | |
| 55 | <?php |
| 56 | $displayData = array(); |
| 57 | |
| 58 | // reduce card size |
| 59 | $displayData['class'] = 'compress'; |
| 60 | |
| 61 | // fetch primary text |
| 62 | $displayData['primary'] = $date->dayToString($k); |
| 63 | |
| 64 | if ($wd_list) |
| 65 | { |
| 66 | $badge = ''; |
| 67 | $closed = false; |
| 68 | |
| 69 | foreach ($wd_list as $wd) |
| 70 | { |
| 71 | // create readable lables |
| 72 | $from = JHtml::fetch('vikappointments.min2time', $wd->from); |
| 73 | $to = JHtml::fetch('vikappointments.min2time', $wd->to); |
| 74 | |
| 75 | // generate badge |
| 76 | $badge .= "<span class=\"badge badge-info\">{$from} - {$to}</span>\n"; |
| 77 | |
| 78 | // check whether the working time was a closure |
| 79 | $closed = $closed || $wd->closed; |
| 80 | } |
| 81 | |
| 82 | if ($closed) |
| 83 | { |
| 84 | // overwrite badge with closure |
| 85 | $badge = "<span class=\"badge badge-important\">" . JText::translate('VAPMANAGEEMPLOYEE22') . "</span>\n"; |
| 86 | } |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | // no existing working days |
| 91 | $badge = "<span class=\"badge badge-warning\">" . JText::translate('JGLOBAL_NO_MATCHING_RESULTS') . "</span>\n"; |
| 92 | } |
| 93 | |
| 94 | // fetch secondary text |
| 95 | $displayData['secondary'] = $badge; |
| 96 | |
| 97 | // fetch edit button |
| 98 | $displayData['edit'] = 'vapOpenWeekDayCard(' . $i . ');'; |
| 99 | |
| 100 | // render layout |
| 101 | echo $wdLayout->render($displayData); |
| 102 | ?> |
| 103 | |
| 104 | <input type="hidden" name="wd_json[]" value="<?php echo $this->escape(json_encode($wd_list)); ?>" /> |
| 105 | |
| 106 | </div> |
| 107 | <?php |
| 108 | } |
| 109 | ?> |
| 110 | |
| 111 | </div> |
| 112 | |
| 113 | <?php echo $vik->closeFieldset(); ?> |
| 114 | </div> |
| 115 | </div> |
| 116 | |
| 117 | </div> |
| 118 | |
| 119 | <!-- RIGHT --> |
| 120 | |
| 121 | <div class="span6"> |
| 122 | |
| 123 | <!-- SPECIAL DAYS --> |
| 124 | |
| 125 | <div class="row-fluid"> |
| 126 | <div class="span12"> |
| 127 | <?php |
| 128 | $help = $vik->createPopover(array( |
| 129 | 'title' => JText::translate('VAPWDLEGENDLABEL2'), |
| 130 | 'content' => JText::sprintf('VAPWDLEGENDTITLE2', JHtml::fetch('date', 'now', JText::translate('DATE_FORMAT_LC1'))), |
| 131 | )); |
| 132 | |
| 133 | echo $vik->openFieldset(JText::translate('VAPWDLEGENDLABEL2') . $help); |
| 134 | ?> |
| 135 | |
| 136 | <div class="vap-cards-container cards-workdays" id="cards-workdays-special"> |
| 137 | |
| 138 | <!-- ADD PLACEHOLDER (show in case of 3+ working days) --> |
| 139 | |
| 140 | <div class="vap-card-fieldset up-to-2 add add-spday" style="<?php echo (count($this->worktimeDate) >= 3 ? '' : 'display:none;'); ?>"> |
| 141 | <div class="vap-card compress"> |
| 142 | <i class="fas fa-plus"></i> |
| 143 | </div> |
| 144 | </div> |
| 145 | |
| 146 | <?php |
| 147 | foreach ($this->worktimeDate as $k => $wd_list) |
| 148 | { |
| 149 | ?> |
| 150 | <div class="vap-card-fieldset up-to-2" id="spday-fieldset-<?php echo $k; ?>" data-date="<?php echo $wd_list[0]->tsdate; ?>"> |
| 151 | |
| 152 | <?php |
| 153 | $displayData = array(); |
| 154 | |
| 155 | // reduce card size |
| 156 | $displayData['class'] = 'compress'; |
| 157 | |
| 158 | // fetch primary text |
| 159 | $displayData['primary'] = $wd_list[0]->date; |
| 160 | |
| 161 | $badge = ''; |
| 162 | $closed = false; |
| 163 | |
| 164 | foreach ($wd_list as $wd) |
| 165 | { |
| 166 | // create readable lables |
| 167 | $from = JHtml::fetch('vikappointments.min2time', $wd->from); |
| 168 | $to = JHtml::fetch('vikappointments.min2time', $wd->to); |
| 169 | |
| 170 | // generate badge |
| 171 | $badge .= "<span class=\"badge badge-info\">{$from} - {$to}</span>\n"; |
| 172 | |
| 173 | // check whether the working time was a closure |
| 174 | $closed = $closed || $wd->closed; |
| 175 | } |
| 176 | |
| 177 | if ($closed) |
| 178 | { |
| 179 | // overwrite badge with closure |
| 180 | $badge = "<span class=\"badge badge-important\">" . JText::translate('VAPMANAGEEMPLOYEE22') . "</span>\n"; |
| 181 | } |
| 182 | |
| 183 | // fetch secondary text |
| 184 | $displayData['secondary'] = $badge; |
| 185 | |
| 186 | // fetch edit button |
| 187 | $displayData['edit'] = 'vapOpenSpecialDayCard(\'' . $k . '\');'; |
| 188 | |
| 189 | // render layout |
| 190 | echo $wdLayout->render($displayData); |
| 191 | ?> |
| 192 | |
| 193 | <input type="hidden" name="wd_json[]" value="<?php echo $this->escape(json_encode($wd_list)); ?>" /> |
| 194 | |
| 195 | </div> |
| 196 | <?php |
| 197 | } |
| 198 | ?> |
| 199 | |
| 200 | <!-- ADD PLACEHOLDER --> |
| 201 | |
| 202 | <div class="vap-card-fieldset up-to-2 add add-spday"> |
| 203 | <div class="vap-card compress"> |
| 204 | <i class="fas fa-plus"></i> |
| 205 | </div> |
| 206 | </div> |
| 207 | |
| 208 | </div> |
| 209 | |
| 210 | <?php echo $vik->closeFieldset(); ?> |
| 211 | </div> |
| 212 | </div> |
| 213 | |
| 214 | <!-- OPTIONS --> |
| 215 | |
| 216 | <div class="row-fluid" style="margin-top: 20px;"> |
| 217 | <div class="span12"> |
| 218 | <?php echo $vik->openFieldset(JText::translate('VAPPREFERENCES')); ?> |
| 219 | |
| 220 | <!-- HIDE PAST - Checkbox --> |
| 221 | |
| 222 | <?php |
| 223 | $yes = $vik->initRadioElement('', '', $this->wdOptions['hide_past_wd'], 'onclick="vapTogglePastWD(1);"'); |
| 224 | $no = $vik->initRadioElement('', '', !$this->wdOptions['hide_past_wd'], 'onclick="vapTogglePastWD(0);"'); |
| 225 | |
| 226 | $help = $vik->createPopover(array( |
| 227 | 'title' => JText::translate('VAPMANAGEEMPLOYEE31'), |
| 228 | 'content' => JText::translate('VAPMANAGEEMPLOYEE31_DESC'), |
| 229 | )); |
| 230 | |
| 231 | echo $vik->openControl(JText::translate('VAPMANAGEEMPLOYEE31') . $help); |
| 232 | echo $vik->radioYesNo('hide_past_wd', $yes, $no, false); |
| 233 | echo $vik->closeControl(); |
| 234 | ?> |
| 235 | |
| 236 | <!-- IMPORT - Button --> |
| 237 | |
| 238 | <div> |
| 239 | <button type="button" class="btn" onclick="vapOpenJModal('wdimport', null, true)"><?php echo JText::translate('VAPIMPORT'); ?></button> |
| 240 | </div> |
| 241 | |
| 242 | <?php echo $vik->closeFieldset(); ?> |
| 243 | </div> |
| 244 | </div> |
| 245 | |
| 246 | </div> |
| 247 | |
| 248 | </div> |
| 249 | |
| 250 | <div style="display:none;" id="spday-struct"> |
| 251 | |
| 252 | <?php |
| 253 | // create structure for new special days |
| 254 | $displayData = array(); |
| 255 | $displayData['class'] = 'compress'; |
| 256 | $displayData['primary'] = ''; |
| 257 | $displayData['secondary'] = ''; |
| 258 | $displayData['edit'] = true; |
| 259 | |
| 260 | echo $wdLayout->render($displayData); |
| 261 | ?> |
| 262 | |
| 263 | </div> |
| 264 | |
| 265 | <?php |
| 266 | $footer = '<button type="button" class="btn btn-success" data-role="save">' . JText::translate('JAPPLY') . '</button>'; |
| 267 | $footer .= '<button type="button" class="btn btn-danger" data-role="delete" style="float:right;">' . JText::translate('VAPDELETE') . '</button>'; |
| 268 | |
| 269 | // render inspector to manage working days management |
| 270 | echo JHtml::fetch( |
| 271 | 'vaphtml.inspector.render', |
| 272 | 'wd-inspector', |
| 273 | array( |
| 274 | 'title' => JText::translate('VAPMANAGEEMPLOYEE13'), |
| 275 | 'closeButton' => true, |
| 276 | 'keyboard' => true, |
| 277 | 'footer' => $footer, |
| 278 | 'width' => 400, |
| 279 | ), |
| 280 | $this->loadTemplate('workdays_modal') |
| 281 | ); |
| 282 | |
| 283 | JText::script('VAPMANAGEEMPLOYEE22'); |
| 284 | JText::script('JGLOBAL_NO_MATCHING_RESULTS'); |
| 285 | ?> |
| 286 | |
| 287 | <script> |
| 288 | var SELECTED_OPTION = null; |
| 289 | |
| 290 | jQuery(function($) { |
| 291 | // open inspector for new special day |
| 292 | $('.vap-card-fieldset.add-spday').on('click', () => { |
| 293 | vapOpenSpecialDayCard(); |
| 294 | }); |
| 295 | |
| 296 | // fill the form before showing the inspector |
| 297 | $('#wd-inspector').on('inspector.show', () => { |
| 298 | var fieldset = $('#' + SELECTED_OPTION); |
| 299 | var json = []; |
| 300 | |
| 301 | // fetch JSON data |
| 302 | if (fieldset.length) { |
| 303 | json = fieldset.find('input[name="wd_json[]"]').val(); |
| 304 | |
| 305 | try { |
| 306 | json = JSON.parse(json); |
| 307 | } catch (err) { |
| 308 | json = []; |
| 309 | } |
| 310 | |
| 311 | if (json.length == 0) { |
| 312 | // create default object |
| 313 | json.push({ |
| 314 | closed: false, |
| 315 | day: parseInt(fieldset.data('day')), |
| 316 | }); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | var subtitle = fieldset.vapcard('primary'); |
| 321 | |
| 322 | // update form heading |
| 323 | $('#inspector-wd-form h3').first().html(subtitle ? subtitle : ''); |
| 324 | |
| 325 | if (json.length == 0 || json[0].id === undefined) { |
| 326 | // creating a working day, hide delete button |
| 327 | $('#wd-inspector [data-role="delete"]').hide(); |
| 328 | } else { |
| 329 | // editing a working day, show delete button |
| 330 | $('#wd-inspector [data-role="delete"]').show(); |
| 331 | } |
| 332 | |
| 333 | fillWorkingDayForm(json); |
| 334 | }); |
| 335 | |
| 336 | // apply the changes |
| 337 | $('#wd-inspector').on('inspector.save', function() { |
| 338 | // validate form |
| 339 | if (!wdValidator.validate()) { |
| 340 | return false; |
| 341 | } |
| 342 | |
| 343 | // get saved working days |
| 344 | var data = getWorkingDayData(); |
| 345 | // get deleted working days |
| 346 | var deleted = getDeletedWorkingDays(); |
| 347 | |
| 348 | var fieldset = $('#' + SELECTED_OPTION); |
| 349 | |
| 350 | if (data.length && data[0].ymd && fieldset.length == 0) { |
| 351 | // field not found, lets look whether already exists |
| 352 | // a record with the same specified date |
| 353 | fieldset = $('#spday-fieldset-' + data[0].ymd); |
| 354 | |
| 355 | if (fieldset.length == 0) { |
| 356 | // create new fieldset |
| 357 | fieldset = vapAddSpecialDayCard(data); |
| 358 | } else { |
| 359 | // fieldset found, merge existing working days with the new ones |
| 360 | let json; |
| 361 | |
| 362 | try { |
| 363 | json = JSON.parse(fieldset.find('input[name="wd_json[]"]').val()); |
| 364 | } catch (err) { |
| 365 | json = []; |
| 366 | } |
| 367 | |
| 368 | // merge only in case the existing working days didn't |
| 369 | // register a closure, otherwise overwrite them |
| 370 | if (json.length && !parseInt(json[0].closed)) { |
| 371 | if (data[0].closed) { |
| 372 | // we created a closure, just update the existing working days |
| 373 | json.forEach((wd, index) => { |
| 374 | json[index].closed = true; |
| 375 | }); |
| 376 | |
| 377 | // do not use new working days |
| 378 | data = json; |
| 379 | } else { |
| 380 | // merge working days |
| 381 | data = json.concat(data); |
| 382 | } |
| 383 | } else { |
| 384 | // auto-delete the days to overwrite |
| 385 | json.forEach((wd) => { |
| 386 | if (wd.id) { |
| 387 | deleted.push(wd.id); |
| 388 | } |
| 389 | }); |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | if (fieldset.length == 0) { |
| 395 | // The user is probably trying to create a special day |
| 396 | // without defining at least a working time... |
| 397 | // This will act as an additional check and the |
| 398 | // inspector won't be closed. |
| 399 | return false; |
| 400 | } |
| 401 | |
| 402 | // save JSON data |
| 403 | fieldset.find('input[name="wd_json[]"]').val(JSON.stringify(data)); |
| 404 | |
| 405 | // register working days to delete |
| 406 | deleted.forEach((id) => { |
| 407 | $('#adminForm').append('<input type="hidden" name="wd_deleted[]" value="' + id + '" />'); |
| 408 | }); |
| 409 | |
| 410 | if (inspectorMode == 'spday' && data.length == 0) { |
| 411 | // auto delete record as there are no more working days |
| 412 | fieldset.remove(); |
| 413 | |
| 414 | if (jQuery('#cards-workdays-special .vap-card-fieldset').not('.add').length < 3) { |
| 415 | // auto-hide the add placeholder at the beginning of the list |
| 416 | jQuery('.vap-card-fieldset.add').first().hide(); |
| 417 | } |
| 418 | } else { |
| 419 | // refresh card details |
| 420 | vapRefreshWorkingDayCard(fieldset, data); |
| 421 | } |
| 422 | |
| 423 | // auto-close on save |
| 424 | $(this).inspector('dismiss'); |
| 425 | }); |
| 426 | |
| 427 | // delete the record |
| 428 | $('#wd-inspector').on('inspector.delete', function() { |
| 429 | var fieldset = $('#' + SELECTED_OPTION); |
| 430 | |
| 431 | if (fieldset.length == 0) { |
| 432 | // record not found |
| 433 | return false; |
| 434 | } |
| 435 | |
| 436 | // get existing working days |
| 437 | var json = fieldset.find('input[name="wd_json[]"]').val(); |
| 438 | |
| 439 | try { |
| 440 | json = JSON.parse(json); |
| 441 | } catch (err) { |
| 442 | json = []; |
| 443 | } |
| 444 | |
| 445 | if (json.length == 0) { |
| 446 | // no days to delete |
| 447 | return false; |
| 448 | } |
| 449 | |
| 450 | // register working days to delete |
| 451 | json.forEach((wd) => { |
| 452 | if (wd.id) { |
| 453 | $('#adminForm').append('<input type="hidden" name="wd_deleted[]" value="' + wd.id + '" />'); |
| 454 | } |
| 455 | }); |
| 456 | |
| 457 | // reset working days |
| 458 | fieldset.find('input[name="wd_json[]"]').val('[]'); |
| 459 | |
| 460 | if (inspectorMode == 'spday') { |
| 461 | // auto delete record |
| 462 | fieldset.remove(); |
| 463 | |
| 464 | if (jQuery('#cards-workdays-special .vap-card-fieldset').not('.add').length < 3) { |
| 465 | // auto-hide the add placeholder at the beginning of the list |
| 466 | jQuery('.vap-card-fieldset.add').first().hide(); |
| 467 | } |
| 468 | } else { |
| 469 | // refresh card details |
| 470 | vapRefreshWorkingDayCard(fieldset, []); |
| 471 | } |
| 472 | |
| 473 | // auto-close on delete |
| 474 | $(this).inspector('dismiss'); |
| 475 | }); |
| 476 | }); |
| 477 | |
| 478 | function vapOpenWeekDayCard(day) { |
| 479 | SELECTED_OPTION = 'weekday-fieldset-' + day; |
| 480 | |
| 481 | // prepare inspector for week day |
| 482 | setWorkingDayInspectorMode('weekday'); |
| 483 | |
| 484 | // open inspector |
| 485 | vapOpenInspector('wd-inspector'); |
| 486 | } |
| 487 | |
| 488 | function vapOpenSpecialDayCard(date) { |
| 489 | if (date) { |
| 490 | SELECTED_OPTION = 'spday-fieldset-' + date; |
| 491 | } else { |
| 492 | SELECTED_OPTION = null; |
| 493 | } |
| 494 | |
| 495 | // prepare inspector for special day |
| 496 | setWorkingDayInspectorMode('spday'); |
| 497 | |
| 498 | // open inspector |
| 499 | vapOpenInspector('wd-inspector'); |
| 500 | } |
| 501 | |
| 502 | function vapAddSpecialDayCard(data) { |
| 503 | let index = data[0].ymd; |
| 504 | |
| 505 | SELECTED_OPTION = 'spday-fieldset-' + index; |
| 506 | |
| 507 | var html = jQuery('#spday-struct').clone().html(); |
| 508 | |
| 509 | html = html.replace(/{id}/, index); |
| 510 | |
| 511 | jQuery( |
| 512 | '<div class="vap-card-fieldset up-to-2" id="spday-fieldset-' + index + '">' + html + '</div>' |
| 513 | ).insertBefore(jQuery('.vap-card-fieldset.add-spday').last()); |
| 514 | |
| 515 | // get created fieldset |
| 516 | let fieldset = jQuery('#spday-fieldset-' + index); |
| 517 | |
| 518 | fieldset.vapcard('edit', 'vapOpenSpecialDayCard(' + index + ')'); |
| 519 | |
| 520 | // create input to hold JSON data |
| 521 | let input = jQuery('<input type="hidden" name="wd_json[]" />').val(JSON.stringify(data)); |
| 522 | |
| 523 | // append input to fieldset |
| 524 | fieldset.append(input); |
| 525 | |
| 526 | if (jQuery('#cards-workdays-special .vap-card-fieldset').not('.add').length >= 3) { |
| 527 | // auto-show the add placeholder at the beginning of the list |
| 528 | jQuery('.vap-card-fieldset.add').first().show(); |
| 529 | } |
| 530 | |
| 531 | return fieldset; |
| 532 | } |
| 533 | |
| 534 | function vapRefreshWorkingDayCard(elem, data) { |
| 535 | if (data.length && data[0].date) { |
| 536 | // update primary text |
| 537 | elem.vapcard('primary', data[0].date); |
| 538 | } |
| 539 | |
| 540 | // fetch secondary text |
| 541 | var secondary = ''; |
| 542 | |
| 543 | if (data.length) { |
| 544 | var closed = false; |
| 545 | |
| 546 | data.forEach((wd) => { |
| 547 | // extract from time |
| 548 | let fh = Math.floor(wd.from / 60); |
| 549 | let fm = wd.from % 60; |
| 550 | |
| 551 | // extract to time |
| 552 | let th = Math.floor(wd.to / 60); |
| 553 | let tm = wd.to % 60; |
| 554 | |
| 555 | // format times |
| 556 | let fhm = getFormattedTime(fh, fm, '<?php echo $config->get('timeformat'); ?>'); |
| 557 | let thm = getFormattedTime(th, tm, '<?php echo $config->get('timeformat'); ?>'); |
| 558 | |
| 559 | // append time as badge |
| 560 | secondary += '<span class="badge badge-info">' + fhm + ' - ' + thm + '</span>\n'; |
| 561 | |
| 562 | // check whether the working time is a closure |
| 563 | closed = closed || parseInt(wd.closed); |
| 564 | }); |
| 565 | |
| 566 | if (closed) { |
| 567 | // overwrite badge with closure |
| 568 | secondary = '<span class="badge badge-important">' + Joomla.JText._('VAPMANAGEEMPLOYEE22') + '</span>\n'; |
| 569 | } |
| 570 | } else { |
| 571 | // no working times |
| 572 | secondary = '<span class="badge badge-warning">' + Joomla.JText._('JGLOBAL_NO_MATCHING_RESULTS') + '</span>\n'; |
| 573 | } |
| 574 | |
| 575 | // update secondary text |
| 576 | elem.vapcard('secondary', secondary); |
| 577 | } |
| 578 | |
| 579 | function vapTogglePastWD(is) { |
| 580 | // keep setting active for 1 year |
| 581 | var upto = new Date(); |
| 582 | upto.setYear(upto.getFullYear() + 1); |
| 583 | |
| 584 | document.cookie = 'vikappointments.hide.past.wd=' + (is ? 1 : 0) + '; expires=' + upto.toUTCString() + '; path=/'; |
| 585 | } |
| 586 | |
| 587 | </script> |
| 588 |