[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/templates/fallback/content/ -> address_book.tpl.php (source)

   1      <table border="0" width="100%" cellspacing="0" cellpadding="0">
   2        <tr>
   3          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
   4            <tr>
   5              <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
   6              <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_address_book.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
   7            </tr>
   8          </table></td>
   9        </tr>
  10        <tr>
  11          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  12        </tr>
  13  <?php
  14    if ($messageStack->size('addressbook') > 0) {
  15  ?>
  16        <tr>
  17          <td><?php echo $messageStack->output('addressbook'); ?></td>
  18        </tr>
  19        <tr>
  20          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  21        </tr>
  22  <?php
  23    }
  24  ?>
  25        <tr>
  26          <td class="main"><b><?php echo PRIMARY_ADDRESS_TITLE; ?></b></td>
  27        </tr>
  28        <tr>
  29          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  30            <tr class="infoBoxContents">
  31              <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  32                <tr>
  33                  <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  34                  <td class="main" width="50%" valign="top"><?php echo PRIMARY_ADDRESS_DESCRIPTION; ?></td>
  35                  <td align="right" width="50%" valign="top"><table border="0" cellspacing="0" cellpadding="2">
  36                    <tr>
  37                      <td class="main" align="center" valign="top"><b><?php echo PRIMARY_ADDRESS_TITLE; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'); ?></td>
  38                      <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  39                      <td class="main" valign="top"><?php echo tep_address_label($customer_id, $customer_default_address_id, true, ' ', '<br>'); ?></td>
  40                      <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  41                    </tr>
  42                  </table></td>
  43                </tr>
  44              </table></td>
  45            </tr>
  46          </table></td>
  47        </tr>
  48        <tr>
  49          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  50        </tr>
  51        <tr>
  52          <td class="main"><b><?php echo ADDRESS_BOOK_TITLE; ?></b></td>
  53        </tr>
  54        <tr>
  55          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  56            <tr class="infoBoxContents">
  57              <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  58  <?php
  59    $addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' order by firstname, lastname");
  60    while ($addresses = tep_db_fetch_array($addresses_query)) {
  61      $format_id = tep_get_address_format_id($addresses['country_id']);
  62  ?>
  63                <tr>
  64                  <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  65                  <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  66                    <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onClick="document.location.href='<?php echo tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL'); ?>'">
  67                      <td class="main"><b><?php echo tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?></b><?php if ($addresses['address_book_id'] == $customer_default_address_id) echo '&nbsp;<small><i>' . PRIMARY_ADDRESS . '</i></small>'; ?></td>
  68                      <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL') . '">' . tep_image_button('small_edit.gif', SMALL_IMAGE_BUTTON_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $addresses['address_book_id'], 'SSL') . '">' . tep_image_button('small_delete.gif', SMALL_IMAGE_BUTTON_DELETE) . '</a>'; ?></td>
  69                    </tr>
  70                    <tr>
  71                      <td colspan="2"><table border="0" cellspacing="0" cellpadding="2">
  72                        <tr>
  73                          <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  74                          <td class="main"><?php echo tep_address_format($format_id, $addresses, true, ' ', '<br>'); ?></td>
  75                          <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  76                        </tr>
  77                      </table></td>
  78                    </tr>
  79                  </table></td>
  80                  <td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  81                </tr>
  82  <?php
  83    }
  84  ?>
  85              </table></td>
  86            </tr>
  87          </table></td>
  88        </tr>
  89        <tr>
  90          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  91        </tr>
  92        <tr>
  93          <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
  94            <tr class="infoBoxContents">
  95              <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
  96                <tr>
  97                  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
  98                  <td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
  99  <?php
 100    if (tep_count_customer_address_book_entries() < MAX_ADDRESS_BOOK_ENTRIES) {
 101  ?>
 102                  <td class="smallText" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, '', 'SSL') . '">' . tep_image_button('button_add_address.gif', IMAGE_BUTTON_ADD_ADDRESS) . '</a>'; ?></td>
 103  <?php
 104    }
 105  ?>
 106                  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
 107                </tr>
 108              </table></td>
 109            </tr>
 110          </table></td>
 111        </tr>
 112        <tr>
 113          <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 114        </tr>
 115        <tr>
 116          <td class="smallText"><?php echo sprintf(TEXT_MAXIMUM_ENTRIES, MAX_ADDRESS_BOOK_ENTRIES); ?></td>
 117        </tr>
 118      </table>
 119  


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7