<!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>
 



<style type="text/css">


body {
  font-family: Arial, sans-serif;
  font-size: 12px;
  margin: 0px;
  background-color: #FFF;
}

h1 {
 margin-left: 10px;
}


.link {
  text-decoration: none;
  color: white;
}

#barratop {
  padding: 0px;
}

.logo {
  float: left;
  width: 50px;
  height: 50px;
  border: 0px;
}

#navHoriz {
  height: 40px;
  padding: 0px;
}

#container {
  padding: 0px;
}


#conteudoINTRO {
  padding: 5px;
  padding-top: 10px;
  padding-left: 15px;
}



#sobre {
  width: 500px;
  padding: 0px;
  margin: 20px;
}




#menuIntro {
  margin: 0px;
  padding: 0px;
  list-style: none;
  font-family: Arial, sans-serif;
  font-size: 18px;
 }

#menuIntro li {
  float: left;
  border-right: 1px solid #BBB;

}

#menuIntro li a {
  display: block;
  text-decoration: none;
  padding: 20px;
}

#menuIntro li a:link, #menuIntro li a:visited {
  color: #BBB;
}

#menuIntro li a:hover {
  color: #000;
  background-color: #EEE;
}

#listas {
  padding: 0px;
  margin-left: 5px;
  font-size: 12px;
  width: 218px;
  height: 600px;
  float: left;
}

#bnlistas {
  float: left;
  width: 99%;
  height: 20px;
  padding: 0px;
  padding-left: 10px;
  padding-top: 0px;
  padding-bottom: 0px;
  font-size: 12px;
  color: white;
}

#bnlistas a {
  color: white;
  text-decoration: none;
}

#conteudo {
  width: 700px;
  height: 800px;
  font-size: 16px;
  padding: 0px;
  margin-left: 0px;
  float: left;  
}

.novo {
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
}


span.Editar {
  padding-top: 30px;
  margin-left: 20px;
}

span.Excluir {
  padding-top: 30px;
}

span.TituloPrincipal {
  padding-top: 0px;
  font-size: 28px;
  margin-left: 10px;
}

span.NomeMateria {
  font-size: 18px;
  font-weight: normal;
}

span.Editar,
span.Excluir,
span.TituloPrincipal {
  float: left;
}


#listamaterias {
  float: left;
  width: 99%;
  background-color: #004CB6;
  padding: 0px;
  padding-left: 10px;
  padding-top: 5px;
  padding-bottom: 5px;
  color: white;
  font-size: 13px;
}

#listamaterias p {
  margin-top: 0px;
  margin-bottom: -5px;
}





#listamateriasCOR1 {
  float: left;
  width: 98%;
  background-color: #F0F5FD;
  padding: 5px;
  padding-left: 10px;
}

#listamateriasCOR1 p {
  margin-top: 0px;
  margin-bottom: -5px;
}

#listamateriasCOR1 a:link, visited {
  color: gray;
  text-decoration: none;
}

#listamateriasCOR1 a:hover {
  color: blue;
  text-decoration: none;
}

#listamateriasCOR1:hover {
  background-color: #FFF;
  color: black;
}





#listamateriasCOR2 {
  float: left;
  width: 98%;
  background-color: #DEEAFE;
  padding: 5px;
  padding-left: 10px;
}

#listamateriasCOR2 p {
  margin-top: 0px;
  margin-bottom: -5px;
  width: 200px;
}

#listamateriasCOR2 a:link, visited {
  color: gray;
  text-decoration: none;
}

#listamateriasCOR2 a:hover {
  color: blue;
  text-decoration: none;
}

#listamateriasCOR2:hover {
  background-color: #FFF;
  color: black;
}







#listamateriasCOR3 {
  background-color: #95B2DB;
  color: white;
}






#listasecoesCOR1 {
  float: left;
  width: 98%;
  background-color: #F0F5FD;
  padding: 2px;
  padding-left: 10px;
}



#listasecoesCOR1 p {
  margin-top: 0px;
  margin-bottom: -5px;
  width: 200px;
  float: left;
}

