View file modules/padmin/mainpage.php

File size: 1.42Kb
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.ru	  *
**********************************/
$locate = 'in_padmin';
if(isset($user) && $user['level'] >= 6) {
$title = $lang->word('main_page_manager');
require_once(SYS.'/view/header.php');
$tpl->div('title',  $lang->word('main_page_manager'));
if(isset($_POST['save']) && $_GET['act']== 'save') {
$mainpage = input($_POST['mainpage']);
$db->query("UPDATE `system` SET  `mainpage` = '". $mainpage."'");
$tpl->div('menu', $lang->word('succ_save'));
$tpl->div('block', img('nav.png') . '<a href="/padmin/mainpage/">'.$lang->word('main_page_manager').'</a><br/>'. img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
exit;
	}
echo '<div class="post">
<form action="/padmin/mainpage/?act=save" method="post">
<b>'. $lang->word('main_page_manager_contents') .'</b>:<br/>
<textarea name="mainpage" rows="10" cols="50">'. $system['mainpage'] .'</textarea><br/>
<input type="submit" name="save" value="'. $lang->word('save') .'" /><br/>
</form>
</div>';
$tpl->div('block', img('admin.png') .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>'. HICO .'<a href="/">'. $lang->word('home') .'</a>');
require_once(SYS.'/view/footer.php');
} else { header('Location: /'); exit;}
?>