diff --git a/.gitignore b/.gitignore index 596842b..cd71c5c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,34 +5,26 @@ admin/ cache/ !/cache/.htaccess -# PhpStorm -.idea/ -*.iws -.idea_modules/ - +# Heroku specific entries +vendor/ +.env -# Created by https://www.gitignore.io/api/windows,osx,linux - -### Windows ### -# Windows image file caches -Thumbs.db -ehthumbs.db +# Created by https://www.gitignore.io/api/osx,linux,windows,phpstorm,sublimetext -# Folder config file -Desktop.ini +### Linux ### +*~ -# Recycle Bin used on file shares -$RECYCLE.BIN/ +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* -# Windows Installer files -*.cab -*.msi -*.msm -*.msp +# KDE directory preferences +.directory -# Windows shortcuts -*.lnk +# Linux trash folder which might appear on any partition or disk +.Trash-* +# .nfs files are created when an open file is removed but is still being accessed +.nfs* ### OSX ### *.DS_Store @@ -42,7 +34,6 @@ $RECYCLE.BIN/ # Icon must end with two \r Icon - # Thumbnails ._* @@ -62,15 +53,122 @@ Network Trash Folder Temporary Items .apdisk +### PhpStorm ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -### Linux ### -*~ +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.xml +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml -# KDE directory preferences -.directory +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries -# Linux trash folder which might appear on any partition or disk -.Trash-* +# CMake +cmake-build-debug/ + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Ruby plugin and RubyMine +/.rakeTasks + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +### PhpStorm Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/sonarlint + +### SublimeText ### +# cache files for sublime text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# workspace files are user-specific +*.sublime-workspace + +# project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using SublimeText +# *.sublime-project + +# sftp configuration file +sftp-config.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.gitignore.io/api/osx,linux,windows,phpstorm,sublimetext diff --git a/.htaccess b/.htaccess index 89cef61..483a08a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,4 @@ -# (c) 2015 - 2017 Wruczek +# (c) 2015 - 2017 Wruczek and Contributors AddDefaultCharset UTF-8 diff --git a/LICENSE.md b/LICENSE.md index 9e784d1..b9f4a51 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 - 2017 Wruczek +Copyright (c) 2016 - 2017 Wruczek and Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/bans.php b/bans.php index 6c33a4c..1f4ffdc 100644 --- a/bans.php +++ b/bans.php @@ -68,14 +68,14 @@ function getBanlist() { $user = censorIP((string)$ban['ip']); if (!empty($ban['lastnickname'])) - $user = htmlentities((string)$ban['lastnickname']); + $user = htmlspecialchars((string)$ban['lastnickname']); if (empty($user)) $user = "Unknown"; - $reason = htmlentities((string)$ban['reason']); - $invokername = htmlentities((string)$ban['invokername']); + $reason = htmlspecialchars((string)$ban['reason']); + $invokername = htmlspecialchars((string)$ban['invokername']); $duration = $ban['duration']; $createdepoch = $ban['created']; $expiresepoch = $ban['created'] + $duration; diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d95217d --- /dev/null +++ b/composer.json @@ -0,0 +1,6 @@ +{ + "require" : { + "php" : "^5.5", + "ext-mbstring": "*" + } +} diff --git a/config/languages/lang.de.php b/config/languages/lang.de.php index 030ed98..c94d2ce 100644 --- a/config/languages/lang.de.php +++ b/config/languages/lang.de.php @@ -33,7 +33,7 @@ $lang["footer"]["background"] = "Hintergrund"; /************* Server status *************/ $lang["serverstatus"]["title"] = "Server Status"; -$lang["serverstatus"]["address"] = "Addresse"; +$lang["serverstatus"]["address"] = "Adresse"; $lang["serverstatus"]["loading"] = "Laden..."; $lang["serverstatus"]["online"] = "Online"; @@ -57,7 +57,7 @@ $lang["adminlist"]["lastupdate"] = "Letzte Aktualisierung: {0}"; /************* Server viewer promo box (under adminlist and contact) *************/ $lang["svpb"]["title"] = "Server Viewer"; -$lang["svpb"]["takealook"] = "Riskier 'n Blick »"; +$lang["svpb"]["takealook"] = "Riskier einen Blick »"; /************************************/ @@ -101,4 +101,4 @@ $lang["banlist"]["table"]["expires"] = "Läuft ab am"; $lang["rules"]["title"] = "Server Regeln"; $lang["rules"]["filenotfound"] = "Error: Die Datei config/rules.md wurde nicht gefunden!"; -$lang["rules"]["readerror"] = "Fehler: nicht genügend Rechte um auf config/rules.md zuzugreifen!"; +$lang["rules"]["readerror"] = "Fehler: Nicht genügend Rechte um auf config/rules.md zuzugreifen!"; diff --git a/config/rules.md b/config/rules.md index 8861b86..15b855e 100644 --- a/config/rules.md +++ b/config/rules.md @@ -1,4 +1,8 @@ -### Regulamin serwera +### Server Rules + +In dieser Datei werden die Server Regeln eingetragen welche dann auf der Seite "rules.php" angezeigt werden. Zum Ändern muss einfach die Datei rules.md im Verzeichnis config verändert werden. + +
This is a dedicated file to keep your server rules. Its loaded and displayed on "rules.php" page. To change it, go to the config directory and edit file rules.md diff --git a/css/style.css b/css/style.css index 75c9e35..b1bf810 100644 --- a/css/style.css +++ b/css/style.css @@ -31,7 +31,8 @@ p, a { /* Force 16px icon size after TeamSpeak update 3.1.5 */ .ts3_viewer img, .adminlist img { - width: 16px + max-height: 16px; + max-width: 16px } /* ****** */ diff --git a/include/adminlist.php b/include/adminlist.php index ebf2faf..3c7d882 100644 --- a/include/adminlist.php +++ b/include/adminlist.php @@ -63,11 +63,11 @@ function getAdminList() { if($user["client_type"]) continue; if (!$user) { - $offlineClients[] = '

' . htmlentities($userInfo['client_nickname']) . '' . translate($lang["adminlist"]["status"]["offline"]) . '

'; + $offlineClients[] = '

' . htmlspecialchars($userInfo['client_nickname']) . '' . translate($lang["adminlist"]["status"]["offline"]) . '

'; continue; } - $onlineClients[] = '

User status' . '' . htmlentities($user) . '' . ($user['client_away'] ? '' . translate($lang["adminlist"]["status"]["away"]) . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '

'; + $onlineClients[] = '

User status' . '' . htmlspecialchars($user) . '' . ($user['client_away'] ? '' . translate($lang["adminlist"]["status"]["away"]) . '' : '' . translate($lang["adminlist"]["status"]["online"]) . '') . '

'; } foreach (array_merge($onlineClients, $offlineClients) as $str) diff --git a/include/footer.php b/include/footer.php index 87c7f71..ceee11b 100644 --- a/include/footer.php +++ b/include/footer.php @@ -12,7 +12,7 @@
  • - ts-website v 1.4.5 — © Wruczek 2016 - 2017 + ts-website v 1.4.5 — © Wruczek and Contributors 2016 - 2017

    diff --git a/include/header.php b/include/header.php index 7235690..744b83b 100644 --- a/include/header.php +++ b/include/header.php @@ -16,7 +16,7 @@ $htalink = $config["general"]["enablehta"] ? "" : ".php"; "> - + <?php echo $config["general"]["title"] . $config["general"]["subtitle"]; ?>