Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: text/html; charset=utf-8');
- require_once "config.php"; // inclui a conexão a database
- $produtos = 0;
- $produtos_subcategoria = 0;
- echo "
- <html>
- <head>
- <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"favicon.ico\" />
- ";
- $sql = mysql_query("SELECT nome_imagem FROM imagem_background");
- $result = mysql_fetch_row($sql);
- echo"
- <style type=\"text/css\">
- body {
- background-image:url('./background/$result[0]');
- background-size:100% 100%;
- background-position: 50% 50%;
- background-repeat: no-repeat;
- margin-top: 0px;
- margin-right: 0;
- margin-left: 0;
- margin-bottom: 0;
- }
- .text {
- font-family: Georgia, serif
- font-size: 10px;
- color: #33CC33;
- opacity:1;
- filter:alpha(opacity=100);
- -moz-opacity:1;
- -khtml-opacity:1;
- }
- p {
- font-family: Georgia, serif
- }
- .transparent {
- /* Fallback for web browsers that doesn't support RGBa */
- background: rgb(246, 246, 246);
- /* RGBa with 0.6 opacity */
- background: rgba(246, 246, 246, 0.8);
- /* For IE 5.5 - 7*/
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#70000000, endColorstr=#99000000);
- /* For IE 8*/
- -ms-filter: \"progid:DXImageTransform.Microsoft.gradient(startColorstr=#70000000, endColorstr=#99000000)\";
- }
- ";
- // Barra de scroll
- echo"
- .divId {
- width: 280px;
- height: 175px;
- overflow: auto
- }
- a:link {
- color:#FFFFFF; /* unvisited link */
- text-decoration:none;
- }
- a:visited {
- color:#FFFFFF; /* visited link */
- text-decoration:none;
- }
- a:hover /* mouse over link */
- {
- color:#FFFFFF;
- text-decoration:none;
- }
- a:active {
- color:#FFFFFF; /* selected link */
- text-decoration:none;
- }
- a.menu:link {
- color:#8B0000; /* unvisited link */
- text-decoration:none;
- }
- a.menu:visited {
- color:#8B0000; /* visited link */
- text-decoration:none;
- }
- a.menu:hover /* mouse over link */
- {
- color:#8B0000;
- text-decoration:none;
- }
- a.menu:active {
- color:#8B0000; /* selected link */
- text-decoration:none;
- }
- a.tooltip2:link {
- color:#000000; /* unvisited link */
- text-decoration:none;
- }
- a.tooltip2:visited {
- color:#000000; /* visited link */
- text-decoration:none;
- }
- a.tooltip2:hover /* mouse over link */
- {
- color:#000000;
- text-decoration:none;
- }
- a.tooltip2:active {
- color:#000000; /* selected link */
- text-decoration:none;
- }
- div.footer {
- bottom:0;
- width:100%;
- }
- #NT_copy {
- background-color: #333333;
- color: #FFFFFF;
- font-weight: bold;
- font-size: 13px;
- font-family: \"Trebuchet MS\";
- width: 900px;
- left: 0;
- top: 0;
- padding: 4px;
- position: fixed;
- top: 20%;
- left: 50%;
- margin-left: -450px;
- text-align: left;
- z-index: 20;
- -moz-border-radius: 0 10px 10px 10px;
- filter: progid: DXImageTransform.Microsoft.Alpha(opacity=87);
- -moz-opacity: .87;
- -khtml-opacity:.87;
- opacity:.87;
- }
- </style>
- <script src=\"js/jquery-1.3.2.min.js\" type=\"text/javascript\"></script>
- <script src=\"js/ntip.js\" type=\"text/javascript\"></script>
- <title>Produtos</title>
- </head>
- <body>
- <table width=\"100%\" bgcolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td align=\"center\" height=\"40\">
- <table width=\"1000\" align=\"center\" bgcolor=\"#000000\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td width=\"188\">
- <img src=\"./uploads/partial_logo1.jpg\" height=\"80\" width=\"188\">
- </td>
- <td width=\"812\" align=\"center\">
- <font color=\"#FFFFFF\" size=\"+1\"><p><a href=\"empresa_portugues.php\"> Empresa</a> | <a href=\"produtos_portugues.php\" class=\"menu\"> Produtos</a> | <a href=\"processo_produtivo_portugues.php\">Processo Produtivo</a> | <a href=\"qualidade_portugues.php\">Qualidade</a> | <a href=\"parceria_portugues.php\">Parceria</a> | <a href=\"contactos_portugues.php\">Contatos</a></p></font>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width=\"1000\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td>
- <table cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td width=\"188\">
- <img src=\"./uploads/partial_logo2.jpg\" height=\"29\" width=\"188\">
- </td>
- <td width=\"812\"></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width=\"1000\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"transparent\">
- <tr>
- <td width=\"188\">
- <img src=\"./uploads/partial_logo3.png\" height=\"94\" width=\"188\">
- </td>
- <td width=\"812\"></td>
- </tr>
- </table>
- <table width=\"1000\" align=\"center\" bgcolor=\"#f6f6f6\" class=\"transparent\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td width=\"200\"></td>
- <td width=\"800\">
- <font size=\"+3\"><b><p>Produtos</p></b></font>
- </td>
- </tr>
- </table>
- <table width=\"1000\" align=\"center\" bgcolor=\"#f6f6f6\" class=\"transparent\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td height=\"30\">
- </td>
- </tr>
- </table>
- ";
- // $sql = mysql_query("SELECT nome_imagem FROM imagem_background");
- // $result = mysql_fetch_row($sql);
- $sql2 = mysql_query("SELECT nome_categoria FROM categoria_portugues_prod");
- echo"
- <table width=\"1000\" align=\"center\" bgcolor=\"#f6f6f6\" class=\"transparent\" cellpadding=\"10\" cellspacing=\"0\">
- ";
- // De 3 em 3 Produtos criar uma nova linha <tr>
- // se $produtos = 0 cria <tr>
- if($produtos == 0)
- {
- echo"
- <tr>
- ";
- }
- while (($result2 = mysql_fetch_array($sql2)) != null) // nome_categoria
- {
- $produtos = $produtos + 1;
- echo "<td width=\"33%\" valign=\"top\">";
- echo "<div align=\"center\"><font size=\"+1\"><p><b>$result2[0]</b></p></font></div></br>"; // nome_categoria
- $sql3 = mysql_query("SELECT id FROM categoria_portugues_prod WHERE nome_categoria='$result2[0]'");
- $result3 = mysql_fetch_row($sql3); // id_categoria
- $sql4 = mysql_query("SELECT nome_imagem FROM subcategoria_portugues_prod WHERE id_categoria='$result3[0]'");
- $result4 = mysql_fetch_row($sql4); // nome_imagem
- $sql5 = mysql_query("SELECT descricao FROM categoria_portugues_prod WHERE id='$result3[0]'");
- $result5 = mysql_fetch_row($sql5); // descricao
- echo"
- <div align=\"center\">
- <span class=\"formInfo\">
- <img src=\"./produtos/subcategoria_portugues/$result4[0]\" width=\"100\" height=\"180\">"; // imagem
- // tabela subcategorias deve ter só um <td> como a tabela de categorias
- echo"
- <span style=\"display: none;\" class=\"mycontent\">
- ";
- // Tabela Subcategorias
- $sql6 = mysql_query("SELECT nome_subcategoria FROM subcategoria_portugues_prod WHERE id_categoria='$result3[0]'");
- echo "
- <table width=\"900\" align=\"center\" bgcolor=\"#f6f6f6\" class=\"transparent\" cellpadding=\"10\" cellspacing=\"10\">
- ";
- if($produtos_subcategoria == 0)
- {
- echo"
- <tr>
- ";
- }
- while (($result6 = mysql_fetch_array($sql6)) != null) // nome_subcategoria
- {
- $produtos_subcategoria = $produtos_subcategoria + 1;
- echo "<td width=\"25%\" valign=\"top\">";
- echo "<div align=\"center\"><font size=\"+1\"><p><b>$result6[0]</b></p></font></div></br>"; // nome_subcategoria
- $sql7 = mysql_query("SELECT nome_imagem FROM subcategoria_portugues_prod WHERE id_categoria='$result3[0]'");
- $result7 = mysql_fetch_row($sql7); // nome_imagem
- echo"
- <div align=\"center\">
- <img src=\"./produtos/subcategoria_portugues/$result7[0]\" width=\"100\" height=\"180\">"; // imagem
- $sql8 = mysql_query("SELECT descricao FROM subcategoria_portugues_prod WHERE id_categoria='$result3[0]'");
- $result8 = mysql_fetch_row($sql8); // descricao (ficha tecnica)
- echo"
- <div align=\"center\">
- <a href=\"./produtos/subcategoria_portugues/$result8[0]\" class=\"tooltip2\">Ficha Técnica</a>"; // ficha tecnica
- echo "
- </div>
- ";
- /*
- // não deve criar quando $produtos_subcategoria = 2
- if($produtos_subcategoria < 2)
- {
- echo"
- <td align=\"center\">
- <img src=\"./uploads/separator.png\" width=\"10\" height=\"100%\">
- </td>
- ";
- }
- */
- // se $produtos_subcategoria == 2 faz reset
- if($produtos_subcategoria == 2)
- {
- $produtos_subcategoria = 0;
- }
- if($produtos_subcategoria == 0)
- {
- echo "
- </td>
- </tr>
- ";
- }
- }
- echo"
- </td>
- </tr>
- </table>
- </span>
- </span>
- </div>
- </br>
- <div class=\"divID\">
- $result5[0]"; // descricao
- echo "
- </div>
- ";
- echo"
- </br></br>
- ";
- // não deve criar quando $produtos = 3
- if($produtos < 3)
- {
- echo"
- <td align=\"center\">
- <img src=\"./uploads/separator.png\" width=\"10\" height=\"100%\">
- </td>
- ";
- }
- // se $produtos == 3 faz reset
- if($produtos == 3)
- {
- $produtos = 0;
- }
- if($produtos == 0)
- {
- echo "
- </td>
- </tr>
- ";
- }
- }
- echo"
- </td>
- </tr>
- </table>
- <table width=\"1000\" align=\"center\" bgcolor=\"#f6f6f6\" class=\"transparent\" cellpadding=\"0\" cellspacing=\"0\">
- <tr>
- <td height=\"30\">
- </td>
- </tr>
- </table>
- <div class=\"footer\">
- <table width=\"100%\" height=\"30\" cellpadding=\"10\">
- <tr>
- <td align=\"right\" valign=\"middle\">
- ";
- // <img src=\"./uploads/Powered by.png\" alt=\"logo\">
- echo"
- </td>
- </tr>
- </table>
- </div>
- <script type=\"text/javascript\">
- $(document).ready(function(){
- $(\".formInfo\").tooltip(
- {
- tooltipcontentclass:\"mycontent\"
- }
- )
- });;
- </script>
- <script type=\"text/javascript\">
- $(\".formInfo\").tooltip({
- events: {
- def: 'click, dblclick',
- }
- });
- </script>
- </body>
- </html>
- ";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement