<?php

$pid = B;
$cid = C;
if (!$post = $db->fetch_first('select * from (' . PF .
    'article as article left join ' . PF . 'posts as post on article.menu_id=' . MID .
    ' && article.post_id=post.id) where article.post_id=' . $pid))
{
    yun_error(mlang('主题不存在'));
}
if (!$row = $db->fetch_first('select *,comment.id as id,comment.authorid as authorid,comment.content as content from (' .
    PF . 'comments as comment left join ' . PF .
    'posts as post on comment.post_id=post.id) left join ' . PF .
    'user as user on comment.authorid=user.id where comment.id=' . $cid .
    ' && post.id=' . $pid))
{
    yun_error(mlang('评论不存在'));
}
empty($mpv[3]) && yun_error(mlang('权限不足'));
if (IS_POST)
{
    edit_comment($cid, $row);
    yun_succeed(mlang('评论修改成功'), 'refresh', true);
}
$arr = array();
$row['content'] = htmlspecialchars($row['content']);
ini_editor('ubb');
arg($cid, $pid, $row);

?>