Ejemplo n.º 1
0
    }
    print_r($error);
    echo '-----------------' . $cattcha;
    $search_bad_words = array("'хуй'siU", "'пизд'siU", "'ёб'siU", "'сука'siU", "'суки'siU", "'дроч'siU", "'хуя'siU", "'ссуч'siU");
    $replace = array("*", "*", "*", "*", "*", "*", "*", "*");
    $msg = strip_tags($msg);
    $msg = preg_replace($search_bad_words, $replace, $msg);
    $yourname = preg_replace($search_bad_words, $replace, $yourname);
    if (empty($error)) {
        $msg = nl2br($msg);
        $msg = str_replace("\n", " ", $msg);
        $msg = str_replace("\r", " ", $msg);
        require_once CODE . 'bbParser.php';
        $bbcode = new bbParser($disableURL);
        $msg = $bbcode->getHtml($msg);
        addcomments((int) $idmess, $commentsfilename, $msg, $yourname, $email);
        $msg = '';
        @setcookie('flood_news', $newsflood, time() + $newsflood);
    }
}
if (empty($yourname)) {
    $yourname = $_SESSION['name'];
}
if (file_exists($commentsfilename)) {
    $commentpage = isset($_GET['commentpage']) ? (int) $_GET['commentpage'] : 0;
    $arrcomments = getcomments($commentsid, $commentsfilename, $moder_comments);
    $arrcomments = array_reverse($arrcomments);
    $countcomments = getcountcomments($commentsid, $commentsfilename, $moder_comments);
    echo '<br /><br /><div class="comment_head"><a name="comment_begin"></a><h3>' . __('Комментарии') . ':</h3></div><hr>';
    if (count($arrcomments) == 0) {
        echo '<div class="comment"><br/>' . __('Нет комментариев') . '.<br/></div>';
Ejemplo n.º 2
0
header("Content-type: text/xml");
header("Cache-control: private");
$action = $_REQUEST['action'];
global $entity;
switch ($action) {
    case 'addvideo':
        addvideonode();
        break;
    case 'replacevideo':
        replacevideonode();
        break;
    case 'modifyvideo':
        editvideonode();
        break;
    case 'addcomments':
        addcomments();
        break;
    case 'editcomments':
        editcomments();
        break;
    case 'deletecomment':
        deletecomment();
        break;
    case 'getvideocomments':
        getvideocomments();
        break;
    case 'changerating':
        changerating();
        break;
    case 'addpeoplenode':
        addpeoplenode();