#listasecoesCOR1 a:link, visited {
  color: gray;
  text-decoration: none;
}

#listasecoesCOR1 a:hover {
  color: blue;
  text-decoration: none;
}


#listasecoesCOR1:hover {
  background-color: #FFF;
  color: black;
}






#listasecoesCOR2 {
  float: left;
  width: 98%;
  background-color: #DEEAFE;
  padding: 2px;
  padding-left: 10px;
}

#listasecoesCOR2 p {
  margin-top: 0px;
  margin-bottom: -5px;
  float: left;
}

#listasecoesCOR2 a:link, visited {
  color: gray;
  text-decoration: none;
}

#listasecoesCOR2 a:hover {
  color: blue;
  text-decoration: none;
}


#listasecoesCOR2:hover {
  background-color: #FFF;
  color: black;
}




#listasecoesCOR3 {
  background-color: #95B2DB;
  color: white;
}







#listatitulos {
  float: left;
  padding: 10px;
  padding-left: 5px;
}


#listaeditar {
  float: right;
  width: 100px;
  text-align: center;
  padding: 0px;
  padding-left: 5px;
}


#mat_info {
  margin-left: 10px;
  padding-right: 10px;
  padding-bottom: 10px;
  font-family: Arial, sans-serif;
  font-size: 12px;
}

#mat_info input {
  border-style: colapse;
}

#rodape {
}








</style>


<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=='todas')
{

echo'
<div id="listamaterias">
Conte&uacute;do - Lista Completa

<br/><br/>

<a href="adm_materias.php?lg='.$lg.'&opcao=inserir&form=basico" 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=200,height=800,top=60\'); return false;" class="link">
+ CONTE&Uacute;DO
</a>

&nbsp;
|
&nbsp;

<a href="lista_materias.php?lg='.$lg.'&list=todas" class="link">
ATUALIZAR
</a>



</div>';

$sql = "select * from materias order by cod_materia asc";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {
echo'
<div';

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


if($valor["cod_materia"]==$cod){ 
     echo' id="listamateriasCOR3"'; 
}



echo'>


<h3 style="font-size: 19px; font-weight: normal;">'.$valor["nome"].'</h3>
C&Oacute;DIGO: <b>'.$valor["cod_materia"].'</b><br/>
SE&Ccedil;&Atilde;O: <b>'.$valor["secao"].'</b><br/>
ORDEM: <b>'.$valor["id"].'</b>

<br /><br />

<a href="adm_materias.php?lg='.$lg.'&sec='.$sec.'&form=editor&opcao=altera&cod='.$valor["cod_materia"].'" 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;">
<img src="images/icone_edit.jpg" border="0">
</a>



<a href="adm_materias.php?lg='.$lg.'&sec='.$valor["secao"].'&opcao=altera&form=basico&cod='.$valor["cod_materia"].'" 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;">
<img src="images/icone_i.jpg" border="0">
</a>



<a href="adm_materias.php?lg='.$lg.'&opcao=excluir&cod='.$valor["cod_materia"].'" 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">
<img src="images/icone_x.jpg" border="0">
</font>
</a>


</div>';

       }

}







