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

📄 soldier_educate.php

📁 Download you own three BR
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?php } ?>

<!--文字说明-->
<?php if($barracks_result['b_barracks']>=1) { ?> 
  <ul>
  <li class="wy_02">军队训练与军营等级、科技研究等级、军营上限和人口有关!</li>
  <li class="wy_03">5个士兵占用1个人口,且士兵每天都需消耗粮食,粮食不足士兵将会死亡!</li>
  <li class="wy_04">------------------------------------------------------------------------------------------</li>
  </ul>
 

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

  <?php 	
//	echo $value;
//	exit;   
	
	
//	echo $_COOKIE['array_code'];

 $s_count=0;
  if($attribu_soldier_list) foreach ($attribu_soldier_list as $i=>$m) {
  switch ($m['s_type']){
  	case 1:{
  		if($barracks_result['b_barracks']<1) $flag2=0;
  		else $flag2=1;
  		break;
  	}
  	case 2:{
  		if($barracks_result['b_barracks']<2) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 3:{
  		if($barracks_result['b_barracks']<3) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 4:{
  		if($barracks_result['b_barracks']<4) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 5:{
  		if($barracks_result['b_barracks']<5) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 6:{
  		if($barracks_result['b_barracks']<6) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 7:{
  		if($barracks_result['b_barracks']<7) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 8:{
  		if($barracks_result['b_barracks']<8) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 9:{
  		if($barracks_result['b_barracks']<9) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 10:{
  		if($barracks_result['b_barracks']<10) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 11:{
  		if($barracks_result['b_barracks']<12) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 12:{
  		if($barracks_result['b_barracks']<14) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 13:{
  		if($barracks_result['b_barracks']<16) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 14:{
  		if($barracks_result['b_barracks']<18) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 15:{
  		if($barracks_result['b_barracks']<20) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 16:{
  		if($barracks_result['b_barracks']<20) $flag2=0;
  		else $flag2=1;break;
  	}
  	case 17:{
  		if($barracks_result['b_barracks']<22) $flag2=0;
  		else $flag2=1;break;
  	}
  }
  if($flag2=="0") break;
  $s_count++;
  ?>
  <!--------------队列阴影框----------->
  <div class="d1f_04">
  <a href="soliderinfo.php?soldier_num=<?php echo $m['s_type'];?>" target="_blank"><img src="img/soldier/<?php echo $m['s_image'];?>" style="margin-top:3px;"  width="50" height="50" border="0" id="d1_02" /> </a>
  </div>
  <div class="d1f_05">
    <strong style="margin-right:14px; "><a href="soliderinfo.php?soldier_num=<?php echo $m['s_type'];?>" target="_blank"><?php echo $soldier_type_name[$m['s_type']];?></a><a name="<?php echo $soldier_type_name_en[$m['s_type']];?>"></a>(<span class="wy_06"><?php $current_soldier=$soldier_result[$soldier_type_name_en[$m['s_type']]]; if($current_soldier>0) echo $current_soldier;else echo "0";?></span>)</strong>
	
	</div>
  <div class="d1f_00" style="margin-top:5px ">
  训练消耗:
  <?php if($m['s_rices']) { ?>
  粮食<span class="wy_05" <?php if($barracks_result['rices'] < $m['s_rices']) echo "style=\"color:red;\"";?> ><?php echo $m['s_rices'];?></span> | 
  <?php }if($m['s_woods']){?>
  木材<span class="wy_05" <?php if($barracks_result['woods'] < $m['s_woods']) echo "style=\"color:red;\"";?>><?php echo $m['s_woods'];?></span> | 
  <?php }if($m['s_irons']){ ?>
  铁矿<span class="wy_05" <?php if($barracks_result['ores'] < $m['s_irons']) echo "style=\"color:red;\"";?>><?php echo $m['s_irons'];?></span> | 
   <?php }if($m['s_golds']){ ?>
  黄金<span class="wy_05" <?php if($barracks_result['golds'] < $m['s_golds']) echo "style=\"color:red;\"";?>><?php echo $m['s_golds'];?></span> | 
  <?php } ?>
  用时<span class="wy_05"><?php echo $m['s_time'];?></span>分钟
   </div>
   <div class="d1f_00" style="margin-top:5px ">
    <?php echo $m['s_description'];?>
  </div>
   
  <div class="d1f_0012" style="margin-top:12px ">
    <?php
    switch ($m['s_type']){
    	case 1:{
    		//军营1级
    		if($barracks_result['b_barracks'] >=1 ){$flag=1;}else{$flag=0;}break;
    	}
    	case 2:{
    		//军营2级、“军情刺探”1级
    		if($barracks_result['b_barracks'] >=2 and $study_result['s_army']>=1){$flag=1;}else{$flag=0;}break;
    	}
    	case 3:{
    		//军营3级、“道路地图”2级
    		if($barracks_result['b_barracks'] >=3 and $study_result['s_map']>=2){$flag=1;}else{$flag=0;}break;
    	}
    	case 4:{
    		//军营4级、“铠甲制造”3级
    		if($barracks_result['b_barracks'] >=4 and $study_result['s_loricae']>=3){$flag=1;}else{$flag=0;}break;
    	}
    	case 5:{
    		//军营5级、“武器制造”1级、“铠甲制造”1级
    		if($barracks_result['b_barracks'] >=5 and $study_result['s_arm']>=1 and $study_result['s_loricae']>=1){$flag=1;}else{$flag=0;}break;
    	}
    	case 6:{
    		//军营6级、“武器制造”3级、“铠甲制造”2级
    		if($barracks_result['b_barracks'] >=6 and $study_result['s_arm']>=3 and $study_result['s_loricae']>=2){$flag=1;}else{$flag=0;}break;
    	}
    	case 7:{
    		//军营7级、“武器制造”4级、“马匹圈养”1级
    		if($barracks_result['b_barracks'] >=7 and $study_result['s_arm']>=4  and $study_result['s_gee']>=1){$flag=1;}else{$flag=0;}break;
    	}
    	case 8:{
    		//军营8级、“机械技术”1级
    		if($barracks_result['b_barracks'] >=8 and $study_result['s_engine']>=1){$flag=1;}else{$flag=0;}break;
    	}
    	case 9:{
    		//军营9级、“机械技术”2级、“弹道技术”1级
    		if($barracks_result['b_barracks'] >=9 and $study_result['s_engine']>=2 and $study_result['s_trajectory']>=1){$flag=1;}else{$flag=0;}break;
    	}
    	case 10:{
    		//军营10级、“马匹圈养”3级
    		if($barracks_result['b_barracks'] >=10 and $study_result['s_gee']>=3){$flag=1;}else{$flag=0;}break;
    	}
    	case 11:{
    		//军营12级、“武器制造”6级、“铠甲制造”6级
    		if($barracks_result['b_barracks'] >=12 and $study_result['s_arm']>=6 and $study_result['s_loricae']>=6){$flag=1;}else{$flag=0;}break;
    	}
    	case 12:{
    		//军营14级、“铁矿精炼“2级、“防御加固”5级
    		if($barracks_result['b_barracks'] >=14 and $study_result['s_steel']>=2 and $study_result['s_recovery']>=5){$flag=1;}else{$flag=0;}break;
    	}
    	case 13:{
    		//军营16级、“铁矿精炼“6级、“马匹圈养”8级、“武器制造”8级
    		if($barracks_result['b_barracks'] >=16 and $study_result['s_steel']>=6 and $study_result['s_gee']>=8 and $study_result['s_arm']>=8){$flag=1;}else{$flag=0;}break;
    	}
    	case 14:{
    		//军营18级、“机械技术”6级、“弹道技术”5级、“铠甲制造”8级
    		if($barracks_result['b_barracks'] >=18 and $study_result['s_engine']>=6 and $study_result['s_trajectory']>=5 and $study_result['s_loricae']>=8){$flag=1;}else{$flag=0;}break;
    	}
    	case 15:{
    		//军营20级、“铁矿精炼“10级、“武器制造”10级、“铠甲制造”10级、“马匹圈养”10级
    		if($barracks_result['b_barracks'] >=20 and $study_result['s_steel']>=10 and $study_result['s_arm']>=10 and $study_result['s_loricae']>=10 and $study_result['s_gee']>=10){$flag=1;}else{$flag=0;}break;
    	}
    	case 16:{
    		//军营20级、“机械技术“8级、“弹道技术”8级、“车轮改进”6级
    		if($barracks_result['b_barracks'] >=20 and $study_result['s_engine']>=8 and $study_result['s_trajectory']>=8 and $study_result['s_wheel']>=6){$flag=1;}else{$flag=0;}break;
    	}
    	case 17:{
    		//军营22级、“机械技术“10级、“弹道技术”10级、“车轮改进”8级、“防御加固”8级
    		if($barracks_result['b_barracks'] >=22 and $study_result['s_engine']>=10 and $study_result['s_trajectory']>=10 and $study_result['s_wheel']>=8 and $study_result['s_recovery']>=8){$flag=1;}else{$flag=0;}break;
    	}
    }
    if($flag) {
    ?>  <a href="safe_soldier.php" style="margin-left:5px " class="d" target="_self">【出售】</a>
	    <!--<a href="union_give_soldier.php?soldier_type=<?php //echo $m['s_type'];?>&soldier_max=<?php //echo $current_soldier;?>&union_id=<?php //echo $union_result['union_id'];?>&union_name=<?php //echo $union_result['union_name'];?>#union" class="f">捐献联盟</a>-->
    <?php }else{ 
        echo "<span style=\"color:red\">需求:".$m['needs']."</span>";
    }
    ?>
  </div>
  <div class="d1f_02" style="margin-left:50px; margin-top:5px;">
  <?php if($flag) { ?>
  <form action="" method="post" name="soldier_educate<?php echo $i;?>">
	<input type="hidden" name="action" value="soldier_educate">	
	<input type="hidden" name="s_type" value="<?php echo $m['s_type'];?>">
	<?php 
	if($barracks_result['rices'] >= $m['s_rices']
	and $barracks_result['ores'] >= $m['s_irons']
	and $barracks_result['woods'] >= $m['s_woods']
	and $barracks_result['golds'] >= $m['s_golds']
	) {
	?>
	<?php if($barracks_space>=1) { ?>
	
	               <select name="gen_id" style="margin-top:3px;">
	          		<option value="0">工作将领</option>
	          		<?php
	          		if($my_hero_list) foreach ($my_hero_list as $gi=>$gm) { ?>
	          		   <option value="<?php echo $gm['g_gid']."|".$gm['ge_name'];?>"><?php echo $gm['ge_name']."(".$gm['g_intellect'].")";?></option>
	          		<?php }	?>
				    </select>
	
	<input type="Text" name="s_num" value="" size="4" style="height:16px; background-color:#ffffff; border:1px solid #000000;" maxlength="5" />
	 <a href="javascript:this.soldier_educate<?php echo $i;?>.submit();" class="d" style="margin-left:5px "  target="_self" onkeydown="return keycode()">【训练】</a>
	
    <?php }else{ ?>
    <span class="wy_05" style="color:red; padding-top:-9px;">军营上限已满</span>
    <?php } ?>
	 <?php }else{ ?>
    <span class="wy_05" style="color:red; padding-top:-9px;">资源不足</span>
    <?php 
    }
    $current_soldier=$soldier_result[$soldier_type_name_en[$m['s_type']]];
    ?>
  </form>
  <?php }else{ ?>
  <span class="wy_05" style="color:red; padding-top:-9px;">需求不足</span>
  <?php } ?>
  </div> 
  <?php if($i<>"16") { ?>
  <div id="d1_00" class="wy_04">------------------------------------------------------------------------------------------</div> 
  <?php }else{ ?>
  <div style="padding-bottom:60px;"></div>
  <?php } ?>
  
<?php }}else{ ?>
	<div id="building_description" class="task_title" style="padding-top:20px; padding-bottom:280px;">训练军队需先建造<a href="build.php?build_page=military_affairs" target="main" class="f">【军营】</a>设施!</div>
<?php } ?>
<?php $s_count=($s_count) ? $s_count :0;?>
<div style="padding-bottom:<?php echo 260-$s_count*50;?>px;"> </div>
</div>

</div>
<div id="mb_03"></div>
<?php 
include_once("function_area_re.php");
$db->close();?>
</body>
</html>

⌨️ 快捷键说明

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