<?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="heading">
      <h1><img src="view/image/setting.png" alt="" /> <?php echo $heading_title; ?></h1>
      <div class="buttons">
      	<a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a>
      	<a href="<?php echo $cancel; ?>" class="button"><?php echo $button_cancel; ?></a>
      </div>
    </div>
    <div class="content">
      <div id="tabs" class="htabs">
      	<a href="#tab-inf_contatos"><?php echo $tab_inf_contatos; ?></a>
      	<a href="#tab-inf_rsociais"><?php echo $tab_inf_rsociais; ?></a>
        <a href="#tab-inf_config"><?php echo $tab_inf_config; ?></a>
      </div>
          <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
              
            	  <div id="tab-inf_contatos">
                      <table class="form">
                        <tr>
                          <td><?php echo $entry_inf_telefone; ?></td>
                          <td><input class="inf-cel" type="text" name="config_inf_telefone" value="<?php echo $config_inf_telefone; ?>" />
                          </td>
                        </tr>
                        <tr>
                          <td><?php echo $entry_inf_email; ?></td>
                          <td><input type="text" name="config_inf_email" value="<?php echo $config_inf_email; ?>" />
                          
                          <?php if(isset($error_inf_status_email)){ ?>
                          	<span class="error"><?php echo $error_inf_status_email; ?></span>
                          <?php } ?>                          
                          </td>
                        </tr>
                        <tr>
                          <td><?php echo $entry_inf_status_email; ?></td>
                          <td>
                          <select name="config_inf_status_email">
                          	<option value="enable" <?php if($config_inf_status_email == 'enable') echo ' selected="selected"';?><?php if($config_inf_status_email == '') echo ' selected="selected"';?>>Habilitado</option>
                            <option value="disable"  <?php if($config_inf_status_email == 'disable') echo ' selected="selected"';?><?php if($config_inf_status_email == '') echo ' selected="selected"';?>>Desabilitado</option>
                          </select>
                          </td>
                        </tr>  
                    

                        	<?php foreach ($languages as $language) { ?>
                                <tr class="tab-language-<?php echo $language['language_id']; ?>">
                                    <td><?php echo $entry_inf_dados ?></td>
                                    <td>
                                        <textarea name="config_inf_dados[<?php echo $language['language_id']; ?>]" id="config_inf_dados-<?php echo $language['language_id']; ?>"><?php   if(is_array($config_inf_dados)){  echo $config_inf_dados[$language['language_id']]; }else { echo $config_inf_dados; } ?></textarea>
                                        
                                    </td>
                                </tr>
                            <?php } ?>
                                    			                       
                        
                        
                      </table>
                </div> 
                <div id="tab-inf_rsociais">    
                	<table class="form">
                        <tr>
                          <td><?php echo $entry_inf_twitter; ?></td>
                          <td><input type="text" name="config_inf_twitter" value="<?php echo $config_inf_twitter; ?>" />
                          </td>
                        </tr>
                        <tr>
                          <td><?php echo $entry_inf_facebook; ?></td>
                          <td><input type="text" name="config_inf_facebook" value="<?php echo $config_inf_facebook; ?>" />
                          </td>
                        </tr>
                        <tr>
                          <td><?php echo $entry_inf_blogger; ?></td>
                          <td><input type="text" name="config_inf_blogger" value="<?php echo $config_inf_blogger; ?>" />
                          </td>
                        </tr>
                        <tr>
                          <td><?php echo $entry_inf_youtube; ?></td>
                          <td><input type="text" name="config_inf_youtube" value="<?php echo $config_inf_youtube; ?>" />
                          </td>
                        </tr>                	
                	</table>
                </div> 
                <div id="tab-inf_contatos">
                    <table class="form">
                        <tr>
                            <td><?php echo $entry_new_pattern_purchase; ?></td>
                            <td>
                            <select name="config_new_pattern_purchase">
                                <?php if ($config_new_pattern_purchase) { ?>
                                <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                                <option value="0"><?php echo $text_disabled; ?></option>
                                <?php } else { ?>
                                <option value="1"><?php echo $text_enabled; ?></option>
                                <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                                <?php } ?>
                            </select>
                            </td>              
                        </tr>                         
                        
                    </table>
                </div>
            
            </div>
          
    </div>
 </div>

<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>

<?php foreach ($languages as $language) { ?>
<script type="text/javascript"><!--
CKEDITOR.replace('config_inf_dados-<?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; ?>'
});
//--></script>
<?php } ?>


<script type="text/javascript"><!--
$('#template').load('index.php?route=setting/setting/template&token=<?php echo $token; ?>&template=' + encodeURIComponent($('select[name=\'config_template\']').attr('value')));
//-->
</script> 

<script>
	$(".inf-cel").mask("(99) 9999-9999?9");
</script>

<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<?php echo $footer; ?>