name = 'LiteBans'; // Clicking on the header name will send you to this address. $this->name_link = '#'; // Database information $host = 'localhost'; $port = 3306; $database = 'litebans'; $username = 'root'; $password = 'password'; // Supported drivers: mysql, pgsql $driver = 'mysql'; // Show inactive bans? Removed bans will show (Unbanned), mutes will show (Unmuted), warnings will show (Expired). $this->show_inactive_bans = true; // Show pager? This allows users to page through the list of bans. $this->show_pager = true; // Amount of bans/mutes/warnings to show on each page $this->limit_per_page = 10; // If you set a table prefix in config.yml, set it here as well $table_prefix = ""; // The server console will be identified by any of these names. // It will be given a standard name and avatar image. $this->console_aliases = array( "CONSOLE", "Console", ); $this->console_name = "Console"; $this->console_image = "includes/img/console.png"; // Avatar images for all players will be fetched from this URL. // Examples: /* 'https://cravatar.eu/avatar/$UUID/25' * 'https://crafatar.com/avatars/$UUID?size=25' * 'https://minotar.net/avatar/$NAME/25' */ $this->avatar_source = 'https://cravatar.eu/avatar/$UUID/25'; // If enabled, names will be shown below avatars instead of being shown next to them. $this->avatar_names_below = true; // The date format can be changed here. // https://secure.php.net/manual/en/function.date.php // Example of default: July 2, 2015, 9:19 PM $this->date_format = 'F j, Y, g:i A'; date_default_timezone_set("UTC"); /*** End of configuration ***/ $this->table = array( 'bans' => "${table_prefix}bans", 'mutes' => "${table_prefix}mutes", 'warnings' => "${table_prefix}warnings", 'kicks' => "${table_prefix}kicks", 'history' => "${table_prefix}history", ); $this->active_query = ""; if ($driver === "pgsql") { Settings::$TRUE = "B'1'"; Settings::$FALSE = "B'0'"; } if (!$this->show_inactive_bans) { $this->active_query = "WHERE active=" . Settings::$TRUE; } $this->driver = $driver; if ($connect) { $dsn = "$driver:dbname=$database;host=$host;port=$port"; if ($driver === 'mysql') { $dsn .= ';charset=utf8'; } try { $this->conn = new PDO($dsn, $username, $password); $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die('Connection failed: ' . $e->getMessage()); } if ($driver === 'pgsql') { $this->conn->query("SET NAMES 'UTF8';"); } } } }