<?php /* Smarty version Smarty-3.1.15, created on 2015-04-29 11:15:13
         compiled from "/home/hushdogcafe/public_html/cube/modules/shipping/All_In_One_Shipping/skin/admin/index.tpl" */ ?>
<?php /*%%SmartyHeaderCode:210479977555404cc1c37681-26919694%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5de37029b317014e5a6ea72169bc26eaa5d00813' => 
    array (
      0 => '/home/hushdogcafe/public_html/cube/modules/shipping/All_In_One_Shipping/skin/admin/index.tpl',
      1 => 1426727362,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '210479977555404cc1c37681-26919694',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'VAL_SELF' => 0,
    'DISPLAY_RATES' => 0,
    'TITLE' => 0,
    'MULTIPLE_ZONES' => 0,
    'LANG' => 0,
    'MODULE' => 0,
    'TAXES' => 0,
    'tax' => 0,
    'SELECT_multiple_zones_all' => 0,
    'SELECT_multiple_zones_first' => 0,
    'SELECT_debug_0' => 0,
    'SELECT_debug_1' => 0,
    'SELECT_debug_2' => 0,
    'ZONES' => 0,
    'zone' => 0,
    'SKIN_VARS' => 0,
    'LINK_ADD_SHIPPING_ZONE' => 0,
    'DISPLAY_FORM' => 0,
    'LEGEND' => 0,
    'ZONE' => 0,
    'ZONE_TYPE' => 0,
    'COUNTRIES' => 0,
    'country' => 0,
    'ZONE_COUNTRIES' => 0,
    'STATES' => 0,
    'state' => 0,
    'ZONE_STATES' => 0,
    'FORM_HASH' => 0,
    'SESSION_TOKEN' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_55404cc214b605_08934171',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_55404cc214b605_08934171')) {function content_55404cc214b605_08934171($_smarty_tpl) {?><style type="text/css">
   tr.show-removed td { text-decoration: line-through; color: #666; background: #ddd; }
   tr.show-removed .aios-editable { background: #ddd !important; }
</style>
<form action="<?php echo $_smarty_tpl->tpl_vars['VAL_SELF']->value;?>
" method="post" enctype="multipart/form-data">
   <?php if (isset($_smarty_tpl->tpl_vars['DISPLAY_RATES']->value)) {?>
   <!-- TAB -->
   <div id="All_In_One_Shipping" class="tab_content">
      <h3><?php echo $_smarty_tpl->tpl_vars['TITLE']->value;?>
</h3>
      <?php if ($_smarty_tpl->tpl_vars['MULTIPLE_ZONES']->value) {?>
      <div><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['module_help_using_tabs'];?>
</div>
      <?php }?>
      <fieldset>
         <legend><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['module_settings'];?>
</legend>
         <div><label for="status"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['common']['status'];?>
</label><span><input type="hidden" name="module[status]" id="status" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['status'];?>
" /></span></div>
         <div>
            <label for="range_weight"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_weight'];?>
</label>
            <span><input type="hidden" name="module[range_weight]" id="range_weight" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['range_weight'];?>
" /></span>
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_weight_description'];?>

         </div>
         <div>
            <label for="range_subtotal"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_subtotal'];?>
</label>
            <span><input type="hidden" name="module[range_subtotal]" id="range_subtotal" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['range_subtotal'];?>
" /></span>
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_subtotal_description'];?>

         </div>
         <div>
            <label for="range_items"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_items'];?>
</label>
            <span><input type="hidden" name="module[range_items]" id="range_items" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['range_items'];?>
" /></span>
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['range_items_description'];?>

         </div>
         <div><label for="tax"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['catalogue']['tax_type'];?>
</label>
            <span>
            <select name="module[tax]" id="tax">
            <?php  $_smarty_tpl->tpl_vars['tax'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tax']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['TAXES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tax']->key => $_smarty_tpl->tpl_vars['tax']->value) {
$_smarty_tpl->tpl_vars['tax']->_loop = true;
?><option value="<?php echo $_smarty_tpl->tpl_vars['tax']->value['id'];?>
" <?php echo $_smarty_tpl->tpl_vars['tax']->value['selected'];?>
><?php echo $_smarty_tpl->tpl_vars['tax']->value['tax_name'];?>
</option><?php } ?>
            </select>
            </span>
         </div>
         <div><label for="status"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['catalogue']['tax_included'];?>
</label><span><input type="hidden" name="module[tax_included]" id="tax_included" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['tax_included'];?>
" /></span></div>
         <div><label for="multiple_zones"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['multiple_zones'];?>
</label>
            <span>
            <select name="module[multiple_zones]" id="multiple_zones">
            <option value="all" <?php echo $_smarty_tpl->tpl_vars['SELECT_multiple_zones_all']->value;?>
><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_all_matching_zones'];?>
</option>
            <option value="first" <?php echo $_smarty_tpl->tpl_vars['SELECT_multiple_zones_first']->value;?>
><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_first_matching_zone'];?>
</option>
            </select>
            </span>
         </div>
         <div><label for="debug"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['debug'];?>
</label>
            <span>
            <select name="module[debug]" id="debug">
            <option value="0" <?php echo $_smarty_tpl->tpl_vars['SELECT_debug_0']->value;?>
><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['no_debug'];?>
</option>
            <option value="1" <?php echo $_smarty_tpl->tpl_vars['SELECT_debug_1']->value;?>
><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['enable_debug'];?>
</option>
            <option value="2" <?php echo $_smarty_tpl->tpl_vars['SELECT_debug_2']->value;?>
><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['verbose_debug'];?>
</option>
            </select>
            </span>
         </div>
      </fieldset>
      <fieldset>
         <legend><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['advanced_settings'];?>
</legend>
         <div>
            <a href="#" onclick="$('#aios-advanced').toggle();return false"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['show_advanced_settings'];?>
</a><br />
         </div>
         <div id="aios-advanced">
            <div>
               <label><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_pricing'];?>
</label>
               <span><input type="hidden" name="module[use_flat]" id="use_flat" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['use_flat'];?>
" /><label for="use_flat"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_flat'];?>
</label></span>
            </div>
            <div>
               <label class="spacer">&nbsp;</label>
               <span><input type="hidden" name="module[use_item]" id="use_item" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['use_item'];?>
" /><label for="use_item"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_item'];?>
</label></span>
            </div>
            <div>
               <label class="spacer">&nbsp;</label>
               <span><input type="hidden" name="module[use_percent]" id="use_percent" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['use_percent'];?>
" /><label for="use_percent"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_percent'];?>
</label></span>
            </div>
            <div>
               <label class="spacer">&nbsp;</label>
               <span><input type="hidden" name="module[use_weight]" id="use_weight" class="toggle" value="<?php echo $_smarty_tpl->tpl_vars['MODULE']->value['use_weight'];?>
" /><label for="use_weight"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['use_weight'];?>
</label></span>
            </div>
         </div>
      </fieldset>
      <script type="text/javascript">
         document.getElementById('aios-advanced').style.display = 'none';
      </script>
      <?php if (!$_smarty_tpl->tpl_vars['MULTIPLE_ZONES']->value) {?>
      <h4><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_zones'];?>
</h4>
      <p><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_zones_description'];?>
</p>
      <h4><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_rates'];?>
</h4>
      <?php  $_smarty_tpl->tpl_vars['zone'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['zone']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['ZONES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['zone']->key => $_smarty_tpl->tpl_vars['zone']->value) {
$_smarty_tpl->tpl_vars['zone']->_loop = true;
?>
      <?php echo $_smarty_tpl->getSubTemplate ('admin/shipping_rates.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

      <?php } ?>
      <?php }?>
   </div>
   <!-- TAB -->
   <div id="shipping_zones" class="tab_content">
      <h3><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['title_shipping_zones'];?>
</h3>
      <table class="list">
         <thead>
            <tr>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['arrange'];?>
</th>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['zone_name'];?>
</th>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['countries'];?>
</th>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['states_provinces_postcodes'];?>
</th>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_rates'];?>
</th>
               <th><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['zone_actions'];?>
</th>
            </tr>
         </thead>
         <tbody class="reorder-list">
            <?php  $_smarty_tpl->tpl_vars['zone'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['zone']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['ZONES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['zone']->key => $_smarty_tpl->tpl_vars['zone']->value) {
$_smarty_tpl->tpl_vars['zone']->_loop = true;
?>
            <?php if ($_smarty_tpl->tpl_vars['zone']->value['id']==0) {?>
         </tbody>
         <tbody class="list">
            <?php }?>
            <tr>
               <td align="center">
                  <?php if ($_smarty_tpl->tpl_vars['zone']->value['id']>0) {?>
                  <a href="#" class="handle"><img src="<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['admin_folder'];?>
/skins/<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['skin_folder'];?>
/images/updown.gif" title="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['ui']['drag_reorder'];?>
" /></a>
                  <input type="hidden" name="order[]" value="<?php echo $_smarty_tpl->tpl_vars['zone']->value['id'];?>
" />
                  <?php }?>
               </td>
               <td><?php echo $_smarty_tpl->tpl_vars['zone']->value['zone_name'];?>
</td>
               <td><?php echo $_smarty_tpl->tpl_vars['zone']->value['display_countries'];?>
</td>
               <td><?php echo $_smarty_tpl->tpl_vars['zone']->value['display_states'];?>
 <?php echo $_smarty_tpl->tpl_vars['zone']->value['display_postcodes'];?>
</td>
               <td><a href="<?php echo $_smarty_tpl->tpl_vars['zone']->value['link_rates'];?>
"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['shipping_rates'];?>
</a></td>
               <td>
                  <?php if ($_smarty_tpl->tpl_vars['zone']->value['link_edit']) {?>
                  <a href="<?php echo $_smarty_tpl->tpl_vars['zone']->value['link_edit'];?>
" class="aios-edit-zone"><img src="<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['admin_folder'];?>
/skins/<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['skin_folder'];?>
/images/edit.png" alt="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['common']['edit'];?>
" title="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['common']['edit'];?>
" style="padding:0 5px;" /></a>
                  <?php }?>
                  <?php if ($_smarty_tpl->tpl_vars['zone']->value['link_delete']) {?>
                  <a href="<?php echo $_smarty_tpl->tpl_vars['zone']->value['link_delete'];?>
" class="aios-remove-zone" title="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['notification']['confirm_delete'];?>
"><img src="<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['admin_folder'];?>
/skins/<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['skin_folder'];?>
/images/delete.png" alt="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['common']['delete'];?>
" title="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['notification']['confirm_delete'];?>
" style="padding:0 5px;" /></a>
                  <?php }?>
               </td>
            </tr>
            <?php } ?>
            <tr>
               <td colspan="6">
                  <a href="<?php echo $_smarty_tpl->tpl_vars['LINK_ADD_SHIPPING_ZONE']->value;?>
"><img src="<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['admin_folder'];?>
/skins/<?php echo $_smarty_tpl->tpl_vars['SKIN_VARS']->value['skin_folder'];?>
/images/add.png" alt="" width="16" height="16" border="0" style="padding:0 5px;" /><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['title_shipping_zone_add'];?>
</a>
               </td>
            </tr>
         </tbody>
      </table>
   </div>
   <?php if ($_smarty_tpl->tpl_vars['MULTIPLE_ZONES']->value) {?>
   <?php  $_smarty_tpl->tpl_vars['zone'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['zone']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['ZONES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['zone']->key => $_smarty_tpl->tpl_vars['zone']->value) {
$_smarty_tpl->tpl_vars['zone']->_loop = true;
?>
   <!-- TAB -->
   <div id="zone_<?php echo $_smarty_tpl->tpl_vars['zone']->value['id'];?>
" class="tab_content">
      <h3>
         <?php echo $_smarty_tpl->tpl_vars['zone']->value['zone_name'];?>
 <!--(<?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['zone_id'];?>
 <?php echo $_smarty_tpl->tpl_vars['zone']->value['id'];?>
)-->
      </h3>
      <?php echo $_smarty_tpl->getSubTemplate ('admin/shipping_rates.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

   </div>
   <?php } ?>
   <?php }?>
   <?php }?>
   <?php if (isset($_smarty_tpl->tpl_vars['DISPLAY_FORM']->value)) {?>
   <div id="All_In_One_Shipping" class="tab_content">
   <h3><?php echo $_smarty_tpl->tpl_vars['LEGEND']->value;?>
</h3>
   <fieldset>
      <input type="hidden" name="zone[id]" value="<?php echo $_smarty_tpl->tpl_vars['ZONE']->value['id'];?>
" />
      <legend><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['title_shipping_zone_add'];?>
</legend>
      <div>
         <label for="zone_name"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['zone_name_description'];?>
</label>
         <span>
         <input id="zone_name" name="zone[zone_name]" type="text" value="<?php echo $_smarty_tpl->tpl_vars['ZONE']->value['zone_name'];?>
" class="required" />
         </span>
      </div>
   </fieldset>
   <fieldset>
      <legend><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['what_will_this_zone_contain'];?>
</legend>
      <div>
         <label for="zone_type_countries"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_countries'];?>
</label>
         <span>
         <input id="zone_type_countries" name="zone_type" type="radio" value="C" onclick="display_div('C');" <?php if ($_smarty_tpl->tpl_vars['ZONE_TYPE']->value=='C') {?>checked="checked"<?php }?>/> 
         </span>
      </div>
      <div>
         <label for="zone_type_states"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_states'];?>
</label>
         <span>
         <input id="zone_type_states" name="zone_type" type="radio" value="S" onclick="display_div('S');" <?php if ($_smarty_tpl->tpl_vars['ZONE_TYPE']->value=='S') {?>checked="checked"<?php }?>/> 
         </span>
      </div>
      <div>
         <label for="zone_type_postcodes"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_postcodes'];?>
</label>
         <span>
         <input id="zone_type_postcodes" name="zone_type" type="radio" value="P" onclick="display_div('P');" <?php if ($_smarty_tpl->tpl_vars['ZONE_TYPE']->value=='P') {?>checked="checked"<?php }?>/> 
         </span>
      </div>
      <br />
      <div id="div_countries" class="nostripe">
         <h3><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_countries'];?>
</h3>
         <div class="clear">
            <label for="zone_countries_chzn"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['country_countries'];?>
</label>
         </div>
         <div class="clear">
            <select id="zone_countries" data-placeholder="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['choose_each_country'];?>
" name="zone_countries[]" multiple="multiple" class="chzn-select" style="width:350px;">
            <?php  $_smarty_tpl->tpl_vars['country'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['country']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['COUNTRIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['country']->key => $_smarty_tpl->tpl_vars['country']->value) {
$_smarty_tpl->tpl_vars['country']->_loop = true;
?>
            <option value="<?php echo $_smarty_tpl->tpl_vars['country']->value['iso'];?>
" <?php if (in_array($_smarty_tpl->tpl_vars['country']->value['iso'],$_smarty_tpl->tpl_vars['ZONE_COUNTRIES']->value)) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['country']->value['name'];?>
</option>
            <?php } ?>
            </select>
         </div>
      </div>
      <div id="div_states" class="nostripe">
         <h3><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_states'];?>
</h3>
         <div class="clear">
            <label for="state_country"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['select_country'];?>
</label>
         </div>
         <div class="clear">
            <select name="state_country">
               <option value=""><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['select_country'];?>
</option>
               <?php  $_smarty_tpl->tpl_vars['country'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['country']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['COUNTRIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['country']->key => $_smarty_tpl->tpl_vars['country']->value) {
$_smarty_tpl->tpl_vars['country']->_loop = true;
?>
               <option value="<?php echo $_smarty_tpl->tpl_vars['country']->value['iso'];?>
" <?php if (in_array($_smarty_tpl->tpl_vars['country']->value['iso'],$_smarty_tpl->tpl_vars['ZONE_COUNTRIES']->value)) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['country']->value['name'];?>
</option>
               <?php } ?>
            </select>
         </div>
         <div class="clear">
            <label for="zone_states"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['zone_states'];?>
</label>
         </div>
         <div class="clear">
            <select data-placeholder="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['choose_each_state'];?>
" name="zone_states[]" multiple="multiple" class="chzn-select" style="width:350px;">
            <?php  $_smarty_tpl->tpl_vars['state'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['state']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['STATES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['state']->key => $_smarty_tpl->tpl_vars['state']->value) {
$_smarty_tpl->tpl_vars['state']->_loop = true;
?>
            <option value="<?php echo $_smarty_tpl->tpl_vars['state']->value['abbrev'];?>
" <?php if (in_array($_smarty_tpl->tpl_vars['state']->value['abbrev'],$_smarty_tpl->tpl_vars['ZONE_STATES']->value)) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['state']->value['name'];?>
</option>
            <?php } ?>
            </select>
         </div>
      </div>
      <div id="div_postcodes" class="nostripe">
         <h3><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['one_or_more_postcodes'];?>
</h3>
         <div class="clear">
            <label for="postcode_country"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['select_country'];?>
</label>
         </div>
         <div class="clear">
            <select name="postcode_country" onchange="display_instructions(this);">
               <option value=""><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['select_country'];?>
</option>
               <?php  $_smarty_tpl->tpl_vars['country'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['country']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['COUNTRIES']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['country']->key => $_smarty_tpl->tpl_vars['country']->value) {
$_smarty_tpl->tpl_vars['country']->_loop = true;
?>
               <option value="<?php echo $_smarty_tpl->tpl_vars['country']->value['iso'];?>
" <?php if (in_array($_smarty_tpl->tpl_vars['country']->value['iso'],$_smarty_tpl->tpl_vars['ZONE_COUNTRIES']->value)) {?>selected="selected"<?php }?>><?php echo $_smarty_tpl->tpl_vars['country']->value['name'];?>
</option>
               <?php } ?>
            </select>
         </div>
         <div class="clear">
            <label for="zone_postcodes"><?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postal_code_regions'];?>
</label>
         </div>
         <div class="clear">
            <textarea name="zone_postcodes" style="width:250px;height:150px;"><?php echo $_smarty_tpl->tpl_vars['ZONE']->value['postcodes'];?>
</textarea>
         </div>
         <div id="div_pc_instructions">
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postcode_zone_instructions'];?>

         </div>
         <div id="div_pc_instructions_us">
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postcode_zone_instructions_us'];?>

         </div>
         <div id="div_pc_instructions_au">
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postcode_zone_instructions_au'];?>

         </div>
         <div id="div_pc_instructions_gb">
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postcode_zone_instructions_gb'];?>

         </div>
         <div id="div_pc_instructions_ca">
            <?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['postcode_zone_instructions_ca'];?>

         </div>
         <script type="text/javascript">
            // Show/hide div
            function show_hide_div(div_id, show) {
              element = document.getElementById(div_id);
              if (show == undefined) {
                if (element.style.display == 'none') show = 1;
                else show = 0;
              }
              if (show == 1) element.style.display = 'block';
              else element.style.display = 'none';
              return show;
            }
            function display_div(zone_ref) {
              show_hide_div('div_countries', zone_ref=='C');
              show_hide_div('div_states', zone_ref=='S');
              show_hide_div('div_postcodes', zone_ref=='P');
            }
            // Hide all zone divs initially
            display_div('<?php echo $_smarty_tpl->tpl_vars['ZONE_TYPE']->value;?>
');
            
            function display_instructions(el) {
              if (el) {
                country_iso = el.options[el.selectedIndex].value;
              } else {
                country_iso = '';
              }
              instructions = ['US', 'AU', 'GB', 'CA'];
              if (instructions.indexOf(country_iso) == -1) {
                other_country = true;
              } else {
                other_country = false;
              }
              show_hide_div('div_pc_instructions', other_country);
              show_hide_div('div_pc_instructions_us', country_iso=='US');
              show_hide_div('div_pc_instructions_au', country_iso=='AU');
              show_hide_div('div_pc_instructions_gb', country_iso=='GB');
              show_hide_div('div_pc_instructions_ca', country_iso=='CA');
            }
            // Display general instructions initially
            display_instructions();
         </script>
      </div>
   </fieldset>
   </div>
   <?php }?>
   <div class="form_control">
      <input type="hidden" name="save" value="<?php echo $_smarty_tpl->tpl_vars['FORM_HASH']->value;?>
" />
      <input type="hidden" name="previous-tab" id="previous-tab" value="" />
      <?php if (isset($_smarty_tpl->tpl_vars['DISPLAY_RATES']->value)) {?>
      <input type="submit" value="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['save_all_changes'];?>
" />
      <?php } else { ?>
      <input type="submit" value="<?php echo $_smarty_tpl->tpl_vars['LANG']->value['allinoneshipping']['save'];?>
" />
      <?php }?>
   </div>
   <input type="hidden" name="token" value="<?php echo $_smarty_tpl->tpl_vars['SESSION_TOKEN']->value;?>
" />
</form><?php }} ?>
