📄 war_result_info.php
字号:
<?php
require_once("configs/Configs.php");//加载配置文件
require_once("functions/login_flag.php");//是否已经登录
require_once("functions/func_common.php");//加载函数文件
require_once("functions/class_mysql.php");//加载数据库类文件
if($_GET['ac']=="del_war_info"){
$query=$db->query("select * from war_result where `w_serial`='".$_GET['w_serial']."'");
$del_result = $db->fetch_array($query);
$_GET['w_id'] = $del_result['w_id'];
//攻击方
if($del_result['u_id']==$_COOKIE['UserId'] and $del_result['de_del_flag']=="1"){//直接删除
$db->query("delete from war_result where `w_id`='".$del_result['w_id']."' and `u_id`='".$_COOKIE['UserId']."'");
$db->query("delete from war_result_info where `u_id`='".$_COOKIE['UesrId']."' and (`w_type`='0' or `w_type`='1' or `w_type`='4') and `war_serial`='".$del_result['w_serial']."'");
}elseif($del_result['u_id']==$_COOKIE['UserId'] and $del_result['de_del_flag']=="0"){
$db->query("update war_result set `wo_del_flag`='1' where `w_id`='".$del_result['w_id']."' and `u_id`='".$_COOKIE['UserId']."'");
}
//防御方
if($del_result['to_u_id']==$_COOKIE['UserId'] and $del_result['wo_del_flag']=="1"){//直接删除
$db->query("delete from war_result where `w_id`='".$del_result['w_id']."' and `to_u_id`='".$_COOKIE['UserId']."'");
$db->query("delete from war_result_info where `to_u_id`='".$_COOKIE['UesrId']."' and (`w_type`='0' or `w_type`='1' or `w_type`='4') and `war_serial`='".$del_result['w_serial']."'");
}elseif($del_result['to_u_id']==$_COOKIE['UserId'] and $del_result['wo_del_flag']=="0"){
$db->query("update war_result set `de_del_flag`='1' where `w_id`='".$_GET['w_id']."' and `to_u_id`='".$_COOKIE['UserId']."'");
}
echomsg("删除成功","war_result_list.php?type=war");
}
//掠夺、袭击和占领战
if($_GET['w_type']=="0" or $_GET['w_type']=="1" or $_GET['w_type']== "6" or $_GET['w_type']=="4" or $_GET['w_type']=="7"){
if($_GET['from']<>"world_news"){
//攻击方
$query=$db->query("select * from war_result_info where `war_serial`='".$_GET['w_serial']."' and (`u_id`='".$_COOKIE['UserId']."' or `u_id`='".$_GET['w_to1']."') and `w_type`='1' ");
$wo_result=$db->fetch_array($query);
//防御方
$query=$db->query("select * from war_result_info where `war_serial`='".$_GET['w_serial']."' and (`u_id`='".$_COOKIE['UserId']."' or `u_id`='".$_GET['w_to1']."') and `w_type`='0' ");
$de_result=$db->fetch_array($query);
}else{
//攻击方
$query=$db->query("select * from war_result_info where `war_serial`='".$_GET['w_serial']."' and (`u_id`='".$_GET['action']."' or `u_id`='".$_GET['recovery']."') and `w_type`='1' ");
$wo_result=$db->fetch_array($query);
//防御方
$query=$db->query("select * from war_result_info where `war_serial`='".$_GET['w_serial']."' and (`u_id`='".$_GET['action']."' or `u_id`='".$_GET['recovery']."') and `w_type`='0' ");
$de_result=$db->fetch_array($query);
}
//攻击方
$wo_gen_info = explode("|",$wo_result['gen_attribute']);
//攻击次数
$action_counter = count(explode("|",$wo_result['attack_power']));
$wo_arm_info = explode("|",$wo_result['army_info']);
$wo_action_power = explode("|",$wo_result['attack_power']);
$wo_recovery_power = explode("|",$wo_result['recovery_power']);
$query = $db->query("select c_area,c_area_x,c_area_y from city where `u_id`='".$wo_result['u_id']."' and `c_id`='".$wo_result['c_id']."'");
$wo_area = $db->fetch_array($query);
//防御方
$de_gen_info = explode("|",$de_result['gen_attribute']);
$de_arm_info = explode("|",$de_result['army_info']);
$de_action_power = explode("|",$de_result['attack_power']);
$de_recovery_power = explode("|",$de_result['recovery_power']);
}else{
$query=$db->query("select * from war_result where `w_id`='".$_GET['w_id']."' and `w_type`='".$_GET['w_type']."' and (`u_id`='".$_COOKIE['UserId']."' or `to_u_id`='".$_COOKIE['UserId']."') ");
$wo_result=$db->fetch_array($query);
//读取当前间谍数与返回间谍数
$query=$db->query("select * from soldier where `u_id`='".$wo_result['u_id']."' and `c_id`='".$wo_result['c_id']."'");
$lurcher_result = $db->fetch_array($query);
}
//更新攻击方的阅读标志
if($_GET['read_flag']=="0" and $_GET['war_result_type']=="me"){
$db->query("update war_result set `w_read`='1' where `u_id`='".$_COOKIE['UserId']."' and `w_serial`='".$_GET['w_serial']."'");
}
//更新防御方的阅读标志
if($_GET['read_flag2']=="0" and $_GET['war_result_type']=="de"){
$db->query("update war_result set `w_read2`='1' where `to_u_id`='".$_COOKIE['UserId']."' and `w_serial`='".$_GET['w_serial']."'");
}
$wo_gen_status_type = array("0"=>"带兵","1"=>"带兵","2"=>"被俘虏","3"=>"带兵");
$de_gen_status_type = array("0"=>"带兵","1"=>"战死","2"=>"被俘虏","3"=>"逃跑");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>战报详情</title>
<link href="css/id.css" rel="stylesheet" type="text/css">
<link href="css/css.css" rel="stylesheet" type="text/css">
<link type="text/css" href="css/build.css" rel="stylesheet">
<style>
body{
margin-top:0px;font-size:12px;
}
.text1 { color:#ffffff; font-weight:bold;}
a.info {
position:relative; z-index:0; color:#000; text-decoration:none;}
a.info:hover {
z-index:1; background-color:#000000;}
a.info span {
display: none;}
a.info:hover span { display:block; position:absolute; padding-left:5px; padding-right:5px; padding-top:5px; padding-bottom:5px;width:280px; border:2px solid #fff; line-height:16px; background-color:#E7CB94; color:#000000; text-align: left; text-decoration:none; margin-top:-50px;margin-left:-350px;}
.img_style { filter:Gray(enabled=tru); }
.img_style1 { filter:Gray(enabled=false);}
</style>
</head>
<body>
<script language="JavaScript">
function del(){
var name=confirm("确定要删除吗?")
if (name==true)
{
return true;
}
else
{
return false;
}
}
</script>
<!--导航-->
<?php require_once("diplomatism_daohang.htm");?>
<div id="mb_01">
<div class="page_build_title"><?php echo $war_type[$_GET['w_type']];?>战简报</div>
</div>
<div id="mb_04">
<!--替换区域开始-->
<div id="arm">
<table width="95%" align="center" style="margin-top:15px;font-size:12px; ">
<tr >
<td width="20%" height="25" ><span style="color:#ffffff; font-weight:bold;"><a href="message.php?e_type=1" target="_self">任务信息</a></span></td>
<td width="20%" height="25" ><span style="color:#ffffff; font-weight:bold;"><a href="war_result_list.php?type=war" target="_self" <?php if($_GET['type']=="war") { ?>style="color:RED;"<?php } ?>>战报信息</a></span></td>
<td width="20%" height="25" ><span style="color:#ffffff; font-weight:bold;"><a href="war_result_list.php?type=lurcher" target="_self" <?php if($_GET['type']=="lurcher") { ?>style="color:RED;"<?php } ?>>间谍信息</span></a></td>
<td width="20%" height="25"><span style="color:#ffffff; font-weight:bold;"><a href="message.php?e_type=2" target="_self">收 件 箱</a></span></td>
<td width="20%" height="25" ><span style="color:#ffffff; font-weight:bold;"><a href="message_put.php">写信</a></span></td>
</tr>
</table>
<?php if($_GET['w_type']=="0" or $_GET['w_type']=="1" or $_GET['w_type']=="6" or $_GET['w_type']=="4" or $_GET['w_type']=="7"){ ?>
<table width="98%" border=1 cellpadding=1 cellspacing=0 style="margin-top:0px;margin-bottom:20px; border-collapse:collapse;border:1px solid threeddarkshadow;font-size:12px;" bordercolor="threeddarkshadow" align="center">
<tr bgcolor="darkslategray">
<td height="25" width="45%" align="left" class="text1">ID:<?php echo $_GET['w_serial'];?></td>
<td width="80" width="10%" height="25"><div align="center" class="text1"><?php echo $war_type[$_GET['w_type']];?></div></td>
<td height="25" width="45%" align="right" class="text1"><div align="right">日期:<?php echo date("Y年m月d日 H时i分s秒",$wo_result['dates']);?></div></td>
</tr>
<tr>
<td height="25"><div align="center"><b>攻击方(
<?php
if($_GET['from']<>"world_news"){
echo $wo_result['nickname']."[".$wo_area['c_area'].":".$wo_area['c_area_x']."]";
}else{
echo $_GET['action_c_name'];
}
?>
)</b></div></td>
<td width="80" height="25"></td>
<td height="25"><div align="center"><b>防御方(
<?php
if($_GET['from']<>"world_news"){
echo $de_result['nickname']."[".$de_result['c_area']."]";
}else{
echo $_GET['recovery_c_name'];
}
?>)</b></div></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="80" height="20" align="center">攻击:</td>
<td width="80" height="20" align="left"><?php echo $wo_gen_info[0];?></td>
<td height="20" rowspan="4"><div align="center"><img src="img/gen_header/<?php echo $wo_result['gen_id'];?>.jpg" width="120" height="120" border="0" /></div></td>
</tr>
<tr>
<td width="80" height="20" align="center">智力:</div></td>
<td width="80" height="20" align="left"><?php echo $wo_gen_info[1];?></td>
</tr>
<tr>
<td width="80" height="20" align="center">防御:</td>
<td width="80" height="20" align="left"><?php echo $wo_gen_info[2];?></td>
</tr>
<tr>
<td width="80" height="20" align="center">忠诚:</td>
<td width="80" height="20" align="left"><?php echo $wo_gen_info[3];?></td>
</tr>
<tr>
<td width="80" height="20" align="center"></td>
<td width="80" height="20"></td>
<td height="20"><div align="center"><?php echo $wo_result['gen_name'];?>(<?php if($wo_gen_info[5]>0) echo $wo_gen_info[5];else echo "0";?>级)</div></td>
</tr>
</table>
</td>
<td width="80"><div align="center">VS</div></td>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="4"><?php if($de_result['gen_id']>0) { ?><img src="img/gen_header/<?php echo $de_result['gen_id'];?>.jpg" width="120" height="120" border="0" /><?php } else echo "无武将";?></td>
<td width="80" height="20" align="center">攻击:</td>
<td width="80" height="20" align="left"><?php if($de_gen_info[0]>0) echo $de_gen_info[0];else echo "0";?></td>
</tr>
<tr>
<td width="80" height="20" align="center">智力:</td>
<td width="80" height="20" align="left"><?php if($de_gen_info[1]>0) echo $de_gen_info[1];else echo "0";?></td>
</tr>
<tr>
<td width="80" height="20" align="center">防御:</td>
<td width="80" height="20" align="left"><?php if($de_gen_info[2]>0) echo $de_gen_info[2];else echo "0";?></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -