1
0
mirror of https://e.coding.net/circlecloud/McAccount.git synced 2024-11-21 01:38:55 +00:00

修改服务器信息 修复玩家无法退出的问题...

Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
502647092 2015-11-12 21:01:18 +08:00
parent 893f6d223d
commit 36ef3990da
4 changed files with 84 additions and 21 deletions

View File

@ -444,4 +444,4 @@ class DB {
$CharSet = str_replace ( '-', '', $Config ['CharSet'] );
mysql_query ( "SET NAMES '$CharSet'", $this->DBS [$Config ['ModelTag']] );
}
}
}

View File

@ -33,7 +33,7 @@ class user_public extends AmysqlController {
}
}
function clientlogout() {
if ($this->_model ( "authme" )->login ( @$_REQUEST ['user'], md5 ( @$_REQUEST ['pass'] ) )) {
if ($this->_model ( "authme" )->clientlogout ( @$_REQUEST ['user'])) {
$_SESSION ['username'] = @$_REQUEST ['user'];
JsonSuccess ( '登陆成功!' );
} else {

View File

@ -19,18 +19,19 @@ class authme extends AmysqlModel {
return false;
}
public function login($username, $password) {
$sum = $this->_sum ( "SELECT * FROM `authme` WHERE `username` = '$username' AND `password` = '$password'" );
if ($sum != 0)
return true;
else
return false;
}
public function clientlogin($username, $password) {
$sum = $this->_sum ( "SELECT * FROM `authme` WHERE `username` = '$username' AND `password` = '$password'" );
if ($sum != 0) {
$key = array ("isLogged" => 1 );
$this->_update ( 'authme', $key, "WHERE `username`='$username'" );
return true;
}
}
public function clientlogin($username, $password) {
$sum = $this->_sum ( "SELECT * FROM `authme` WHERE `username` = '$username' AND `password` = '$password'" );
if ($sum != 0)
return true;
else
} else
return false;
}
public function clientcheck($username) {
@ -42,11 +43,11 @@ class authme extends AmysqlModel {
}
public function clientlogout($username) {
$key = array ("isLogged" => 0 );
$num = $this->_update ( 'authme', $key, "WHERE `username`='" . $username . "'" );
if ($num == 0)
return false;
else
$num = $this->_update ( 'authme', $key, "WHERE `username`='$username'" );
if ($num != 0)
return true;
else
return false;
}
public function pass($username, $newpass) {
$key = array ("password" => $newpass );

View File

@ -1,31 +1,61 @@
{
"areas":[
{
"name":"测试大区",
"servers":[
{
"name":"测试服务器",
"addr":"2630.7ymc.com",
"port":25565,
"picurl":"http://yum.citycraft.cn",
"type":"测试|生存|PVP|帮派|技能|任务",
"info":"测试服务器一区",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.8-Forge",
"url":"http://cloud.citycraft.cn/Version",
"depend":"1.8"
}
]
},
{
"name":"纯净大区",
"servers":[
{
"name":"MFCRAFT",
"address":"s1.mfcraft.cn",
"addr":"s1.mfcraft.cn",
"port":25510,
"info":"MFCRAFT \u000d 稳定 声誉 生存 地皮 小游戏",
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.8-Forge",
"url":"four.mengcraft.com",
"depend":"1.8"
},
{
"name":"IZCRAFT",
"address":"mc.izcraft.com",
"addr":"mc.izcraft.com",
"port":25565,
"info":"IZCRAFT \u000d 稳定 声誉 生存 地皮 小游戏",
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.8-Forge",
"url":"http://cloud.citycraft.cn/Version",
"depend":"1.8"
},
{
"name":"MFCRAFT3",
"address":"s3.mfcraft.cn",
"addr":"s3.mfcraft.cn",
"port":25512,
"info":"MFCRAFT3 \u000d 稳定 声誉 生存 地皮 小游戏",
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.8",
"url":"four.mengcraft.com",
"depend":"1.8"
@ -37,14 +67,46 @@
"servers":[
{
"name":"梦幻之都",
"address":"three.mengcraft.com",
"addr":"three.mengcraft.com",
"port":11333,
"info":"梦幻之都\u000dMOD服务器\u000d豆腐 家具 工业2 能源应用2",
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.7.10-Forge-CT",
"url":"http://cloud.citycraft.cn/Version",
"depend":"1.7.10"
}
]
}
],
"recommendserver":[
{
"name":"逗比ZXC",
"addr":"three.mengcraft.com",
"port":11333,
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.7.10-Forge-CT",
"url":"http://cloud.citycraft.cn/Version",
"depend":"1.7.10"
},
{
"name":"傻叉ZXC",
"addr":"three.mengcraft.com",
"port":11333,
"picurl":"http://yum.citycraft.cn",
"type":"生存|PVP|帮派|技能|任务",
"info":"我是7老板 我在生存一区等你",
"wfjs":"http://yum.citycraft.cn",
"tsjc":"http://yum.citycraft.cn",
"version":"1.7.10-Forge-CT",
"url":"http://cloud.citycraft.cn/Version",
"depend":"1.7.10"
}
]
}