<?php echo $header; ?>
<div id="content">
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <?php if ($error_warning) { ?>
  <div class="warning"><?php echo $error_warning; ?></div>
  <?php } ?>
  <?php if ($success) { ?>
  <div class="success"><?php echo $success; ?></div>
  <?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1><img src="view/image/backup.png" /><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#import').submit();" class="button"><span><?php echo $button_import; ?></span></a><a onclick="$('#export').submit();" class="button"><span><?php echo $button_export; ?></span></a></div>
  </div>
  <div class="content">
    <div id="tabs" class="htabs"><a href="#tab-import"><?php echo $tab_import; ?></a><a href="#tab-export"><?php echo $tab_export; ?></a></div>
	 <div id="tab-import">
      <form action="<?php echo $import; ?>" method="post" enctype="multipart/form-data" id="import">
      <table class="form">
      	<!-- mapping fields to names -->
		<tr>
			<td colspan="2" style="width:100%"><table>
				<tr><td style="width:200px;"><h2><?php echo $text_field_oc_title; ?></h2></td><td><h2><?php echo $text_field_csv_title; ?></h2></td>
				<tr><td style="width:200px;"><?php echo $text_field_firstname; ?></td><td><input type="text" name="customers_field_firstname" value="<?php echo $customers_field_firstname; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_lastname; ?></td><td><input type="text" name="customers_field_lastname" value="<?php echo $customers_field_lastname; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_email; ?></td><td><input type="text" name="customers_field_email" value="<?php echo $customers_field_email; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_telephone; ?></td><td><input type="text" name="customers_field_telephone" value="<?php echo $customers_field_telephone; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_fax; ?></td><td><input type="text" name="customers_field_fax" value="<?php echo $customers_field_fax; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_password; ?></td><td><input type="text" name="customers_field_password" value="<?php echo $customers_field_password; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_newsletter; ?></td><td><input type="text" name="customers_field_newsletter" value="<?php echo $customers_field_newsletter; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_company; ?></td><td><input type="text" name="customers_field_company" value="<?php echo $customers_field_company; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_address_1; ?></td><td><input type="text" name="customers_field_address_1" value="<?php echo $customers_field_address_1; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_address_2; ?></td><td><input type="text" name="customers_field_address_2" value="<?php echo $customers_field_address_2; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_postcode; ?></td><td><input type="text" name="customers_field_postcode" value="<?php echo $customers_field_postcode; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_city; ?></td><td><input type="text" name="customers_field_city" value="<?php echo $customers_field_city; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_country_id; ?></td><td><input type="text" name="customers_field_country_id" value="<?php echo $customers_field_country_id; ?>"></td></tr>
				<tr><td style="width:200px;"><?php echo $text_field_zone_id; ?></td><td><input type="text" name="customers_field_zone_id" value="<?php echo $customers_field_zone_id; ?>"></td></tr>
			</table></td>
		</tr>
        <tr>
          <td style="width:20px;"><?php echo $entry_import; ?></td>
          <td><input type="file" name="import" /></td>
        </tr>
      </table>
    </form>
    </div>
    <div id="tab-export">
    <form action="<?php echo $export; ?>" method="post" enctype="multipart/form-data" id="export">
      <table class="form">
        <tr>
          <td><?php echo $entry_export; ?></td>
          <td><div class="scrollbox" style="margin-bottom: 5px;">
              <?php $class = 'odd'; ?>
              <?php foreach ($tables as $table) { ?>
              <?php $class = ($class == 'even' ? 'odd' : 'even'); ?>
              <div class="<?php echo $class; ?>">
                <input type="checkbox" name="export[]" value="<?php echo $table; ?>" checked="checked" />
                <?php echo $table; ?> </div>
              <?php } ?>
            </div>
          </td>
        </tr>
      </table>
    </form>
    </div>
  </div>
</div>
<script>
	$(function() {
		var dates = $( "#from, #to" ).datepicker({
			defaultDate: "+1w",
			changeMonth: true,
			onSelect: function( selectedDate ) {
				var option = this.id == "from" ? "minDate" : "maxDate",
					instance = $( this ).data( "datepicker" ),
					date = $.datepicker.parseDate(
						instance.settings.dateFormat ||
						$.datepicker._defaults.dateFormat,
						selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
				dateFormat: 'yy-mm-dd';
			}
		});
	});
</script>
<script type="text/javascript"><!--
$('#tabs a').tabs(); 
//--></script> 
<?php echo $footer; ?>