myaac/system/pages/guilds.php
slawkens1 05f8756a12 * fixed viewing pages with capital letters (like serverInfo) on case sensitive systems
* 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
2017-11-14 19:58:44 +01:00

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.');
}
}
?>