Require UTF-8

This commit is contained in:
ruan 2015-11-03 09:01:26 +02:00
parent 335229b0d1
commit 9b3943ad5c

View File

@ -6,6 +6,10 @@ use PDOException;
class Page { class Page {
public function __construct($name, $header = true) { public function __construct($name, $header = true) {
ini_set('mbstring.internal_encoding', 'UTF-8');
ini_set('default_charset', 'utf-8');
header('Content-Type: text/html; charset=UTF-8');
$this->time = microtime(true); $this->time = microtime(true);
if ($header) { if ($header) {
require_once './includes/header.php'; require_once './includes/header.php';
@ -32,13 +36,13 @@ class Page {
$this->set_info($info); $this->set_info($info);
$this->permanent = array( $this->permanent = array(
'ban' => 'Permanent Ban', 'ban' => 'Permanent Ban',
'mute' => 'Permanent Mute', 'mute' => 'Permanent Mute',
'warn' => 'Permanent', 'warn' => 'Permanent',
'kick' => null, 'kick' => null,
); );
$this->expired = array( $this->expired = array(
'ban' => '(Unbanned)', 'ban' => '(Unbanned)',
'mute' => '(Unmuted)', 'mute' => '(Unmuted)',
'warn' => '(Expired)', 'warn' => '(Expired)',
'kick' => null, 'kick' => null,
@ -58,34 +62,34 @@ class Page {
case "ban": case "ban":
case "bans": case "bans":
return array( return array(
"type" => "ban", "type" => "ban",
"table" => $settings->table['bans'], "table" => $settings->table['bans'],
"title" => "Bans", "title" => "Bans",
); );
case "mute": case "mute":
case "mutes": case "mutes":
return array( return array(
"type" => "mute", "type" => "mute",
"table" => $settings->table['mutes'], "table" => $settings->table['mutes'],
"title" => "Mutes", "title" => "Mutes",
); );
case "warn": case "warn":
case "warnings": case "warnings":
return array( return array(
"type" => "warn", "type" => "warn",
"table" => $settings->table['warnings'], "table" => $settings->table['warnings'],
"title" => "Warnings", "title" => "Warnings",
); );
case "kick": case "kick":
case "kicks": case "kicks":
return array( return array(
"type" => "kick", "type" => "kick",
"table" => $settings->table['kicks'], "table" => $settings->table['kicks'],
"title" => "Kicks", "title" => "Kicks",
); );
default: default:
return array( return array(
"type" => null, "type" => null,
"table" => null, "table" => null,
"title" => null, "title" => null,
); );