33 lines
532 B
PHP
33 lines
532 B
PHP
<?php
|
|
|
|
include './sc.php';
|
|
|
|
|
|
|
|
$id = $_POST['id'];
|
|
|
|
$qq = $user.'@qq.com';
|
|
|
|
if (!file_get_contents('./products/'.$id.'.json')) {
|
|
die("未找到商品");
|
|
}
|
|
|
|
$data = @file_get_contents('./products/'.$id.'.json');
|
|
|
|
$data = json_decode($data, true);
|
|
|
|
if ($data['hidden'] == 1) {
|
|
die("未找到商品");
|
|
}
|
|
|
|
if ($data['have'] <= 0) {
|
|
die("商品已售罄");
|
|
}
|
|
|
|
|
|
if ($bi < $data['bi'] or $Star < $data['star']) {
|
|
die('余额不足...');
|
|
}
|
|
|
|
echo '跳转中……<meta http-equiv="refresh" content="1;url=./ready_products.fx?id='.$id.'">';
|
|
?>
|