<!--
########################################################################################
# Linha do Texto is a web application for exploring meaning inside textual categories. #
# Copyright (C) 2010 Ana Cristina Fricke Matte #
# #
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License #
# as published by the Free Software Foundation; either version 2 #
# of the License, or (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software #
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #
########################################################################################
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- <meta http-equiv="refresh" content="10;url="http://www.semiofon.org"> -->
<!-- DW6 -->
<head>
<title>Linha do Texto from Texto Livre.org</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="mm_health_nutr.css" type="text/css" />
<script language="JavaScript" src="data.js" type="text/javascript"></script>
<style type="text/css">
<!
.style3 {
color: #FFFFFF;
font-weight: bold;
}
.style4 {font-size: 12px}
.style5 {font-size: 11px}
.style6 {color: #5C743D}
.styleBorderRed {
border-width: medium;
border-style: solid;
border-color: #e70000;
}
.styleBorderBlue {
border-width: medium;
border-style: solid;
border-color: #006ce7;
}
.style10 {
color: #e70000;
font-weight: bold;
}
.style11 {
color: #e76502;
font-weight: bold;
}
.style12 {
color: #e5b402;
font-weight: bold;
}
.style13 {
color: #cce704;
font-weight: bold;
}
.style14 {
color: #88e702;
font-weight: bold;
}
.style15 {
color: #02e743;
font-weight: bold;
}
.style16 {
color: #00e7a2;
font-weight: bold;
}
.style17 {
color: #00d0e7;
font-weight: bold;
}
.style18 {
color: #006ce7;
font-weight: bold;
}
>
<?php
include "funcoes.php";
include "config.php";
include "value.php";
?>
</style>
</head>
<body bgcolor="#F4FFE4">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#D5EDB3">
<td colspan="4" rowspan="2" bgcolor="#BBDD99"><div align="center"><img src="textolivre.png" alt="Texto Livre.org" width="200" /></div></td>
<td colspan="5" height="50" align="center" valign="bottom" nowrap="nowrap" bgcolor="#E8F5D6" id="logo"><form method="post" action= "index.php">Id do jogo: <input type="text" name="id_jogo" size="10" value="2"><input type="submit" name="escolhe" value=" Escolhe "></form><br />
</td>
</tr>
<tr bgcolor="#D5EDB3">
<td colspan="5" height="26" align="center" valign="top" bgcolor="#D5EDB3" id="tagline"><a href=http://sourceforge.net/projects/linhadotexto>LINHA DO TEXTO</a> Atualize a página para ver o resultado do seu voto!</td>
</tr>
<tr>
<td colspan="9" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
<tr>
<td colspan="9" bgcolor="#99CC66" ><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr bgcolor="#99CC66">
<td colspan="4" id="dateformat" height="20">
<script language="JavaScript" type="text/javascript">
document.write(TODAY); </script></td>
<td colspan="1" id="orientacao" height="20"><span class="subHeader"><a href="orientacoes.php" title="Orientações"> Orientações </span></a> </td>
<td colspan="1" id="criar" height="20"><span class="subHeader"><a href="crialinhadotexto.php" title="Criar"> Criar </span></a> </td>
<td colspan="1" id="editar" height="20"><span class="subHeader"><a href="editalinhadotexto.php" title="Editar"> Editar </span></a> </td>
<td colspan="1" id="ListaJogos" height="20"><span class="subHeader"><a href="listajogos.php" title="ListaJogosIds"> Listar Jogos e IDs </span></a> </td>
</tr>
<tr>
<td colspan="9" bgcolor="#99CC66" ><img src="mm_dashed_line.gif" alt="line decor" width="4" height="3" border="0" /></td>
</tr>
<tr>
<td colspan="9" bgcolor="#5C743D"><img src="mm_spacer.gif" alt="" width="1" height="2" border="0" /></td>
</tr>
</table>
<table align="center" widht="100%" border="0" cellspacing="0" cellpadding="15" >
<tr bgcolor="#D5EDB3" >
<?
$escolhe = $_POST["escolhe"];
if ((!empty($escolhe))and($escolhe!=""))
{
$id_jogo = $_POST["id_jogo"];
mysql_abrir_sessao();
$sql = mysql_query("SELECT `jogo` FROM `jogo` WHERE `id_jogo` = '$id_jogo'");
$resultado = mysql_result($sql,0,0);
if ($resultado)
{
// $jogo = mysql_fetch_object ($sql);
// $jogar = "{$jogo->jogo}";
echo "<h2><center>Jogo: $resultado ($id_jogo)</center></h2>";
mysql_abrir_sessao();
$a = (($id_jogo-1) * 4) +1;
$b = $a + 4;
$i = 0;
echo "<td colspan=\"5\" class=\"styleBorderRed\">";
echo "Parâmetros A:";
for (($a=$a);($a<$b);($a++))
{
$sql = "SELECT `parametroa` FROM `parametro` WHERE `id_parametro` = '$a'";
$resultado = mysql_query($sql);
if ($resultado) {
$dado = mysql_fetch_object($resultado);
echo "{$dado->parametroa} <br />";
}
}
echo "</td>";
echo "<td colspan=\"1\" class=\"style10\"><center>WWWWW</center></td><td colspan=\"1\" class=\"style11\"><center>WWWW</center></td><td colspan=\"1\" class=\"style12\"><center>WWW</center></td> <td colspan=\"1\" class=\"style13\"><center>WW</center></td><td colspan=\"1\" class=\"style14\"><center>W</center></td> <td colspan=\"1\" class=\"style15\"><center>WW</center></td><td colspan=\"1\" class=\"style16\"><center>WWW</center></td><td colspan=\"1\" class=\"style17\"><center>WWWW</center></td><td colspan=\"1\" class=\"style18\"><center>WWWWW</center></td><td colspan=\"5\" class=\"styleBorderBlue\">Parâmetros B:<br />";
// mysql_abrir_sessao();
$a = (($id_jogo-1) * 4) +1;
$b = $a + 4;
$i = 0;
for (($a=$a);($a<$b);($a++))
{
$sql = "SELECT `parametrob` FROM `parametro` WHERE `id_parametro` = '$a'";
$resultado = mysql_query($sql);
if ($resultado) {
$dado = mysql_fetch_object($resultado);
echo "{$dado->parametrob} <br />";
} else {
echo "<p>Erro na SQL: {$sql}</p>";
}
}
echo "</td> </tr>";
$a = (($id_jogo-1) * 9) +1;
$b = $a + 9;
$i = 1;
for (($a=$a);($a<$b);($a++))
{
$sql = "SELECT `titulo` FROM `texto` WHERE `id_texto` = '$a'";
$resulta = mysql_query($sql);
$consulta = mysql_result($resulta,0,0);
if ($consulta){
$mediaVoto = "SELECT AVG (voto) FROM `voto` WHERE `id_texto` = $a";
$resultaVoto = mysql_query($mediaVoto);
$votos = mysql_result($resultaVoto,0,0);
$coeficiente = ($votos*550);
$posicao = ($coeficiente/9);
$posicao = $posicao."px";
echo "<tr><td colspan=\"19\" height=\"30\"><div id=\"$consulta\" style=\"position:relative;left:$posicao\">";
echo "<form title=\"Votar\" method=\"get\" action=\"voto.php\" target=\"_blank\"><input type=\"hidden\" name=\"idjogo\" value=\"$id_jogo\"><input type=\"hidden\" name=\"idtexto\" value=\"$a\"><input type=\"hidden\" name=\"nometexto\" value=\"$consulta\"></input><input type=\"submit\" name=\"submit\" value=\"$consulta\"></span></form>";
echo "</div></td></tr>";
}
}
echo "<tr bgcolor=\"#D5EDB3\"><td colspan=\"5\" class=\"styleBorderRed\"> Parâmetro A<br />";
// mysql_abrir_sessao();
$a = (($id_jogo-1) * 4) +1;
$b = $a + 4;
$i = 0;
for (($a=$a);($a<$b);($a++))
{
$sql = "SELECT `parametroa` FROM `parametro` WHERE `id_parametro` = '$a'";
$resultado = mysql_query($sql);
if ($resultado) {
$dado = mysql_fetch_object($resultado);
echo "{$dado->parametroa} <br />";
} else {
echo "<p>Erro na SQL: {$sql}</p>";
}
}
// mysql_close()
echo "</td><td colspan=\"1\" bgcolor=\"#e70000\"><center>WWWWW</center></td><td colspan=\"1\" bgcolor=\"#e76502\"><center>WWWW</center></td><td colspan=\"1\" bgcolor=\"#e5b402\"><center>WWW</center></td> <td colspan=\"1\" bgcolor=\"#cce704\"><center>WW</center></td><td colspan=\"1\" bgcolor=\"#88e702\"><center>W</center></td><td colspan=\"1\" bgcolor=\"#02e743\"><center>WW</center></td> <td colspan=\"1\" bgcolor=\"#00e7a2\"><center>WWW</center></td><td colspan=\"1\" bgcolor=\"#00d0e7\"><center>WWWW</center></td><td colspan=\"1\" bgcolor=\"#006ce7\"><center>WWWWW</center></td> <td colspan=\"5\" class=\"styleBorderBlue\"> Parâmetros B <br />";
//mysql_abrir_sessao();
$a = (($id_jogo-1) * 4) +1;
$b = $a + 4;
$i = 0;
for (($a=$a);($a<$b);($a++))
{
$sql = "SELECT `parametrob` FROM `parametro` WHERE `id_parametro` = '$a'";
$resultado = mysql_query($sql);
if ($resultado) {
$dado = mysql_fetch_object($resultado);
echo "{$dado->parametrob} <br />";
} else {
echo "<p>Erro na SQL: {$sql}</p>";
}
}
echo "</td> </tr>";
}
}
else{
listajogos();
}
?>
<tr bgcolor="#D5EDB3">
<td bgcolor="#D5EDB3" colspan="19"><span class="style5"><div align="center">|| Texto Livre .org || GNU 2007 ||</div><div align="right"><a href="creditos.html" title="Créditos" target="_blank">Créditos</a></div></span></td>
</tr>
</table>
Linha do Texto v1, Copyright (C) 2010 Ana Cristina Fricke Matte
Linha do Texto comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions; see GNUv.2 license for details (LICENSE.TXT or LICENCE_PT_BR.TXT).
</body>
</html>