📄 lurcher.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");//加载数据库类文件
//读取研究表study
$query=$db->query("select s.s_army,r.golds,r.rices from study as s,resource as r where s.`u_id`=r.`u_id` and s.`u_id`='".$_COOKIE['UserId']."'");
$study_result=$db->fetch_array($query);
//当前间谍数量
$query=$db->query("select * from lurcher where `u_id`='".$_COOKIE['UserId']."' and `c_id`='".$_COOKIE['CityId']."'");
$lurcher=$db->fetch_array($query);
//间谍任务开始
require_once("armament_action_task.php");
$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;
}
</style>
</head>
<body>
<script>
function checkForm(obj){
if(obj.area.value=="" || obj.area_x.value=="" || obj.area_y.value==""){
alert("请输入坐标!");
return false;
}
if(obj.lurcher_num.value=="0" || obj.lurcher_num.value==""){
alert("需派遣1个以上的间谍!");
return false;
}
}
function input_num(){
if(document.lurcher_action.lurcher_num.value > document.lurcher_action.max_num.value){
document.lurcher_action.lurcher_num.value = document.lurcher_action.max_num.value;
}
}
</script>
<!--导航-->
<?php require_once("army_daohang.htm");?>
<div id="mb_01">
<div class="page_build_title"><a href="lurcher.php" target="main"><span style="color:RED;">间谍派遣</span></a> <a href="lurcher_educate.php" target="main">间谍训练</a> <a href="war_info.php" target="main">查看当前军事行动</a></div>
</div>
<div id="mb_04">
<!--替换区域开始-->
<?php if($_COOKIE['city_type']=="1") { ?>
<?php if($study_result['s_army']>0) { ?>
<table width="90%" border=1 cellpadding=5 cellspacing=0 style="margin-top:20px; font-size:12px; border-collapse:collapse;border:1px solid threeddarkshadow; " bordercolor="threeddarkshadow" align="center">
<form action="" method="post" name="lurcher_action" onSubmit="return checkForm(this);">
<input type="hidden" name="action" value="attack">
<input type="hidden" name="attack_type" value="3">
<TR>
<TD align="center" class="sub_subtitle" colspan="2"><span id="text2" style="font-weight:bold;">派遣间谍:获取敌方情报信息</span></TD>
</TR>
<TR height="28">
<TD align="center" class="sub_subtitle">前往</TD>
<TD align="left">
<?php $area=explode(":",$_GET['area']);?>
城池坐标: <input name="area" type="text" size="6" value="<?php echo $area[0];?>">
<input name="area_x" type="text" size="3" value="<?php echo $area[1];?>">
<input name="area_y" type="text" size="3" value="<?php echo $area[2];?>">
<input name="button" type="button" class="submit" id="button" value="查找" onclick="javascript:self.window.location='world_map.php';">
</TD>
</TR>
<TR>
<TD align="center" class="sub_subtitle"><span id="text2">派遣</span></TD>
<TD align="left">
<?php if($lurcher['lurcher_num']>0) { ?>
<input name="lurcher_num" type="text" size="6" value="0" onchange="input_num(this);" />个间谍,现有(<?php echo $lurcher['lurcher_num'];?>)。
<input type="hidden" name="max_num" value="<?php echo $lurcher['lurcher_num'];?>" />
<?php }else { ?>
<input name="lurcher_num" type="hidden" size="6" value="0" />
<input type="hidden" name="max_num" value="0" />
<div style="color:RED;">请“<a href="lurcher_educate.php" target="main">训练间谍</a>”!</div>
<?php } ?>
</TD>
</TR>
<TR>
<TD align="center" class="sub_subtitle">花费</TD>
<TD align="left">
(<span style="color:RED;"><?php echo $lurcher_need_golds;?></span>)黄金
</TD>
</TR>
<TR>
<TD align="center" class="sub_subtitle">单程时间</TD>
<TD align="left">
(<span style="color:RED;"><?php echo $lurcher_time;?></span>) 分钟
</TD>
</TR>
</TABLE>
</td>
</tr>
<tr height="30"><td align="center"><input type="Submit" class="button" value=" 出发 " name="submit_name" /></td></tr>
</form>
</table>
<?php }else { ?>
<div id="building_description" class="task_title">派遣间谍需先研究“<a href="study.php" target="main">军情刺探</a>”!</div>
<?php }}else { ?>
<div class="page_title" style="color:red; margin-top:30px;">分城池不能派遣间谍!</div>
<?php } ?>
<!--替换区域结束-->
</div>
</div>
<div id="mb_03"></div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -