<?php

$companyKeys = array(
    $model->adr_one_street,
    $model->adr_one_postalcode,
    $model->adr_one_locality,
    $model->adr_one_countryname,
);

$privatKeys = array(
    $model->adr_two_street,
    $model->adr_two_postalcode,
    $model->adr_two_locality,
    $model->adr_two_countryname
);

$allKeys = array_merge($companyKeys, $privatKeys);

if (!empty(array_sum($allKeys))) {
    echo "<li>";
    echo "<h2>" . __('ADDRESSESS_FORM_HEADER_ADDRESSESS') . "</h2>";
    echo "</li>";
}

if (!empty(array_sum($companyKeys))) {
    echo "<li>";
    echo $model->adr_one_street;
    echo "<br />";
    echo "$model->adr_one_postalcode $model->adr_one_locality";
    echo "<br />";
    echo "$model->adr_one_countryname";
    echo "<div class='addressKey'><p>" . __('ADDRESSESS_FORM_HEADER_BUSINESS') . "</p></div>";
    echo "</li>";
}

if (!empty(array_sum($privatKeys))) {
    echo "<li>";
    echo $model->adr_two_street;
    echo "<br />";
    echo "$model->adr_two_postalcode $model->adr_two_locality";
    echo "<br />";
    echo "$model->adr_two_countryname";
    echo "<div class='addressKey'><p>" . __('ADDRESSESS_FORM_HEADER_PRIVATE') . "</p></div>";
    echo "</li>";
}
