Jump to content
Fórum Script Brasil
  • 0

Ajuda Com Alterar.php


Guest --Lord --

Question

Guest --Lord --

Olá pessoal

Estou fazendo um sistema para editar arquivos do gerador.

http://lord.forum-brazukas.com/gerador/fil...editar.php?id=6

O problema é que mesmo eu editando o arquivo ele não altera nada.

Aqui os códigos

up_editar.php



<!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=iso-8859-1" />
<title>Visualizando Uploads</title>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
}
.style2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
.style3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #666666;
}
a:active {
text-decoration: none;
color: #000000;
}
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: bold; }
.style7 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bold;
}
-->
</style>
</head>

<body>
<div align="center" class="style1">Uploads Cadastrados no Portal </div>
<p align="center"><span class="style7"><a href="../meio/admin/cad.php">Cadastrar Novo Upload</a></span></p>
<p align="center">
<?php
$servidor= "localhost";
$usuario = "brazukas_ih";
$senha = "123456";
$nomebase = "brazukas_ih";
$conexao = mysql_connect($servidor, $usuario, $senha) or die ("Imposs&iacute;vel Conectar Servidor Mysql");
mysql_select_db($nomebase, $conexao) or die ("Imposs&iacute;vel abrir banco Mysql");

$comando = mysql_query("SELECT * FROM filmes order by id DESC", $conexao);
while ($row = mysql_fetch_row($comando))
{
$id = $row["0"];
$titulo = $row["1"];
$titulo_ori = $row["2"];
$genero = $row["3"];
$dura = $row["4"];
$ano = $row["5"];
$qualidade = $row["6"];
$tipo = $row["7"];
$tamanho = $row["8"];
$sinopse = $row["9"];
$elenco = $row["10"];
$trailer = $row["11"];
$uploader = $row["12"];
$uteis = $row["13"];
$download = $row["14"];
$capa = $row["45"];
$screen1 = $row["46"];
$screen2 = $row["47"];
$screen3 = $row["48"];
$screen4 = $row["49"];
$screen5 = $row["50"];


?>
</p>
<table width="630" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="54%"><span class="style3"><?=$titulo?></span></td>
<td width="15%"><div align="center"><span class="style5"><?=$uploader?></span></div></td>
<td width="14%"><div align="center"><span class="style2"><a href="editar.php?id=<?=$id?>">Editar Upload </a></span> </div></td>
<td width="17%"><div align="center"><span class="style3"><a href="../meio/admin/del.php?id=<?=$id?>">Excluir Upload </a></span> </div></td>
<? } ?>
</tr>
</table>
</body>
</html>
[/codebox]

editar.php

[codebox]
<?php
$servidor= "localhost";
$usuario = "brazukas_ih";
$senha = "123456";
$nomebase = "brazukas_ih";
$conexao = mysql_connect($servidor, $usuario, $senha) or die ("Impossível Conectar Servidor Mysql");
mysql_select_db($nomebase, $conexao) or die ("Impossível abrir banco Mysql");

$id = $_GET['id'];

$sqlbusca = mysql_query("SELECT * FROM filmes where id = $id
",$conexao);

while ($row = mysql_fetch_row($sqlbusca))
{
$id = $row["0"];
$titulo = $row["1"];
$titulo_ori = $row["2"];
$genero = $row["3"];
$dura = $row["4"];
$ano = $row["5"];
$qualidade = $row["6"];
$tipo = $row["7"];
$tamanho = $row["8"];
$sinopse = $row["9"];
$elenco = $row["10"];
$trailer = $row["11"];
$uploader = $row["12"];
$uteis = $row["13"];
$download = $row["14"];
$capa = $row["45"];
$screen1 = $row["46"];
$screen2 = $row["47"];
$screen3 = $row["48"];
$screen4 = $row["49"];
$screen5 = $row["50"];
}

?>

<style type="text/css">

<!--

.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #E3BD16;
font-weight: bold;
font-size: 12px;
}

