Ir para conteúdo
Fórum Script Brasil
  • 0

[ Help ] Algum erro nesse código php com MySQL


Guest Slater

Pergunta

Se ouver algum erro me ajudem a corrigir por favor ...

out.php

<?

require("config.php");

$a = "UPDATE $table SET clicksout = clicksout + 1 WHERE memberid = '$id'";
$query = mysql_query("SELECT * FROM $table WHERE memberid = '$id'") or die (mysql_error());

while($object = mysql_fetch_object($query)){
$datetoday = $object->date;

if($datetoday != $date){ $b = "UPDATE $table SET date = '$date', hitsday7 = hitsday6, hitsday6 = hitsday5, hitsday5 = hitsday4, hitsday4 = hitsday3, hitsday3 = hitsday2, hitsday2 = hitsday1, hitsday1 = 1 WHERE memberid = '".$_GET["id"]."'"; }

function dohits(){
global $a,$b,$c,$date,$daytoday;

mysql_query($a); //or die(mysql_error());
mysql_query($b); //or die(mysql_error());
}

dohits();

header("Location: $object->url");
}
?>

config.php

<?

$hostname = "localhost";

$username = "139071";

$password = "pass";

$database = "139071";

############################################################

# Admin Panel Information #

############################################################

$admin_user = "user";

$admin_pass = "pass";

############################################################

# Webmaster Information #

############################################################

$webmaster_email = "hudson_of@hotmail.com";

$webmaster_url = "url";

############################################################

# FTP Information #

# FTP Information is optional, #

# but recommended for advanced use. #

############################################################

$ftp_add = "IP"; // Ip Address or ftp address

$ftp_user = "user"; // username or username@yourdomain.com

$ftp_password = "pass"; // ftp username password

############################################################

# Topsite Information #

############################################################

$topsite_name = "TOP WYD Privates"; // Name of Topsite

$topsite_initials = "XT"; // Topsite Initials

// The URL to where the script is located ( without a trailing / )

$script_url = "http://gamesmais.6te.net/top";

// The URL to where you've stored your topsite buttons ( without trailing / )

$img_dir = "http://gamesmais.6te.net/top/images";

// How many buttons you have for the ranks ( 0 = all buttons the same, else EX: 50 )

$img_total = 50;

// Extension of the buttons ( .bmp / .jpg / .jpeg / .gif / .png )

$img_ext = ".gif";

// Total buttons that'll be shown on your topsite ( $img_visible = "all" = show all buttons )

$img_visible = "all";

// Sites listed per page

$pp = 25;

// Send the webmaster an email when someone joined your topsite ? ( 0 = no / 1 = yes )

$webmaster_sendmail = 0;

############################################################

# DO NOT EDIT BELOW HERE! #

############################################################

// The name of the table IN $database

$table = "xtd";

$date = date("dmY");

$numdays = 7;

// Connect to database ( Do not modify ! )

mysql_connect($hostname,$username,$password) or die(mysql_error());

mysql_select_db($database);

?>

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,3k
×
×
  • Criar Novo...