Bonjour à tous et à toutes ! J'aimerais installé sur mon site le générateur de banniere conçu par Aweb ! J'ai eu beau modifié les fichiers comme indiqué le script ne marche pas ! Ai-je fait une erreur dans mes modifications ? Donc voila je voulez savoir tout d'abbord si vous connaissiez ce script ? Puis si il y avez une personne qui pouvez regarde mon fichier et voir si tout était bon !
En vous remerciant à l'anvance
Cordialement,
Yann
Edit : voila mon fichier index qu'est-ce qui ne va pas ??
<?php
$pour = 'Yann31140'; //Votre pseudo
//Ne touchez à rien en dessous de cette ligne si vosu ne conaissez pas le PHP !!!
//Si vosu avez des erreurs, faites un CHMOD sur les répertoires "fonts" et
//"banners" et sur les fichiers à l'intérieur.
//Vous pouvez tout modifier dans ce script SAUF les copyright !!!
//(Violation de droit d'auteur)
//Script (c)2005 Aweb Productions. All Rights Reserved.
$banner = 'Choisissez une bannière...';
if (@$_POST['banner'] != NULL) {$banner = @$_POST['banner'];}
$font = 'Choisissez une police...';
if (@$_POST['font'] != NULL) {$font = @$_POST['font'];}
$text = 'Texte';
if (@$_POST['text'] != NULL) {$text = @$_POST['text'];}
$size = '20';
if (@$_POST['size'] != NULL) {$size = @$_POST['size'];}
$RGBr = '255';
if (@$_POST['RGBr'] != NULL) {$RGBr = @$_POST['RGBr'];}
$RGBg = '255';
if (@$_POST['RGBg'] != NULL) {$RGBg = @$_POST['RGBg'];}
$RGBb = '255';
if (@$_POST['RGBb'] != NULL) {$RGBb = @$_POST['RGBb'];}
$x = '5';
if (@$_POST['x'] != NULL) {$x = @$_POST['x'];}
$y = '40';
if (@$_POST['y'] != NULL) {$y = @$_POST['y'];}
$angle = '0';
if (@$_POST['angle'] != NULL) {$angle = @$_POST['angle'];}
//En cas de sauvegarde
if (@$_GET['save'] == '1') {
$fichier = 'generated/image.png';
$nom_fichier = 'banniere.png';
//$tailleFichier = filesize($fichier);
$_GET['save'] = 'image';
include 'banniere.php';
// téléchargement du fichier
header('Content-disposition: attachment; filename='.$nom_fichier);
header('Content-Type: application/force-download');
header('Content-Transfer-Encoding: fichier');
header('Content-Length: '.filesize('generated/image.png'));
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
readfile($fichier);
exit;
}
?>
<html>
<head>
<title>Générateur de Bannières - (c) 2005 Aweb pour <?php echo $pour; ?></title>
</head>
<body>
Générateur de bannières
<?php
if (@$_GET['mode'] == 'view') {
echo '<br><u>Voici votre bannière :</u><br><img src="banniere.php?size='.@$_POST['size'].'&text='.@$_POST['text'].'&banner='.@$_POST['banner'].'&x='.@$_POST['x'].'&y='.@$_POST['y'].'&font='.@$_POST['font'].'&RGBr='.@$_POST['RGBr'].'&RGBg='.@$_POST['RGBg'].'&RGBb='.@$_POST['RGBb'].'&angle='.@$_POST['angle'].'">';
echo '<br><a href="?mode=view&save=1&size='.@$_POST['size'].'&text='.@$_POST['text'].'&banner='.@$_POST['banner'].'&x='.@$_POST['x'].'&y='.@$_POST['y'].'&font='.@$_POST['font'].'&RGBr='.@$_POST['RGBr'].'&RGBg='.@$_POST['RGBg'].'&RGBb='.@$_POST['RGBb'].'&angle='.@$_POST['angle'].'">Télécharger l\'image !</a>';
}
?>
<form name="form1" method="post" action="index.php?mode=view">
<table width="815" border="0">
<tr>
<td width=30% valign="top"><strong>Image : </strong></td>
<td width=70%><p>
<select name="banner">
<OPTION SELECTED><?php echo $banner; ?>
<OPTION>---
<?php
if ($handle = opendir('banners')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "blackfont.png" && $file != "Thumbs.db") {
echo "<OPTION>
</select>
- <a href="#null" onClick="window.open('banners.php','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES BANNIERES</a> </p>
</td>
</tr>
<tr>
<td valign="top"><strong>Police : </strong></td>
<td><p>
<select name="font">
<OPTION SELECTED><?php echo $font; ?>
<OPTION>---
<?php
if ($handle = opendir('fonts')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "Thumbs.db") {
echo "<OPTION>
</select>
- <a href="#null" onClick="window.open('fonts.php','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES POLICES</a>
</p>
</td>
</tr>
<tr>
<td valign="top"><strong>Texte : </strong></td>
<td><input type="text" name="text" value="<?php echo $text; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Taille du texte : </strong></td>
<td><input type="text" name="size" value="<?php echo $size; ?>">
(de 1 à 100) </td>
</tr>
<tr>
<td valign="top"><strong>Couleur du texte : </strong></td>
<td><p>R(Rouge):
<input name="RGBr" type="text" size="5" maxlength="3" value="<?php echo $RGBr; ?>">
G(Vert):
<input name="RGBg" type="text" size="5" maxlength="3" value="<?php echo $RGBg; ?>">
B(Bleu):
<input name="RGBb" type="text" size="5" maxlength="3" value="<?php echo $RGBb; ?>">
- <a href="#null" onClick="window.open('rgb.htm','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES COULEURS</a> </p>
</td>
</tr>
<tr>
<td valign="top"><strong>Position X (horizontal) : </strong></td>
<td><input type="text" name="x" value="<?php echo $x; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Position Y (vertical) : </strong></td>
<td><input type="text" name="y" value="<?php echo $y; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Angle du texte : </strong></td>
<td><input type="text" name="angle" value="<?php echo $angle; ?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Créer !!!"></td>
</tr>
</table>
</form>
<?php //La suppretion du copyright entraîne une violation du copyright.
//Vous pouvez ajouter votre propre copyright Dessus ou Dessous mais
//Supprimer ou Modifier le mien est purement illégal.?>
(c) 2005 <a href="mailto:[email protected]">Aweb</a> pour <?php echo $pour; ?>. <a href="http://aweb.eurower.net/scripts/" target="_blank">http://aweb.eurower.net/scripts/ <br>
</a>
</body>
</html>
voici un aperçu
http://img404.imageshack.us/img404/8527/awebcm9.jpg
kes qui ne vas pas !! ??Le cadre rouge ! cela ne devrait pas apparaitre ceci, cela devrait apparaitre qu'une fois une banniere créé ! pourquoi est-ce ainsi ?
En vous remerciant encore une fois
Bonjour à tous et à toutes ! J'aimerais installé sur mon site le générateur de banniere conçu par Aweb ! J'ai eu beau modifié les fichiers comme indiqué le script ne marche pas ! Ai-je fait une erreur dans mes modifications ? Donc voila je voulez savoir tout d'abbord si vous connaissiez ce script ? Puis si il y avez une personne qui pouvez regarde mon fichier et voir si tout était bon !
En vous remerciant à l'anvance
Cordialement,
Yann
Edit : voila mon fichier index qu'est-ce qui ne va pas ??
[php]<?php
$pour = 'Yann31140'; //Votre pseudo
//Ne touchez à rien en dessous de cette ligne si vosu ne conaissez pas le PHP !!!
//Si vosu avez des erreurs, faites un CHMOD sur les répertoires "fonts" et
//"banners" et sur les fichiers à l'intérieur.
//Vous pouvez tout modifier dans ce script SAUF les copyright !!!
//(Violation de droit d'auteur)
//Script (c)2005 Aweb Productions. All Rights Reserved.
$banner = 'Choisissez une bannière...';
if (@$_POST['banner'] != NULL) {$banner = @$_POST['banner'];}
$font = 'Choisissez une police...';
if (@$_POST['font'] != NULL) {$font = @$_POST['font'];}
$text = 'Texte';
if (@$_POST['text'] != NULL) {$text = @$_POST['text'];}
$size = '20';
if (@$_POST['size'] != NULL) {$size = @$_POST['size'];}
$RGBr = '255';
if (@$_POST['RGBr'] != NULL) {$RGBr = @$_POST['RGBr'];}
$RGBg = '255';
if (@$_POST['RGBg'] != NULL) {$RGBg = @$_POST['RGBg'];}
$RGBb = '255';
if (@$_POST['RGBb'] != NULL) {$RGBb = @$_POST['RGBb'];}
$x = '5';
if (@$_POST['x'] != NULL) {$x = @$_POST['x'];}
$y = '40';
if (@$_POST['y'] != NULL) {$y = @$_POST['y'];}
$angle = '0';
if (@$_POST['angle'] != NULL) {$angle = @$_POST['angle'];}
//En cas de sauvegarde
if (@$_GET['save'] == '1') {
$fichier = 'generated/image.png';
$nom_fichier = 'banniere.png';
//$tailleFichier = filesize($fichier);
$_GET['save'] = 'image';
include 'banniere.php';
// téléchargement du fichier
header('Content-disposition: attachment; filename='.$nom_fichier);
header('Content-Type: application/force-download');
header('Content-Transfer-Encoding: fichier');
header('Content-Length: '.filesize('generated/image.png'));
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
readfile($fichier);
exit;
}
?>
<html>
<head>
<title>Générateur de Bannières - (c) 2005 Aweb pour <?php echo $pour; ?></title>
</head>
<body>
Générateur de bannières
<?php
if (@$_GET['mode'] == 'view') {
echo '<br><u>Voici votre bannière :</u><br><img src="banniere.php?size='.@$_POST['size'].'&text='.@$_POST['text'].'&banner='.@$_POST['banner'].'&x='.@$_POST['x'].'&y='.@$_POST['y'].'&font='.@$_POST['font'].'&RGBr='.@$_POST['RGBr'].'&RGBg='.@$_POST['RGBg'].'&RGBb='.@$_POST['RGBb'].'&angle='.@$_POST['angle'].'">';
echo '<br><a href="?mode=view&save=1&size='.@$_POST['size'].'&text='.@$_POST['text'].'&banner='.@$_POST['banner'].'&x='.@$_POST['x'].'&y='.@$_POST['y'].'&font='.@$_POST['font'].'&RGBr='.@$_POST['RGBr'].'&RGBg='.@$_POST['RGBg'].'&RGBb='.@$_POST['RGBb'].'&angle='.@$_POST['angle'].'">Télécharger l\'image !</a>';
}
?>
<form name="form1" method="post" action="index.php?mode=view">
<table width="815" border="0">
<tr>
<td width=30% valign="top"><strong>Image : </strong></td>
<td width=70%><p>
<select name="banner">
<OPTION SELECTED><?php echo $banner; ?>
<OPTION>---
<?php
if ($handle = opendir('banners')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "blackfont.png" && $file != "Thumbs.db") {
echo "<OPTION>
</select>
- <a href="#null" onClick="window.open('banners.php','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES BANNIERES</a> </p>
</td>
</tr>
<tr>
<td valign="top"><strong>Police : </strong></td>
<td><p>
<select name="font">
<OPTION SELECTED><?php echo $font; ?>
<OPTION>---
<?php
if ($handle = opendir('fonts')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "Thumbs.db") {
echo "<OPTION>
</select>
- <a href="#null" onClick="window.open('fonts.php','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES POLICES</a>
</p>
</td>
</tr>
<tr>
<td valign="top"><strong>Texte : </strong></td>
<td><input type="text" name="text" value="<?php echo $text; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Taille du texte : </strong></td>
<td><input type="text" name="size" value="<?php echo $size; ?>">
(de 1 à 100) </td>
</tr>
<tr>
<td valign="top"><strong>Couleur du texte : </strong></td>
<td><p>R(Rouge):
<input name="RGBr" type="text" size="5" maxlength="3" value="<?php echo $RGBr; ?>">
G(Vert):
<input name="RGBg" type="text" size="5" maxlength="3" value="<?php echo $RGBg; ?>">
B(Bleu):
<input name="RGBb" type="text" size="5" maxlength="3" value="<?php echo $RGBb; ?>">
- <a href="#null" onClick="window.open('rgb.htm','Displayd','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480');">VOIR LES COULEURS</a> </p>
</td>
</tr>
<tr>
<td valign="top"><strong>Position X (horizontal) : </strong></td>
<td><input type="text" name="x" value="<?php echo $x; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Position Y (vertical) : </strong></td>
<td><input type="text" name="y" value="<?php echo $y; ?>"></td>
</tr>
<tr>
<td valign="top"><strong>Angle du texte : </strong></td>
<td><input type="text" name="angle" value="<?php echo $angle; ?>"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Créer !!!"></td>
</tr>
</table>
</form>
<?php //La suppretion du copyright entraîne une violation du copyright.
//Vous pouvez ajouter votre propre copyright Dessus ou Dessous mais
//Supprimer ou Modifier le mien est purement illégal.?>
(c) 2005 <a href="mailto:
[email protected]">Aweb</a> pour <?php echo $pour; ?>. <a href="http://aweb.eurower.net/scripts/" target="_blank">http://aweb.eurower.net/scripts/ <br>
</a>
</body>
</html>[/php]
voici un aperçu :arrow: http://img404.imageshack.us/img404/8527/awebcm9.jpg
kes qui ne vas pas !! ??Le cadre rouge ! cela ne devrait pas apparaitre ceci, cela devrait apparaitre qu'une fois une banniere créé ! pourquoi est-ce ainsi ?
En vous remerciant encore une fois