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

📄 infomation.php

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

//处理武将等级、经验、代兵数
require_once("all_processing.php");

//处理武将等级、经验、代兵数
//require_once("update_gen_grade.php");

//资源增长
//require("auto_grow_resource.php");

//加载数据....
require_once("load_player_info.php");

require_once("functions/update_grade.php");

//加载放弃分城
include_once("city_out.php");

//查询是不是有加成道具;
$query_use_if_goods=$db->query("select * from add_goods_info where u_id='".$_COOKIE['UserId']."' and c_id='".$_COOKIE['CityId']."' and type='1';");
$io=$db->fetch_array($query_use_if_goods);
if ($io['golds_add']) $golds_img=1;else $golds_img=0;
if ($io['rices_add']) $rices_img=1;else $rices_img=0;
if ($io['woods_add']) $woods_img=1;else $woods_img=0;
if ($io['ores_add']) $ores_img=1;else $ores_img=0;

//我的城池列表
$city_query=$db->query("select * from city where `u_id`='".$_COOKIE['UserId']."' order by c_id");

     $woods_add = $add_resource[1] * $resource_percent;
     $irons_add = $add_resource[2] * $resource_percent;
     $golds_add = $add_resource[3] * $resource_percent;
     $rices_add = $add_resource[4] * $resource_percent;
     if($woods_add<1) $woods_add=1;
     if($irons_add<1) $irons_add=1;
     if($golds_add<1) $golds_add=1;
     if($rices_add<1) $rices_add=1;
     $atime = (int)(3600000/$woods_add);
     	if($atime=="") $atime=99999999;
     $btime = (int)(3600000/$irons_add);
     	if($btime=="") $btime=99999999;
     $ctime = (int)(3600000/$golds_add);
     	if($ctime=="") $ctime=99999999;
     $dtime = (int)(3600000/$rices_add);
     	if($dtime=="") $dtime=99999999;
     	
//查询是否使用免战牌
$query_mi=$db->query("select id from add_goods_info where type='2' and u_id='".$_COOKIE['UserId']."' and m_gid='80';");
$mian_if=$db->num_rows($query_mi);

$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">
<meta http-equiv="pragma"content="no-cache">  
<meta http-equiv="cache-control"content="no-cache,must-revalidate">  
<meta http-equiv="expires"content="wed,26feb199708:21:57gmt">  

<title>三国</title>

<link href="css/id.css" rel="stylesheet" type="text/css">
<link href="css/css.css" rel="stylesheet" type="text/css">
<style>
body{
margin-left:auto; margin-right:auto;
}
a:link {color: #FF3300;text-decoration: none;}
a:visited {color: #FF3300;text-decoration: none;}
a:active {color: #FF3300;text-decoration: none;}
a:hover {color: #734921;text-decoration: underline;}

</style>

</head>

<body style="overflow-x:hidden;" oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<script language="javascript" type="text/javascript" src="js/xmlhttprequest.js"></script>
<script language="javascript" type="text/javascript" src="js/game_init.js"></script>
<script language="javascript" type="text/javascript" src="js/resource_auto_grow.js"></script>
<script language="javascript" type="text/javascript" src="js/number_format.js"></script>

<script>
 function ResumeError() {
 return true;
 }
 window.onerror = ResumeError;
 
function refresh_page(){
	top.window.location = 'index.php';
}
function refresh_self(){
	self.window.location = 'infomation.php';
}

var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var base64DecodeChars = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,-1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
//客户端Base64编码
function base64encode(str) {
    var out, i, len;
    var c1, c2, c3;
  len = str.length;
    i = 0;
    out = "";
    while(i < len) {
 c1 = str.charCodeAt(i++) & 0xff;
 if(i == len)
 {
     out += base64EncodeChars.charAt(c1 >> 2);
     out += base64EncodeChars.charAt((c1 & 0x3) << 4);
     out += "==";
     break;
 }
 c2 = str.charCodeAt(i++);
 if(i == len)
 {
     out += base64EncodeChars.charAt(c1 >> 2);
     out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
     out += base64EncodeChars.charAt((c2 & 0xF) << 2);
     out += "=";
     break;
 }
 c3 = str.charCodeAt(i++);
 out += base64EncodeChars.charAt(c1 >> 2);
 out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
 out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
 out += base64EncodeChars.charAt(c3 & 0x3F);
    }   
    //out=out.replace("+","%2B");//替换+,否则在服务器解码的时候会出错 
    return out;
}
//客户端Base64解码

function base64decode(str) {
    var c1, c2, c3, c4;
    var i, len, out;

    len = str.length;
    i = 0;
    out = "";
    while(i < len) {
 /* c1 */
 do {
     c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
 } while(i < len && c1 == -1);
 if(c1 == -1)
     break;

 /* c2 */
 do {
     c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
 } while(i < len && c2 == -1);
 if(c2 == -1)
     break;

 out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));

 /* c3 */
 do {
     c3 = str.charCodeAt(i++) & 0xff;
     if(c3 == 61)
  return out;
     c3 = base64DecodeChars[c3];
 } while(i < len && c3 == -1);
 if(c3 == -1)
     break;

 out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));

 /* c4 */
 do {
     c4 = str.charCodeAt(i++) & 0xff;
     if(c4 == 61)
  return out;
     c4 = base64DecodeChars[c4];
 } while(i < len && c4 == -1);
 if(c4 == -1)
     break;
 out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
    }
    out=out.replace("+","%2B");//替换+,否则在服务器解码的时候会出错
    return out;
}