.style8 {color: #E3BD16; font-family: Tahoma; font-weight: bold; font-size: 9px; }
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
a:link {
color: #000000;
}
a:visited {
color: #000000;
}
a:hover {
color: #999999;
}
a:active {
color: #000000;
}
.style10 {color: #000000}

-->

</style>

<form action="edit_not.php" method="post" enctype="multipart/form-data" class="form" id="form">
<input type="hidden" name="id" method="post" value="<? echo $id; ?>">
<table width="53%" border="0" align="center" cellpadding="0" cellspacing="1" id="table1">

<tr>

<td colspan="2">
<font class="style1">Editando Upload: <?=$titulo?></font></p></td>
</tr>

<tr>

<td colspan="2">&nbsp;</td>
</tr>
<tr>

<td width="17%"><div align="right"><span class="style8">Titulo:&nbsp;</span></div></td>

<td width="83%" align="left">

<div align="left">
<input name="titulo" class="combo" id="log" style="border:1px solid; width: 350; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #FFFFFF; float:left; height:17" tabindex="1" value="<?=$titulo?>" />
</div></td>
</tr>

<tr>

<td width="17%" height="19"><div align="right"><span class="style8">Capa:&nbsp;</span></div></td>

<td width="83%" align="left"><div align="left">
<input name="capa" type="text" class="combo" id="fonte" style="border:1px solid; width: 350; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #FFFFFF;" tabindex="3" value="<?=$capa?>" />
</div></td>
</tr>

<tr>

<td width="17%"><div align="right"><span class="style8">Uploader:&nbsp;</span></div></td>

<td width="83%" align="left">

<div align="left">
<input name="uploader" class="combo" id="log" style="border:1px solid; width: 350; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #FFFFFF; float:left; height:17" tabindex="3" value="<?=$uploader?>" />
</div></td>
</tr>

<tr>

<td width="17%"><div align="right"><span class="style8">Link:&nbsp;</span></div></td>

<td width="83%" align="left">

<div align="left">
<input name="link" class="combo" id="log" value="<?=$link?>" style="border:1px solid; width: 350; FONT-SIZE: 8pt; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #FFFFFF; float:left; height:17" size="20" maxlength="100" tabindex="5" />
</div></td>
</tr>

<tr>

<td colspan="2">&nbsp;</td>
</tr>

<tr>

<td colspan="2" align="center">
<center>
<input type="submit" value="Alterar" class="botaoform" name="B1" style="width: 90px; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #FFFFFF"/></td>
</tr>
<tr>

<td colspan="2"><p class="style10">&nbsp;</p>
<p align="center" class="style10">* Verifique o link da imagem para evitar que seu upload seja retirado do portal.</p></td>
</tr>

<tr>

<td colspan="2" align="center">
<center>
<p class="style10"><a href='java script:history.back()'>[Retorna]</a></p></td>
</tr>
</table>

Edit_not.php


<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #999999;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
<?php
$servidor= "localhost";
$usuario = "brazukas_ih";
$senha = "123456";
$nomebase = "brazukas_ih";
$conexao = mysql_connect($servidor, $usuario, $senha) or die ("Impossível Conectar Servidor Mysql");
mysql_select_db($nomebase, $conexao) or die ("Impossível abrir banco Mysql");

$id = $_POST["id"];
$titulo = $_POST["titulo"];
$titulo_ori = $_POST["titulo_ori"];
$genero = $_POST["genero"];
$dura = $_POST["dura"];
$ano = $_POST["ano"];
$qualidade = $_POST["qualidade"];
$tipo = $_POST["tipo"];
$tamanho = $_POST["tamanho"];
$sinopse = $_POST["sinopse"];
$elenco = $_POST["elenco"];
$trailer = $_POST["trailer"];
$uploader = $_POST["uploader"];
$uteis = $_POST["uteis"];
$select1 = $_POST["select1"];
$select2 = $_POST["select2"];
$select3 = $_POST["select3"];
$select4 = $_POST["select4"];
$select5 = $_POST["select5"];
$select6 = $_POST["select6"];
$select7 = $_POST["select7"];
$select8 = $_POST["select8"];
$select9 = $_POST["select9"];
$select10 = $_POST["select10"];
$select11 = $_POST["select11"];
$select12 = $_POST["select12"];
$select13 = $_POST["select13"];
$select14 = $_POST["select14"];
$select15 = $_POST["select15"];
$down1 = $_POST["down1"];
$down2 = $_POST["down2"];
$down3 = $_POST["down3"];
$down4 = $_POST["down4"];
$down5 = $_POST["down5"];
$down6 = $_POST["down6"];
$down7 = $_POST["down7"];
$down8 = $_POST["down8"];
$down9 = $_POST["down9"];
$down10 = $_POST["down10"];
$down11 = $_POST["down11"];
$down12 = $_POST["down12"];
$down13 = $_POST["down13"];
$down14 = $_POST["down14"];
$down15 = $_POST["down15"];
$capa = $_POST["capa"];
$screen1 = $_POST["screen1"];
$screen2 = $_POST["screen2"];
$screen3 = $_POST["screen3"];
$screen4 = $_POST["screen4"];
$screen5 = $_POST["screen5"];


$sql = "UPDATE filmes SET
capa = '$capa',
link = '$link',
uploader = '$uploader',
titulo = '$titulo'
where id = '$id'";

$update = mysql_query($sql,$conexao);

$sql;
echo "<p align=\"center\"><b>Upload atualizado com sucesso.</font></b>
<br><br><a href='http://lord.forum-brazukas.com/gerador/filmes/up_editar.php'>[Retorna]</a></p>";

?>
[/codebox]

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.6k
×
×
  • Create New...