⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 report.php

📁 Download you own three BR
💻 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");//加载数据库类文件

//删除上次的报表记录
//$db->query("delete from report where `r_date`<'".(time() - $resource_add_time * 60 * 60 * 2)."' and `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");

//读取本次的报表记录
$query=$db->query("select * from report where `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");
while($row=$db->fetch_array($query)) $report_list[]=$row;

/*
//算出使用的资源
if($report_list<>"") foreach ($report_list as $k=>$row){
	if($row['r_type1']=="6"  and $row['r_info_type']=="1"){
	   $use_resource_type =  explode("|",$row['r_type2']);
       $use_resource_value = explode("|",$row['r_value']);
       break;
	}
}

//算出生产的资源
if($report_list<>"") foreach ($report_list as $k=>$row){
    if($row['r_type1']=="1" and $row['r_info_type']=="1"){ 
       $r_type = explode("|",$row['r_type2']);
       $r_value = explode("|",$row['r_value']);
       break;
	}
}
*/
$db->close();

?>


<!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;
}
.report_text li{ list-style:none; line-height:24px; text-align:left;}

</style>

</head>

<body>
<script language="JavaScript">
function killErrors() {
  return true;
}
window.onerror = killErrors;
</script>
<?php 
	  echo "<script>";
   	  echo "parent.function_area.refresh_area_page();";
   	  echo "</script>";
?>
<!--导航-->
<?php require_once("system_daohang.htm");?>

<div id="mb_01">
	<div class="page_build_title">士兵粮食消耗(24小时制)</div>
</div>
<div id="mb_04">

<!--替换区域开始-->


<!--摘要信息-->
<div class="report_text">
  <ul>
  <li style="list-style:none;line-height:32px;font-weight:bold;text-align:center;"></li>
  
 <?php if($report_list) foreach ($report_list as $i=>$m) { 
     
       //士兵粮食消耗
       if($m['type']=="10"){
       $info = explode("|",$m['r_beizhu']);
   ?>
     <li><b><?php echo date("Y-m-d",$m['r_date']);?></b>报表:<br />士兵消耗粮食:<?php echo $info[0];?><?php if($info[1]) echo ",由于您的食物缺乏,导致士兵死亡:".$info[1];?></li>
    <?php } 
       //提醒:建设升级增长
       if($m['r_type1']=="8" and $m['r_info_type']=="1" and $m['r_type2']=="20"){
   ?>
     <li>建筑物建造升级增长经验:(<?php echo round($m['r_value'],0);?>)点</li>
    <?php } 
       //提醒:城墙升级,防御值增加
       if($m['r_type1']=="9" and $m['r_info_type']=="1" and $m['r_type2']=="19"){
    ?>
     <li>城墙升级,防御值增加:(<?php echo round($m['r_value'],0);?>)点</li>
    <?php }
       //提醒:建筑物建造数量
       if($m['r_type1']=="3" and $m['r_info_type']=="1"){
       //$r_type2 = explode("|",$m['r_type2']);
       //$r_value = explode("|",$m['r_value']);
       //$build_num=count($r_type2);
    ?>
     <li><?php echo $m['r_value']."个".$r_type_two[$m['r_type2']];?>建造完成!</li>
    <?php } 
       //提醒:建筑物升等级
       if($m['r_type1']=="4" and $m['r_info_type']=="1"){
       //$r_type2 = explode("|",$m['r_type2']);
       //$r_value = explode("|",$m['r_value']);
       //$build_num=count($r_type2);
    ?>
     <li><?php echo "恭喜:您的".$r_type_two[$m['r_type2']]."等级已经提升(".$m['r_value'].")级";?>!</li>
    <?php } 
       //提醒:摧毁建筑物
       if($m['r_type1']=="5" and $m['r_info_type']=="1" and $m['r_type2']=="20"){
       $r_type2 = explode("|",$m['r_type2']);
       $r_value = explode("|",$m['r_value']);
       $build_num=count($r_type2);
    ?>
     <li><?php for($i=1;$i<=$build_num;$i++){ ?> <?php echo "(".$r_value[$i].")".$r_type_two[$r_type2[$i]].",";?><?php } ?>被摧毁!</li>
    <?php } } ?>
  </ul>
</div>
  
<!--替换区域结束-->
<div style="padding-bottom:200px;"> </div>
</div>

</div>
<div id="mb_03"></div>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -