mirror of
				https://github.com/slawkens/myaac.git
				synced 2025-10-31 07:56:23 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			81 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Deprecated functions (compat)
 | |
|  *
 | |
|  * @package   MyAAC
 | |
|  * @author    Slawkens <slawkens@gmail.com>
 | |
|  * @copyright 2019 MyAAC
 | |
|  * @link      https://my-aac.org
 | |
|  */
 | |
| defined('MYAAC') or die('Direct access not allowed!');
 | |
| 
 | |
| class Validator extends \MyAAC\Validator {}
 | |
| 
 | |
| function check_name($name, &$errors = '') {
 | |
| 	if(Validator::characterName($name))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function check_account_id($id, &$errors = '') {
 | |
| 	if(Validator::accountId($id))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function check_account_name($name, &$errors = '') {
 | |
| 	if(Validator::accountName($name))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function check_name_new_char($name, &$errors = '') {
 | |
| 	if(Validator::newCharacterName($name))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function check_rank_name($name, &$errors = '') {
 | |
| 	if(Validator::rankName($name))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function check_guild_name($name, &$errors = '') {
 | |
| 	if(Validator::guildName($name))
 | |
| 		return true;
 | |
| 
 | |
| 	$errors = Validator::getLastError();
 | |
| 	return false;
 | |
| }
 | |
| 
 | |
| function news_place() {
 | |
| 	return tickers();
 | |
| }
 | |
| 
 | |
| function tableExist($table)
 | |
| {
 | |
| 	global $db;
 | |
| 	return $db->hasTable($table);
 | |
| }
 | |
| 
 | |
| function fieldExist($field, $table)
 | |
| {
 | |
| 	global $db;
 | |
| 	return $db->hasColumn($table, $field);
 | |
| }
 | |
| 
 | |
| function getCreatureImgPath($creature): string {
 | |
| 	return getMonsterImgPath($creature);
 | |
| }
 | 
