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

📄 buildinfo.php

📁 Download you own three BR
💻 PHP
字号:
<?php
require_once("configs/Configs.php");//加载配置文件
require_once("functions/login_flag.php");//是否已经登录
require_once("functions/class_mysql.php");//加载数据库类文件
require_once("functions/func_common.php");//加载函数文件

////////////////////////////获取相关建筑物的初始值//////////////////////
$b_attribute_query=$db->query("select * from building_attribute where `b_type`='".$_GET['b_type']."'");
$build_base = $db->fetch_array($b_attribute_query);
	
$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;
}
.style1 {color: #FFFFFF}
</style>

</head>

<body>
<script language="JavaScript">
function killErrors() {
  return true;
}
window.onerror = killErrors;
</script>


<div id="mb_01">
	<div class="page_build_title"><?php echo $b_type_name[$_GET['b_type']];?>建筑详情</div>
</div>
<div id="mb_04">

<!--替换区域开始-->
    
    <table width="90%" border="0" cellspacing="1" cellpadding="5" style="margin-top:10px; ">
        <tr align="center">
          <td ><div align="center"><img src="
<?php if($_GET['b_type']<>"12") {
echo "img/building/zao_";
switch($_GET['b_type']){
  case 11:{
    echo "08";
    break;
  }
case 13:{
    echo "12";
    break;
  }
case 8:{
    echo "11";
    break;
  }
case 10:{
    echo "07";
    break;
  }
case 9:{
    echo "06";
    break;
  }
  default:{
    echo "0".$_GET['b_type'];
    break;
  }
}
}else{
	echo "images/cheng";
}
?>
.gif" />

</div></td>
        </tr>
        <tr>
          <td align="center" class="wy_05"><?php echo $building_info_array[$_GET['b_type']];?></td> 
        </tr>
        <tr> 
          <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
          
<?php if($_GET['b_type']<=4) { ?>
<tr bgcolor="#006699">
              <td width="104" height="20">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
              <td width="427"><div align="center" class="white style1"><strong>产量</strong></div></td>
              <td width="100"><div align="center" class="white style1"><strong>耗费工人</strong></div></td>
</tr>
<?php $j=0; for($i=0;$i<=30;$i++) { ?>
            <tr <?php if($i==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"><div align="center"><?php echo $j;?></div></td>
              <td height="20"><div align="center"><?php echo add_workers($build_base['b_base'],$i);?></div></td>
              <td height="20"><div align="center"><?php echo add_workers($build_base['b_workers'],$i);?></div></td>
            </tr>
			<?php $j++;?>
            
<?php }}elseif($_GET['b_type']=="5") { ?>
<tr bgcolor="#006699">
              <td  width="50%" height="20">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
              <td  width="50%"><div align="center" class="white style1"><strong>增加工人</strong></div></td>
</tr>
<?php $j=0; for($i=0;$i<=30;$i++) { ?>
<tr <?php if($i==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"  width="50%"><div align="center"><?php echo $j;?></div></td>
              <td height="20"  width="50%"><div align="center"><?php echo add_workers($build_base['b_base'],$i);?></div></td>
</tr>
<?php $j++;?>
<?php }}elseif($_GET['b_type']=="11") { ?>
<tr bgcolor="#006699">
              <td width="104" height="20">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
                <td width="100"><div align="center" class="white style1"><strong>黄金上限</strong></div></td>
              <td width="100"><div align="center" class="white style1"><strong>粮食上限</strong></div></td>
              <td width="100"><div align="center" class="white style1"><strong>铁矿上限</strong></div></td>
              <td width="100"><div align="center" class="white style1"><strong>木材上限</strong></div></td>
</tr>
<?php $k=0; for($i=1;$i<=30;$i++) { ?>
<tr <?php if($i-1==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"><div align="center"><?php echo $k;?></div></td>
              <td height="20"><div align="center"><?php echo add_percent($golds_uplimit,50,$i);?></div></td>
              <td height="20"><div align="center"><?php echo add_percent($rices_uplimit,50,$i);?></div></td>
              <td height="20"><div align="center"><?php echo add_percent($irons_uplimit,50,$i);?></div></td>
              <td height="20"><div align="center"><?php echo add_percent($woods_uplimit,50,$i);?></div></td>
</tr>
<?php $k++;?>
<?php }}elseif($_GET['b_type']=="8") { ?>
<tr bgcolor="#006699">
              <td  width="30%" height="20">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
                <td  width="30%"><div align="center" class="white style1"><strong>训练兵种</strong></div></td>
                <td  width="60%"><div align="center" class="white style1"><strong>训练上限</strong></div></td>
</tr>
<?php $j=0; for($i=0;$i<=22;$i++) { ?>
<tr <?php if($i==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"  width="30%"><div align="center"><?php echo $j;?></div></td>
              <td height="20"  width="30%"><div align="center"><?php if($soldier_info_array[$i]) echo $soldier_info_array[$i];else echo "无";?></div></td>
              <td height="20"  width="40%"><div align="center"><?php echo $j*500;?></div></td>
</tr>
<?php $j++;?>
<?php }}elseif($_GET['b_type']=="10") { ?>
<tr bgcolor="#006699">
              <td height="20" width="50%">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
                <td  width="50%"><div align="center" class="white style1"><strong>招纳数量</strong></div></td>
</tr>
<?php $j=0; for($i=0;$i<=30;$i++) { ?>
<tr <?php if($i==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"  width="50%"><div align="center"><?php echo $j;?></div></td>
              <td height="20"  width="50%"><div align="center"><?php if (($i%2)==0) { $progen=$i/2;
		}else {
			$progen=(int)($i/2)+1;
		}
		echo $progen;		
		?></div></td>
</tr>
<?php $j++;?>
<?php }}elseif($_GET['b_type']=="12") { ?>
<tr bgcolor="#006699">
              <td height="20" width="50%">
                <div align="center" class="white style1"><strong>级别</strong></div></td>
                <td  width="50%"><div align="center" class="white style1"><strong>防御值</strong></div></td>
</tr>
<?php $j=0; for($i=0;$i<=30;$i++) { ?>
<tr <?php if($i==$_GET['grade']) echo "bgcolor=\"#E7E7E7\"";?>>
              <td height="20"  width="50%"><div align="center"><?php echo $j;?></div></td>
              <td height="20"  width="50%"><div align="center"><?php echo 500*$i;?></div></td>
</tr>
<?php $j++;?>
<?php }} ?>
          </table></td>
        </tr>
  </table>
    
<!--替换区域结束-->

</div>

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

</body>
</html>

⌨️ 快捷键说明

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