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

📄 build_new.php

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

//创建、拆除并获取建筑物的建造队列
require_once("build_task.php");

//建筑物的初始数据值
	////////////////////////////获取玩家当前建筑物等级数量//////////////////////
	$b_current_query=$db->query("select `b`.*,`c`.`total_house`,`c`.`free_house` from building as b,city as c where `b`.`u_id`=`c`.`u_id` and `b`.`c_id`=`c`.`c_id` and `b`.`c_id`='".$_COOKIE["CityId"]."' and `b`.`u_id`='".$_COOKIE["UserId"]."'");
	$b_current_result=$db->fetch_array($b_current_query);
	
	////////////////////////////获取相关建筑物的初始值//////////////////////
	$b_attribute_query=$db->query("select * from building_attribute order by sort");
	while($row=$db->fetch_array($b_attribute_query)) $b_attribute_result[]=$row;


//库存资源
$query_r=$db->query("select * from resource where `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");
$resource_result = $db->fetch_array($query_r);
?>
<!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">
<link href="css/box.css" rel="stylesheet" type="text/css">

<style>
body{margin-top:0px;}
.li_description {list-style:none; color:#CE4118;}

</style>

</head>

<body>
<script language="javascript" type="text/javascript" src="../js/xmlhttprequest.js"></script>
<script>
function disp_confirm(){
var name=confirm("确定要取消吗?")
if (name==true)
{
return true;
}
else
{
return false;
}
}
				
function del_confirm(){
	if(confirm("拆除将消耗建造升级时资源和时间的1/3\n\n请确定是否要继续进行拆除操作!")){
		  return true;
	}else return false;
}

<?php if($remain_hours or $remain_minutes or $remain_seconds) { ?>
var hour,min,sec
hour=<?php echo $remain_hours;?>;
min=<?php echo $remain_minutes;?>;
sec=<?php echo $remain_seconds;?>;
function tick() {
sec-=1;
if (sec==-1){
min-=1
sec=59
}
if (min==-1){
if (hour!=0){
hour-=1
min=59
}
}
if (sec<=0 && min<=0 && hour<=0){
if(!hour && !min && !sec){
self.window.location='build.php?build_page=<?php echo $_GET['build_page'];?>';
}
Clock1.innerHTML ="<a href=build.php?build_page=<?php echo $_GET['build_page'];?>>完成</a>";
Clock2.innerHTML ="完成";
self.window.location='build.php?build_page=<?php echo $_GET['build_page'];?>';
}else{
if(!hour && !min && !sec){
self.window.location='build.php?build_page=<?php echo $_GET['build_page'];?>';
}
Clock1.innerHTML =hour+"小时"+min+"分"+sec+"秒";
window.setTimeout("tick();", 1000);
}
}
window.onload = tick;
<?php } ?>
</script>

  <div id="tc_02">
    <div id="mb_0">
    <div id="mc_01"><a href="build.php?build_page=produce" target="main">城市设施</a></div>
	</div>
	
	<div id="mb_2" >
	  <div id="mc_01" ><a href="build.php?build_page=recovery" target="main">防御设施</a></div>
	</div>
  </div>

<div id="mb_01">
	<div class="page_build_title">建筑</div>
</div>
<div id="mb_04">

<!--<div id="building_description" class="task_title">您的建造队列</div>-->

<?php if($current_task_list){ ?>
<div class="out" style="margin-top:25px;">
  <div class="in">
    <div class="fox">
      <div class="fom">

         <div>
          <table width="100%" height="40" border="0" cellpadding="0" cellspacing="0" style="font-size:12px; text-align:center;">
            <tr>
              <td width="8"><img src="images/med_01.gif" width="8" height="30"></td>
              <td width="56" class="fod1_01">序 号</td>
              <td width="128" class="fod1_01">建筑物</td>
              <td width="128" class="fod1_01">建筑单位</td>
              <td width="132" class="fod1_01">剩余时间</td>
              <td width="155" class="fod1_02">操作命令</td>
              <td width="8"><img src="images/med_02.gif" width="8" height="30"></td>
            </tr>
            <?php if($current_task_list) foreach ($current_task_list as $i=>$m) {
		  	if($counter){
		  	if($i==0 and !$m['b_end_time']){
		  		//生成任务完成时间
		  		$end_other_times=time()+$m['b_time'];		  		
		  		$db->query("update building_task set `b_end_time`='".$end_other_times."' where `u_id`='".$_COOKIE['UserId']."' and `t_id`='".$m['t_id']."'");
		  		echomsg("","?build_page=".$_GET['build_page']);
		  	}
		   ?>
            <tr>
              <td><img src="images/med_30.gif" width="8" height="30"></td>
              <td class="fod1_01" ><?php echo ($i+1);?></td>
              <td class="fod1_01"><?php echo $b_type_name[$m['b_type']];?><?php if($m['g_name']<>"") echo "(".$m['g_name'].")"; if ($m['god_id']) echo ' <img alt="" src="images/up.gif" align="absmiddle"/>';?></td>
              <td class="fod1_01"> <?php if($m['t_type']=="0") echo "拆到";else echo "升到";echo $m['b_num_grade']."级";?></td>
              <td class="fod1_01"><?php if($i=="0") { ?> 
	         <span id="Clock1"></span>
		     <?php }else echo "等待中...";?></td>
              <td class="fod1_02">
              <?php 
			  if($i=="0") {
			  ?> 
			  <div id="Clock2"><a href="?b_action=clear_building_task&b_id=<?php echo $m['t_id'];?>&g_gid=<?php echo $m['g_gid'];?>&building_sum=<?php echo count($current_task_list);?>&b_type=<?php echo $m['b_type'];?>&build_page=<?php echo $_GET['build_page'];?>" onclick="return disp_confirm();" onclick="return disp_confirm();"  onclick="return disp_confirm();" onclick="return disp_confirm();" target="_self">取消</a></div>
			  <?php } else { ?>
			  <a href="?b_action=clear_building_task&b_id=<?php echo $m['t_id'];?>&g_gid=<?php echo $m['g_gid'];?>&b_type=<?php echo $m['b_type'];?>&build_page=<?php echo $_GET['build_page'];?>" onclick="return disp_confirm();" target="_self">取消</a>
			  <?php } ?>
			  <?php } ?>
              </td>
              <td><img src="images/med_31.gif" width="8" height="30"></td>
            </tr>
            <?php } ?>
            <tr>
              <td><img src="images/med_03.gif" width="8" height="30"></td>
              <td colspan="5"><a href="?b_action=clear_building_task&build_page=<?php echo $_GET['build_page'];?>&chanel_type=all" class="d" onclick="return disp_confirm();">全部取消</a></td>
              <td><img src="images/med_04.gif" width="8" height="30"></td>
            </tr>
          </table>
		</div>

      </div>
    </div>
  </div>
</div>
<?php } ?>




⌨️ 快捷键说明

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