Файл: modules/black_list/unblock.php
Строк: 35
<?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
*/
if (!User::logged() or $db->query("SELECT * FROM `users` WHERE `id` = '". abs(intval($_GET['id'])) ."' LIMIT 1")->rowCount() == 0 or abs(intval($_GET['id']) == $user['id']) or $db->query("SELECT * FROM `black_list` WHERE `user_id` = '".$user['id']."' AND `block_id` = '". abs(intval($_GET['id'])) ."'")->rowCount() == 0)
{
header('Location: /');
exit();
}
$db->query("DELETE FROM `black_list` WHERE `user_id` = '". User::Id() ."' AND `block_id` = '". abs(intval($_GET['id'])) ."'");
$title = _t('black_list');
include_header($title);
Template::div('title', $title);
Template::div('menu', _t('delete_block').'<br /><a href="javascript:history.back(-1);">'. _t('back').'</a>');
Template::div('block', HICO .'<a href="/">'. _t('home').'</a>');
include_footer();
?>