mirror of
				https://e.coding.net/circlecloud/McAccount.git
				synced 2025-11-03 17:56:24 +00:00 
			
		
		
		
	@@ -29,4 +29,12 @@ class index extends AmysqlController {
 | 
			
		||||
		$this->title = "Minecraft 服务器列表";
 | 
			
		||||
		$this->_View ( "servers" );
 | 
			
		||||
	}
 | 
			
		||||
	function news() {
 | 
			
		||||
		$this->title = "Minecraft 服务器列表";
 | 
			
		||||
		$this->_View ( "news" );
 | 
			
		||||
	}
 | 
			
		||||
	function pics() {
 | 
			
		||||
		$this->title = "Minecraft 服务器列表";
 | 
			
		||||
		$this->_View ( "pics" );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -25,11 +25,19 @@ class user_public extends AmysqlController {
 | 
			
		||||
			JsonError ( '未通过验证 请T出服务器!' );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function clientlogout() {
 | 
			
		||||
		if ($this->_model ( "authme" )->clientlogout ( @$_REQUEST ['user'] )) {
 | 
			
		||||
			JsonSuccess ( '离线成功!' );
 | 
			
		||||
	function clientlogin() {
 | 
			
		||||
		if ($this->_model ( "authme" )->clientlogin ( @$_REQUEST ['user'], md5 ( @$_REQUEST ['pass'] ) )) {
 | 
			
		||||
			JsonSuccess ( '登陆成功!' );
 | 
			
		||||
		} else {
 | 
			
		||||
			JsonError ( '离线失败!' );
 | 
			
		||||
			JsonError ( '登陆失败!' );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function clientlogout() {
 | 
			
		||||
		if ($this->_model ( "authme" )->login ( @$_REQUEST ['user'], md5 ( @$_REQUEST ['pass'] ) )) {
 | 
			
		||||
			$_SESSION ['username'] = @$_REQUEST ['user'];
 | 
			
		||||
			JsonSuccess ( '登陆成功!' );
 | 
			
		||||
		} else {
 | 
			
		||||
			JsonError ( '登陆失败!' );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	function pass() {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,6 +26,13 @@ class authme extends AmysqlModel {
 | 
			
		||||
			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
 | 
			
		||||
			return false;
 | 
			
		||||
	}
 | 
			
		||||
	public function clientcheck($username) {
 | 
			
		||||
		$num = $this->_sum ( "SELECT * FROM `authme` WHERE `username`='$username' AND `isLogged`='1'" );
 | 
			
		||||
		if ($num != 0)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										0
									
								
								View/news.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								View/news.php
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								View/pics.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								View/pics.php
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								View/study.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								View/study.php
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										0
									
								
								View/tsjs.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								View/tsjs.php
									
									
									
									
									
										Normal file
									
								
							
		Reference in New Issue
	
	Block a user