Файл: modules/padmin/mainpage.php
Строк: 74
<?php
/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) 2013, Taras Chornyi, Sergiy Mazurenko, Ivan Kotliar
* @link http://perf-engine.net
* @package PerfEngine
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6) {
$title = _t('main_page_manager');
include_header($title);
$tpl->div('title', _t('main_page_manager'));
if(isset($_POST['save']) && $_GET['act']== 'save')
{
$mainpage = input($_POST['mainpage']);
$ini = new Ini(SYS.'/ini/core.ini');
$ini->write('mainpage', $mainpage);
$ini->updateFile();
$tpl->div('menu', _t('succ_save'));
$tpl->div('block', img('nav.png') . '<a href="/padmin/mainpage/">'._t('main_page_manager').'</a><br/>'. img('admin.png') .'<a href="/padmin/">'. _t('padmin') .'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
exit;
}
echo '<div class="post">
<form action="/padmin/mainpage/?act=save" method="post">
<b>'. _t('main_page_manager_contents') .'</b>:<br/>
<textarea name="mainpage" rows="10" cols="50">'. $system['mainpage'] .'</textarea><br/>
<input type="submit" name="save" value="'. _t('save') .'" /><br/>
</form>
</div>';
$tpl->div('block', img('admin.png') .'<a href="/padmin/">'. _t('padmin') .'</a><br/>'. HICO .'<a href="/">'. _t('home') .'</a>');
include_footer();
} else { header('Location: /'); exit;}
?>