add +1 year in subscript anpay.php

This commit is contained in:
Andrey Kuvshinov
2023-01-12 11:42:45 +00:00
parent ae78ea6ef6
commit 645ce50139

View File

@@ -86,7 +86,7 @@ function resultpay_kuri(){
if (isset($result['event'])) { if (isset($result['event'])) {
$shop_id = $result['object']['id']; $shop_id = $result['object']['id'];
$find_sql = "SELECT `buy_id`, `delivery_id`, `number_id` FROM `anbuy` WHERE `shop_id` = '$shop_id' LIMIT 1"; $find_sql = "SELECT `buy_id`, `delivery_id`, `number_id`, `date_end` FROM `anbuy` WHERE `shop_id` = '$shop_id' LIMIT 1";
$find_order = db_get($find_sql); $find_order = db_get($find_sql);
if (!isset($find_order['buy_id'])) { if (!isset($find_order['buy_id'])) {
@@ -98,13 +98,21 @@ function resultpay_kuri(){
$currdate = date('Y-m-d H:i:s'); $currdate = date('Y-m-d H:i:s');
if ($find_order['number_id'] == 486){
$date_end = date("Y-m-d H:i:s", strtotime("+1 year"));
}
else {
$date_end = $find_order['date_end'];
}
$supd = " $supd = "
UPDATE UPDATE
`anbuy` `anbuy`
SET SET
`buy_status` = '1', `buy_status` = '1',
`buy_active` = '1', `buy_active` = '1',
`date` = '$currdate' `date` = '$currdate',
`date_end` = '$date_end'
WHERE WHERE
`buy_id` = '{$find_order['buy_id']}'"; `buy_id` = '{$find_order['buy_id']}'";