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

📄 wj_bhome.php

📁 This a free web game, animportantnote of this, "xia domain" for free software, follow the "general p
💻 PHP
字号:
<?
include "../inc/attest_lu.inc.php";
/*
===============================================================
=                 侠域(Ver 0.9.0) 使用规则版本(Ver 0.2)       =
             此程序所有版权归原作者所有. 此版权信息不得删除.
= Copyright (C) 2001-2002  WFoxd                              =
=                                                             =
=版权所有(C)2002,作者 田野(风狐) 未经许可 不得使用 传播    =
=E-MAIL:wfoxd@cnnetgame.com                                   =
=http://www.cnnetgame.com                                     =
===============================================================
*/
include "../inc/config.inc.php";
include "../inc/style.inc.php";
/*
==============
=
=公元 2002年月日
==============
*/
//判断瞬移
include "../include/area_now.inc.php";
$way = array("bhc/wj_home.php");
$way[] = "bhc/wj_bhome.php?id=".$id;
area_now($way,$user_id);
?>
<?
	if(empty($id)){
			echo "无效差数";
			exit();
		}
		
	include "../inc/db.inc.php";
	$home_info = mysql_query("SELECT * FROM wj_home WHERE id='$id'");
	$home_id = mysql_result($home_info,0,"id");	
	$home_open = mysql_result($home_info,0,"open");
	
	if($home_open == "N" && $home_id != "$user_id"){
		echo "<br><font color=green>房子已经被主人锁了,你进不去。</font>\n";
		echo "<meta http-equiv=\"refresh\" content=\"5; url=wj_home.php\">";
		mysql_close();
		exit();	
	}
	
	if($edit == 1){		
		echo ("
		<center>
			<form action=wj_bhome.php?edit=2&id=$id method=post>
			取名:<input type=text name=home_name size=10>(最多5个汉字)<br>
			房间描述:<input type=text name=home_des size=15><br>
			开放状态:开<input type=radio value=Y checked name=R1>关<input type=radio value=N name=R1>
			<input type=submit name=B1 value='设置' style='font-family: 宋体; border-style: ridge; border-width: 0; background-color: #CCFF99; color:#666633'>
			</form>
		</center>
		");
	}
	if($edit == 2){
		if($home_id != "$user_id"){
		echo "<br><font color=green>房间主人不是你,你怎么来捣蛋阿!</font>\n";
		echo "<meta http-equiv=\"refresh\" content=\"5; url=wj_home.php\">";
		mysql_close();
		exit();	
		}
		mysql_query("UPDATE wj_home SET home_name='$home_name',home_des='$home_des',open='$R1' WHERE id='$id'");
		echo "房间设置完毕。";
		$home_info = mysql_query("SELECT * FROM wj_home WHERE id='$id'");
	}
	if($kickout == 1){
		if($home_id != "$user_id"){
		echo "<br><font color=green>房间主人不是你,你怎么来捣蛋阿!</font>\n";
		echo "<meta http-equiv=\"refresh\" content=\"5; url=wj_home.php\">";
		mysql_close();
		exit();	
		}
		$at = "bhc/wj_bhome.php?id=".$id;
		mysql_query("UPDATE misc SET location_id='bhc/wj_home.php',location='玩家村' WHERE location_id='$at'");
		echo "房间设置完毕。";
	}
	
	if($sleep == 1){
	$my_info = mysql_query("SELECT kedian FROM misc WHERE id='$id'");
	$my_kedian = mysql_result($my_info,0,"kedian");
	
	$at = "wj_bhome.php?id=".$id;
	if(time() < $my_kedian+300){
		echo "<br><font color=green>休息也太频繁了,现在都没有任何效果了!</font>\n";
		echo "<meta http-equiv=\"refresh\" content=\"3; url=".$at."\">";
		mysql_close();
		exit();	
	}
		
	$time = time();
	
	mysql_query("UPDATE renwu_member SET hpnow=hp,ponow=po WHERE id='$id'");
	mysql_query("UPDATE misc SET kedian='$time' WHERE id='$id'");
	
	echo "<font color=#B3A43E>你美美的睡了一觉,觉得身心舒畅.....</font><br>\n";	
	}
	
	$home_name = mysql_result($home_info,0,"home_name");
	$home_des = mysql_result($home_info,0,"home_des");
	
	echo "<br>=============".$home_name."===============<br>";
	echo $home_des."。<br>\n";
	
	if($home_id == $user_id){
	echo "<br>你可以==><a href=wj_bhome.php?edit=1&id=$id>设置房间</a>|<a href=wj_bhome.php?kickout=1&id=$id>送客</a>|<a href=wj_bhome.php?sleep=1&id=$id>休息</a><br>";
	}
/*
	$npc_org = "";
    	include "../include/list_npc.inc.php";  
*/
	//记录位置
	include "../include/location_lu.inc.php";
	up_location("自己家","bhc/wj_bhome.php?id=$id","$user_id");
	
	echo ("
	<br>
	这里可以通往==><br>	
	<a href=./wj_home.php>【玩家村】<a/>
	");
?>

⌨️ 快捷键说明

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