<!--
########################################################################################
# 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;
}
>
</style>
<?php
include "config.php";
include "funcoes.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">Cria Novo Jogo Na Linha do Texto</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></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="9" id="dateformat" height="20">
<script language="JavaScript" type="text/javascript">
document.write(TODAY); </script></td>
<td colspan="1" id="voltar" height="20"><span class="subHeader"><a href="index.php" title="Voltar"> Volta para a Linha do Texto </span></a> </td></tr>
</table>
<h1>Preencha o formulário para criar um novo jogo</h1>
<?
formulario();
?>
<h3>Para editar o jogo já existente, <a href="editalinhadotexto.php">clique aqui!</a>"</h3>
<?php
$apertou = $_POST["apertou"];
if ((!empty($apertou)) and ($apertou!="")){
include "config.php";
$senhanovatabela = $_POST["senhanovatabela"];
$jogo = $_POST["jogo"];
$email = $_POST["email"];
if (($senhanovatabela==$senhacriatabela) and (!empty($senhanovatabela)) and ($senhanovatabela!="")){
if (((!empty($email)) and ($email!="")) and ((!empty($jogo)) and ($jogo!=""))){
mysql_abrir_sessao();
$sql = mysql_query("INSERT INTO `jogo` (`jogo`, `email`) VALUES ('$jogo', '$email');");
$id_jogo = mysql_insert_id();
$a = (($id_jogo*9)-1);
if (!empty($sql) and ($sql != "")){
for (($i=1);($i<10);($i++))
{
$tabelaTexto = mysql_query("INSERT INTO `texto` (`id_jogo`, `titulo`, `texto`) VALUES ('$id_jogo', '', '');");
$tabelavoto = mysql_query("INSERT INTO `voto` (`id_jogo`, `id_texto`, `voto`) VALUES ('$id_jogo', '$a', '5');");
$a++;
}
for (($i=1);($i<5);($i++))
{
$tabelaParametro = mysql_query("INSERT INTO `parametro` (`id_jogo`, `parametroa`, `parametrob`) VALUES ('$id_jogo', '', '');");
}
echo "<h2>Cadastro bem sucedido!</h2>Para inserir textos no novo jogo, <b><a href=\"editalinhadotexto.php\">clique aqui!</b></a>";
}
else{ $erro = mysql_error();
echo "Estamos com problemas técnicos! Por favor, tente mais tarde!";
mail("a9fm@yahoo.com","Problemas Cadastro Experimento","Problemas com o usuario: $email. dados:email=$email jogo=$jogo senhanovatabela=$senhanovatabela erro = $erro");
}
}
}else{echo "A senha está incorreta.";}
}
?>
</body>
</html>