form_cb_expl=$form_cb_expl; if($form_cb_expl) { $expl_ajout_ok = 1 ; $query = "select expl_id from exemplaires where expl_cb='$form_cb_expl'"; $result = mysql_query($query, $dbh); if(!mysql_num_rows($result)) { // exemplaire inconnu $param->message_ajout_expl = $msg[367]; $expl_ajout_ok = 0 ; } else { $expl_trouve = mysql_fetch_object($result); $item = $expl_trouve->expl_id; $param->expl_id=$expl_trouve->expl_id; if($stuff = get_expl_info($item)) { $param->expl_notice=$stuff->expl_notice; $param->titre=$stuff->titre; $stuff = check_pret($stuff); } else { $param->message_ajout_expl = $msg[395]; $expl_ajout_ok = 0 ; } } } if ($expl_ajout_ok) $res_ajout = $myCart->add_item($item,"EXPL"); else $res_ajout = $myCart->add_item_blob($form_cb_expl,"EXPL_CB" ); $myCart->compte_items(); // form de saisie cb exemplaire if ($expl_ajout_ok) { if ($res_ajout==CADDIE_ITEM_OK) { $param->message_ajout_expl = $msg["caddie_".$myCart->type."_added"]; } if ($res_ajout==CADDIE_ITEM_NULL) { $param->message_ajout_expl = $msg[caddie_item_null]; } if ($res_ajout==CADDIE_ITEM_IMPOSSIBLE_BULLETIN) { $param->message_ajout_expl = $msg[caddie_pointe_item_impossible_bulletin]; } } break; default: break; } } $param->nb_item=$myCart->nb_item; $param->nb_item_pointe=$myCart->nb_item_pointe; $param->nb_item_base=$myCart->nb_item_base; $param->nb_item_base_pointe=$myCart->nb_item_base_pointe; $param->nb_item_blob=$myCart->nb_item_blob; $param->nb_item_blob_pointe=$myCart->nb_item_blob_pointe; $array[0]=$param; $buf_xml = array2xml($array); ajax_http_send_response("$buf_xml","text/xml");