var build_name;
build_name=new Array('伐木场','采矿场','金矿','农田','民居','武器工房','牧场','军营','翰林院','酒馆','仓库','城墙','督造司');

function refresh_resource(){
	    
	//更新资源////////////////////////////
	var resource = new XMLHttpRequest();
	if (resource) {
        resource.onreadystatechange = function() {
            if (resource.readyState == 4 && (resource.status == 200 || resource.status == 304)) {
                //response.charset="utf8";
            	var s = unescape(resource.responseText);
            	//alert(s);
                var ars = s.split('|');
                var colors;
                //粮食
                if(parseInt(ars[31]) <= parseInt(ars[1])) colors='RED;';
                document.getElementById("rices").innerHTML='<span style=\"cursor:hand; color:'+colors+'\" title=\"粮食\">'+ars[1]+'</span>';
                document.resource_form.r_rices.value=ars[1];
                document.resource_form.r_rices_uplimit.value=ars[45];
                //木材
                if(parseInt(ars[32]) <= parseInt(ars[2])) colors='RED;';
                document.getElementById("woods").innerHTML='<span style=\"cursor:hand; color:'+colors+'\" title=\"木材\">'+ars[2]+'</span>';
                document.resource_form.r_woods.value=ars[2];
                //alert(ars[2]);
                document.resource_form.r_woods_uplimit.value=ars[46];
                //铁矿
                if(parseInt(ars[33]) <= parseInt(ars[3])) colors='RED;';
                document.getElementById("irons").innerHTML='<span style=\"cursor:hand; color:'+colors+'\" title=\"铁矿\">'+ars[3]+'</span>';
                document.resource_form.r_irons.value=ars[3];
                document.resource_form.r_irons_uplimit.value=ars[47];
                //黄金
                if(parseInt(ars[34]) <= parseInt(ars[4])) colors='RED;';
                document.getElementById("golds").innerHTML='<span style=\"cursor:hand; color:'+colors+'\" title=\"黄金\">'+ars[4]+'</span>';
                document.resource_form.r_golds.value=ars[4];
                document.resource_form.r_golds_uplimit.value=ars[44];
                //工作人口
                document.getElementById("total_house").innerHTML='<span id=\"total_house\" style=\"cursor:hand;\" title=\"总人口\">'+ars[9]+'</span>';
                //剩余人口
                if(parseInt(ars[28])<0) color='RED';
                else color='#734921';
                document.getElementById("free_house").innerHTML='<span id=\"free_house\" style=\"cursor:hand; color:'+color+';\" title=\"剩余人口\">'+ars[28]+'</span>';
                //<span style=\"cursor:hand; color:'+color+'\" title=\"剩余人口\">'+ars[28]+'</span>';
                //土地
                document.getElementById("city_size").innerText = 200 - parseInt(ars[11]);
                //当前城市士兵数
                /*
                var current_city_soldiers=Math.floor(ars[15]/10000);
                if(current_city_soldiers >=1) current_city_soldiers_value = (current_city_soldiers + '万');
                else current_city_soldiers_value = ars[15];
                */
                document.getElementById("soldier").innerHTML='<span id=\"soldier\" style=\"cursor:hand;\" title=\"士兵\">'+ars[15]+'</span>';
               
                
                //document.getElementById("current_city_officers").innerText = ars[16];//武将数
                document.getElementById("total_citys").innerText = ars[22];//总城池数
                document.getElementById("total_officers").innerText = ars[23];//总武将数
                document.getElementById("union_name").innerText = ars[24];//联盟
                if(parseInt(ars[24])=="" || parseInt(ars[24])=="0") document.getElementById("union_name").innerText = '无';//联盟
                if(parseInt(ars[25])>100) ars[25]=100;
                if(parseInt(ars[40])<1) ars[25]=0;
                document.getElementById("citywall_status").innerHTML = "<a href=\"build.php?build_page=recovery#citywall\" target=\"main\">"+ars[25]+"%";//城墙状态
                document.getElementById("p_grade").innerText = parseInt(ars[26]);//玩家等级
                var percent = Math.floor(ars[0]/ars[27]*100);
                if(percent>100) percent=100;
                document.getElementById("p_score").innerHTML = '<span id=\"p_score\">'+ars[0]+'/'+ars[27]+'</span>';
                p_score2.style.width = percent+'%';
                //在线人数
                document.getElementById("online").innerText = ars[29];
                //排名
                document.getElementById("rank").innerText = ars[30];
                //产量
                document.getElementById("golds_produce").innerHTML = parseInt(ars[36]);
                document.getElementById("rices_produce").innerHTML = parseInt(ars[37]);
                document.getElementById("woods_produce").innerHTML = parseInt(ars[38]);
                document.getElementById("irons_produce").innerHTML = parseInt(ars[39]);
                //生产百分比
                document.getElementById("produce").innerHTML = parseInt(ars[43]);
                                
                if(!ars[41] || ars[41]=='') document.getElementById("building").innerHTML = '建筑队列空闲';
                else document.getElementById("building").innerHTML = build_name[parseInt(ars[41])-1]+'正在升级中';
                //document.getElementById("building").innerText = parseInt(ars[41]);
                if(!ars[42] || ars[42]=='' || build_name[parseInt(ars[42])-1]=='') document.getElementById("complate_building").innerHTML = '无';
                else document.getElementById("complate_building").innerHTML = '已完成'+build_name[parseInt(ars[42])-1]+'升级';

⌨️ 快捷键说明

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