<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Itens</title>
	<meta content="text/html; charset=utf-8" http-equiv="content-type" />
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
	<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="ckeditor/adapters/jquery.js"></script>
	<script src="ckeditor/samples/sample.js" type="text/javascript"></script>
	<link href="ckeditor/samples/sample.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	//<![CDATA[

$(function()
{
	var config = {
		toolbar:
		[

['-','-']


['TextColor','BGColor'],

			['UIColor']
		]
	};

	// Initialize the editor.
	// Callback function can be passed and executed after full instance creation.
	$('.jquery_ckeditor').ckeditor(config);
});

	//]]>
	</script>
</head>
<body>

<form method="post" action="

<?php

echo'?lg='.$lg.'&opcao=editaritem&flag=gravar" >

<INPUT TYPE="hidden" name="cod" value="'.$valor["cod_item"].'">'; 

?>

<div>




<textarea cols="30" rows="1" class="jquery_ckeditor" name="item">
<?php echo''.$valor["item"].''; ?>  
</textarea>


<textarea cols="30" rows="1" class="jquery_ckeditor" name="detalhes">
<?php echo''.$valor["detalhes"].''; ?>  
</textarea>


<INPUT TYPE="text" name="id_item" value="<?php echo''.$valor["id_item"].''; ?>">

<br />





<?php

echo'
<div id="perg_info">
<SELECT size="1" name="lista">

<OPTION value="0">
Inserir como N&Iacute;VEL 1
</OPTION>';

$c = $valor["lista"];

$sql = "select * from itens where cod_item = '$c'";
$resulta = mysql_query ($sql);
while ( $valor = mysql_fetch_array($resulta) )
     {
        if($resulta == TRUE)
        {
echo '
<OPTION selected value="'.$valor["cod_item"].'">
'.$valor["item"].'</OPTION>';
        }
     }

echo '
<OPTION value="">
LISTAS
</OPTION>';

$sql = "select * from itens order by cod_item  ASC";
$resultb = mysql_query ($sql);
while ( $valor = mysql_fetch_array($resultb) )
     {
        if($resultb == TRUE)
        {
echo '
<OPTION value="'.$valor["cod_item"].'">'.$valor["item"].'</OPTION>';
        }
     }
echo '

</SELECT>
</div>';

?>


<br />






<div style="float: right; margin-right: 20px;">
&nbsp;<br/>
<input type="submit" value="SALVAR"/>
</div>

</div>
</form>


</body>
</html>




