* new account.login view for tibiacom template

* added new indicator icons for create account, create character and change character name
* attempt to fix incorrect views counter behavior (its resetting to 0 in some cases)
* moved check_* functions to class Validator
* from now all validators ajax requests will fire onblur instead of onkeyup
* ajax requests returns now json instead of xml
* added 404 response when file is not found
* fixed gallery
This commit is contained in:
slawkens
2017-10-16 16:49:35 +02:00
parent dd572b00d0
commit 4daaa67710
263 changed files with 886 additions and 539 deletions

View File

@@ -15,19 +15,20 @@ $views_counter = 1; // default value, must be here!
if($cache->enabled())
{
$value = 0;
if(!$cache->fetch('views_counter', $value))
if(!$cache->fetch('views_counter', $value) || $value <= 1)
{
$value = 0;
if(fetchDatabaseConfig('views_counter', $value))
$views_counter = $value;
else
registerDatabaseConfig('views_counter', 1); // save in the database
registerDatabaseConfig('views_counter', 2); // save in the database
}
else
else {
$views_counter = $value;
}
$cache->set('views_counter', ++$views_counter, 60 * 60);
if(($views_counter % COUNTER_SYNC) == 0) // sync with database
if($views_counter > 1 && ($views_counter % COUNTER_SYNC) == 0) // sync with database
updateDatabaseConfig('views_counter', $views_counter);
/*
{