[go: up one dir, main page]

Menu

[r3]: / voto.php  Maximize  Restore  History

Download this file

210 lines (203 with data), 8.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!--
########################################################################################
# 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;
}
</style>
<?php
include "funcoes.php";
include "config.php";
//include "value.php";
?>
</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"><?
$submit = $_GET['submit'];
if ($submit){
$nomeTexto = $_GET["nometexto"];
$id_jogo = $_GET["idjogo"];
$id_texto = $_GET["idtexto"];
echo "$nomeTexto (jogo $id_jogo texto $id_texto)";
}?></td>
</tr>
<tr bgcolor="#D5EDB3">
<td colspan="9" height="26" align="center" valign="top" bgcolor="#D5EDB3" id="tagline"><a href=http://sourceforge.net/projects/linhadotexto>LINHA DO TEXTO</a></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">&nbsp;&nbsp;
<script language="JavaScript" type="text/javascript">
document.write(TODAY); </script></td>
<td colspan="1" id="orientacao" height="20"><span class="subHeader"><a href="orientacoes.html" title="Orientações"> Orientações &nbsp;&nbsp;</span></a> </td>
<td colspan="1" id="voltar" height="20"><span class="subHeader"><a href="index.php" title="Voltar">Voltar para a Linha do Texto </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>
</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="19" 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="0" >
<tr bgcolor="#E8F5D6">
<?
mysql_abrir_sessao();
$c = (($id_jogo-1) * 4) + 1;
$d = $c + 4;
$sql = "SELECT `titulo`, `texto` FROM `texto` WHERE `id_texto` = $id_texto";
$resultado = mysql_query($sql);
$sql2 = "SELECT `parametroa` FROM `parametro` WHERE `id_parametro` = $c";
$parametrosa = mysql_query($sql2);
$sql3 = "SELECT `parametrob` FROM `parametro` WHERE `id_parametro` = $c";
$parametrosb = mysql_query($sql3);
if ($resultado) {
$dados = mysql_fetch_object($resultado);
echo "<p>\n";
echo "<td colspan='7'>{$dados->titulo} -> {$dados->texto} <br />";
echo "</p>\n</td>";
if ($parametrosa){
$i = 1;
for (($c=$c);($c<$d);($c++)){
$sql2 = "SELECT `parametroa` FROM `parametro` WHERE `id_parametro` = $c";
$parametrosa = mysql_query($sql2);
$sql3 = "SELECT `parametrob` FROM `parametro` WHERE `id_parametro` = $c";
$parametrosb = mysql_query($sql3);
$pa = mysql_result($parametrosa,0);
$pb = mysql_result($parametrosb,0);
if ((!empty($pa))and($pa!="")){
echo "<td colspan='3'><form method=\"post\" action \"voto.php\"> $pa <br />";
echo "<select name=\"voto$i\" size=\"9\">";
echo "<option value=\"1\" class=\"style10\">WWWWW";
echo "<option value=\"2\" class=\"style11\"><b>WWWW";
echo "<option value=\"3\" class=\"style12\"><b>WWW";
echo "<option value=\"4\" class=\"style13\"><b>WW";
echo "<option value=\"5\" class=\"style14\"><b>W";
echo "<option value=\"6\" class=\"style15\"><b>WW";
echo "<option value=\"7\" class=\"style16\"><b>WWW";
echo "<option value=\"8\" class=\"style17\"><b>WWWW";
echo "<option value=\"9\" class=\"style18\"><b>WWWWW";
echo "</select><br />$pb &nbsp;&nbsp;</td>";
$i++;
}
}
echo "<td colspan='3'>&nbsp;&nbsp;<input type=\"submit\" name=\"votou\" value=\"Votar!\"></input></form>";
echo "</td>";
echo "</tr> <tr>";
echo "<td colspan='19' bgcolor='#5C743D' height='2'>";
$votou = $_POST['votou'];
if ((!empty($votou))and($votou!="")){
echo "<td colspan='3'>";
mysql_abrir_sessao();
$insertvoto1 = $_POST["voto1"];
$insertvoto2 = $_POST["voto2"];
$insertvoto3 = $_POST["voto3"];
$insertvoto4 = $_POST["voto4"];
$sql = mysql_query("INSERT INTO `voto` (`id_voto`, `id_jogo`, `id_texto`, `voto`) VALUES (NULL, $id_jogo, $id_texto, $insertvoto1);");
$sql2 = mysql_query("INSERT INTO `voto` (`id_voto`, `id_jogo`, `id_texto`, `voto`) VALUES (NULL, $id_jogo, $id_texto, $insertvoto2);");
$sql3 = mysql_query("INSERT INTO `voto` (`id_voto`, `id_jogo`, `id_texto`, `voto`) VALUES (NULL, $id_jogo, $id_texto, $insertvoto3);");
$sql4 = mysql_query("INSERT INTO `voto` (`id_voto`, `id_jogo`, `id_texto`, `voto`) VALUES (NULL, $id_jogo, $id_texto, $insertvoto4);");
if ($sql){
echo "<form method=\"post\" action=\"index.php\"><input type=\"hidden\" name=\"id_jogo\" value=\"$id_jogo\"><input type=\"hidden\" name=\"escolhe\" value=\"escolhe\"><input type=\"submit\" >\"window.close()\" value=\"Agora que já votou, clique aqui para validar seu voto e voltar ao jogo!\"></form></td>";
}
}
echo "</td>";
echo "</tr>";
}
}
?>
</tr>
<tr bgcolor="#D5EDB3">
<td bgcolor="#D5EDB3" colspan="19" height="2"><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>
</body>
</html>