Flux d’activité

Flux d’activité de Messages

  1. 3DVF


    En recopiant ton code j'ai cela

    Je n'affiche pas les warning, donc forcément :)

    Il nous reste du pai nsur la planche :)

    L'ajout dans recherche.php :

    // Insertion Tag de recherche
    $query = "SELECT COUNT(*) FROM tag_cloud WHERE tag_name = '$motclef'";
    $result = mysql_query($query);
    $enr = mysql_fetch_array($result);
    //echo "Nb de Lien : ".$enr[0]."";
    if($enr[0] != ""){
    if($enr[0] == 0 ){
    $sql = "INSERT INTO `tag_cloud` (`id`, `tag_name`,`nbsearch`) VALUES ('', '$motclef','1')";
    mysql_query($sql) or die(mysql_error());
    //echo "Ajout de ".$motclef."";
    }else{
    $query = "SELECT * FROM tag_cloud WHERE tag_name = '$motclef'";
    $result = mysql_query($query);
    while ( $champ = mysql_fetch_array($result) )
    {
    //echo 'Resultat: '.$champ[id].' | '.$champ[tag_name].' - "'.$champ[nbsearch]."\" \n" ;
    $id = $champ[id];
    $nb_search = $champ[nbsearch];
    $nb_search++;
    //echo "Increment de ".$motclef." - ".$nbsearch."";
    $sql = "UPDATE `tag_cloud` SET `nbsearch` = '$nb_search' WHERE `id` = $id LIMIT 1";
    mysql_query($sql) or die(mysql_error());
    }
    }
    }
    // Fin Insertion[/codebox]

  2. noya_m


    En recopiant ton code j'ai cela

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\1_gisserot\tag.php:6) in c:\program files\easyphp1-8\www\1_gisserot\configuration.inc.php on line 81

    Notice: Undefined variable: tags in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 33

    Warning: array_values(): The argument should be an array in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 33

    Warning: Wrong parameter count for max() in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 33

    Notice: Undefined variable: tags in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 34

    Warning: array_values(): The argument should be an array in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 34

    Warning: Wrong parameter count for min() in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 34

    Warning: Invalid argument supplied for foreach() in c:\program files\easyphp1-8\www\1_gisserot\tag.php on line 54

  3. 3DVF


    http://www.3dvf.fr/tag.php voila mon test, normalement le tableau est limité a 180 pixel de large, mais si des mots trop long apparaissent, le tableau s'éllargi!!! Comment faire?

    Merci

    Le code :

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Document sans titre</title>
    <style> .nuage {line-height:25px;font: normal small verdana, arial, helvetica, sans-serif; text-align: justify; border:1px solid #B6CDE1; padding:10px; position:relative} .nuage a {text-decoration:none} .nuage a:hover {color: white; background-color: #668AA8;} .nuage a.level0 {font-size:6px;color:#DFDFDF;} .nuage a.level1 {font-size:8px;color:#B8C9D6;} .nuage a.level2 {font-size:10px;color:#668AA8;} .nuage a.level3 {font-size:12px;color:#47657B;} .nuage a.level4 {font-size:14px;color:#E76300;} .nuage a.level5 {font-size:16px;color:#E76300;} .nuage a.level6 {font-size:18px;color:#E76300;} .nuage a.level7 {font-size:20px;color:#E76300;} .nuage a.level8 {font-size:22px;color:#E76300;} .nuage a.level9 {font-size:24px;color:#E76300;font-weight: bold} .nuage a.level10 {font-size:26px;color:#FF3300;font-weight: bold} </style></head><body topmargin="0" leftmargin="0" alink="#ff9900" bgcolor="#ffffff" link="#e86519" marginheight="0" marginwidth="0" text="#000000" vlink="#6e003a">
    <?php
    include("configuration.inc.php");
    // N'oubliez pas de vous connectez à votre base de données
    // Afin d'adapter le code à votre site internet, il vous suffit de modifier 3 choses :
    // col est le nom du champs représentant le Tag Cloud
    // ID est la clé primaire
    // MA_TABLE est le nom de ma base de données
    $query = "SELECT tag_name AS tag, nbsearch AS quantity FROM tag_cloud GROUP BY tag_name ORDER BY tag_name ASC";
    $result = mysql_query($query);

    // Boucle à travers les résultats afin de les mettres dans un simple tableau:
    // $tag['col1'] = 12;
    // $tag['col2'] = 25;
    // etc. Ceci nous permetteras de calculer la taille de chacun d'entre eux.
    while ($row = mysql_fetch_array($result)) {
    $tags[$row['tag']] = $row['quantity'];
    }

    // Taille maximal - Taille minimal
    $max_size = 250; // max font size en %
    $min_size = 100; // min font size en %


    // Obtenir la plus petit valeur et la plus grande du tableau
    $max_qty = max(array_values($tags));
    $min_qty = min(array_values($tags));


    // Déterminer l'étendu des valeurs
    $spread = $max_qty - $min_qty;
    if (0 == $spread) { // we don't want to divide by zero
    $spread = 1;
    }


    // Détermine l'incrémentation du font-size
    $step = ($max_size - $min_size)/($spread);

    ?>
    <table width="180" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
    <div class="nuage" style="margin: 0pt auto; line-height: 25px;"><font face="arial,helvetica,sans-serif" size="3">
    <?
    // Boucle à travers le tableau
    foreach ($tags as $key => $value) {

    // Calcul du font-size CSS
    // trouvez les valeur supérieurs au $min_qty
    // multiplier par la valeur de l'incrémentatiion ($size)
    // et ajouter la valeur du minimum ($min_size)
    $size = $min_size + (($value - $min_qty) * $step);

    // Afin de terminer le script, il vous suffit de modifier les caractères
    // '####' par le lien de destination voulu.

    echo '<a href="http://www.3dvf.fr/achat/recherche.php?motclef='.$key.'" style="font-size: '.$size.'%"';
    echo ' title="'.$value.' recherche(s) sur le mot '.$key.'"';
    echo '>'.$key.'</a> ';
    }


    ?>
    </font></div>
    </td>
    </tr>
    </table>
    </body>
    </html>[/codebox]

    La table SQL :

    [codebox]CREATE TABLE `tag_cloud` (
    `id` int(11) NOT NULL auto_increment,
    `tag_name` varchar(100) NOT NULL default '',
    `nbsearch` int(11) NOT NULL default '0',
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=55 ;

  4. benito


    Une solution:

    1) tu créés un nouvel utilisateur AVEC LE MOT DE PASSE QUE TU VEUX

    2) tu vas dans ta BDD sur le nouveau profil et tu copies le mot de passe crypté

    3) tu colles ce mot de passe sur le profil qu etu veux réinitialiser

    4) tu tentes de te loguer avec le profil et le nouveau mot de passe

    Willy

    Cette solution marche très bien...

    Merci beaucoup.

    Benoit

  5. john11400


    Dans achat/modele/achat_confirmatio, j'ai modifié ceci :

    while ($prod = mysql_fetch_array($qid)) {

    $quantite = $_SESSION['caddie']->articles[$prod['id']];

    $promotion = $prod['promotion'] ;

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

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

    $total_ttc = $prix * $quantite;

    $total_ht = $prix_ht * $quantite;

    $ensemble_total_ht += $total_ht;

    $ensemble_total_ttc += $total_ttc;

    $tva = $ensemble_total_ttc - $ensemble_total_ht;

    switch ($transport) {

    case "normal" :

    $expedition = $normal;

    break;

    case "express" :

    $expedition = $express;

    break;

    }

    ?>

    <tr>

    <td class="normal"><?php echo $prod['reference'] ?></td>

    <td class="normal">

    <?php echo $prod['nom'] ?>

    </td>

    <td class="normal" align="right">

    <?php

    echo fprix($prix)." &euro; ";

    if ($promotion != 0) { echo "(- ".$promotion." % )"; }

    ?>

    </td>

    <td class="normal" align="center"><?php echo $quantite?></td>

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

    <?php echo fprix($total_ttc) ?> €

    </td>

    </tr>

    <?php } ?>

    <tr>

    <td colspan="4"></td>

    <td colspan="2"><hr size=1></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right"">Total H.T. :</td>

    <td class="normal" align="right"><b><?php echo fprix($ensemble_total_ht) ?></b></td>

    <td class="normal"><b>€ </b></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">TVA :</td>

    <td class="normal" align="right"><b><?php echo fprix($tva) ?></b></td>

    <td class="normal"><b>&euro;</b></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">Frais d'expédition :</td>

    <td class="normal" align="right"><b><?php echo $expedition; ?></b></td>

    <td class="normal">&euro;</td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">Total T.T.C :</td>

    <td class="normal" align="right"><b>

    <?php

    $caddie_total = $ensemble_total_ttc + $expedition;

    Par :

    while ($prod = mysql_fetch_array($qid)) {

    $quantite = $_SESSION['caddie']->articles[$prod['id']];

    $promotion = $prod['promotion'] ;

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

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

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

    $total_ttc = $prix * $quantite;

    $total_ht = $prix_ht * $quantite;

    $ensemble_total_ht += $total_ht;

    $ensemble_total_ttc += $total_ttc;

    $tva = $ensemble_total_ttc - $ensemble_total_ht - $ecotaxe_ht;

    switch ($transport) {

    case "normal" :

    $expedition = $normal;

    break;

    case "express" :

    $expedition = $express;

    break;

    }

    ?>

    <tr>

    <td class="normal"><?php echo $prod['reference'] ?></td>

    <td class="normal">

    <?php echo $prod['nom'] ?>

    </td>

    <td class="normal" align="right">

    <?php

    echo fprix($prix)." &euro; ";

    if ($promotion != 0) { echo "(- ".$promotion." % )"; }

    ?>

    </td>

    <td class="normal" align="center"><?php echo $quantite?></td>

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

    <?php echo fprix($total_ttc) ?> €

    </td>

    </tr>

    <?php } ?>

    <tr>

    <td colspan="4"></td>

    <td colspan="2"><hr size=1></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right"">Total H.T. :</td>

    <td class="normal" align="right"><b><?php echo fprix($ensemble_total_ht) ?></b></td>

    <td class="normal"><b>€ </b></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right"">Ecotaxe H.T. :</td>

    <td class="normal" align="right"><b><?php echo fprix($ecotaxe_ht) ?></b></td>

    <td class="normal"><b>€ </b></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">TVA :</td>

    <td class="normal" align="right"><b><?php echo fprix($tva) ?></b></td>

    <td class="normal"><b>&euro;</b></td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">Frais d'expédition :</td>

    <td class="normal" align="right"><b><?php echo $expedition; ?></b></td>

    <td class="normal">&euro;</td>

    </tr>

    <tr>

    <td colspan="4" class="label" align="right">Total T.T.C :</td>

    <td class="normal" align="right"><b>

    <?php

    $caddie_total = $ensemble_total_ttc + $expedition;

    Mais j'ai un probleme, dans les calculs, j'ai ajouté l'ecotaxe, ca fonctionne pour un produit et seulement 1

    Si j'augmente son nombre , l'ecotaxe n'est pas multiplié

    Si j'ajoute un autre produit, c'est l'ecotaxe de ce produit qui est calculé.

    Pour voir un exemple: www.discountfolies.fr/boutique

  6. Willy


    Vite fait alors:

    - il faut regarder dans le caddie si tous les produits présents dans le caddie sont a télacharger, si oui, on préremplis le type d'expédition, pour le pays, il peut y avoir des soucis de TVA je pense. Ensuite, l'utilisateur n'aura qu'a cliquer sur commander.

    Sinon jouer avec le poids du colis ert le mettre a 0 pour les produits à témécharger et si poids total = 0, on fait comme d'écrit ci-dessus.

    - je n'utilise pas les produist numériques, mais il doit y avoir une qté dans la commande, apres dans le module des produits numériques... Je ne sais pas.

    Willy

  7. atila-diffusion


    1) Créé un champs comptage dans ta table où tu stocks tes mots recherchés

    2) Il faudrait que tu regardes en premier si la recherche a déja été effectuée.

    Si oui, tu mets à jour le compteur en ajoutant 1 au comptage

    Si non tu créés un enregistrement avec un comptage de 1

    3) A l'affichage tu sélectionnes la zone comptage plutot que de faire un count

    Willy

    ouaip, ce que je dis, avec des chiffres devant :)

Twitter Advisto ecommerce

Facebook PEEL Shopping