Your IP : 18.224.252.183
Current Path : /home/meharicl/ |
|
Current File : /home/meharicl/commissiontobase.php |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>MCDF</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="HAPedit 3.1">
<body bgcolor="#FF8000">
<center><img src="/fait3-3/site_logo.gif" alt="MCDF" width="512" /></center>
<hr />
</head>
<body bgcolor="#FFFFFF">
<?
echo("<center><b><big>Taitement en cours</big></b></center>");
//var_dump($_POST);
$link_kananas = mysqli_connect("meharicltest.mysql.db", "meharicltest", "Pva131254", "meharicltest");
$dhm=date("Y-m-d H:i:s" );
$op_id=$_POST['id_op'];
$id_forum=$_POST['id_membre'];
$tarif=$_POST['tarif'];
$T=$_POST['T'];
///****fait stripe_ticket }
$sql="INSERT INTO `stripe_ticket` (`id_tk`, `id_forum`, `id_kananas`, `id_op`, `DHM_creation`) VALUES (NULL, ".$id_forum.", NULL, ".$op_id.",'".$dhm."');";
//echo($sql."<br>");
$link_kananas->query($sql);
//echo("<br>".$sql);
$sql="SELECT MAX(`id_tk`) FROM `stripe_ticket`";
$link_kananas->query($sql);
$result=$link_kananas->query($sql);
while($max=$result->fetch_assoc()) {
$id_ticket=$max['MAX(`id_tk`)'];
}
$sql="UPDATE `stripe_ticket` SET `tarif` = '".$tarif."' WHERE `stripe_ticket`.`id_tk` = ".$id_ticket;
$link_kananas->query($sql);
//echo($id_ticket."*********************************<br>");
//fait stripe_vente
$l=0;
for ($i=0;$i<$_POST['q_vente'];$i++){
$id_pr=$_POST['id_oph'.$i];
$q_pr=$_POST['QH'.$i];
$q_pu=$_POST['PUH'.$i];
//echo("<br>**".$id_pr."--".$q_pr);
if($q_pr>0){
if($q_pu*1>0){$l++;}
$sql="INSERT INTO `stripe_vente` (`id_vt`, `id_ticket`, `id_produit`, `q_produit` ) VALUES (NULL, ".$id_ticket.", '".$id_pr."', '".$q_pr."' );";
//echo($sql);
$link_kananas->query($sql); //echo($sql);
}
}
//var_dump($_POST);
//echo("****************".$l);
if(($l>0)&&($_POST["mode_paiement"]=="CB")){
echo('
/<script>
window.location.assign("create-checkout-session.php");
</script>
');
}
if(($l>0)&&($_POST["mode_paiement"]=="espece")){
echo('
/<script>
window.location.assign("success.php?ticket='.$id_ticket.'®lement=espece");
</script>
');
}
if(($l>0)&&($_POST["mode_paiement"]=="papier")){
echo('
/<script>
window.location.assign("identite_papier.php?ticket='.$id_ticket.'®lement=papier");
</script>
');
}
echo('
/<script>
window.location.assign("success.php?ticket='.$id_ticket.'®lement=cheque");
</script>
');
//ticket=".$ticket_id;
?>
</body>
</html>