1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
<?php
header ("Content-type: image/png");
header ("Content-type: image/gif");
header ("Content-type: image/jpeg");
$image = imagecreate(900,50);
$image2 = imagecreate(468,60);
$orange = imagecolorallocate($image, 255, 128, 0);
//$bleu = imagecolorallocate($image2, 0, 0, 255);
$bleuclair = imagecolorallocate($image, 156, 227, 254);
$noir = imagecolorallocate($image2, 0, 0, 0);
$blanc = imagecolorallocate($image, 255, 255, 255);
$blanc1 = imagecolorallocate($image2, 255, 255, 255);
$idcamp = $_GET['idcamp'];
$id_site = $_GET['id_site'];
include_once('includes/config.php');
include_once('includes/mysql.php');
$info = $db->prepare('SELECT * FROM siteaffil where id_site = :url');
$info->bindValue('url',$id_site, PDO::PARAM_STR);
$info->execute();
$site=$info->fetch(PDO::FETCH_OBJ);
$info2 = $db->prepare('SELECT * FROM campagne where id_camp = :url1');
$info2->bindValue('url1',$idcamp, PDO::PARAM_STR);
$info2->execute();
$site1=$info2->fetch(PDO::FETCH_OBJ);
$script = '<a href="'. $site1->url .'"><img src="'. $site1->urlban .'"></a>';
if($site->etat == 1){
imagestring($image, 4, 35, 15, "<script> document.write('<a href='$script' accesskey='9'>'); </script>", $blanc);
imagepng($image); //// ici le probleme
}else{
imagestring($image, 4, 35, 15, "Vous n'etes pas autorise a afficher <br> les campagnes de sur le site ! ". $site->url_site ." ", $blanc);
imagepng($image);
}
?> |
Partager