PHP interesse |
|
ik heb een scriptje gemaakt dat zorgt dat hij plaatje overelkaar plakt maar hij geeft geen plaatje weer wat moet er veranderd worden??
<?
header('content-type: image/png');
if($midden == 1 OR $midden == 2 OR $midden == 3 OR $midden == 4){
$image = imagecreatefrompng('/land/gras_full.png');
}
if($midden == 5 OR $midden == 6 OR $midden == 7){
$image = imagecreatefrompng('/land/bos_full.png');
}
if($midden == 8){
$image = imagecreatefrompng('/land/gras_full.png');
}
if($boven == 1 OR $boven == 2 OR $boven == 3 OR $boven == 4){
$image_b = imagecreatefrompng('/land/gras_boven.png');
}
if($boven == 5 OR $boven == 6 OR $boven == 7){
$image_b = imagecreatefrompng('/land/bos_boven.png');
}
if($rechts == 1 OR $rechts == 2 OR $rechts == 3 OR $rechts == 4){
$image_r = imagecreatefrompng('/land/gras_rechts.png');
}
if($rechts == 5 OR $rechts == 6 OR $rechts == 7){
$image_r = imagecreatefrompng('/land/bos_rechts.png');
}
if($onder == 1 OR $onder == 2 OR $onder == 3 OR $onder == 4){
$image_o = imagecreatefrompng('/land/gras_onder.png');
}
if($onder == 5 OR $onder == 6 OR $onder == 7){
$image_o = imagecreatefrompng('/land/bos_onder.png');
}
if($links == 1 OR $links == 2 OR $links == 3 OR $links == 4){
$image_l = imagecreatefrompng('/land/gras_links.png');
}
if(links == 5 OR $links == 6 OR $links == 7){
$image_l = imagecreatefrompng('/land/bos_links.png');
}
if($midden == 8 AND $boven == 8){
$water = imagecreatefrompng('/land/water_b.png');
}
if($midden == 8 AND $rechts == 8){
$water = imagecreatefrompng('/land/water_r.png');
}
if($midden == 8 AND $onder == 8){
$water = imagecreatefrompng('/land/water_o.png');
}
if($midden == 8 AND $links == 8){
$water = imagecreatefrompng('/land/water_l.png');
}
if($midden == 8 AND $boven == 8 AND $rechts == 8){
$water = imagecreatefrompng('/land/water_b_r.png');
}
if($midden == 8 AND $onder == 8 AND $rechts == 8){
$water = imagecreatefrompng('/land/water_r_o.png');
}
if($midden == 8 AND $onder == 8 AND $links == 8){
$water = imagecreatefrompng('/land/water_o_l.png');
}
if($midden == 8 AND $links == 8 AND $boven == 8){
$water = imagecreatefrompnge('/land/water_l_b.png');
}
if($midden == 8 AND $boven == 8 AND $rechts == 8 AND $onder == 8){
$water = imagecreatefrompng('/land/water_b_r_o.png');
}
if($midden == 8 AND $onder == 8 AND $rechts == 8 AND $links == 8){
$water = imagecreatefrompng('/land/water_r_o_l.png');
}
if($midden == 8 AND $onder == 8 AND $links == 8 AND $boven == 8){
$water = imagecreatefrompng('/land/water_o_l_b.png');
}
if($midden == 8 AND $links == 8 AND $boven == 8 AND $rechts == 8){
$water = imagecreatefrompng('/land/water_l_b_r.png');
}
if($midden == 8 AND $links == 8 AND $boven == 8 AND $rechts == 8 AND $onder == 8){
$water = imagecreatefrompng('/land/water_full.png');
}
imagecopymerge($image, $image_b, 0, 0, 0, 0, 100, 100, 100);
imagecopymerge($image, $image_r, 0, 0, 0, 0, 100, 100, 100);
imagecopymerge($image, $image_o, 0, 0, 0, 0, 100, 100, 100);
imagecopymerge($image, $image_l, 0, 0, 0, 0, 100, 100, 100);
imagecopymerge($image, $water, 0, 0, 0, 0, 100, 100, 100);
imagepng($image); //{edit} imagepng helpt ook nie
imagedestroy($image);
imagedestroy($image_b);
imagedestroy($image_r);
imagedestroy($image_o);
imagedestroy($image_l);
imagedestroy($water);
?>
<? header('content-type: image/png'); if($midden == 1 OR $midden == 2 OR $midden == 3 OR $midden == 4){ $image = imagecreatefrompng('/land/gras_full.png'); } if($midden == 5 OR $midden == 6 OR $midden == 7){ $image = imagecreatefrompng('/land/bos_full.png'); } if($midden == 8){ $image = imagecreatefrompng('/land/gras_full.png'); } if($boven == 1 OR $boven == 2 OR $boven == 3 OR $boven == 4){ $image_b = imagecreatefrompng('/land/gras_boven.png'); } if($boven == 5 OR $boven == 6 OR $boven == 7){ $image_b = imagecreatefrompng('/land/bos_boven.png'); } if($rechts == 1 OR $rechts == 2 OR $rechts == 3 OR $rechts == 4){ $image_r = imagecreatefrompng('/land/gras_rechts.png'); } if($rechts == 5 OR $rechts == 6 OR $rechts == 7){ $image_r = imagecreatefrompng('/land/bos_rechts.png'); } if($onder == 1 OR $onder == 2 OR $onder == 3 OR $onder == 4){ $image_o = imagecreatefrompng('/land/gras_onder.png'); } if($onder == 5 OR $onder == 6 OR $onder == 7){ $image_o = imagecreatefrompng('/land/bos_onder.png'); } if($links == 1 OR $links == 2 OR $links == 3 OR $links == 4){ $image_l = imagecreatefrompng('/land/gras_links.png'); } if(links == 5 OR $links == 6 OR $links == 7){ $image_l = imagecreatefrompng('/land/bos_links.png'); } if($midden == 8 AND $boven == 8){ $water = imagecreatefrompng('/land/water_b.png'); } if($midden == 8 AND $rechts == 8){ $water = imagecreatefrompng('/land/water_r.png'); } if($midden == 8 AND $onder == 8){ $water = imagecreatefrompng('/land/water_o.png'); } if($midden == 8 AND $links == 8){ $water = imagecreatefrompng('/land/water_l.png'); } if($midden == 8 AND $boven == 8 AND $rechts == 8){ $water = imagecreatefrompng('/land/water_b_r.png'); } if($midden == 8 AND $onder == 8 AND $rechts == 8){ $water = imagecreatefrompng('/land/water_r_o.png'); } if($midden == 8 AND $onder == 8 AND $links == 8){ $water = imagecreatefrompng('/land/water_o_l.png'); } if($midden == 8 AND $links == 8 AND $boven == 8){ $water = imagecreatefrompnge('/land/water_l_b.png'); } if($midden == 8 AND $boven == 8 AND $rechts == 8 AND $onder == 8){ $water = imagecreatefrompng('/land/water_b_r_o.png'); } if($midden == 8 AND $onder == 8 AND $rechts == 8 AND $links == 8){ $water = imagecreatefrompng('/land/water_r_o_l.png'); } if($midden == 8 AND $onder == 8 AND $links == 8 AND $boven == 8){ $water = imagecreatefrompng('/land/water_o_l_b.png'); } if($midden == 8 AND $links == 8 AND $boven == 8 AND $rechts == 8){ $water = imagecreatefrompng('/land/water_l_b_r.png'); } if($midden == 8 AND $links == 8 AND $boven == 8 AND $rechts == 8 AND $onder == 8){ $water = imagecreatefrompng('/land/water_full.png'); } imagecopymerge($image, $image_b, 0, 0, 0, 0, 100, 100, 100); imagecopymerge($image, $image_r, 0, 0, 0, 0, 100, 100, 100); imagecopymerge($image, $image_o, 0, 0, 0, 0, 100, 100, 100); imagecopymerge($image, $image_l, 0, 0, 0, 0, 100, 100, 100); imagecopymerge($image, $water, 0, 0, 0, 0, 100, 100, 100); imagepng($image); //{edit} imagepng helpt ook nie imagedestroy($image); imagedestroy($image_b); imagedestroy($image_r); imagedestroy($image_o); imagedestroy($image_l); imagedestroy($water); ?>
alvast bedankt
sasser;-)
|