<?php echo $header; ?>


<div id="content">
	<div class="breadcrumb">
		<?php foreach ($breadcrumbs as $breadcrumb) { ?>

		<?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"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
	</div>

	<div class="content">

	<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">

		<div id="settings_tabs" class="htabs clearfix">
			<a href="#functions_settings"><?php echo $entry_tab_functions; ?></a>
			<a href="#footer_settings"><?php echo $entry_tab_footer; ?></a>
		</div>

		<div id="functions_settings" class="divtab">
		
			<table class="form">
			
				<tr>
					<td colspan="2">
						<h3><?php echo $entry_default_color; ?></h3>
					</td>
					
					
				</tr>
				
				<tr>
					<td><select name="tg_demeter_cp_default_color">
              
              <?php if (isset($tg_demeter_cp_default_color)) {
              $selected = "selected";
              ?>
			  <option value="default" <?php if($tg_demeter_cp_default_color=='default'){echo $selected;} ?>>Padrão</option>
              <option value="blue" <?php if($tg_demeter_cp_default_color=='blue'){echo $selected;} ?>>Azul</option>
			  <option value="coffee" <?php if($tg_demeter_cp_default_color=='coffee'){echo $selected;} ?>>Café</option>
			  <option value="green" <?php if($tg_demeter_cp_default_color=='green'){echo $selected;} ?>>Verde</option>
			  <option value="red" <?php if($tg_demeter_cp_default_color=='red'){echo $selected;} ?>>Vermelho</option>
			  <option value="orange" <?php if($tg_demeter_cp_default_color=='orange'){echo $selected;} ?>>Laranja</option>
			  <?php } else { ?>
			  <option value="default">Padrão</option>
              <option value="blue">Azul</option>
              <option value="coffee">Café</option>
              <option value="green">Verde</option>
              <option value="red">Vermelho</option>
			  <option value="orange">Laranja</option>
              <?php } ?>
           </select></td>
				</tr>
				
			
				<tr>
					<td colspan="2">
						<h3><?php echo $entry_delivery_time; ?></h3>
					</td>
				</tr>
					<?php foreach ($languages as $language) { ?>
						<tr> 
							<td><?php echo $entry_delivery_title; ?></td> 
	  			
							<td> 
								<input type="text" name="mymodule_title<?php echo $language['language_id']; ?>" id="mymodule_title<?php echo $language['language_id']; ?>" size="30" value="<?php echo ${'mymodule_title' . $language['language_id']}; ?>" />
								<img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" style="vertical-align: top;" /><br />
							</td>
						</tr>
					<?php } ?> 
					
					<td><?php echo $entry_delivery_value; ?></td>
					<td><input type="text" name="tg_demeter_cp_delivery_time" size="30" value="<?php echo $tg_demeter_cp_delivery_time; ?>" /></td>
				
				<tr>
					<td colspan="2">
						<h3><?php echo $entry_delivery_phone; ?></h3>
					</td>
				</tr>
				<?php foreach ($languages as $language) { ?>
						<tr> 
							<td><?php echo $entry_delivery_title; ?></td> 
	  			
							<td> 
								<input type="text" name="mymodule_title2<?php echo $language['language_id']; ?>" id="mymodule_title2<?php echo $language['language_id']; ?>" size="30" value="<?php echo ${'mymodule_title2' . $language['language_id']}; ?>" />
								<img src="view/image/flags/<?php echo $language['image']; ?>" title="<?php echo $language['name']; ?>" style="vertical-align: top;" /><br />
							</td>
						</tr>
					<?php } ?> 
				<tr>
					<td><?php echo $entry_delivery_value; ?></td>
					<td><input type="text" name="tg_demeter_cp_delivery_phone" size="30" value="<?php echo $tg_demeter_cp_delivery_phone; ?>" /></td>
				</tr>

				

			</table>

		</div>		

		<div id="footer_settings" class="divtab">
		
			<table class="form">
				
				<tr>
					<td><?php echo $entry_facebook_id; ?></td>
					<td>
						<input type="text" name="tg_demeter_cp_facebook_id" value="<?php echo $tg_demeter_cp_facebook_id; ?>" /></td>
				</tr>

				<tr>
					<td><?php echo $entry_twitter_username; ?></td>
					<td><input type="text" name="tg_demeter_cp_twitter_username" value="<?php echo $tg_demeter_cp_twitter_username; ?>" /></td>
				</tr>

				<tr>
					<td><?php echo $entry_gplus_id; ?></td>
					<td><input type="text" name="tg_demeter_cp_gplus_id" value="<?php echo $tg_demeter_cp_gplus_id; ?>" /></td>
				</tr>

				<tr>
					<td><?php echo $entry_pinterest_id; ?></td>
					<td><input type="text" name="tg_demeter_cp_pinterest_id" value="<?php echo $tg_demeter_cp_pinterest_id; ?>" /></td>
				</tr>

			</table>

		</div>

		</form>

	</div>

</div>

<script type="text/javascript">

	$('#settings_tabs a').tabs();
	$('#functions_tabs a').tabs();
	$('#languages a').tabs(); 
	$('#footer_settings_tabs a').tabs();

</script>

