This commit is contained in:
Wruczek 2016-09-25 03:50:41 +02:00
parent 739748133b
commit e5469f09a2
5 changed files with 25 additions and 37 deletions

9
.gitignore vendored
View File

@ -1,6 +1,12 @@
config/config.php config/config.php
prototypes/ prototypes/
# PhpStorm
.idea/
*.iws
.idea_modules/
# Created by https://www.gitignore.io/api/windows,osx,linux # Created by https://www.gitignore.io/api/windows,osx,linux
### Windows ### ### Windows ###
@ -29,6 +35,9 @@ $RECYCLE.BIN/
.AppleDouble .AppleDouble
.LSOverride .LSOverride
# Icon must end with two \r
Icon
# Thumbnails # Thumbnails
._* ._*

View File

@ -19,12 +19,12 @@
### Requirements ### Requirements
- Minimum - Minimum
- PHP 5.4 or newer - PHP 5.5 or newer
- Installed and enabled ``mbstring`` extension - Installed and enabled ``mbstring`` extension
- Recommended - Recommended
- Newest stable PHP version - Newest stable PHP version
- Up-to-date Apache server - Up-to-date Apache server
- Enabled mod_rewrite (sudo a2enmod rewrite && service apache2 reload) - Enabled mod_rewrite (``sudo a2enmod rewrite && service apache2 reload``)
- Enabled support of htaccess - Enabled support of htaccess
<br><br> <br><br>

View File

@ -57,7 +57,7 @@ $config["adminlist"] = array(6, 17, 19);
$config['contact']['title'] = 'Contact the staff'; $config['contact']['title'] = 'Contact the staff';
$config['contact']['text'] = ' $config['contact']['text'] = '
<ul class="list-unstyled"> <ul class="list-unstyled">
<li>TeamSpeak: <span class="pullright">channel <a href="ts3server://ts.wruczek.top?channel=Kana%C5%82y%20publiczne%2FPogaduchy%2FPogaduchy%205">Pomoc</a></span></li> <li>TeamSpeak: <span class="pullright">channel <a href="ts3server://ts.wruczek.top?cid=30">TS-WEBSITE - Support</a></span></li>
<li>Email: <span class="pullright"><a href="mailto:kontakt@email.com">konakt@email.com</a></span></li> <li>Email: <span class="pullright"><a href="mailto:kontakt@email.com">konakt@email.com</a></span></li>
<li>GaduGadu: <span class="pullright"><a href="gg:123456789">123456789 <img src="https://status.gadu-gadu.pl/users/status.asp?id=49568758&styl=1"></a></span></li> <li>GaduGadu: <span class="pullright"><a href="gg:123456789">123456789 <img src="https://status.gadu-gadu.pl/users/status.asp?id=49568758&styl=1"></a></span></li>
<li>Steam: <span class="pullright"><a href="http://steamcommunity.com/id/wruczek">Wruczek</a></span></li> <li>Steam: <span class="pullright"><a href="http://steamcommunity.com/id/wruczek">Wruczek</a></span></li>

View File

@ -10,7 +10,7 @@
<p class="pull-left">&copy; <?php tl($config["general"]["title"]); ?> 2016</p> <p class="pull-left">&copy; <?php tl($config["general"]["title"]); ?> 2016</p>
<div class="pull-right"> <div class="pull-right">
<ul class="list-inline"> <ul class="list-inline">
<li><p><small><?php tl($lang["footer"]["website"]); ?> &copy; <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.3.1 | MIT License<br><?php tl($lang["footer"]["css"]); ?> <a href="https://flamespersecond.de">NothingTV</a>, <?php tl($lang["footer"]["background"]); ?> &copy; <a href="http://nabulsigraphix.wix.com/commissions">NabulsiGraphix</a></small></p></li> <li><p><small><?php tl($lang["footer"]["website"]); ?> &copy; <a href="http://wruczek.top">Wruczek</a> 2016 | <a href="https://github.com/Wruczek/ts-website">ts-website</a> v 1.3.2 | MIT License<br><?php tl($lang["footer"]["css"]); ?> <a href="https://flamespersecond.de">NothingTV</a>, <?php tl($lang["footer"]["background"]); ?> &copy; <a href="http://nabulsigraphix.wix.com/commissions">NabulsiGraphix</a></small></p></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -1,35 +1,5 @@
<?php <?php
/* Od wersji 1.2.0 sprawny htaccess nie jest już wymagany
if (!isset($_SERVER['HTACCESS'])) {
$title = 'Plik .htaccess nie jest włączony';
$text = '<p>Strona wymaga włączonej obsługi pliku <code>.htaccess</code>.</p>
<p><a href="https://www.digitalocean.com/community/tutorials/how-to-use-the-htaccess-file">Poradnik na temat właczania pliku htaccess</a></p>';
die(showError($title, $text));
}
*/
/* Od wersji 1.2.0 mod_rewrite nie jest już wymagany
if(!in_array('mod_rewrite', apache_get_modules())) {
$title = 'Brak wymaganych rozszerzeń';
$text = '<p>Na swoim serwerze nie posiadasz modułu <code>rewrite</code> wymaganego do poprawnego działania tej strony.</p>
<p>Posiadasz system Ubuntu? Świetnie! Uruchom poniższe komendy, by włączyć wymagany moduł:</p>
<pre>sudo a2enmod rewrite
sudo service apache2 reload</pre>
<p>Używasz system Debian? Uruchom owe komendy pomijając przedrostek <code>sudo</code>:</p>
<pre>a2enmod rewrite
service apache2 reload</pre>
<p>Jeśli używasz hostingu i nie masz dostępu do konsoli, skontaktuj się z administratorem lub pomocą techniczną Twojego hostingu.</p>';
die(showError($title, $text));
}
*/
function isPHPVersionSupported() { function isPHPVersionSupported() {
if (!defined('PHP_VERSION_ID')) { if (!defined('PHP_VERSION_ID')) {
$version = explode('.', PHP_VERSION); $version = explode('.', PHP_VERSION);
@ -48,7 +18,6 @@ if (!isPHPVersionSupported()) {
} }
if (!extension_loaded("mbstring")) { if (!extension_loaded("mbstring")) {
$title = 'MBString extension is missing'; $title = 'MBString extension is missing';
$text = '<p>Required PHP extension: <code>mbstring</code> has not been found on the server.</p> $text = '<p>Required PHP extension: <code>mbstring</code> has not been found on the server.</p>
@ -58,8 +27,18 @@ if (!extension_loaded("mbstring")) {
die(showError($title, $text)); die(showError($title, $text));
} }
if(!file_exists(__DIR__ . "/../config/config.php")) { try {
require_once __DIR__ . "/../lib/phpfastcache/autoload.php";
\phpFastCache\CacheManager::Files();
} catch (\phpFastCache\Exceptions\phpFastCacheDriverException $e) {
$title = 'Directory is not writable';
$text = '<p>Please make sure that the whole website directory including subdirectories is fully writable.</p>';
die(showError($title, $text));
}
if(!file_exists(__DIR__ . "/../config/config.php")) {
$title = 'config.php does not exists'; $title = 'config.php does not exists';
$text = '<p>Please go into the directory <code>config</code> and rename <code>config.template.php</code> to <code>config.php</code>.</p> $text = '<p>Please go into the directory <code>config</code> and rename <code>config.template.php</code> to <code>config.php</code>.</p>