C'est super sympa de m'avoir répondu si vite - merci
voici le code de ma page index.php
<?
include("configuration.inc.php");
$DOC_TITLE = "[EUROSGOS.COM]";
include("$repertoire_modele/haut.php");
?>
<table width=100% border="0" cellpadding="0" cellspacing="0" class=normal bgcolor=#FFFFFF>
<tr valign="top">
<td class=petit>
<p></p>
<b>Bienvenue sur le site web de Euro-sgos!</b><p></p>
Pour toutes vos demandes d'informations, vous pouvez nous contacter à l'adresse email : <a href="mailto:<?=$support?>" class=petit><b><?=$support?></b></a><p></p>
<? print_on_specials(); ?>
</td>
</tr>
</table>
<?
include("$repertoire_modele/bas.php");
/******************************************************************************
* FUNCTIONS
*****************************************************************************/
function print_on_specials() {
/* Affiche la liste des catégories qui sont spéciales */
global $wwwroot, $repertoire_modele, $tauxtva;
$qid = mysql_query("SELECT id, nom, promotion, descriptifcourt, image1, prixht FROM produits WHERE on_special = 1 AND etat = 1");
if (mysql_num_rows($qid) == 0) {
echo "Aucun produit n'a été prévu en page d'accueil";
} else {
$nb_cellules = mysql_num_rows($qid);
$nb_colonnes = 2;
$reste = $nb_cellules % $nb_colonnes;
$nb_lignes = ( $nb_cellules - $reste )/ $nb_colonnes;
?>
<table align=center border=0 bordercolor=#003366 cellspacing=0 cellpadding=0 width="90%">
<?
$j = 0;
while ($ligne = mysql_fetch_array($qid)) {
{
if ( $j % $nb_colonnes == 0 ) {
echo "<tr valign=top>";
}
if($j % $nb_colonnes !=0 OR $j % $nb_colonnes == 0 ) {
// on affiche une cellule
echo "<td class=petit width=50%>";
?>
<table align=center border=0 bordercolor=#003366 cellspacing=0 cellpadding=0 width="100%">
<tr><td><b><a class=normal href="<? echo $wwwroot ?>/achat/produit_details.php?id=<? echo $ligne["id"] ?>"><? echo $ligne["nom"]?></a></b></td></tr>
<tr><td align=center height=150 valign=middle><? if ($ligne["image1"] <> "") {?>
<div align=center><img src="<?=$wwwroot?>/administrer/images/<?=$ligne["image1"]?>"></div>
<?} else {?><div align=center><img src="<?=$wwwroot?>/images/photo-non-disponible.gif"></div><?}?></td></tr>
<tr><td class="normal">
<?php
$prix = @$ligne["prix"] * (1-$ligne["promotion"]/100);
if ($ligne["promotion"] != 0) {?>
<font color="#CC0000"><b>Promotion : <? echo $ligne["promotion"]; ?> %</b></font><br>
<b>Prix TTC : </b><s><?=fprix($ligne["prix"]); ?></s>
<font color="#CC0000"><b><?=fprix($prix); ?> € TTC</b></font><br>
<? } else {?>
<b>Prix : <font color="#CC0000"><?=fprix($prix); ?> € T.T.C</b></font><br>
<?
}
?>
</td></tr>
<tr><td class="normal">
<form method="POST" action="<?=$wwwroot?>/achat/caddie_ajout.php" name="ajout<?=$ligne["id"] ?>">
<b>Quantité : </b>
<select name="qte" class="formulaire1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="hidden" name="id" value="<?=$ligne["id"] ?>">
<a class=normal href="Javascript:document.ajout<?=$ligne["id"] ?>.submit()">
<img src="<?=$wwwroot?>/images/caddie.gif" align=middle alt="" border="0">
</a>
<a class=petit href="Javascript:document.ajout<?=$ligne["id"] ?>.submit()">
Ajouter au caddie
</a>
</form>
</td></tr>
</table>
<? }
echo "</td>";
$j++;
if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) {
echo "</tr>";
}
}
} ?>
</table>
<?
}}
?>
le code de mon fichier info.inc.php
<?
$serveur_mysql = "localhost";
$utilisateur_mysql = "root";
$mot_de_passe_mysql = "";
$nom_de_la_base = "baseeurosgos";
$wwwroot = "http://localhost/caddie";
$site = "caddie";
$normal = "";
$express = "";
$support = "[email protected]";
?>
[b]C'est super sympa de m'avoir répondu si vite - merci
voici le code de ma page index.php[/b]
[php]<?
include("configuration.inc.php");
$DOC_TITLE = "[EUROSGOS.COM]";
include("$repertoire_modele/haut.php");
?>
<table width=100% border="0" cellpadding="0" cellspacing="0" class=normal bgcolor=#FFFFFF>
<tr valign="top">
<td class=petit>
<p></p>
<b>Bienvenue sur le site web de Euro-sgos!</b><p></p>
Pour toutes vos demandes d'informations, vous pouvez nous contacter à l'adresse email : <a href="mailto:<?=$support?>" class=petit><b><?=$support?></b></a><p></p>
<? print_on_specials(); ?>
</td>
</tr>
</table>
<?
include("$repertoire_modele/bas.php");
/******************************************************************************
* FUNCTIONS
*****************************************************************************/
function print_on_specials() {
/* Affiche la liste des catégories qui sont spéciales */
global $wwwroot, $repertoire_modele, $tauxtva;
$qid = mysql_query("SELECT id, nom, promotion, descriptifcourt, image1, prixht FROM produits WHERE on_special = 1 AND etat = 1");
if (mysql_num_rows($qid) == 0) {
echo "Aucun produit n'a été prévu en page d'accueil";
} else {
$nb_cellules = mysql_num_rows($qid);
$nb_colonnes = 2;
$reste = $nb_cellules % $nb_colonnes;
$nb_lignes = ( $nb_cellules - $reste )/ $nb_colonnes;
?>
<table align=center border=0 bordercolor=#003366 cellspacing=0 cellpadding=0 width="90%">
<?
$j = 0;
while ($ligne = mysql_fetch_array($qid)) {
{
if ( $j % $nb_colonnes == 0 ) {
echo "<tr valign=top>";
}
if($j % $nb_colonnes !=0 OR $j % $nb_colonnes == 0 ) {
// on affiche une cellule
echo "<td class=petit width=50%>";
?>
<table align=center border=0 bordercolor=#003366 cellspacing=0 cellpadding=0 width="100%">
<tr><td><b><a class=normal href="<? echo $wwwroot ?>/achat/produit_details.php?id=<? echo $ligne["id"] ?>"><? echo $ligne["nom"]?></a></b></td></tr>
<tr><td align=center height=150 valign=middle><? if ($ligne["image1"] <> "") {?>
<div align=center><img src="<?=$wwwroot?>/administrer/images/<?=$ligne["image1"]?>"></div>
<?} else {?><div align=center><img src="<?=$wwwroot?>/images/photo-non-disponible.gif"></div><?}?></td></tr>
<tr><td class="normal">
<?php
$prix = @$ligne["prix"] * (1-$ligne["promotion"]/100);
if ($ligne["promotion"] != 0) {?>
<font color="#CC0000"><b>Promotion : <? echo $ligne["promotion"]; ?> %</b></font><br>
<b>Prix TTC : </b><s><?=fprix($ligne["prix"]); ?></s>
<font color="#CC0000"><b><?=fprix($prix); ?> € TTC</b></font><br>
<? } else {?>
<b>Prix : <font color="#CC0000"><?=fprix($prix); ?> € T.T.C</b></font><br>
<?
}
?>
</td></tr>
<tr><td class="normal">
<form method="POST" action="<?=$wwwroot?>/achat/caddie_ajout.php" name="ajout<?=$ligne["id"] ?>">
<b>Quantité : </b>
<select name="qte" class="formulaire1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<input type="hidden" name="id" value="<?=$ligne["id"] ?>">
<a class=normal href="Javascript:document.ajout<?=$ligne["id"] ?>.submit()">
<img src="<?=$wwwroot?>/images/caddie.gif" align=middle alt="" border="0">
</a>
<a class=petit href="Javascript:document.ajout<?=$ligne["id"] ?>.submit()">
Ajouter au caddie
</a>
</form>
</td></tr>
</table>
<? }
echo "</td>";
$j++;
if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) {
echo "</tr>";
}
}
} ?>
</table>
<?
}}
?>[/php]
[b]le code de mon fichier info.inc.php[/b]
[php]<?
$serveur_mysql = "localhost";
$utilisateur_mysql = "root";
$mot_de_passe_mysql = "";
$nom_de_la_base = "baseeurosgos";
$wwwroot = "http://localhost/caddie";
$site = "caddie";
$normal = "";
$express = "";
$support = "
[email protected]";
?>[/php]