View file modules/padmin/delete_page.php

File size: 1.17Kb
<?php
/**********************************
*	@package: PerfCMS			  *
*	@year: 2012					  *
*	@author: Artas				  *
*	@link: http://perfcms.pp.ua	  *
**********************************/
$locate = 'in_padmin';
if($user['level'] >= 6) {
if(isset($_GET['page_id'])) {
if(isset($_POST['yes'])) {
$db->query("DELETE FROM `pages` WHERE `id` = '".abs(intval($_GET['page_id'])) ."'");
header('Location: /padmin/pages/');
	} elseif(isset($_POST['no'])) {
header('Location: /padmin/pages/');
	} 
$title = $lang->word('delete');
require_once(SYS.'/view/header.php');
$tpl->div('title', $lang->word('delete'));
echo '<form action="/padmin/delete-page/'.abs(intval($_GET['page_id'])) .'/" method="post">
		<div class="menu">
			<b>'. $lang->word('r_sure') .'</b><br/>
			<input name="yes" type="submit" value="'. $lang->word('yyes') .'" /> <input name="no" type="submit" value="'. $lang->word('yno') .'" /><br/>
		</div>
		</form>';
		
$tpl->div('block', NAV .'<a href="/padmin/">'. $lang->word('padmin') .'</a><br/>' . HICO .'<a href="/">'. $lang->word('home').'</a>');
require_once(SYS.'/view/footer.php');
} else { header('Location: /'); } 
} else { header('Location: /'); }
?>