<?php
  
ECHO "<div class='navi'>";
ECHO "<a href='?'>".ICONS('home', 25)."</a>";
ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
ECHO "<a href='?path=site'>".LG('Настройки сайта')."</a> ";
ECHO "".ICONS('angle-right', 22, 'fa-fw')."";
ECHO "".LG('Режим онлайн')."";
ECHO "</div>";
  
IF (POST('ok')){
  
  $users = INTVAL(POST('users'));
  $guests = INTVAL(POST('guests'));
  
  INI::UPGRADE(ROOT.'/system/config/global/settings.ini', 'ONLINE_TIME_USERS', $users);
  INI::UPGRADE(ROOT.'/system/config/global/settings.ini', 'ONLINE_TIME_GUESTS', $guests);
  
  SUCCESS('Изменения успешно приняты', 'session');
  REDIRECT('?path=site&section=online');
    
}

ECHO "<div class='fon'>";
  
ECHO "<form method='post'>";

ECHO "<b>".LG('Сколько будет высвечиваться что пользователь онлайн?:')."</b><br />";
ECHO "<select name='users' class='form-control-select'>";
ECHO "<option value='0'".(CONFIG('ONLINE_TIME_USERS') == 0?" selected='selected'":NULL).">0 ".LG('минут')."</option>";
ECHO "<option value='60'".(CONFIG('ONLINE_TIME_USERS') == 60?" selected='selected'":NULL).">1 ".LG('минуту')."</option>";
ECHO "<option value='120'".(CONFIG('ONLINE_TIME_USERS') == 120?" selected='selected'":NULL).">2 ".LG('минуты')."</option>";
ECHO "<option value='180'".(CONFIG('ONLINE_TIME_USERS') == 180?" selected='selected'":NULL).">3 ".LG('минуты')."</option>";
ECHO "<option value='240'".(CONFIG('ONLINE_TIME_USERS') == 240?" selected='selected'":NULL).">4 ".LG('минуты')."</option>";
ECHO "<option value='300'".(CONFIG('ONLINE_TIME_USERS') == 300?" selected='selected'":NULL).">5 ".LG('минут')."</option>";
ECHO "<option value='360'".(CONFIG('ONLINE_TIME_USERS') == 360?" selected='selected'":NULL).">6 ".LG('минут')."</option>";
ECHO "<option value='420'".(CONFIG('ONLINE_TIME_USERS') == 420?" selected='selected'":NULL).">7 ".LG('минут')."</option>";
ECHO "<option value='480'".(CONFIG('ONLINE_TIME_USERS') == 480?" selected='selected'":NULL).">8 ".LG('минут')."</option>";
ECHO "<option value='540'".(CONFIG('ONLINE_TIME_USERS') == 540?" selected='selected'":NULL).">9 ".LG('минут')."</option>";
ECHO "<option value='600'".(CONFIG('ONLINE_TIME_USERS') == 600?" selected='selected'":NULL).">10 ".LG('минут')."</option>";
ECHO "<option value='660'".(CONFIG('ONLINE_TIME_USERS') == 660?" selected='selected'":NULL).">11 ".LG('минут')."</option>";
ECHO "<option value='720'".(CONFIG('ONLINE_TIME_USERS') == 720?" selected='selected'":NULL).">12 ".LG('минут')."</option>";
ECHO "<option value='780'".(CONFIG('ONLINE_TIME_USERS') == 780?" selected='selected'":NULL).">13 ".LG('минут')."</option>";
ECHO "<option value='840'".(CONFIG('ONLINE_TIME_USERS') == 840?" selected='selected'":NULL).">14 ".LG('минут')."</option>";
ECHO "<option value='900'".(CONFIG('ONLINE_TIME_USERS') == 900?" selected='selected'":NULL).">15 ".LG('минут')."</option>";
ECHO "<option value='960'".(CONFIG('ONLINE_TIME_USERS') == 960?" selected='selected'":NULL).">16 ".LG('минут')."</option>";
ECHO "<option value='1020'".(CONFIG('ONLINE_TIME_USERS') == 1020?" selected='selected'":NULL).">17 ".LG('минут')."</option>";
ECHO "<option value='1080'".(CONFIG('ONLINE_TIME_USERS') == 1080?" selected='selected'":NULL).">18 ".LG('минут')."</option>";
ECHO "<option value='1140'".(CONFIG('ONLINE_TIME_USERS') == 1140?" selected='selected'":NULL).">19 ".LG('минут')."</option>";
ECHO "<option value='1200'".(CONFIG('ONLINE_TIME_USERS') == 1200?" selected='selected'":NULL).">20 ".LG('минут')."</option>";
ECHO "<option value='1260'".(CONFIG('ONLINE_TIME_USERS') == 1260?" selected='selected'":NULL).">21 ".LG('минутy')."</option>";
ECHO "<option value='1320'".(CONFIG('ONLINE_TIME_USERS') == 1320?" selected='selected'":NULL).">22 ".LG('минуты')."</option>";
ECHO "<option value='1380'".(CONFIG('ONLINE_TIME_USERS') == 1380?" selected='selected'":NULL).">23 ".LG('минуты')."</option>";
ECHO "<option value='1440'".(CONFIG('ONLINE_TIME_USERS') == 1440?" selected='selected'":NULL).">24 ".LG('минуты')."</option>";
ECHO "<option value='1500'".(CONFIG('ONLINE_TIME_USERS') == 1500?" selected='selected'":NULL).">25 ".LG('минут')."</option>";
ECHO "<option value='1800'".(CONFIG('ONLINE_TIME_USERS') == 1800?" selected='selected'":NULL).">30 ".LG('минут')."</option>";
ECHO "<option value='2100'".(CONFIG('ONLINE_TIME_USERS') == 2100?" selected='selected'":NULL).">35 ".LG('минут')."</option>";
ECHO "<option value='2400'".(CONFIG('ONLINE_TIME_USERS') == 2400?" selected='selected'":NULL).">40 ".LG('минут')."</option>";
ECHO "<option value='2700'".(CONFIG('ONLINE_TIME_USERS') == 2700?" selected='selected'":NULL).">45 ".LG('минут')."</option>";
ECHO "<option value='3000'".(CONFIG('ONLINE_TIME_USERS') == 3000?" selected='selected'":NULL).">50 ".LG('минут')."</option>";
ECHO "<option value='3300'".(CONFIG('ONLINE_TIME_USERS') == 3300?" selected='selected'":NULL).">55 ".LG('минут')."</option>";
ECHO "<option value='3600'".(CONFIG('ONLINE_TIME_USERS') == 3600?" selected='selected'":NULL).">1 ".LG('час')." [max]</option>";
ECHO "</select><br /><br />";

