Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/12/2010, 11:27
helion
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 14 años
Puntos: 4
Pregunta Error Con firmas en PHP

Buenas con todos, tengo un problema con mi firma en php... no se en que estoy haciendo mal o que linea estaria fallando...

el php es este

Código PHP:
<?php
function Conectarse(){
    
    if (!(
$link=mysql_connect("127.0.0.1","root","valladares"))){
    echo 
'error user o pass incorrectos';
    exit();
    }

    if (!
mysql_select_db("gbwc",$link)){
    echo 
'base de datos no existe';
    exit();
    }

return 
$link;

}

Conectarse();

function 
clean_variable($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($_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, user where 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>
    <meta HTTP-EQUIV="Refresh" CONTENT="0; URL=<?="http://".$_SERVER['HTTP_HOST']?>?op=firmas">
<?
}
?>

ahora el .htacess es

Código PHP:
Options +FollowSymLinks
RewriteEngine On

Options 
-MultiViews
Options All 
-Indexes


Directoryindex index2
.php

RewriteRule 
^index.asp index2.php [L
ahora e revisado todo.. y pes estan todas las tablas en mi base de datos y la conexion es correcta para que no genere dicho error.


supuestamente la firma se convoca asi :
http://localhost/firmas/?nick=TESTNICK

la carpeta de firmas esta en www/firmas/ el error que me genera es el siguiente :




e revisado esas lineas y todo esta correcto.. podrian ayudarme porfavor