1
This commit is contained in:
parent
6db522bf78
commit
ac90da3c39
@ -597,14 +597,12 @@ class EquipController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$active_time = $row['active_time'];
|
$active_time = $row['active_time'];
|
||||||
if ($active_time + $sub_time <= time()) {
|
if ($active_time + $sub_time <= time() ||
|
||||||
|
$active_time + $row['sub_time'] <= time() + 30) {
|
||||||
$active_time = 0;
|
$active_time = 0;
|
||||||
$sub_time = 0;
|
$sub_time = 0;
|
||||||
$flag = 1;
|
$flag = 1;
|
||||||
}
|
}
|
||||||
// if ($sub_time == 0) {
|
|
||||||
// $flag = 1;
|
|
||||||
// }
|
|
||||||
$retEquip = $conn->execScript('UPDATE equip SET active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time ' .
|
$retEquip = $conn->execScript('UPDATE equip SET active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time ' .
|
||||||
' WHERE accountid=:accountid AND id=:id;',
|
' WHERE accountid=:accountid AND id=:id;',
|
||||||
array(
|
array(
|
||||||
|
@ -227,6 +227,7 @@ class ShopController{
|
|||||||
$active_time = $user_db['active_time'];
|
$active_time = $user_db['active_time'];
|
||||||
$nowTime = phpcommon\getdayseconds(time());
|
$nowTime = phpcommon\getdayseconds(time());
|
||||||
$passed_days = floor(($nowTime - phpcommon\getdayseconds($user_db['active_time'])) / (3600 * 24));
|
$passed_days = floor(($nowTime - phpcommon\getdayseconds($user_db['active_time'])) / (3600 * 24));
|
||||||
|
//$passed_days = 2;
|
||||||
if ($passed_days >= 1) {
|
if ($passed_days >= 1) {
|
||||||
for ($i = 1; $i <= count($shop_conf); $i++) {
|
for ($i = 1; $i <= count($shop_conf); $i++) {
|
||||||
if ($shop_conf[$i]['isrefresh'] == 0) {
|
if ($shop_conf[$i]['isrefresh'] == 0) {
|
||||||
@ -359,7 +360,8 @@ class ShopController{
|
|||||||
'coin_nums' => $coin_num,
|
'coin_nums' => $coin_num,
|
||||||
'diamond_nums' => $diamond_num,
|
'diamond_nums' => $diamond_num,
|
||||||
'item_list' => $item_list,
|
'item_list' => $item_list,
|
||||||
'all_item_list' => $all_item_list
|
'all_item_list' => $all_item_list,
|
||||||
|
'id' => $id,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user