ECHO "<b>".LG('Сколько будет высвечиваться что гость онлайн?:')."</b><br />";
ECHO "<select name='guests' class='form-control-select'>";
ECHO "<option value='0'".(CONFIG('ONLINE_TIME_GUESTS') == 0?" selected='selected'":NULL).">0 ".LG('минут')."</option>";
ECHO "<option value='60'".(CONFIG('ONLINE_TIME_GUESTS') == 60?" selected='selected'":NULL).">1 ".LG('минуту')."</option>";
ECHO "<option value='120'".(CONFIG('ONLINE_TIME_GUESTS') == 120?" selected='selected'":NULL).">2 ".LG('минуты')."</option>";
ECHO "<option value='180'".(CONFIG('ONLINE_TIME_GUESTS') == 180?" selected='selected'":NULL).">3 ".LG('минуты')."</option>";
ECHO "<option value='240'".(CONFIG('ONLINE_TIME_GUESTS') == 240?" selected='selected'":NULL).">4 ".LG('минуты')."</option>";
ECHO "<option value='300'".(CONFIG('ONLINE_TIME_GUESTS') == 300?" selected='selected'":NULL).">5 ".LG('минут')."</option>";
ECHO "<option value='360'".(CONFIG('ONLINE_TIME_GUESTS') == 360?" selected='selected'":NULL).">6 ".LG('минут')."</option>";
ECHO "<option value='420'".(CONFIG('ONLINE_TIME_GUESTS') == 420?" selected='selected'":NULL).">7 ".LG('минут')."</option>";
ECHO "<option value='480'".(CONFIG('ONLINE_TIME_GUESTS') == 480?" selected='selected'":NULL).">8 ".LG('минут')."</option>";
ECHO "<option value='540'".(CONFIG('ONLINE_TIME_GUESTS') == 540?" selected='selected'":NULL).">9 ".LG('минут')."</option>";
ECHO "<option value='600'".(CONFIG('ONLINE_TIME_GUESTS') == 600?" selected='selected'":NULL).">10 ".LG('минут')."</option>";
ECHO "<option value='660'".(CONFIG('ONLINE_TIME_GUESTS') == 660?" selected='selected'":NULL).">11 ".LG('минут')."</option>";
ECHO "<option value='720'".(CONFIG('ONLINE_TIME_GUESTS') == 720?" selected='selected'":NULL).">12 ".LG('минут')."</option>";
ECHO "<option value='780'".(CONFIG('ONLINE_TIME_GUESTS') == 780?" selected='selected'":NULL).">13 ".LG('минут')."</option>";
ECHO "<option value='840'".(CONFIG('ONLINE_TIME_GUESTS') == 840?" selected='selected'":NULL).">14 ".LG('минут')."</option>";
ECHO "<option value='900'".(CONFIG('ONLINE_TIME_GUESTS') == 900?" selected='selected'":NULL).">15 ".LG('минут')."</option>";
ECHO "<option value='960'".(CONFIG('ONLINE_TIME_GUESTS') == 960?" selected='selected'":NULL).">16 ".LG('минут')."</option>";
ECHO "<option value='1020'".(CONFIG('ONLINE_TIME_GUESTS') == 1020?" selected='selected'":NULL).">17 ".LG('минут')."</option>";
ECHO "<option value='1080'".(CONFIG('ONLINE_TIME_GUESTS') == 1080?" selected='selected'":NULL).">18 ".LG('минут')."</option>";
ECHO "<option value='1140'".(CONFIG('ONLINE_TIME_GUESTS') == 1140?" selected='selected'":NULL).">19 ".LG('минут')."</option>";
ECHO "<option value='1200'".(CONFIG('ONLINE_TIME_GUESTS') == 1200?" selected='selected'":NULL).">20 ".LG('минут')."</option>";
ECHO "<option value='1260'".(CONFIG('ONLINE_TIME_GUESTS') == 1260?" selected='selected'":NULL).">21 ".LG('минутy')."</option>";
ECHO "<option value='1320'".(CONFIG('ONLINE_TIME_GUESTS') == 1320?" selected='selected'":NULL).">22 ".LG('минуты')."</option>";
ECHO "<option value='1380'".(CONFIG('ONLINE_TIME_GUESTS') == 1380?" selected='selected'":NULL).">23 ".LG('минуты')."</option>";
ECHO "<option value='1440'".(CONFIG('ONLINE_TIME_GUESTS') == 1440?" selected='selected'":NULL).">24 ".LG('минуты')."</option>";
ECHO "<option value='1500'".(CONFIG('ONLINE_TIME_GUESTS') == 1500?" selected='selected'":NULL).">25 ".LG('минут')."</option>";
ECHO "<option value='1800'".(CONFIG('ONLINE_TIME_GUESTS') == 1800?" selected='selected'":NULL).">30 ".LG('минут')."</option>";
ECHO "<option value='2100'".(CONFIG('ONLINE_TIME_GUESTS') == 2100?" selected='selected'":NULL).">35 ".LG('минут')."</option>";
ECHO "<option value='2400'".(CONFIG('ONLINE_TIME_GUESTS') == 2400?" selected='selected'":NULL).">40 ".LG('минут')."</option>";
ECHO "<option value='2700'".(CONFIG('ONLINE_TIME_GUESTS') == 2700?" selected='selected'":NULL).">45 ".LG('минут')."</option>";
ECHO "<option value='3000'".(CONFIG('ONLINE_TIME_GUESTS') == 3000?" selected='selected'":NULL).">50 ".LG('минут')."</option>";
ECHO "<option value='3300'".(CONFIG('ONLINE_TIME_GUESTS') == 3300?" selected='selected'":NULL).">55 ".LG('минут')."</option>";
ECHO "<option value='3600'".(CONFIG('ONLINE_TIME_GUESTS') == 3600?" selected='selected'":NULL).">1 ".LG('час')." [max]</option>";
ECHO "</select><br /><br />";

HTML::BUTTON('panel-button2', 'ok', 'save', 'Сохранить изменения');

ECHO "</form>";

ECHO "</div>";

?>