if ($list=='psecao')
{


$sql = "select * from secoes where cod_secao = '$sec'";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {

echo'
<div id="bnlistas">
</div>

<span class="TituloPrincipal">
'.$valor["nome_secao"].'
</span>

<span class="Editar">
<a href="adm_secoes.php?lg='.$lg.'&opcao=altera&cod='.$valor["cod_secao"].'" target="_blank" title="Editar T&iacute;tulo" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=600,left=300,height=400,top=100\'); return false;"><img src="images/icone_edit.jpg" border="0"></a>
</span>

<span class="Excluir">
<a href="adm_secoes.php?lg='.$lg.'&opcao=excluir&cod='.$valor["cod_secao"].'" target="_blank" title="Excluir T&iacute;tulo" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=600,left=300,height=300,top=100\'); return false;">
<img src="images/icone_x.jpg" border="0">
</a>
</span>





<div id="listamaterias">';

     }

echo'
<a href="adm_materias.php?lg='.$lg.'&form=matsecao&sec='.$sec.'&opcao=inserir" 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;" class="link">
+ P&Aacute;GINA NESTE GRUPO
</a>

&nbsp;
|
&nbsp;

<a href="lista_materias.php?lg='.$lg.'&list=psecao&sec='.$sec.'" class="link">
ATUALIZAR
</a>

</div>';

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

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

echo'>



<h2 class="NomeMateria">
'.$valor["nome"].'
</h2>

C&Oacute;DIGO: <b>'.$valor["cod_materia"].'</b><br/>
SIMPLES: <b>'.$valor["secao"].'</b><br/>
LISTA: <b>'.$valor["pagina"].'</b><br/>
ORDEM: <b>'.$valor["id"].'</b>

<br /><br />

<a href="adm_materias.php?lg='.$lg.'&sec='.$sec.'&form=editor&opcao=altera&cod='.$valor["cod_materia"].'" 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;">
<img src="images/icone_edit.jpg" border="0">
</a>



<a href="adm_materias.php?lg='.$lg.'&sec='.$valor["secao"].'&opcao=altera&form=basico&cod='.$valor["cod_materia"].'" 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;">
<img src="images/icone_i.jpg" border="0">
</a>



<a href="adm_materias.php?lg='.$lg.'&opcao=excluir&cod='.$valor["cod_materia"].'&sec='.$sec.'" 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">
<img src="images/icone_x.jpg" border="0">
</font>
</a>



</div>';
       }

}









if ($list=='plista')
{


$sql = "select * from listas where cod_lista = '$lista'";
$result = mysql_query ($sql);
while ( $valor = mysql_fetch_array($result) )
     {

echo'
<div id="bnlistas">
</div>


<span class="TituloPrincipal">
'.$valor["nome_lista"].'
</span>

<span class="Editar">
<a href="adm_listas.php?lg='.$lg.'&opcao=altera&cod='.$valor["cod_lista"].'" target="_blank" title="Editar Nome da Lista" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=600,left=300,height=300,top=100\'); return false;"><img src="images/icone_edit.jpg" border="0"></a>
</span>

<span class="Excluir">
<a href="adm_listas.php?lg='.$lg.'&opcao=excluir&cod='.$valor["cod_lista"].'" target="_blank" title="Excluir Lista" onclick="window.open(this.href, \'Editor\', \'resizable=yes,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=600,left=300,height=300,top=100\'); return false;">
<img src="images/icone_x.jpg" border="0">
</a>
</span>



<div id="listamaterias">';

     }

echo'
<a href="adm_materias.php?lg='.$lg.'&form=matlista&lista='.$lista.'&opcao=inserir" 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;" class="link">
+ &Iacute;TEM NESTA LISTA
</a>

&nbsp;
|
&nbsp;

<a href="lista_materias.php?lg='.$lg.'&list=plista&lista='.$lista.'" class="link">
ATUALIZAR
</a>

</div>';

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

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

echo'>



<h2 class="NomeMateria">
'.$valor["nome"].'
</h2>

C&Oacute;DIGO: <b>'.$valor["cod_materia"].'</b><br/>
SE&Ccedil;&Atilde;O: <b>'.$valor["secao"].'</b><br/>
LISTA: <b>'.$valor["pagina"].'</b><br/>
ORDEM: <b>'.$valor["id"].'</b>

<br /><br />

<a href="adm_materias.php?lg='.$lg.'&sec='.$sec.'&form=editor&opcao=altera&cod='.$valor["cod_materia"].'" 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;"><img src="images/icone_edit.jpg" border="0"></a>



<a href="adm_materias.php?lg='.$lg.'&list='.$valor["pagina"].'&opcao=altera&form=basico&cod='.$valor["cod_materia"].'" 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;"><img src="images/icone_i.jpg" border="0"></a>



<a href="adm_materias.php?lg='.$lg.'&opcao=excluir&cod='.$valor["cod_materia"].'&list='.$list.'" 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;"><img src="images/icone_x.jpg" border="0"></a>



</div>';
       }

}











?>



</body>
</html>