#!/usr/bin/perl -U

use CGI::Carp qw(fatalsToBrowser);

print "Content-type: text/html; charset=utf-8\n\n";

use lib ".";

use Switch;
use Modulos::ConectaBd;
use Modulos::ExecutaBd;
use Modulos::Util;
use Modulos::Request;

$dbh = conectaBanco();

%FORM = processaRequisicao();

print <<END;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Franciscanas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--   A:link    {text-decoration: none; color: #460000;    }-->
<!--   A:visited {text-decoration: none; color: #460000;    }-->
<!--   A:hover   {text-decoration: none; color: #DF650B;    }-->
<br>
<!--body { 
       scrollbar-face-color: #FDF7BD;
	   scrollbar-shadow-color: #FFFFFF;
	   scrollbar-highlight-color: #FFFFFF;
	   scrollbar-3dlight-color: #F8D171;
	   scrollbar-darkshadow-color: ;
	   scrollbar-track-color: #FFECB3;
	   scrollbar-arrow-color: #EC961B;
	   ie-scrollbar-width:5px;
}-->
</style>
<link href="franciscanas.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="FFECB3" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<br>
<table width="759" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="FDF7BD" class="fonte">
  <tr> 
    <td width="801"><iframe bgcolor="#FFFFFF" name="frame" src="topo.html" width="759" height="221" frameborder="0"></iframe></td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="fonte">
        <tr> 
          <td width="2%" background="fundo.gif"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="fonte">
              <tr>
                <td>
<table width="100%" border="0" align="left" cellpadding="0" cellspacing="0" class="fonte">
                      <tr> 
                        <td width="25%" valign="top"><iframe bgcolor="#FFFFFF" name="frame" src="menu.html" width="187" height="289" frameborder="0"></iframe></td>
                        <td width="75%" valign="top"> 
			<table width="94%" height="19" border="0" align="center" cellpadding="0" cellspacing="0" class="fonte">
                        <tr> 
                        <td><strong>Ora&ccedil;&otilde;es e Reflex&otilde;es</strong><br> <br> </td>
                        </tr>
			<tr>
			<td>

END

$campos = "id_oracao|titulo";
$vars = "id|titulo";
$lista = "SELECT | FROM cad_oracoes ORDER BY titulo";
($dados, $fetch) = buscaDados($dbh, $lista, $campos, $vars) or die "$DBI::errstr\n";
while( $fetch->() ) {

	$id = $dados->{id};
	$titulo = $dados->{titulo};
	$comeco_link = "<a href=\"ver_oracoes_reflexoes.cgi?oracoesreflexoes=$id\" target=\"_parent\">";
	$fim_link = "</a>";

print <<END;

		      <table width="100%" border="0" cellpadding="0" cellspacing="4" class="caixarealce">
                          <tr> 
                            <td><strong>$comeco_link $titulo $fim_link</strong></td>
                          </tr>
                      </table>
                        <br>

END

}

print <<END;

		</td>
                      </tr>
                    </table>
                  </td>
              </tr>
	      <tr>
	     <td colspan="2" valign="top"><iframe name="rodape" src="rodape.html" width="759" height="95" frameborder="0"></iframe></td>
	  </tr>
            </table>  
          </td>
        </tr>
      </table>
         </td>
          </tr>
        </table>
      </td>
      </tr>
  </table>
<br>
</body>
</html>

END

desconectaBanco($dbh);
