Flux d’activité

Flux d’activité de Messages

  1. 2ni


    salut encore moi dsl d'insister mais je vois pas les variables d'origine, est ce que c'est $expédition ou $transport ou autre.......? De plus le fichier lib/setup/info.inc.php est vierge, je ne sais pas si c'est normal???

    Ce que je voudrais savoir précisement, c'est un exemple de variable d'origine à changer et par quoi la changer exactement.

    dsl d'insister comme ça mais j'ai vraiment un blocage pourtant ça n'a pas l'air compliqué.

    ceci dit merci pour ta rapidité willy, a bientot :rolleyes:

  2. atila-diffusion


    oki j'ai regardé moi même..

    Alors voilà ce que ca devrait te donner

    <?php

    header('Content-type: text/xml; charset=utf-8');

    $query = "SELECT * FROM `peel_produits`";

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<results>";

    while ($article = mysql_fetch_array($result)) {

    print "<rs id='". $article['id']."' info=". $article['XXX ce que tu veux]."'>". $article['nom_fr']."</rs>";

    }

    print "</results>";

    }

    ?>

  3. noya_m


    <?php

    $aUsers = array(

    "Caramel beurre salé",

    "Altman, Alisha",

    "Archibald, Janna",

    "Auman, Cody",

    "Bagley, Sheree",

    "Ballou, Wilmot",

    "Bard, Cassian",

    "Bash, Latanya",

    "Beail, May",

    "Black, Lux",

    "Bloise, India",

    "Blyant, Nora",

    "Bollinger, Carter",

    "Burns, Jaycob",

    "Carden, Preston",

    "Carter, Merrilyn",

    "Christner, Addie",

    "Churchill, Mirabelle",

    "Conkle, Erin",

    "Countryman, Abner",

    "Courtney, Edgar",

    "Cowher, Antony",

    "Craig, Charlie",

    "Cram, Zacharias",

    "Cressman, Ted",

    "Crissman, Annie",

    "Davis, Palmer",

    "Downing, Casimir",

    "Earl, Missie",

    "Eckert, Janele",

    "Eisenman, Briar",

    "Fitzgerald, ######",

    "Fleming, Sidney",

    "Fuchs, Bridger",

    "Fulton, Rosalynne",

    "Fye, Webster",

    "Geyer, Rylan",

    "Greene, Charis",

    "Greif, Jem",

    "Guest, Sarahjeanne",

    "Harper, Phyllida",

    "Hildyard, Erskine",

    "Hoenshell, Eulalia",

    "Isaman, Lalo",

    "James, Diamond",

    "Jenkins, Merrill",

    "Jube, Bennett",

    "Kava, Marianne",

    "Kern, Linda",

    "Klockman, Jenifer",

    "Lacon, Quincy",

    "Laurenzi, Leland",

    "Leichter, Jeane",

    "Leslie, Kerrie",

    "Lester, Noah",

    "Llora, Roxana",

    "Lombardi, Polly",

    "Lowstetter, Louisa",

    "Mays, Emery",

    "Mccullough, Bernadine",

    "Mckinnon, Kristie",

    "Meyers, Hector",

    "Monahan, Penelope",

    "Mull, Kaelea",

    "Newbiggin, Osmond",

    "Nickolson, Alfreda",

    "Pawle, Jacki",

    "Paynter, Nerissa",

    "Pinney, Wilkie",

    "Pratt, Ricky",

    "Putnam, Stephanie",

    "Ream, Terrence",

    "Rumbaugh, Noelle",

    "Ryals, Titania",

    "Saylor, Lenora",

    "Schofield, Denice",

    "Schuck, John",

    "Scott, Clover",

    "Smith, Estella",

    "Smothers, Matthew",

    "Stainforth, Maurene",

    "Stephenson, Phillipa",

    "Stewart, Hyram",

    "Stough, Gussie",

    "Strickland, Temple",

    "Sullivan, Gertie",

    "Swink, Stefanie",

    "Tavoularis, Terance",

    "Taylor, Kizzy",

    "Thigpen, Alwyn",

    "Treeby, Jim",

    "Trevithick, Jayme",

    "Waldron, Ashley",

    "Wheeler, Bysshe",

    "Whishaw, Dodie",

    "Whitehead, Jericho",

    "Wilks, Debby",

    "Wire, Tallulah",

    "Woodworth, Alexandria",

    "Zaun, Jillie"

    );

    $aInfo = array(

    "Bedfordshire",

    "Buckinghamshire",

    "Cambridgeshire",

    "Cheshire",

    "Cornwall",

    "Cumbria",

    "Derbyshire",

    "Devon",

    "Dorset",

    "Durham",

    "East Sussex",

    "Essex",

    "Gloucestershire",

    "Hampshire",

    "Hertfordshire",

    "Kent",

    "Lancashire",

    "Leicestershire",

    "Lincolnshire",

    "Norfolk",

    "Northamptonshire",

    "Northumberland",

    "North Yorkshire",

    "Nottinghamshire",

    "Oxfordshire",

    "Shropshire",

    "Somerset",

    "Staffordshire",

    "Suffolk",

    "Surrey",

    "Warwickshire",

    "West Sussex",

    "Wiltshire",

    "Worcestershire",

    "Durham",

    "East Sussex",

    "Essex",

    "Gloucestershire",

    "Hampshire",

    "Hertfordshire",

    "Kent",

    "Lancashire",

    "Leicestershire",

    "Lincolnshire",

    "Norfolk",

    "Northamptonshire",

    "Northumberland",

    "North Yorkshire",

    "Nottinghamshire",

    "Oxfordshire",

    "Shropshire",

    "Somerset",

    "Staffordshire",

    "Suffolk",

    "Surrey",

    "Warwickshire",

    "West Sussex",

    "Wiltshire",

    "Worcestershire",

    "Durham",

    "East Sussex",

    "Essex",

    "Gloucestershire",

    "Hampshire",

    "Hertfordshire",

    "Kent",

    "Lancashire",

    "Leicestershire",

    "Lincolnshire",

    "Norfolk",

    "Northamptonshire",

    "Northumberland",

    "North Yorkshire",

    "Nottinghamshire",

    "Oxfordshire",

    "Shropshire",

    "Somerset",

    "Staffordshire",

    "Suffolk",

    "Surrey",

    "Warwickshire",

    "West Sussex",

    "Wiltshire",

    "Worcestershire",

    "Durham",

    "East Sussex",

    "Essex",

    "Gloucestershire",

    "Hampshire",

    "Hertfordshire",

    "Kent",

    "Lancashire",

    "Leicestershire",

    "Lincolnshire",

    "Norfolk",

    "Northamptonshire",

    "Northumberland",

    "North Yorkshire",

    "Nottinghamshire"

    );

    $input = strtolower( $_GET['input'] );

    $len = strlen($input);

    $aResults = array();

    if ($len)

    {

    for ($i=0;$i<count($aUsers);$i++)

    {

    // had to use utf_decode, here

    // not necessary if the results are coming from mysql

    //

    if (strtolower(substr(utf8_decode($aUsers[$i]),0,$len)) == $input)

    $aResults[] = array( "id"=>($i+1) ,"value"=>htmlspecialchars($aUsers[$i]), "info"=>htmlspecialchars($aInfo[$i]) );

    //if (stripos(utf8_decode($aUsers[$i]), $input) !== false)

    // $aResults[] = array( "id"=>($i+1) ,"value"=>htmlspecialchars($aUsers[$i]), "info"=>htmlspecialchars($aInfo[$i]) );

    }

    }

    header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past

    header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified

    header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1

    header ("Pragma: no-cache"); // HTTP/1.0

    if (isset($_REQUEST['json']))

    {

    header("Content-Type: application/json");

    echo "{\"results\": [";

    $arr = array();

    for ($i=0;$i<count($aResults);$i++)

    {

    $arr[] = "{\"id\": \"".$aResults[$i]['id']."\", \"value\": \"".$aResults[$i]['value']."\", \"info\": \"\"}";

    }

    echo implode(", ", $arr);

    echo "]}";

    }

    else

    {

    header("Content-Type: text/xml");

    echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><results>";

    for ($i=0;$i<count($aResults);$i++)

    {

    echo "<rs id=\"".$aResults[$i]['id']."\" info=\"".$aResults[$i]['info']."\">".$aResults[$i]['value']."</rs>";

    }

    echo "</results>";

    }

    ?>

  4. noya_m


    en gros ce que je voudrais c'est juste faire apparaitre le nom du produit

    style :

    <?php

    header('Content-type: text/xml; charset=utf-8');

    $mysql_db = @mysql_connect("localhost", "root", "root");

    @mysql_select_db("ajaxAppli");

    $query = "SELECT * FROM `peel_produits`";

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<list>";

    while ($article = mysql_fetch_array($result)) {

    print "<item>";

    print "<libele>". $article['nom_fr']."</libele>"; //===> pour l'auto suggestion (voir www.produits-bretons.fr et taper J )

    print "</item>";

    }

    print "</list>";

    }

    ?>

  5. atila-diffusion


    on transforme ca et d'autre chose

    <?php

    header('Content-type: text/xml; charset=utf-8');

    $mysql_db = @mysql_connect("localhost", "root", "root"); ===> serveur, user pass... à utiliser avec les variables globales peel

    @mysql_select_db("ajaxAppli"); ===> database à utiliser avec les variables globales peel

    $query = "SELECT * FROM `produits`"; ===> là mettre peel_produits je crois

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<list>";

    while ($article = mysql_fetch_array($result)) {

    print "<item>";

    print "<libele>".$article['libele']."</libele>"; ===> là mettre le champs nom, le reste OSEF

    print "<prix>".$article['prix']."</prix>";

    print "<descriptif>".$article['descriptif']."</descriptif>";

    print "<image>".$article['image']."</image>";

    print "</item>";

    }

    print "</list>";

    }

    @mysql_close($mysql_db);?>

  6. Willy


    <?php

    header('Content-type: text/xml; charset=utf-8');

    $mysql_db = @mysql_connect("localhost", "root", "root");

    @mysql_select_db("ajaxAppli");

    --> il existe déja une fonction de connexion à la BDD dans peel, normalement quand cette page sera appelée, l'utilisateur sera déja connecté à la base pas besoin de le reconnecter

    $query = "SELECT * FROM `produits`"; -> peel_produits

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<list>";

    while ($article = mysql_fetch_array($result)) {

    print "<item>";

    print "<libele>".$article['libele']."</libele>"; --> $article['nom_fr'] par exemple

    print "<prix>".$article['prix']."</prix>";

    print "<descriptif>".$article['descriptif']."</descriptif>"; --> $article['descriptif_fr'] par exemple

    print "<image>".$article['image']."</image>"; --> $article['image1'] par exemple

    print "</item>";

    }

    print "</list>";

    }

    @mysql_close($mysql_db);

    --> ne pas fermer la connexion à la fin

    ?>

    Apres je n'ais pa regardé ce que vous vouliez faire avec, je pensais que c'était pour la recherche auto suggestive, mais avec l'image...

    Voila,

    Willy

  7. noya_m


    bien,

    donc on peut l'adapter a peel

    <?php

    header('Content-type: text/xml; charset=utf-8');

    $mysql_db = @mysql_connect("localhost", "root", "root"); ===> on tansforme ceci et c'est tout ?

    @mysql_select_db("ajaxAppli");

    $query = "SELECT * FROM `produits`";

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<list>";

    while ($article = mysql_fetch_array($result)) {

    print "<item>";

    print "<libele>".$article['libele']."</libele>";

    print "<prix>".$article['prix']."</prix>";

    print "<descriptif>".$article['descriptif']."</descriptif>";

    print "<image>".$article['image']."</image>";

    print "</item>";

    }

    print "</list>";

    }

    @mysql_close($mysql_db);?>

  8. atila-diffusion


    pas de soucis, c'est normal, au lieu d'appeler une page.xml tu n'as qu'à appeler une page .php qui va se faire passer pour un xml

    Un exemple ? (attention, ne corrspond pas à une BDD peel

    <?php

    header('Content-type: text/xml; charset=utf-8');

    $mysql_db = @mysql_connect("localhost", "root", "root");

    @mysql_select_db("ajaxAppli");

    $query = "SELECT * FROM `produits`";

    $result = @mysql_query($query);

    if (mysql_num_rows($result) > 0) {

    print "<list>";

    while ($article = mysql_fetch_array($result)) {

    print "<item>";

    print "<libele>".$article['libele']."</libele>";

    print "<prix>".$article['prix']."</prix>";

    print "<descriptif>".$article['descriptif']."</descriptif>";

    print "<image>".$article['image']."</image>";

    print "</item>";

    }

    print "</list>";

    }

    @mysql_close($mysql_db);?>

  9. Willy


    ok merci encore et encore

    Pour la requete je devrai y arriver (quand meme) par contre lorsque que l'on ecrit dans le csv :

    fwrite($create_csv,$com['id'] (pour 'instant je n'ai qu'une seule table)

    mais si je ve " id " de peel_facture et de peel_produit comment vais-je ecrire le " $com[id] " ?

    julien

    A ce moment là tu fais un truc du genre:

    $select = "SELECT c.id as id_commande, pc.id as articke_id, ... FROM peel_commandes c, peel_commandes_articles pc WHERE ...;

    Et tu appels $com['id_commande']

    Willy

Twitter Advisto ecommerce

Facebook PEEL Shopping