Файл: modules/padmin/delete-page.php
Строк: 49
<?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($user['level'] >= 6) {
if(isset($_GET['id'])) {
if(isset($_POST['yes'])) {
$db->query("DELETE FROM `pages` WHERE `id` = '".abs(intval($_GET['id'])) ."'");
header('Location: /padmin/pages/');
} elseif(isset($_POST['no'])) {
header('Location: /padmin/pages/');
}
$title = _t('delete');
include_header($title);
$tpl->div('title', _t('delete'));
echo '<form action="/padmin/delete-page/'.abs(intval($_GET['id'])) .'/" method="post">
<div class="menu">
<b>'. _t('r_sure') .'</b><br/>
<input name="yes" type="submit" value="'. _t('yyes') .'" /> <input name="no" type="submit" value="'. _t('yno') .'" /><br/>
</div>
</form>';
$tpl->div('block', NAV .'<a href="/padmin/">'. _t('padmin') .'</a><br/>' . HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
} else { header('Location: /'); }
} else { header('Location: /'); }
?>