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

📄 armament_produce.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("armament_processing_task.php");
//处理士兵训练任务队列
require_once("soldier_processing_task.php");

//读取建筑表 - 武器工房等级
$query=$db->query("select b_work_house from building where `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");
$work_house_result=$db->fetch_array($query);

//读取研究表study
$query=$db->query("select * from study where `u_id`='".$_COOKIE['UserId']."'");
$study_result=$db->fetch_array($query);

//创建武器生产队列
require_once("armament_produce_create_task.php");


//读取武器基础表
$query=$db->query("select * from armament_attribute");
while($row=$db->fetch_array($query)) $arm_list[]=$row;

//读取当前武器拥有量
$query=$db->query("select * from armament where `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");
$current_armament=$db->fetch_array($query);

//我的武将列表
$hero_query=$db->query("select * from gen g1,m_gen g2 where g1.`g_gid`=g2.`id` and g1.`g_uid`='".$_COOKIE['UserId']."' and g1.`g_cid`='".$_COOKIE['CityId']."' and g1.`g_status`='0'");
while($row=$db->fetch_array($hero_query)) $my_hero_list[]=$row;

$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">
<link type="text/css" href="css/box.css" rel="stylesheet">

</head>

<body>
<script language="javascript">
<?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_page=<?php echo $_GET['build_page'];?>';
}
Clock1.innerHTML ="<a href=?build_page=<?php echo $_GET['build_page'];?>>完成</a>";
Clock2.innerHTML ="完成";
self.window.location='?build_page=<?php echo $_GET['build_page'];?>';
}else{
if(!hour && !min && !sec){
self.window.location='?build_page=<?php echo $_GET['build_page'];?>';
}
Clock1.innerHTML =hour+"小时"+min+"分"+sec+"秒";
window.setTimeout("tick();", 1000);
}
}
window.onload = tick;
<?php } ?> 
<!--
function disp_confirm(){
var name=confirm("确定要取消吗?")
if (name==true)
{
return true;
}
else
{
return false;
}
}
//-->
</script>

<!--导航-->
<?php require_once("army_daohang.htm");?>

<div id="mb_01">
	<div class="page_build_title">武器生产</div>
</div>
<div id="mb_04">

<?php if($work_house_result['b_work_house']>0 and $work_house_result['b_work_house']<>"") { ?>

<?php if($current_task_list){ ?>
<!--------队列阴影框----------->
<div class="out" style="margin-top:25px;">
  <div class="in">
    <div class="fox">
	  <div class="fom">
	    <!--------内部队列框----------->
		  <div class="med1_01">
		    <img src="images/med_01.gif" class="bac"/ >
			 <div class="med1_02">序  号</div>
			 <div class="med1_04">武器名称</div>
			 <div class="med1_04">数  量</div>
			 <div class="med1_05">剩余时间</div>
			 <div class="med1_06">操作命令</div>
		     <img src="images/med_02.gif"  class="bac"/>		 
		   </div>
	      <?php foreach ($current_task_list as $i=>$m) { 
	      	if(!$remain_hours and !$remain_minutes and !$remain_seconds) { 
		       echomsg("","?build_page=".$_GET['build_page']);
		    }
		  ?>
		  <div class="med1_07" style="color:#4C2805 "><?php echo ($i+1);?></div>
		  <div class="med1_03" style="color:#4C2805 "><?php echo $arm_type_name[$m['a_type']];?></div>
		  <div class="med1_03" style="color:#4C2805 ">
		  <?php 
		  echo $m['a_num']."个";
		  ?>
		  </div>
		  <div class="med1_08" style="color:#4C2805 ">
			  <?php 
			  if($i=="0") {
			  ?> 
		      <span id="Clock1"></span>
			  <?php
			  }elseif($m['a_end_time']<>"" and $m['a_end_time']<>0) echo date("d日 H:i:s",$m['a_end_time']); else echo "等待中...";?>
		  </div>
		  <div class="med1_09" style="color:#4C2805 ">
			  <?php if($i=="0") { ?>
			  <span id="Clock2"><a href="?a_action=clear_armamenting_task&a_id=<?php echo $m['id'];?>&arm_sum=<?php echo count($current_task_list);?>&a_type=<?php echo $m['a_type'];?>" target="_self" onclick="return disp_confirm();">取消</a></span>
			  <?php } else { ?>
			  <span id="Clock2"><a href="?a_action=clear_armamenting_task&a_id=<?php echo $m['id'];?>&a_type=<?php echo $m['a_type'];?>" target="_self" onclick="return disp_confirm();">取消</a></span>
			  <?php } ?>
		  </div>
		  <?php } ?>
         <div>
		 </div>
		<!--------内部队列框----------->
	  </div>
	</div>
  </div>
</div>
<?php } ?>
<!--文字说明-->
  <ul>
    <li class="wy_02">注:1.武器生产,与您的武器工房等级和科技研究有关。</li> 
    <li class="wy_03" style="margin-left:18px ">2.最多可以同时安排 5 项武器生产队列。</li>
    <li class="wy_04">-----------------------------------------------------------------------------------------</li>
  </ul>


<!--替换区域开始-->
         <?php
	   	   //一级武器工房
	       //if($work_house_result['b_work_house']>=1){
     		 if($arm_list<>"") foreach ($arm_list as $i=>$m) {
                if($m['a_bigtype']=="1"){
                include("armament_produce_show.php");//调用显示部分
                if(($study_result['s_smelt']<1 and $m['a_type']=="1") or 
                ($study_result['s_smelt']<4 and $m['a_type']=="2")      
                ){ ?>
                <div class="d1f_001" style="margin-top:5px ">
				<span class="wy_06" style="color:red;">科技研究需达到:<?php echo $m['need_study'];?></span>
				</div>
	            <?php } ?>
           <div class="d1f_02" style="margin-left:20px; margin-top:5px; ">
              <?php 
              //判断研究技术:需要“冶炼锻造”1和4级
              if($study_result['s_smelt']>=1 and $m['a_type']=="1" or $study_result['s_smelt']>=4 and $m['a_type']=="2") { 
              include("armament_produce_from.php");//调用表单部分
              ?>
              <?php }else{ ?>
                <span class="wy_05">条件不足</span>

⌨️ 快捷键说明

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