Файл: modules/albums/delete_comment.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
*/
$locate = 'in_photo_albums';
if(User::level() < 5 && $db->query("SELECT user_id FROM `news_comms` WHERE `id` = '". num($_GET['post_id']) ."'")->fetchColumn() != User::Id())
{
go('/');
}
if(!empty($_GET['id']))
{
$comments = new Comments('albums', abs(intval($_GET['id'])), '', '', 'albums_photo');
$comments->delete(abs(intval($_GET['post_id'])));
}
else
{
go('/');
}
?>