<?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 } ?>
  <div class="box">
    <div class="heading">
      <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a></div>
    </div>
    <div class="content">
      <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
	  <table style="width: 100%">
	  <tr>
	  <td style="width: 50%; vertical-align: top;">
          <div id="language" class="htabs">
            <?php foreach ($languages as $language) { ?>
            <a href="#tab-language-<?php echo $language['language_id']; ?>"><img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a>
            <?php } ?>
          </div>
          <?php foreach ($languages as $language) { ?>
          <div id="tab-language-<?php echo $language['language_id']; ?>">
            <table class="form">
			    <tr>
                <td><?php echo $entry_msg; ?></td></tr>
				<tr>
				<tr>
                <td><input style="width: 200px;" name="floshop3_header_title[<?php echo $language['language_id']; ?>]" value="<?php echo isset($header_title[$language['language_id']]) ? $header_title[$language['language_id']] : ''; ?>" /></td>
                </tr>
				<tr>
                <td><?php echo $entry_number; ?></td></tr>
				<tr>
				<tr>
                <td><input style="width: 200px;" name="floshop3_header_number[<?php echo $language['language_id']; ?>]" value="<?php echo isset($header_number[$language['language_id']]) ? $header_number[$language['language_id']] : ''; ?>" /></td>
                </tr>
			    <tr>
                <td><?php echo $entry_title; ?></td></tr>
				<tr>
				<tr>
                <td><input style="width: 200px;" name="floshop3_footer_title[<?php echo $language['language_id']; ?>]" value="<?php echo isset($footer_title[$language['language_id']]) ? $footer_title[$language['language_id']] : ''; ?>" /></td>
                </tr>
                <tr>
                <td><?php echo $entry_description; ?></td></tr>
				<tr>
                <td><textarea name="floshop3_footer_content[<?php echo $language['language_id']; ?>]" id="description-<?php echo $language['language_id']; ?>"><?php echo isset($footer_content[$language['language_id']]) ? $footer_content[$language['language_id']] : ''; ?></textarea></td>
                </tr>
            </table>
          </div>
        <?php } ?>
	   </td>
	   <td style="width: 50%; vertical-align: top;">
	  <table style="width: 100%;">
	  <tr><td style="padding: 10px; background: #CAED9C; font-weight: bold; width: 100%;">
	  <?php echo $entry_colorvar; ?>
	  <select name="floshop3_colorvar">
                  <?php if ($floshop3_colorvar == 'default') { ?>
                  <option value="default" selected="selected">Floshop3 Default</option>
                  <?php } else { ?>
                  <option value="default">Floshop3 Default</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'soft-blue') { ?>
                  <option value="soft-blue" selected="selected">Soft Blue</option>
                  <?php } else { ?>
                  <option value="soft-blue">Soft Blue</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'soft-red') { ?>
                  <option value="soft-red" selected="selected">Soft red</option>
                  <?php } else { ?>
                  <option value="soft-red">Soft red</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'soft-green') { ?>
                  <option value="soft-green" selected="selected">Soft green</option>
                  <?php } else { ?>
                  <option value="soft-green">Soft green</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'yellow-black') { ?>
                  <option value="yellow-black" selected="selected">Yellow black</option>
                  <?php } else { ?>
                  <option value="yellow-black">Yellow black</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'block-silver') { ?>
                  <option value="block-silver" selected="selected">Block silver</option>
                  <?php } else { ?>
                  <option value="block-silver">Block silver</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'blue-silver') { ?>
                  <option value="blue-silver" selected="selected">Blue silver</option>
                  <?php } else { ?>
                  <option value="blue-silver">Blue silver</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'dark-black') { ?>
                  <option value="dark-black" selected="selected">Dark black</option>
                  <?php } else { ?>
                  <option value="dark-black">Dark black</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'fire-block') { ?>
                  <option value="fire-block" selected="selected">Fire block</option>
                  <?php } else { ?>
                  <option value="fire-block">Fire block</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'green-silver') { ?>
                  <option value="green-silver" selected="selected">Green silver</option>
                  <?php } else { ?>
                  <option value="green-silver">Green silver</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'green-yellow') { ?>
                  <option value="green-yellow" selected="selected">Green yellow</option>
                  <?php } else { ?>
                  <option value="green-yellow">Green yellow</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'ice-blue') { ?>
                  <option value="ice-blue" selected="selected">Ice blue</option>
                  <?php } else { ?>
                  <option value="ice-blue">Ice blue</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'metalic-red') { ?>
                  <option value="metalic-red" selected="selected">Metalic red</option>
                  <?php } else { ?>
                  <option value="metalic-red">Metalic red</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'modern-silver') { ?>
                  <option value="modern-silver" selected="selected">Modern silver</option>
                  <?php } else { ?>
                  <option value="modern-silver">Modern silver</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'orange-black') { ?>
                  <option value="orange-black" selected="selected">Orange black</option>
                  <?php } else { ?>
                  <option value="orange-black">Orange black</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'orange-blue') { ?>
                  <option value="orange-blue" selected="selected">Orange blue</option>
                  <?php } else { ?>
                  <option value="orange-blue">Orange blue</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'pink-silver') { ?>
                  <option value="pink-silver" selected="selected">Pink silver</option>
                  <?php } else { ?>
                  <option value="pink-silver">Pink silver</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'red-black') { ?>
                  <option value="red-black" selected="selected">Red black</option>
                  <?php } else { ?>
                  <option value="red-black">Red black</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'red-blue') { ?>
                  <option value="red-blue" selected="selected">Red blue</option>
                  <?php } else { ?>
                  <option value="red-blue">Red blue</option>
                  <?php } ?>
				  <?php if ($floshop3_colorvar == 'silver-purple') { ?>
                  <option value="silver-purple" selected="selected">Silver purple</option>
                  <?php } else { ?>
                  <option value="silver-purple">Silver purple</option>
                  <?php } ?>
                </select>
	  </td></tr>
	  <tr><td style="padding: 10px; background: #CAED9C; font-weight: bold; width: 100%;">
	  <?php echo $entry_numvar; ?>       
	            <?php if ($header_var) { ?>
                <input type="radio" name="floshop3_header_var" value="1" checked="checked" />
                <?php echo $text_yes; ?>
                <input type="radio" name="floshop3_header_var" value="0" />
                <?php echo $text_no; ?>
                <?php } else { ?>
                <input type="radio" name="floshop3_header_var" value="1" />
                <?php echo $text_yes; ?>
                <input type="radio" name="floshop3_header_var" value="0" checked="checked" />
                <?php echo $text_no; ?>
                <?php } ?>
	  </td></tr>
	  <tr><td>
	  <tr><td style="padding: 10px; background: #CAED9C; font-weight: bold; width: 100%;">
	  <?php echo $entry_pm; ?>
	  </td></tr>
	  <tr><td style="padding: 10px; background: #CAED9C; font-weight: bold; width: 100%;">
	              <div class="image"><img src="<?php echo $floshop3_pm; ?>" alt="" id="thumb-floshop3_pm" />
                  <input type="hidden" name="floshop3_footer_pm" value="<?php echo $footer_pm; ?>" id="floshop3_pm" />
                  <br />
                  <a onclick="image_upload('floshop3_pm', 'thumb-floshop3_pm');"><?php echo $text_browse; ?></a>&nbsp;&nbsp;|&nbsp;&nbsp;<a onclick="$('#thumb-floshop3_pm').attr('src', '<?php echo $no_image; ?>'); $('#floshop3_pm').attr('value', '');"><?php echo $text_clear; ?></a></div>
	  </td></tr>
	  </table>
	  </td>
</tr></table>	   
      </form>
    </div>
  </div>
</div>
<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script> 
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
CKEDITOR.replace('description-<?php echo $language['language_id']; ?>', {
	filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
	filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
//--></script> 
<script type="text/javascript"><!--
function image_upload(field, thumb) {
	$('#dialog').remove();
	
	$('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanager&token=<?php echo $token; ?>&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
	
	$('#dialog').dialog({
		title: '<?php echo $text_image_manager; ?>',
		close: function (event, ui) {
			if ($('#' + field).attr('value')) {
				$.ajax({
					url: 'index.php?route=common/filemanager/image&token=<?php echo $token; ?>&image=' + encodeURIComponent($('#' + field).val()),
					dataType: 'text',
					success: function(data) {
						$('#' + thumb).replaceWith('<img src="' + data + '" alt="" id="' + thumb + '" />');
					}
				});
			}
		},	
		bgiframe: false,
		width: 800,
		height: 400,
		resizable: false,
		modal: false
	});
};
//--></script> 
<script type="text/javascript"><!--
$('#language a').tabs();
//--></script> 
<?php echo $footer; ?>