lucas

Utilisateur open source
  • Compteur de contenus

    15
  • Inscrit(e) le

  • Dernière visite


Messages posté(e)s par lucas


  1. bonjour mets ce ci a la place de ton achat/index ? mais fais le en local pour faire un essay

    ma cher

    <?

    include("../configuration.inc.php");

    if (!isset($_GET['catid'])) { $catid = 0;} else {$catid = intval($_GET['catid']);}

    $qid_c = recupere_sous_categorie($catid);

    $DOC_TITLE = "[PEEL.FR]";

    include("$repertoire_modele/haut.php");

    ?>

    <div class="normal" style="border-bottom: 1px dotted grey;text-transform : uppercase;"><? affiche_arbre_categorie($catid) ?></div>

    <?

    $sqlcat = "SELECT image, description FROM peel_categories WHERE id = '".$catid."'";

    $rescat = mysql_query($sqlcat);

    $objcat = mysql_fetch_object($rescat);

    if ($rescat) {

    if (mysql_num_rows($rescat) > 0) {

    echo "<div align=\"center\" class=\"normal\">";

    if (!empty($objcat->image)) {

    echo "<img src=\"$wwwroot/upload/".$objcat->image."\" width=\"150\" align=\"center\">";

    }

    echo "<br /><br >".stripslashes($objcat->description);

    echo "</div>";

    }

    }

    if ($qid_c) {

    if (mysql_num_rows($qid_c) == 0) {

    echo "";

    } else {

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";

    $nb_cellules = mysql_num_rows($qid_c);

    $nb_colonnes = 2;

    $j = 0;

    echo "<div style=\"text-align:center;font-weight:bold\">Liste des sous cat&eacute;gories :</div>";

    while ($cat = mysql_fetch_array($qid_c)) {

    if ( $j % $nb_colonnes == 0 ){

    echo "<tr>";

    }

    if($j % $nb_colonnes != 0 or $j % $nb_colonnes == 0 ){

    // on affiche une cellule

    if ( $j %$nb_colonnes == 0 or $j == $nb_cellules ) {

    echo "<td width=\"50%\" valign=\"top\">";

    }

    else {

    echo"<td width=\"50%\" valign=\"top\">";}

    ?>

    <table width="100%">

    <tr valign="top"><td class="normal">

    <li><a class="normal" href="<?=$_SERVER['PHP_SELF']?>?catid=<?=$cat['id'] ?>"><?=$cat['nom'] ?></a></li>

    </td></tr>

    <? }

    echo "<tr><td><img src=$wwwroot/images/blank.gif width=\"1\" height=\"10\" border=\"0\" alt=\"\" /></td></tr></table>";

    echo "</td>";

    $j++;

    if ( $j % $nb_colonnes == 0 or $j == $nb_cellules ){

    echo "</tr>";

    }

    }

    echo "</table>";

    }

    }

    ?>

    <?

    $nb = 30; //nombre d'enregistrement par page

    if (!isset($_GET['start'])) {$start=0;} else {$start = $_REQUEST['start'];}

    // Récupération et affichage des données

    $sql = "SELECT p.id, p.reference, p.nom, p.promotion, p.descriptif, p.description, p.image1, p.prix, p.on_special, pc.categorie_id FROM peel_produits p, peel_produits_categories pc WHERE p.id = pc.produit_id AND pc.categorie_id = $catid AND p.etat = 1 ORDER BY p.prix LIMIT $start,$nb";

    $result=mysql_query($sql);

    if (mysql_num_rows($result) == 0) {

    if (mysql_num_rows($qid_c) == 0) {

    echo "aucun produit disponible dans cette catégorie";

    }

    } else {

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";

    while($prod=mysql_fetch_array($result))

    {

    ?>

    <tr>

    <td class="normal" valign="top">

    <? if ($prod['image1'] != "") { ?>

    <img src="<?=$repertoire_images?>/<?=$prod['image1'] ?>" valign="top" width="100" alt="" />

    <?} else {?>

    <img src="<?=$wwwroot?>/images/photo-non-disponible.gif" align="left" valign="top" width="100%" alt="" />

    <?}?>

    </td>

    <td class="normal">

    <span class=petit>Réf. : <?=$prod['reference'] ?></span><br />

    <a class="titre" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>"><?echo stripslashes($prod['nom']) ?></a><br />

    <?

    echo stripslashes($prod['descriptif'])."<br />";

    $prix = $prod['prix'] * (1-$prod['promotion']/100);

    if ($prod['promotion'] != 0) {?>

    <font color="#CC0000">Promotion : <? echo $prod['promotion']; ?> %</font><br />

    Prix TTC : <s><?=fprix($prod['prix']); ?></s>&nbsp;

    <font color="#CC0000"><?=fprix($prix); ?> € TTC</font><br />

    <? } else {?>

    Prix : <font color="#CC0000"><?=fprix($prix); ?> € T.T.C</font><br />

    <? } ?>

    <form method="post" action="<?=$wwwroot?>/achat/caddie_ajout.php" name="ajout<?=$prod['id'] ?>">

    Quantité :

    <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="<?=$prod['id'] ?>" />

    <a class="normal" href="java script:document.ajout<?=$prod['id'] ?>.submit()">

    <img src="<?=$wwwroot?>/images/caddie.gif" align=middle alt="" border="0" />

    </a>

    <a class="normal" href="java script:document.ajout<?=$prod['id'] ?>.submit()">

    Ajouter au caddie

    </a>

    | <a class="normal" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>">

    <img src="<?=$wwwroot?>/images/voir.gif" align="middle" width="20" height="20" alt="" border="0" /></a>

    <a class="normal" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>">+ de détails</a><p>

    </form>

    </td></tr>

    <tr>

    <td align="center" class="normal" colspan="2">

    <?

    }

    //Boutons précédent et suivant

    if($start)

    {echo("<a class=\"petit\" href=\"$wwwroot/achat/index.php?catid=".$catid."&start=".($start-$nb)."\">Page pr&eacute;c&eacute;dente</a>");}

    $result=mysql_query("SELECT COUNT(*) FROM peel_produits p, peel_produits_categories pc WHERE p.id = pc.produit_id AND pc.categorie_id = $catid AND p.etat = 1");

    $row=mysql_fetch_row($result);

    if($row[0]>($start+$nb))

    {

    if($start)

    {echo(" / ");}

    echo("<a class=\"petit\" href=\"$wwwroot/achat/index.php?catid=".$catid."&start=".($start+$nb)."\">Page suivante</a>");

    }

    echo("<br />");

    //Affichage des pages

    if($row[0]>$nb) {// le nombre d'enreg. est > au nb de lignes d'affichage ?

    echo("Page :&nbsp;");

    for($index=0;($index*$nb)<$row[0];$index++) // oui alors on affiche les numéros de pages

    {

    ?>

    <b><a class="petit" href="<?=$_SERVER['PHP_SELF']."?catid=".$catid."&start=".$index*$nb; ?>"><? echo $index+1; ?></a></b>

    <?

    }

    }

    echo "</td></tr></table>";

    }

    include("$repertoire_modele/bas.php");

    /******************************************************************************

    * FONCTIONS

    *****************************************************************************/

    function recupere_sous_categorie($catid=0) {

    /* Récupère le nom et la description de toutes les sous-catégories de celle-ci */

    $qid = mysql_query("SELECT id, nom, description, parent_id FROM peel_categories WHERE parent_id = $catid AND id > 0 AND etat = 1") or DIE('Une erreur de connexion à la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    return $qid;

    }

    ?>


  2. :huh: bonsoir au bonjour ,

    voila maintenant le prbleme c'est la catergorie administre qui as touts les petits erreurs de flappe possible je deja esseyer

    de trouve un logiciel open source pour faire des corections automatique mais rien.

    connais tu un logiciel pour analyser les ligns de codes ?

    merci et un bises bien tendre dsl


  3. mais la Liste des sous catégories s'aficher et ligner

    Liste des sous catégories :

    ° ENVELOPPES ET POCHETTES

    ° PAPIERS

    ° AGENDAS ET CALENDRIES

    ° ECRITURE ET CORRECTION

    et je voudrais les metres un acotes des autres commeca

    Liste des sous catégories :

    ° ENVELOPPES ET POCHETTES ° PAPIERS

    ° AGENDAS ET CALENDRIES ° ECRITURE ET CORRECTION

    donc comment proceder a la modif dans mon achat/index au ailleurs merci d'avance paulanna


  4. VOICI LE CODE DE PEEL SHOPING 2.9 (achat/index.php) je sais pas comment le modifier aidez moi stp

    <?

    include("../configuration.inc.php");

    if (!isset($_GET['catid'])) { $catid = 0;} else {$catid = intval($_GET['catid']);}

    $qid_c = recupere_sous_categorie($catid);

    $DOC_TITLE = "[PEEL.FR]";

    include("$repertoire_modele/haut.php");

    ?>

    <div class="petit" style="border-bottom: 1px dotted grey;"><? affiche_arbre_categorie($catid) ?></div>

    <?

    $sqlcat = "SELECT image, description FROM peel_categories WHERE id = '".$catid."'";

    $rescat = mysql_query($sqlcat);

    $objcat = mysql_fetch_object($rescat);

    if ($rescat) {

    if (mysql_num_rows($rescat) > 0) {

    echo "<div align=\"center\" class=\"normal\">";

    if (!empty($objcat->image)) {

    echo "<img src=\"$wwwroot/upload/".$objcat->image."\" width=\"150\" align=\"center\">";

    }

    echo "<br /><br >".stripslashes($objcat->description);

    echo "</div>";

    }

    }

    if ($qid_c) {

    if (mysql_num_rows($qid_c) == 0) {

    echo "";

    } else {

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr valign=\"top\"><td class=\"normal\">";

    echo "<strong>Liste des sous cat&eacute;gories :</strong>";

    echo "</td></tr>";

    while ($cat = mysql_fetch_array($qid_c)) { ?>

    <tr valign="top"><td class="normal">

    <li><a class="normal" href="<?=$_SERVER['PHP_SELF']?>?catid=<?=$cat['id'] ?>"><?=$cat['nom'] ?></a></li>

    </td></tr>

    <? }

    echo "<tr><td><img src=$wwwroot/images/blank.gif width=\"1\" height=\"10\" border=\"0\" alt=\"\" /></td></tr></table>";

    }

    } else {

    echo "";

    }

    ?>

    <?

    $nb = 30; //nombre d'enregistrement par page

    if (!isset($_GET['start'])) {$start=0;} else {$start = $_REQUEST['start'];}

    // R&eacute;cup&eacute;ration et affichage des donn&eacute;es

    $sql = "SELECT p.id, p.reference, p.nom, p.promotion, p.descriptif, p.description, p.image1, p.prix, p.on_special, pc.categorie_id FROM peel_produits p, peel_produits_categories pc WHERE p.id = pc.produit_id AND pc.categorie_id = $catid AND p.etat = 1 ORDER BY p.prix LIMIT $start,$nb";

    $result=mysql_query($sql);

    if (mysql_num_rows($result) == 0) {

    if (mysql_num_rows($qid_c) == 0) {

    echo "aucun produit disponible dans cette cat&eacute;gorie";

    }

    } else {

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";

    $nb_cellules = mysql_num_rows($result);

    $nb_colonnes = 2;

    $j = 0;

    while($prod=mysql_fetch_array($result))

    {

    if ( $j % $nb_colonnes == 0 ) {

    echo "<tr valign=\"top\">";

    }

    if($j % $nb_colonnes !=0 OR $j % $nb_colonnes == 0 ) {

    if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) { echo "<td class=\"newsCelluleOne\" valign=\"top\" width=\"50%\">"; } else { echo "<td class=\"newsCelluleTwo\" valign=\"top\" width=\"50%\">"; }

    ?>

    <table align="center" border="0" cellspacing="0" cellpadding="3" width="100%">

    <tr>

    <td class="normal" valign="top">

    <? if ($prod['image1'] != "") { ?>

    <img src="<?=$repertoire_images?>/<?=$prod['image1'] ?>" valign="top" width="100" alt="" />

    <?} else {?>

    <img src="<?=$wwwroot?>/images/photo-non-disponible.gif" align="left" valign="top" width="100%" alt="" />

    <?}?>

    </td>

    <td class="normal">

    <span class=petit>R&eacute;f. : <?=$prod['reference'] ?></span><br />

    <a class="titre" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>"><?echo stripslashes($prod['nom']) ?></a><br />

    <?

    echo stripslashes($prod['descriptif'])."<br />";

    $prix = $prod['prix'] * (1-$prod['promotion']/100);

    if ($prod['promotion'] != 0) {?>

    <font color="#CC0000">Promotion : <? echo $prod['promotion']; ?> %</font><br />

    Prix TTC : <s><?=fprix($prod['prix']); ?></s>&nbsp;

    <font color="#CC0000"><?=fprix($prix); ?> &euro; TTC</font><br />

    <? } else {?>

    Prix : <font color="#CC0000"><?=fprix($prix); ?> &euro; T.T.C</font><br />

    <? } ?>

    <form method="post" action="<?=$wwwroot?>/achat/caddie_ajout.php" name="ajout<?=$prod['id'] ?>">

    Quantit&eacute; :

    <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="<?=$prod['id'] ?>" />

    <a class="normal" href="java script:document.ajout<?=$prod['id'] ?>.submit()">

    <img src="<?=$wwwroot?>/images/caddie.gif" align=middle alt="" border="0" />

    </a>

    <a class="normal" href="java script:document.ajout<?=$prod['id'] ?>.submit()">

    Ajouter au caddie

    </a>

    | <a class="normal" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>">

    <img src="<?=$wwwroot?>/images/voir.gif" align="middle" width="20" height="20" alt="" border="0" /></a>

    <a class="normal" href="<?echo $wwwroot?>/achat/produit_details.php?id=<?=$prod['id'] ?>&catid=<?=$catid?>">+ de d&eacute;tails</a><p>

    </form>

    </td></tr>

    </table>

    <?php

    }

    echo "</td>";

    $j++;

    if ( $j % $nb_colonnes == 0 OR $j == $nb_cellules ) {

    echo "</tr>";

    }

    }

    ?>

    <tr>

    <td align="center" class="normal" colspan="2">

    <?

    }

    //Boutons pr&eacute;c&eacute;dent et suivant

    if($start)

    {echo("<a class=\"petit\" href=\"$wwwroot/achat/index.php?catid=".$catid."&start=".($start-$nb)."\">Page pr&eacute;c&eacute;dente</a>");}

    $result=mysql_query("SELECT COUNT(*) FROM peel_produits p, peel_produits_categories pc WHERE p.id = pc.produit_id AND pc.categorie_id = $catid AND p.etat = 1");

    $row=mysql_fetch_row($result);

    if($row[0]>($start+$nb))

    {

    if($start)

    {echo(" / ");}

    echo("<a class=\"petit\" href=\"$wwwroot/achat/index.php?catid=".$catid."&start=".($start+$nb)."\">Page suivante</a>");

    }

    echo("<br />");

    //Affichage des pages

    if($row[0]>$nb) {// le nombre d'enreg. est > au nb de lignes d'affichage ?

    echo("Page :&nbsp;");

    for($index=0;($index*$nb)<$row[0];$index++) // oui alors on affiche les num&eacute;ros de pages

    {

    ?>

    <b><a class="petit" href="<?=$_SERVER['PHP_SELF']."?catid=".$catid."&start=".$index*$nb; ?>"><? echo $index+1; ?></a></b>

    <?

    }

    }

    echo "</td></tr></table>";

    //}

    include("$repertoire_modele/bas.php");

    /******************************************************************************

    * FONCTIONS

    *****************************************************************************/

    function recupere_sous_categorie($catid=0) {

    /* R&eacute;cup&egrave;re le nom et la description de toutes les sous-cat&eacute;gories de celle-ci */

    $qid = mysql_query("SELECT id, nom, description, parent_id FROM peel_categories WHERE parent_id = $catid AND id > 0 AND etat = 1") or DIE('Une erreur de connexion &agrave; la base s est produite ' . __LINE__ . '.<p>' . MYSQL_ERROR());

    return $qid;

    }

    ?>

    MERCI POUR VOTRE AIDE

Twitter Advisto ecommerce

Facebook PEEL Shopping