<?php
acms_header('Рейтинг сайтов - админка', 'management');
is_active_module('PRIVATE_TRS');
if (post('ok')){
valid::create(array(
'TRS_NAME' => ['name', 'text', [2, 14], 'Название проекта', 0],
'TRS_TITLE' => ['title', 'text', [2, 50], 'Описание проекта', 0],
'TRS_VIP' => ['vip', 'number_abs', [0, 9999999], 'Цена за VIP']
));
if (ERROR_LOG == 1) {
redirect('/m/top_rating_sites/settings/');
}
ini::upgrade(ROOT.'/system/config/global/settings.ini', 'TRS_NAME', ini_data_check(TRS_NAME));
ini::upgrade(ROOT.'/system/config/global/settings.ini', 'TRS_TITLE', ini_data_check(TRS_TITLE));
ini::upgrade(ROOT.'/system/config/global/settings.ini', 'TRS_VIP', abs(TRS_VIP));
success('Изменения успешно приняты');
redirect('/m/top_rating_sites/settings/');
}
?>
<div class='list-body'>
<div class='list-menu'><center><b><?=tabs(config('TITLE'))?></b></center></div>
<div class='list-menu'>
<form method='post' class='ajax-form' action='/m/top_rating_sites/settings/'>
<?=html::input('name', null, 'Название вашего проекта', null, tabs(config('TRS_NAME')), 'form-control-100', 'text', null, 'text-width')?>
<?=html::input('title', null, 'Описание вашего проекта', null, tabs(config('TRS_TITLE')), 'form-control-100', 'text', null, 'text-width')?>
<?=html::input('vip', null, 'Цена за 1 день VIP', null, abs(config('TRS_VIP')), 'form-control-100', 'number', null, 'money')?>
<?=html::button('button ajax-button', 'ok', 'save', 'Сохранить изменения')?>
</form>
</div>
</div>
<?
back('/m/top_rating_sites/');
acms_footer();