Exemplo n.º 1
0
    <div class="add-new-address clearfix">
        <p class="add-new-btn"><a href="javascript:void(0);" class="modalform">+ ADD NEW ADDRESS</a></p>
    </div>

    <?php 
$address = get_consumer_address_id($_SESSION['consumer']['itconsumer_id']);
$resultt = count($address);
// if no address exists then set the status to signupcomplete...
if ($resultt == 0 && $consumer['recordstatus'] != 'signupcomplete') {
    update_record_status($_SESSION['consumer']['itconsumer_id']);
    // update to signupcomplete
}
//$resultt;
$counting = 0;
while ($counting < $resultt) {
    $address1 = get_address_from_id($address[$counting]['address_id']);
    ?>
    <!-- address box -->
    <div id="div_address_<?php 
    echo $address1[0]['address_id'];
    ?>
" class="address-box-wrap" style="float: left; margin-top: 12px;">
        <div class="address-box"><div class="address-box-inner">
                <p class="address-box-label">Address</p>
                <p class="address-box-value"><?php 
    echo $address1[0]['addressline1'];
    ?>
</p>
                <p class="address-box-show"><a id="show_box_<?php 
    echo $counting;
    ?>
<?php

session_start();
include '../dao/dbcon.php';
include '../dao/address.php';
$id = $_GET['id'];
$address1 = get_address_from_id($id);
$addresstype = $address1[0]['addresstype_id'];
$addressline1 = $address1[0]['addressline1'];
$addressline2 = $address1[0]['addressline2'];
$city = $address1[0]['city'];
$state = $address1[0]['state'];
$country = $address1[0]['country'];
$zipcode = $address1[0]['zipcode'];
$phoneno = $address1[0]['phonenumber'];
?>

<!--<div style="margin-top:20px;float:left;width:100%;">-->
<form name="edit_address" id="adding_address" method="post" onsubmit="return edit_provider_address($(this));">
    <table width="90%" border="0" cellspacing="2" cellpadding="5" align="center">
        <tr>
            <td width="31%" align="right"><strong>Address type  <span style="color:#FF0000"/> *</strong></td>
            <td width="69%"><select name = "address_types" >
                    <?php 
$addressez = getaddresstypes();
foreach ($addressez as $name) {
    if ($name['addresstype_id'] == $address1[0]['addresstype_id']) {
        echo "<option selected='selected' value='{$name['addresstype_id']}' >" . $name['addresstype_name'] . "</option>";
    } else {
        echo "<option value='{$name['addresstype_id']}' >" . $name['addresstype_name'] . "</option>";
    }