}
?>
          <tr>
            <td class="main">&nbsp;<?php 
echo ENTRY_COUNTRY;
?>
</td>
            <td class="main">&nbsp;
<?php 
if ($is_read_only == true) {
    echo smn_get_country_name($account['entry_country_id']);
} elseif ($error == true) {
    if ($entry_country_error == true) {
        echo smn_get_country_list('country') . '&nbsp;' . ENTRY_COUNTRY_ERROR;
    } else {
        echo smn_get_country_name($country) . smn_draw_hidden_field('country');
    }
} else {
    echo smn_get_country_list('country', $account['entry_country_id']) . '&nbsp;' . ENTRY_COUNTRY_TEXT;
}
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="formAreaTitle"><br><?php 
echo CATEGORY_CONTACT;
?>
示例#2
0
function smn_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    $address_format_query = smn_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int) $address_format_id . "'");
    $address_format = smn_db_fetch_array($address_format_query);
    $company = smn_output_string_protected($address['company']);
    if (isset($address['firstname']) && smn_not_null($address['firstname'])) {
        $firstname = smn_output_string_protected($address['firstname']);
        $lastname = smn_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && smn_not_null($address['name'])) {
        $firstname = smn_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = smn_output_string_protected($address['street_address']);
    $suburb = smn_output_string_protected($address['suburb']);
    $city = smn_output_string_protected($address['city']);
    $state = smn_output_string_protected($address['state']);
    if (isset($address['country_id']) && smn_not_null($address['country_id'])) {
        $country = smn_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && smn_not_null($address['zone_id'])) {
            $state = smn_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && smn_not_null($address['country'])) {
        $country = smn_output_string_protected($address['country']['title']);
    } else {
        $country = '';
    }
    $postcode = smn_output_string_protected($address['postcode']);
    $zip = $postcode;
    if ($html) {
        // HTML Mode
        $HR = '<hr>';
        $hr = '<hr>';
        if ($boln == '' && $eoln == "\n") {
            // Values not specified, use rational defaults
            $CR = '<br>';
            $cr = '<br>';
            $eoln = $cr;
        } else {
            // Use values supplied
            $CR = $eoln . $boln;
            $cr = $CR;
        }
    } else {
        // Text Mode
        $CR = $eoln;
        $cr = $CR;
        $HR = '----------------------------------------';
        $hr = '----------------------------------------';
    }
    $statecomma = '';
    $streets = $street;
    if ($suburb != '') {
        $streets = $street . $cr . $suburb;
    }
    if ($country == '') {
        $country = smn_output_string_protected($address['country']);
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    $fmt = $address_format['format'];
    eval("\$address = \"{$fmt}\";");
    if (ACCOUNT_COMPANY == 'true' && smn_not_null($company)) {
        $address = $company . $cr . $address;
    }
    return $address;
}
示例#3
0
         </tr>
<?php 
    }
    ?>
          <tr>
            <td class="main"><?php 
    echo ENTRY_COUNTRY;
    ?>
</td>
            <td class="main">
<?php 
    if ($error == true) {
        if ($entry_country_error == true) {
            echo smn_draw_pull_down_menu('entry_country_id', smn_get_countries(), $sInfo->entry_country_id) . '&nbsp;' . ENTRY_COUNTRY_ERROR;
        } else {
            echo smn_get_country_name($sInfo->entry_country_id) . smn_draw_hidden_field('entry_country_id');
        }
    } else {
        echo smn_draw_pull_down_menu('entry_country_id', smn_get_countries(), $sInfo->entry_country_id);
    }
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
    echo smn_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
      </tr>