} else { $idade = (int) calc_idade($postData); if ($idade < 21) { $mensagemDados = '<p class="text-danger lead"><span style="font-weight: bold;">Sua idade não correspondem aos nosso requisitos mínimos.</span></p>'; } else { $ano_nasc = date('Y-m-d', strtotime(str_replace('/', '-', $postData))); $create_login = mysql_query("INSERT INTO login VALUES (NULL, '" . $usuario . "', '" . $senha . "', '" . $privilegio . "')"); $fetch_row = mysql_fetch_row(mysql_query("SELECT id FROM login WHERE username = '******'")); $nome_imagem = '' . date("YmdHms") . '_id' . $fetch_row[0] . '.jpg'; $create_usuario = mysql_query("INSERT INTO usuarios(id, id_login, id_bairro, nome, sobrenome, sexo, dt_nasc, email, telefone, celular, img, sobre) VALUES (NULL, " . $fetch_row[0] . ", 1, '" . $nome . "', '" . $sobrenome . "', '" . $sexo . "', '" . $ano_nasc . "', NULL, NULL, NULL, '" . $nome_imagem . "', NULL)") or die(mysql_error()); if (copy('../../imagens/perfil/perfil.jpg', '../../imagens/perfil/' . $nome_imagem)) { echo "<meta http-equiv='refresh' content='0; url=../logout.php'>"; echo alertax('Aviso!', 'Usuário criado com sucesso!'); } else { echo "<meta http-equiv='refresh' content='5; url=../logout.php'>"; echo alertax('Aviso!', 'Usuário criado com sucesso! Falha no envio de imagem!'); } } } } } } else { $mensagemLogin = '******'; } } ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php include '../../mysql/conn.php'; include '/../../mysql/bootalert.php'; if (isset($_POST['botao'])) { $topico = $_POST['id_topico']; $resposta = $_POST['mytextarea']; $autor = $_POST['autor']; $pdata = date("Y-m-d H:i:s"); $txt = '<!DOCTYPE html> <html> <head> </head> <body> <p><span style="font-size: 14pt; color: #333333;">Para melhor visualizaçãoo de imagens nos fóruns <span style="text-decoration: underline;">é recomendado resolução ajustada máxima</span> de <span style="color: #008000;"><strong>840px</strong></span> na <span style="text-decoration: underline;">largura da imagem</span>.</span></p> </body> </html>'; if ($resposta == $txt) { echo "<meta http-equiv='refresh' content='0; url=forum.php'>"; echo alertax('Aviso!', 'Existem campos em branco!'); } else { $sql = mysql_query("INSERT INTO respostas_forum (idresposta, id_topico, data, autor, resposta) VALUES (NULL, " . $topico . ", '" . $pdata . "', " . $autor . ", '{$resposta}')") or die("<meta http-equiv='refresh' content='0; url=index.php'><script>alert('" . mysql_error() . "');</script>"); if ($sql != mysql_error()) { echo "<meta http-equiv='refresh' content='0; url=index.php'>"; echo alertax('Aviso!', 'Publicação adicionada com sucesso!'); } else { echo alertax('Aviso de Erro!', 'Houve um erro durante o envio da publicação!'); } } }
include '../../mysql/conn.php'; include '../session.php'; include '../../mysql/bootalert.php'; if (isset($_POST['cancelar'])) { Header("Location: index.php"); } if (isset($_POST['criar'])) { $topico = $_POST['topico']; $xautor = $_POST['id_session']; $xdata = date("Y-m-d H:i:s"); $create_topico = mysql_query("INSERT INTO topicos_forum VALUES (NULL, '" . $topico . "', '" . $xdata . "' , '" . $xautor . "')"); if ($create_topico != mysql_error()) { echo "<meta http-equiv='refresh' content='0; url=index.php'>"; echo alertax('Tópico criado com sucesso!', 'Seu tópico de fórum foi feito com sucesso!'); } else { echo alertax('Erro durante criar!', 'Houve um erro durante a criação do tópico! <br />Verifique as informações fornecidades durante a criação'); } } ?> <!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"> <head> <title>FÓRUM - ASSOCIAÇÃO HABITACIONAL NOVA TERRA</title> <link rel="shortcut icon" href="http://<?php echo $_SERVER['HTTP_HOST']; ?> /imagens/corpo/icon.png"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="author" content="Gabriel Fiipe de Souza Prado" />
<?php include '../mysql/conn.php'; include '../mysql/bootalert.php'; $id_delete = (int) $_GET['id_drop']; $tabela = $_GET['tablitsa']; $coluna = $_GET['coluna']; if (mysql_query("DELETE FROM " . $tabela . " WHERE " . $coluna . " = " . $id_delete)) { echo "<meta http-equiv='refresh' content='0; url=painel.php'>"; echo alertax('Aviso!', 'Excluido com sucesso!'); exit; } else { echo mysql_error(); }
$senha = $_POST['senha']; $dbPass = mysql_fetch_row(mysql_query("SELECT password FROM login WHERE id = " . $id_session)); if ($passatual == $dbPass[0]) { if ($password != $senha) { echo alertax('Erro de senha', 'Senha inválida! <br />Sua nova senha é diferente da confirmação da senha.'); } else { $alteração = mysql_query("UPDATE login SET password = '******' WHERE id = " . $id_session) or die(alertax('Erro UPDATE na tabela `login`!', '' . mysql_error())); if (mysql_error()) { echo alertax('Erro UPDATE na tabela `login`!', '' . mysql_error()); } else { echo "<meta http-equiv='refresh' content='0; url=perfil.php'>"; echo alertax('Aviso!', 'Senha alterada com sucesso!'); } } } else { echo alertax('Erro de senha', 'Senha inválida! <br />Por favor tente novamente.'); } } ?> <!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="author" content="Gabriel Fiipe de Souza Prado"> <meta name="keywords" content="área, administrativa, editar, perfil, ahnt, gv, governador valadares, associação, habitacional, nova, terra"> <meta name="description" content="Perfil - Associação Habitacional Nova Terra"> <link rel="shortcut icon" href="http://<?php echo $_SERVER['HTTP_HOST']; ?>
<?php if (isset($_POST['botao-resenha'])) { include 'bootalert.php'; $id = $_POST['id_nome']; $id_post = $_POST['id_post']; $resenha = $_POST['resenha']; $data_res = date("Y-m-d H:i:s"); $reg_coment = mysql_query("INSERT INTO resenhas (id, id_post, data, nome, comentario) VALUES (NULL, {$id_post}, '{$data_res}', {$id}, '{$resenha}')") or die(alertax('Erro - MySQL INSERT na tabela `resenhas`!', mysql_error())); echo "<meta http-equiv='refresh' content='0; url=painel.php#tab=actio-2'>"; echo alertax('Mensagem enviada com sucesso!', 'Seu comentário foi feito com sucesso!'); unset($_POST['botao-resenha']); } mysql_close();
} else { $query = mysql_query("UPDATE usuarios SET nome = '{$nome}', sobrenome = '{$sobrenome}', id_bairro = {$id_bairro}, sexo = '{$sexo}', dt_nasc = '{$date}', email = '{$email}', telefone = '{$telefone}', celular = '{$celular}', sobre = '{$sobre}' WHERE id_login = {$id}") or die(alertax('Erro UPDATE na tabela `usuarios`!', '' . mysql_error())); } } } if ($_GET['funcao'] == "gravar" && $enviar_arquivo == "nao") { echo "<meta http-equiv='refresh' content='0; url=perfiledit.php'>"; echo alertax('Aviso!', 'Dados alterados com sucesso!'); } else { if ($_GET['funcao'] == "gravar" && $enviar_arquivo == "sim" && is_file($_FILES['arquivo']['tmp_name'])) { $foto = $_POST['id']; $tipos = array("image/jpeg", "image/pjpeg", "image/jpeg", "image/pjpeg", "image/gif", "image/png", ""); $arqType = $_FILES['arquivo']['type']; if (array_search($arqType, $tipos) === false) { echo "<meta http-equiv='refresh' content='0; url=perfiledit.php'>"; echo alertax('Aviso - Erro durante o envio de imagem!', 'Formato de arquivo inválido!!'); } else { if (!move_uploaded_file($_FILES['arquivo']['tmp_name'], "../imagens/perfil/" . $foto)) { echo "<meta http-equiv='refresh' content='0; url=perfiledit.php'>"; echo alertax('Erro durante o envio da imagem!', 'Formato de arquivo inválido!!'); } else { echo "<meta http-equiv='refresh' content='0; url=perfiledit.php'>"; echo alertax('Aviso!', 'Imagem e dados alterados com sucesso! <br />Caso a imagem não venha a aparecer basta atualizar a página!'); } } } else { echo "<meta http-equiv='refresh' content='0; url=perfiledit.php'>"; echo alertax('Erro durante o envio da imagem!', 'Formato de arquivo inválido!!'); } } }
<?php include '../mysql/conn.php'; include '../mysql/bootalert.php'; if (isset($_POST['botao'])) { if ($_POST['titulo'] != '' && $_POST['autor'] != '' && $_POST['mytextarea'] != '') { $title = $_POST['titulo']; $lautor = $_POST['autor']; $texto = $_POST['mytextarea']; $pdata = date("Y-m-d H:i:s"); if ($_GET['action'] == 'insert') { $sql = mysql_query("INSERT INTO postagens (id, data, titulo, materia, autor) VALUES (NULL, '" . $pdata . "', '" . $title . "', '" . $texto . "', " . $lautor . ")") or die("<meta http-equiv='refresh' content='0; url=publicar.php'>" . alertax('Erro INSERT na tabela `postagens`!', mysql_error() . '')); } else { if ($_GET['action'] == 'update') { $sql = mysql_query("UPDATE postagens SET data = '" . $pdata . "', titulo = '" . $title . "', materia = '" . $texto . "' WHERE id = " . $_POST['id_post']) or die("<meta http-equiv='refresh' content='0; url=publicar.php'>" . alertax('Erro UPDATE na tabela `postagens`!', mysql_error() . '')); } } if ($sql != mysql_error()) { echo "<meta http-equiv='refresh' content='0; url=painel.php#tab=actio-2'>"; echo alertax('Aviso!', 'Publicação alterada com sucesso!'); } else { echo alertax('Aviso!', 'Houve um erro durante o envio da publicação!'); } } else { echo "<meta http-equiv='refresh' content='0; url=publicar.php'>"; echo alertax('Aviso!', 'Existem campos em branco!'); } }