1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <script src="jquery191.js"></script>
<script type="text/javascript" language="javascript">
jQuery(function($){
//Lorsque vous cliquez sur un lien de la classe poplight
$('a.poplight').on('click', function() {
var popID = $(this).data('rel'); //Trouver la pop-up correspondante
var popWidth = $(this).data('width'); //Trouver la largeur
var popHeight = $(this).data('height'); //Trouver la largeur
var custom = $(this).data('rel2'); //Trouver l'id
//Faire apparaitre la pop-up et ajouter le bouton de fermeture
$('#' + popID).fadeIn().css({'customers_id':custom, 'width': popWidth, 'height': popHeight}).prepend('<a href="#" class="close"><img src="close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>');
alert(custom)//recup des données
//Récupération du margin, qui permettra de centrer la fenêtre - on ajuste de 80px en conformité avec le CSS
var popMargTop = ($('#' + popID).height() + 40) / 2;
var popMargLeft = ($('#' + popID).width() + 80) / 2;
//Apply Margin to Popup
$('#' + popID).css({
'margin-top' : -popMargTop,
'margin-left' : -popMargLeft
});
//Apparition du fond - .css({'filter' : 'alpha(opacity=80)'}) pour corriger les bogues d'anciennes versions de IE
$('body').append('<div id="fade"></div>');
$('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn();
return false;
});
//Close Popups and Fade Layer
$('body').on('click', 'a.close, #fade', function() { //Au clic sur le body...
$('#fade , .popup_block').fadeOut(function() {
$('#fade, a.close').remove();
}); //...ils disparaissent ensemble
return false;
});
});
</script>
<tr>
<div id="popup3" class="popup_block">
<?php
//======================================================== récup des données ==============================================================
$variableToto = $_POST['custom'];
echo "test" .$variableToto ;
$cust_id=$_GET['custom'];
echo 'test '. $cust_id;
//echo json_encode($code);
echo 'test' .$custom=$_GET['customers_id'];
$customer_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_id = '" . $cust_id . "'");
$customer = tep_db_fetch_array($customer_query); |
Partager