📄 player_safe_times_processing.php
字号:
<?php
//查询拍卖物品的时间
$query_all_safe=$db->query("select * from player_safe ");
while ($list_all_safe=$db->fetch_array($query_all_safe)) {
if (time()>=$list_all_safe['s_end_times']) {
if ($list_all_safe['s_style']==1) {//士兵;
//更新用户士兵数;
$db->query("update soldier set ".$soldier_type_name_en[$list_all_safe['s_type']]."=(".$soldier_type_name_en[$list_all_safe['s_type']]."+'".$list_all_safe['s_num']."') where u_id='".$list_all_safe['u_id']."' and c_id='".$list_all_safe['c_id']."';");
//删除拍卖表记录
$db->query("delete from player_safe where id='".$list_all_safe['id']."';");
}else {//装备,物品
//根据id查询玩家拍卖表记录;
$query_player_safe=$db->query("select * from player_safe where id='".$list_all_safe['id']."';");
$player_safe_list=$db->fetch_array($query_player_safe);
$player_safe_num=$db->num_rows($query_player_safe);
if ($player_safe_num<1) {
continue;
}
//查找对应物品基础表的信息;
$query_m_goods=$db->query("select b.* from player_safe a left join m_goods b on (a.mg_id=b.id) where a.id='".$list_all_safe['id']."';");
$m_goods_list=$db->fetch_array($query_m_goods);
//写入内政物品表;
$query_nzh=$db->query("select id ,num from interior_goods where i_goodsname='".$player_safe_list['s_name']."' and i_uid='".$_COOKIE['UserId']."' ");
$list_bao=$db->fetch_array($query_nzh);
$i_bao=$list_bao['id'];
$n_bao=$list_bao['num'];
if ($i_bao!=''&&$_GET['goods_type_num']==3) {
$n_bao=$n_bao+1;
$db->query("update interior_goods set num='".$n_bao."' where id='".$i_bao."' ");}else{
$db->query("insert into interior_goods (id, i_uid, s_id, i_style, i_style_num, i_goodsname, i_effect, i_state, i_level, s_type,num) values (null, '".$_COOKIE['UserId']."', '".$player_safe_list['mg_id']."', '".$m_goods_list['s_sort']."', '".$player_safe_list['s_type']."', '".$player_safe_list['s_name']."', '".$player_safe_list['s_effect']."', '2', '".$player_safe_list['s_level']."', '".$m_goods_list['s_type']."','1');");
}
//删除拍卖列表记录;
$db->query("delete from player_safe where id='".$list_all_safe['id']."';");
}
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -