<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/**
 * @Project NUKEVIET 4.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2014 VINADES.,JSC. All rights reserved
 * @License GNU/GPL version 2 or any later version
 * @Createdate Mon, 27 Jan 2014 00:08:04 GMT
 */

function sendcommment(module, id_content, area, id, allowed, newscheckss, gfx_count) {
    var commentname = document.getElementById('commentname');
    var commentemail = document.getElementById('commentemail_iavim');
    var code = $("#commentseccode_iavim").val();
    var commentcontent = strip_tags($('textarea[name=commentcontent]').val());
    if (commentname.value == "") {
        alert(nv_fullname);
        commentname.focus();
    } else if (!nv_email_check(commentemail)) {
        alert(nv_error_email);
        commentemail.focus();
    } else if (gfx_count &gt; 0 &amp;&amp; !nv_namecheck.test(code)) {
        error = nv_error_seccode.replace(/\[num\]/g, gfx_count);
        alert(error);
        $("#commentseccode_iavim").focus();
    } else if (commentcontent == '') {
        alert(nv_content);
    } else {
        var sd = document.getElementById('buttoncontent');
        sd.disabled = true;
        $.post(nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&amp;' + nv_name_variable + '=comment&amp;' + nv_fc_variable + '=post&amp;nocache=' + new Date().getTime(), 'module=' + module + '&amp;area=' + area + '&amp;id=' + id + '&amp;pid=' + $('#commentpid').val() + '&amp;allowed=' + allowed + '&amp;checkss=' + newscheckss + '&amp;name=' + commentname.value + '&amp;email=' + commentemail.value + '&amp;code=' + code + '&amp;content=' + encodeURIComponent(commentcontent), function(res) {
            var rs = res.split('_');
            if (rs[0] == 'OK') {
                $("#idcomment").load(nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&amp;' + nv_name_variable + '=comment&amp;module=' + module + '&amp;area=' + area + '&amp;id=' + id + '&amp;allowed=' + allowed + '&amp;status_comment=' + rs[1] + '&amp;checkss=' + newscheckss + '&amp;nocache=' + new Date().getTime());
                $('html, body').animate({
                    scrollTop: $("#idcomment").offset().top
                }, 800);
            } else {
                if (gfx_count &gt; 0 ) {
                    change_captcha('#commentseccode_iavim');
                }
                if (rs[0] == 'ERR') {
                    alert(rs[1]);
                } else {
                    alert(nv_content_failed);
                }
            }
            nv_set_disable_false('buttoncontent');
        });
    }
    return;
}

function nv_commment_feedback(cid, post_name) {
    $("#commentpid").val(cid);
    $("#commentcontent").focus();
    $("#commentcontent").val("@" + post_name + " ");
}

function nv_commment_like(cid, checkss, like) {
    $.post(nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&amp;' + nv_name_variable + '=comment&amp;' + nv_fc_variable + '=like&amp;nocache=' + new Date().getTime(), 'cid=' + cid + '&amp;like=' + like + '&amp;checkss=' + checkss, function(res) {
        var rs = res.split('_');
        if (rs[0] == 'OK') {
            $("#" + rs[1]).text(rs[2]);
        } else if (rs[0] == 'ERR') {
            alert(rs[1]);
        }
    });
}

function nv_commment_delete(cid, checkss) {
    if (confirm(nv_is_del_confirm[0])) {
        $.post(nv_base_siteurl + 'index.php?' + nv_lang_variable + '=' + nv_lang_data + '&amp;' + nv_name_variable + '=comment&amp;' + nv_fc_variable + '=delete&amp;nocache=' + new Date().getTime(), 'cid=' + cid + '&amp;checkss=' + checkss, function(res) {
            var rs = res.split('_');
            if (rs[0] == 'OK') {
                $("#cid_" + cid).remove();
                $.post(nv_url_comm + '&amp;nocache=' + new Date().getTime(), 'sortcomm=' + $('#sort').val() , function(res) {
                    $('#idcomment').html(res);
                });
            } else if (rs[0] == 'ERR') {
                alert(rs[1]);
            }
        });
    }
}</pre></body></html>