Bien le bonsoir.
J'aurais besoin d'une petite aide. J'ai installé l'ItemShop du FR mais malheureusement il y a un petit bug ... Au moment de l'achat, l'argent n'est pas débité sur le compte. Voici la partie concerné:
<?php
$get_pos = mysql_query("SELECT pos from player.item where owner_id='".$_SESSION['acc_id']."' AND `window` = 'MALL' ORDER BY id DESC");
$pos = mysql_fetch_array($get_pos);
$poss = $pos['pos'];
$add_poss = 1;
if($info['coins'] >= $item['pret'] && $poss == 0){
$data = date('Y-m-d H:i:s');
// LOG
mysql_query("INSERT INTO account.log_buyishop (nume_cumparator, item_cumparat, data_cumpararii) VALUES ('$user_id', '$items', '$data')");
// Scădem Coins
mysql_query("UPDATE account.account SET `coins` = `coins` - ".$item['pret']." WHERE `login` = '$user_id'");
// Adăugăm JD
mysql_query("UPDATE account.account SET `jcoins` = `jcoins` + ".$item['pret']." WHERE `login` = '$user_id'");
// Insertăm Item-ul
mysql_query("INSERT INTO player.item
(owner_id,window,pos,count,vnum,attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2)
VALUES
('$id_username','MALL','$add_poss','1','".$item['vnum']."','".$item['attrtype0']."', '".$item['attrvalue0']."', '".$item['attrtype1']."', '".$item['attrvalue1']."', '".$item['attrtype2']."', '".$item['attrvalue2']."', '".$item['attrtype3']."', '".$item['attrvalue3']."', '".$item['attrtype4']."', '".$item['attrvalue4']."', '".$item['attrtype5']."', '".$item['attrvalue5']."', '".$item['attrtype6']."', '".$item['attrvalue6']."', '".$item['socket0']."', '".$item['socket1']."', '".$item['socket2']."')");
?>
J'ai regardé en haut de la page, il importe le fichier:
include("functions.inc.php");
Or, je n'ai pas ce fichier dans le pack. Donc j'aimerais savoir si quelqu'un saurait déclarer cette fonction. A mon avis, c'est ça qui pose problème: .$item['pret'].
C'est le prix de l'item ...