Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/04/2011, 09:02
helion
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 14 años
Puntos: 4
Pregunta Error en Firmas con PHP

veran no se cual sea mi error... el detalle esta que uso este php que crea firmas con datos de la Base de Datos...

Código PHP:
<?php
function Conectarse(){
    if (!(
$link=mysql_connect("127.0.0.1","root","gamesgb"))){
    echo 
'error user o pass incorrectos';
    exit();
    }
    if (!
mysql_select_db("gunbound",$link)){
    echo 
'base de datos no existe';
    exit();
    }

return 
$link;

}
Conectarse();

function 
clean_variable_fapli($var=NULL,$r=NULL) {
$newvar = @preg_replace('/[^a-zA-Z0-9\_]/'''$var);
if (!
preg_match('/^[a-zA-Z0-9\_\s]*$/i',stripslashes($var))) {
    if (
$r != NULL) {  return true; } else { return $newvar; }
    
writelog("$var"'VARIABLE_ERROR'); 
 } 
    if (
$r == NULL) {  return $newvar; }

}

// Cambia esto x tus variables
$nickname=clean_variable_fapli($_GET['nick']);

$qmnews = @mysql_query("SELECT game.NickName AS NickName, game.Guild AS Guild, game.GuildRank AS GuildRank, game.MemberCount AS MemberCount, game.TotalGrade AS TotalGrade, game.TotalRank AS TotalRank, game.CountryGrade AS CountryGrade, game.Country AS Country, game.CountryRank AS CountryRank, user.Gender AS Gender, game.Id AS Id FROM game,game where game.NickName=user.NickName and game.NickName='$nickname' limit 1");

if(
$r = @mysql_fetch_array($qmnews)){

$IDjuego $r["NickName"];
$clan $r["Guild"];
$puestoclan "".$r['GuildRank']."/".$r['MemberCount']."";
$imgLVLmundial imagecreatefromgif("../ranks/rank_".$r['TotalGrade'].".gif");
$puestomundial $r["TotalRank"];
$imgLVLNacional imagecreatefromgif("../ranks/rank_".$r['CountryGrade'].".gif");
$imgpais imagecreatefrompng("../flags/".$r['Country'].".png");
$puestoPais $r["CountryRank"];

if(
$r['Gender']==1){
$imgfondo='Girl.jpg';
}
if(
$r['Gender']==0){
$imgfondo='Boy.jpg';
}
// cabezera para el navegador 
header('Content-type: image/png');

// variables de color de texto, tamaño, fuente e imagen d fondo
$background imagecreatefromjpeg("$imgfondo");
$black imagecolorallocate($background000);
$tamanio 9;
$fuente 'ft60.ttf';


// insertando las imagenes
//imagecopymerge($background, imagen, x, y, zomx, zomy, largo, alto, transparencia);
imagecopymerge($background$imgLVLmundial9570002515100);
imagecopymerge($background$imgLVLNacional10689002515100);
imagecopymerge($background$imgpais15010002515100);

// Escribiendo en la imagen
imagettftext($background$tamanio08247$black$fuente$IDjuego);
imagettftext($background$tamanio04760$black$fuente$clan);
imagettftext($background$tamanio019560$black$fuente$puestoclan);
imagettftext($background$tamanio020081$black$fuente$puestomundial);
imagettftext($background$tamanio020199$black$fuente$puestoPais);

// mostrar la imagen
imagepng($background);

// borrar la imagen del cache
imagedestroy($background);

}else{
?>
    <script type="text/javascript">alert('Error: Copia bien la URL de tu firma');</script>
<? ?>


el .htaccess es


Código PHP:
Options +FollowSymLinks
RewriteEngine On

Options 
-MultiViews
Options All 
-Indexes


Directoryindex index
.php

RewriteRule 
^index.asp index.php [L

la base de datos es correcta con todos los datos y las imagenes existe

lo convoque de este modo:

http://localhost/index.asp&nick=Cronos <-- no se si esta bien convocado

pero me vota la alerta "Error: Copia bien la URL de tu firma" y todo esta bien :/ alguien podria decirme cual es el error ?