mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00

* fixed changing comment of characters with space and other special characters in name (#29) * fixed viewing guilds with space and other special characters in name (#29) * (kathrine template) fixed displaying menu when no URI is set (URI = '/') * added some additional checks for Validator guildName and rankName if name is empty * (internal) new twig filter: urlencode, which is using urlencode php function
37 lines
847 B
PHP
37 lines
847 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(tableExist('guild_members'))
|
|
define('GUILD_MEMBERS_TABLE', 'guild_members');
|
|
else
|
|
define('GUILD_MEMBERS_TABLE', 'guild_membership');
|
|
|
|
define('MOTD_EXISTS', fieldExist('motd', 'guilds'));
|
|
|
|
//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.');
|
|
}
|
|
}
|
|
?>
|