| @@ 623-653 (lines=31) @@ | ||
| 620 | } |
|
| 621 | } |
|
| 622 | ||
| 623 | function getAlerts() { |
|
| 624 | global $OSCOM_Braintree_Alerts; |
|
| 625 | ||
| 626 | $output = ''; |
|
| 627 | ||
| 628 | if ( tep_session_is_registered('OSCOM_Braintree_Alerts') && !empty($OSCOM_Braintree_Alerts) ) { |
|
| 629 | $result = array(); |
|
| 630 | ||
| 631 | foreach ( $OSCOM_Braintree_Alerts as $type => $messages ) { |
|
| 632 | if ( in_array($type, array('error', 'warning', 'success')) ) { |
|
| 633 | $m = '<ul class="bt-alerts-' . $type . '">'; |
|
| 634 | ||
| 635 | foreach ( $messages as $message ) { |
|
| 636 | $m .= '<li>' . tep_output_string_protected($message) . '</li>'; |
|
| 637 | } |
|
| 638 | ||
| 639 | $m .= '</ul>'; |
|
| 640 | ||
| 641 | $result[] = $m; |
|
| 642 | } |
|
| 643 | } |
|
| 644 | ||
| 645 | if ( !empty($result) ) { |
|
| 646 | $output .= '<div class="bt-alerts">' . implode("\n", $result) . '</div>'; |
|
| 647 | } |
|
| 648 | } |
|
| 649 | ||
| 650 | tep_session_unregister('OSCOM_Braintree_Alerts'); |
|
| 651 | ||
| 652 | return $output; |
|
| 653 | } |
|
| 654 | ||
| 655 | function install($module) { |
|
| 656 | $cut_length = strlen('OSCOM_APP_PAYPAL_BRAINTREE_' . $module . '_'); |
|
| @@ 675-705 (lines=31) @@ | ||
| 672 | } |
|
| 673 | } |
|
| 674 | ||
| 675 | function getAlerts() { |
|
| 676 | global $OSCOM_PayPal_Alerts; |
|
| 677 | ||
| 678 | $output = ''; |
|
| 679 | ||
| 680 | if ( tep_session_is_registered('OSCOM_PayPal_Alerts') && !empty($OSCOM_PayPal_Alerts) ) { |
|
| 681 | $result = array(); |
|
| 682 | ||
| 683 | foreach ( $OSCOM_PayPal_Alerts as $type => $messages ) { |
|
| 684 | if ( in_array($type, array('error', 'warning', 'success')) ) { |
|
| 685 | $m = '<ul class="pp-alerts-' . $type . '">'; |
|
| 686 | ||
| 687 | foreach ( $messages as $message ) { |
|
| 688 | $m .= '<li>' . tep_output_string_protected($message) . '</li>'; |
|
| 689 | } |
|
| 690 | ||
| 691 | $m .= '</ul>'; |
|
| 692 | ||
| 693 | $result[] = $m; |
|
| 694 | } |
|
| 695 | } |
|
| 696 | ||
| 697 | if ( !empty($result) ) { |
|
| 698 | $output .= '<div class="pp-alerts">' . implode("\n", $result) . '</div>'; |
|
| 699 | } |
|
| 700 | } |
|
| 701 | ||
| 702 | tep_session_unregister('OSCOM_PayPal_Alerts'); |
|
| 703 | ||
| 704 | return $output; |
|
| 705 | } |
|
| 706 | ||
| 707 | function install($module) { |
|
| 708 | $cut_length = strlen('OSCOM_APP_PAYPAL_' . $module . '_'); |
|