Файл: modules/video/handler/del_comm.php
Строк: 3
<?php
if (!empty($_GET['del_comm']) && is_numeric($_GET['del_comm']))
{
$del_comm = abs(intval($_GET['del_comm']));
if (mysql_result(mysql_query("SELECT COUNT(`id`) FROM `video_comm` WHERE `id` = '".$del_comm."' LIMIT 1"),0) == true)
{
$arr_del_comm = mysql_fetch_array(mysql_query("SELECT * FROM `video_comm` WHERE `id` = '".$del_comm."' LIMIT 1"));
if ($user_id == $arr_del_comm['user_id'] or $user_id == $arr_video['user_id'])
{
mysql_query("DELETE FROM `video_comm` WHERE `id` = '".$del_comm."'");
}
}
}
?>