<!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?usr='.$usr.''; ?>','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?usr='.$usr.''; ?>','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?usr='.$usr.''; ?>','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?usr='.$usr.''; ?>','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">
Mat&eacute;rias
<div id="listaeditar">
Excluir
</div>
<div id="listaeditar">
URL
</div>
<div id="listaeditar">
C&oacute;digo
</div>
<div id="listaeditar">
URL
</div>
<div id="listaeditar">
Se&ccedil;&atilde;o
</div>
<div id="listaeditar">
Layout
</div>
<div id="listaeditar">
Ordem
</div>
</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'>

<a href="index.php?usr='.$usr.'&sec='.$valor["secao"].'&adm=materias&opcao=altera&form=basico&cod='.$valor["cod_materia"].'" target="_top">
'.$valor["nome"].'
</a>

<div id="listaeditar">
<a href="adm_materias.php?usr='.$usr.'&opcao=excluir&cod='.$valor["cod_materia"].'" target="conteudo">
<font color="red">X</font></a>
</div>

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

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

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

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

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

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

</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">
<span style="margin-left: 3px; float: left; margin-top: 3px; margin-bottom: 3px; font-size: 11px; text-decoration: none;">
<a href="lista_secoes.php?usr='.$usr.'&list=secoes" target="listas">
<< Voltar para Se&ccedil;&otilde;es
</a>
&nbsp;
|
&nbsp;
<a href="index.php?usr='.$usr.'&form=matsecao&sec='.$sec.'&adm=materias&opcao=inserir" target="_top">
+ Criar Nova Mat&eacute;ria nesta Se&ccedil;&atilde;o
</a>
</span>
</div>


<div id="listamaterias">
<span style="float: left; margin-top: 3px; margin-bottom: 3px;">
Se&ccedil;&atilde;o:
</span> 
<span style="margin-left: 3px; float: left; margin-top: 3px; margin-bottom: 3px;">
<strong>
'.$valor["nome_secao"].'
</strong>
</span>';

     }

echo'
<div id="listaeditar">
Excluir
</div>
<div id="listaeditar">
URL (mat&eacute;ria)
</div>
<div id="listaeditar">
C&oacute;digo
</div>
<div id="listaeditar">
URL (se&ccedil;&atilde;o)
</div>
<div id="listaeditar">
Se&ccedil;&atilde;o
</div>
<div id="listaeditar">
Ordem
</div>

</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'>


<a href="index.php?usr='.$usr.'&sec='.$sec.'&form=basico&adm=materias&opcao=altera&cod='.$valor["cod_materia"].'" target="_top">

'.$valor["nome"].'

</a>


<div id="listaeditar">
<a href="index.php?usr='.$usr.'&adm=materias&opcao=excluir&cod='.$valor["cod_materia"].'" target="_top">
<font color="red">X</font></a>
</div>

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

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

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

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

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

<div id="listaeditar">
<a href="index.php?usr='.$usr.'&sec='.$sec.'&form=editor&adm=materias&opcao=altera&cod='.$valor["cod_materia"].'" target="_top">
EDITOR
</a>
</div>

</div>';
       }

}





?>



</body>
</html>