<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>GEWS 2.0</title>
 
<link href="css1.css" rel="stylesheet" type="text/css" />
 
<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/adapters/jquery.js"></script>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script src="ckeditor/sample.js" type="text/javascript"></script>
<link href="ckeditor/sample.css" rel="stylesheet" type="text/css" />








<script language="JavaScript">

janela1 = null;
function setor1()  {
janela1=window.open('<?php include ("stp.php"); echo'uploadfotos.php?lg='.$lg.''; ?>','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=270'); }

janela2 = null;
function setor2()  {
janela2=window.open('<?php include ("stp.php"); echo'uploaddocs.php?lg='.$lg.''; ?>','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=270'); }

janela3 = null;
function setor3()  {
janela3=window.open('<?php include ("stp.php"); echo'uploadaudio.php?lg='.$lg.''; ?>','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=270'); }

janela4 = null;
function setor4()  {
janela4=window.open('<?php include ("stp.php"); echo'uploadvideos.php?lg='.$lg.''; ?>','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=270'); }

janela5 = null;
function setor5()  {
janela5=window.open('paleta.php','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=200'); }

janela6 = null;
function setor6()  {
janela6=window.open('http://www.<?php include ("stp.php"); echo''.$site.''; ?>','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=800,height=500'); }

janela7 = null;
function setor7()  {
janela7=window.open('mod_perguntas.php','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=330,height=290'); }

janela8 = null;
function setor8()  {
janela8=window.open('paleta.php','sprito','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,top=180,left=420,width=300,height=200'); }

</script>






<link rel="stylesheet" media="all" type="text/css" href="menu_style.css" />
<!--[if IE]>
<link rel="stylesheet" media="all" type="text/css" href="ie.css" />
<![endif]-->





<script language="javascript" type="text/javascript"> 
    function ExpandirCategoria(Idcategoria)
    {
        var lnk = document.getElementById( "hyCateg" + Idcategoria );
        var pn = document.getElementById( "pnCateg" + Idcategoria );
 
        if(lnk.style.backgroundImage.indexOf("../../img/ico/expand.gif") > 0)
        {
            pn.style.display = "block";
            lnk.style.backgroundImage='url(../../img/ico/collapse.gif)';
        }
        else
        {
            pn.style.display = "none";
            lnk.style.backgroundImage='url(../../img/ico/expand.gif)';
        }
    }
</script>





<?php 

include ("stp.php");

?>





	<script type="text/javascript">
	<![CDATA[
 
$(function()
{
	var config = {
		toolbar:
		[
			['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
			['UIColor']
		]
	};
 
	// Initialize the editor.
	// Callback function can be passed and executed after full instance creation.
	$('.jquery_ckeditor').ckeditor(config);
});
 
	]]>
	</script>







</head>
<body>











<?php

if ($list=='todos')
{

$sql = "select * from menu_horiz order by id asc";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
      {
echo'
<a href="lista_menusHoriz.php?lg='.$lg.'&list=horizontais&menu='.$menu.'" target="listamaterias">

'.$valor["nome"].'

</a>

<br/>';
       }

}





if ($list=='horizontais')
{
echo'
<div id="listamaterias">


Menus Horizontais
 
<br/><br/>

<a href="adm_menu_horiz.php?lg='.$lg.'&opcao=inserircategoria" class="novo" target="_blank" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=750,left=230,height=800,top=60\'); return false;">
+ NOVO MENU
</a> 


<div id="listaeditar">

</div>
<div id="listaeditar">

</div>
<div id="listaeditar">

</div>

</div>';

$sql = "select * from menu_horiz where id = 001 order by id";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
echo'
<div ';

if($valor["cod_item"]%2){ 
     echo'
id="listamateriasCOR1"'; 
}else{ 
     echo'
id="listamateriasCOR2"';  
}

echo'>


<a href="lista_menusHoriz.php?lg='.$lg.'&list=pmenu&menu='.$valor["nome"].'" target="listamaterias">

'.$valor["nome"].'

</a>


<div id="listaeditar">


</div>
<div id="listaeditar">



</div>
<div id="listaeditar">


</div>
</div>';
       }

}







if ($list=='pmenu')
{



echo'
<div id="listamaterias">
MENU '.$menu.'

&nbsp;&nbsp;&nbsp;&nbsp;

<a href="adm_menu_horiz.php?lg='.$lg.'&menu='.$menu.'&opcao=inserir" class="novo" target="_blank" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=750,left=230,height=800,top=60\'); return false;">
+ NOVO ITEM 
</a>



<div id="listaeditar">
Excluir
</div>
<div id="listaeditar">

</div>
<div id="listaeditar">
Ordem
</div>
<div id="listaeditar">

</div>
<div id="listaeditar">
URL
</div>
</div>';

$sql = "select * from menu_horiz where nome = '$menu' order by id asc";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
echo'
<div';

if($valor["cod_item"]%2){ 
     echo' id="listamateriasCOR1"'; 
}else{ 
     echo' id="listamateriasCOR2"';  
}

echo'>



<a href="adm_menu_horiz.php?lg='.$lg.'&menu='.$menu.'&opcao=altera&cod='.$valor["cod_item"].'" target="_blank" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=750,left=230,height=800,top=60\'); return false;">

'.$valor["item_menu"].'

</a>


<div id="listaeditar">
<a href="adm_menu_horiz.php?lg='.$lg.'&menu='.$menu.'&opcao=excluir&cod='.$valor["cod_item"].'" target="_blank" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=750,left=230,height=800,top=60\'); return false;">
<font color="red">X</font></a>
</div>

<div id="listaeditar">

</div>

<div id="listaeditar">
'.$valor["id"].'
</div>

<div id="listaeditar">

</div>

<div id="listaeditar">
'.$valor["url"].'
</div>

</div>';
       }

}




?>

</body>
</html>