<?php

 $selectDescription = mysql_query("SELECT conteudo FROM adm_seo WHERE idSeo = 1");
 $description = mysql_result($selectDescription, 0, 0);

 $selectKeywords = mysql_query("SELECT conteudo FROM adm_seo WHERE idSeo = 2");
 $keywords = mysql_result($selectKeywords, 0, 0);
?>

<form name="frmCadLink" id="frmCadLink" enctype="multipart/form-data" method="post" class="form-padrao" action="miolo.php?miolo=updateSeo">
	<table border="0" class="tabela-conteudo" cellspacing="10">
		<tbody>
			<tr>
				<td colspan="2" class="titulos-internos">Atualizar Componentes de SEO</td>
			</tr>
			<tr><td colspan="2">&nbsp;</td></tr>
				<tr class="linha-topo">
					<th align='left'>Descri&ccedil;&atilde;o:</th>
				</tr>
				<tr>
					<th align='left'><textarea name='descricao' id='descricao' rows='10' cols='85'><? echo utf8_encode($description);?></textarea></th>
				</tr>
				<tr><td>&nbsp;</td></tr>
				<tr class="linha-topo">
					<th align="left">Palavras Chave:</th>
				</tr>
				<?php 
					$arrKeywords = explode(",", $keywords);
					foreach ($arrKeywords as $keyword) {
				?>
				<tr class="linhaPalavraChave">
					<th class="inputsProdutos" align="left">Conte&uacute;do:<a name="keyword" id="keyword"></a>
						<input type="text" maxlenght="200" name="keywords[]" id="keywords" value="<?php echo utf8_encode($keyword); ?>">&nbsp;<a href="#keyword" class="removerPalavraChave"><img src="images/menos.png" width="18px" height="18px" alt=""></a>
					</th>
				</tr>
				<?php 
				}
				?>
				<tr>
					<th class="inputPalavraChave" align="left">
						<a href="#keyword"  class="adicionarPalavraChave"><img src="images/mais.png" width="18px" height="18px" alt=""></a>
					</th>
				</tr>
				<tr>
					<th align='center' >
						<input type='button' value='Atualizar' name='btnUpdate' id='btnUpdate' OnClick="javascript:frmCadLink.submit();">
						<input type='button' value='Limpar' name='btnLimpar' id='btnLimpar'>
					</th>
				</tr>
			<tr><td colspan="4">&nbsp;</td></tr>
		</tbody>
	</table>
</form>

<? include 'paineis/inputs/divResultado.php'; ?>