• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

please help

Patio

New Member
Joined
Jun 17, 2010
Messages
4
Reaction score
0
what is wrong about logo guilds it work in "guilds" i can see logo guilds but if i add top guilds in latestnews there arent a logo guild please help
 
momento,
this is my code(guild war)

$main_content .= "<tr style=\"background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\">
<td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$a->getId()."\"><img src=\"guilds/".$alogo."\" width=\"64\" height=\"64\" border=\"0\"/><br />".$a->getName()."</a><

and this my guild php

<?php
$mysqli = new mysqli("127.0.0.1", "root", "xxxxxx", "xxxx");
if(mysqli_connect_errno())
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}

$query = $mysqli->query("SELECT `logo`, OCTET_LENGTH(`logo`) as `length` FROM `guilds` WHERE `id` = " . intval($_GET['id']) . " LIMIT 1;");
if(!empty($query) && $row = $query->fetch_object())
{
$sizex = 64;
$sizey = 64;
if(!empty($row->length))
{
$src = imagecreatefromstring($row->logo);
if($src !== false)
{
$img = imagecreatetruecolor($sizex, $sizey);
imagealphablending($img, false);
imagesavealpha($img, true);

imagecopyresized($img, $src, 0, 0, 0, 0, $sizex, $sizey, imagesx($src), imagesy($src));

header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
}
}
else
{
$src = imagecreatefromstring(file_get_contents("./default.png"));
if($src !== false)
{
$img = imagecreatetruecolor($sizex, $sizey);
imagealphablending($img, false);
imagesavealpha($img, true);

imagecopyresized($img, $src, 0, 0, 0, 0, $sizex, $sizey, imagesx($src), imagesy($src));

header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
}
}
}
else
{
die("This guild doesn't exists.");
}
$mysqli->close();
?>
 
Back
Top