mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00

* changed tableExist and fieldExist to $db->hasTable(table) + $db->hasColumn(table, column) * new configurable: database_log - can log database queries and show in website source when logged as super admin * removed debug_level configurable, enabled by default when logged on super admin * added OTS_Account:getCountry() * added posibility to load OTS_Player partially, and without skills * (internal) changed depracated $ots->createObject() functions with their OTS_ equivalents * (internal) removed unused code
37 lines
854 B
PHP
37 lines
854 B
PHP
<?php
|
|
/**
|
|
* Guilds
|
|
*
|
|
* @package MyAAC
|
|
* @author Gesior <jerzyskalski@wp.pl>
|
|
* @author Slawkens <slawkens@gmail.com>
|
|
* @copyright 2017 MyAAC
|
|
* @link http://my-aac.org
|
|
*/
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
$title = 'Guilds';
|
|
|
|
if($db->hasTable('guild_members'))
|
|
define('GUILD_MEMBERS_TABLE', 'guild_members');
|
|
else
|
|
define('GUILD_MEMBERS_TABLE', 'guild_membership');
|
|
|
|
define('MOTD_EXISTS', $db->hasColumn('guilds', 'motd'));
|
|
|
|
//show list of guilds
|
|
if(empty($action)) {
|
|
require(PAGES . 'guilds/list_of_guilds.php');
|
|
}
|
|
else {
|
|
if(!ctype_alnum(str_replace(array('-', '_'), '', $action))) {
|
|
error('Error: Action contains illegal characters.');
|
|
}
|
|
else if(file_exists(PAGES . 'guilds/' . $action . '.php')) {
|
|
require(PAGES . 'guilds/' . $action . '.php');
|
|
}
|
|
else {
|
|
error('This page does not exists.');
|
|
}
|
|
}
|
|
?>
|