function goToPost(post_id) { if(document.getElementById('post_user_name_' + post_id)) window.location = String(window.location).replace(/\#.*$/, "") + '#post_'+post_id; else window.location('/community/post.php?post_id=' + post_id + '#post_' + post_id); } function so_getText(obj, exclude_class) { if (obj.nodeType == 3) return obj.nodeValue; var txt = new String(),i=0,global_br_found=false; while(obj.childNodes[i]) { if(obj.childNodes[i].className != exclude_class) { if(obj.childNodes[i].tagName == 'P') { if(global_br_found) txt += '
'; global_br_found = true; } txt += so_getText(obj.childNodes[i], exclude_class); } i++; } return txt; } function RunTinyMCE_init() { var forced_open = false; if(arguments.length > 0) forced_open = arguments[0]; if(forced_open || document.getElementById('postMessageDiv').style.display == 'none') document.getElementById('postMessageDiv').style.display = 'block'; else document.getElementById('postMessageDiv').style.display = 'none'; } function toggleEditor() { var id = 'TMCETxtArea'; if (!tinyMCE.get(id)) { document.getElementById('editor_toggler').childNodes[0].data = ' К простому вводу '; tinyMCE.execCommand('mceAddControl', false, id); } else { document.getElementById('editor_toggler').childNodes[0].data = ' К улучшеному вводу '; tinyMCE.execCommand('mceRemoveControl', false, id); } } function DoAbused(post_id) { if(!confirm('Вы действительно хотите пожаловаться модератору на это сообщение?')) return false; document.getElementById('abusedJWHN76_' + post_id).innerHTML = 'подождите...'; JsHttpRequest.query( 'abused.php', { 'post_id': post_id }, function(result, errors) { if(result['ok'] != 1) alert('В результате отправки жалобы возникла ошибка.'); else document.getElementById('abusedJWHN76_' + post_id).innerHTML = 'жалоба отослана'; }, true ); } function ban_user(pid, uid) { if(document.getElementById('select_' + pid).value != 0) { document.body.style.cursor = 'wait'; document.getElementById('ban_UIEUJ_' + pid).innerHTML = 'обрабатывается...'; JsHttpRequest.query( 'forum_admin.php', { 'action': 'ban', 'ban': document.getElementById('select_' + pid).value, 'uid': uid, 'reason': document.getElementById('reason_' + pid).value }, function(result, errors) { document.body.style.cursor = 'default'; if(result['ok'] != 1) alert('В результате сохранения возникла ошибка. Пользователь забанен не был.'); else { document.getElementById('userbanIEN432I_' + pid).innerHTML = 'забанен
'; } }, true ); } } function PostDelete(pid, act) { if(act == 'show_reason') { if(document.getElementById('delpost_span_'+pid).style.display == 'none') document.getElementById('delpost_span_'+pid).style.display = ''; else document.getElementById('delpost_span_'+pid).style.display = 'none' } else if(act == 'delete_reason' && document.getElementById('delpost_input_'+pid).value.length != 0 ) { document.body.style.cursor = 'wait'; document.getElementById('delpost_button_'+pid).disabled = true; JsHttpRequest.query( 'forum_admin.php', { 'action': 'del_post', 'post_id': pid, 'reason': document.getElementById('delpost_input_'+pid).value }, function(result, errors) { document.body.style.cursor = 'default'; if(result['ok'] != 1) alert('В результате сохранения возникла ошибка. Сообщение не было удалено.'); else { document.getElementById('delpost_'+pid).innerHTML = 'удалено'; } }, true ); } else if(act == 'delete') { document.body.style.cursor = 'wait'; JsHttpRequest.query( 'forum_admin.php', { 'action': 'del_post', 'post_id': pid }, function(result, errors) { document.body.style.cursor = 'default'; if(result['ok'] != 1) alert('В результате сохранения возникла ошибка. Сообщение не было удалено.'); else { document.getElementById('delpost_'+pid).innerHTML = 'удалено'; } }, true ); } } function show_ban(pid) { document.getElementById("show_ban_" + pid).style.display = 'none'; document.getElementById("div_" + pid).style.display = ''; } function ChangeTopic(act) { if(act == 'open') { document.getElementById('topic_name_WJFC3734').style.display = 'none'; document.getElementById('topic_change_OWNV8343').style.display = ''; } if(act == 'send') { if(document.change_topic_form.topic_name.value.length > 3) { document.body.style.cursor = 'wait'; document.getElementById('topic_change_OWNV8343').style.display = 'none'; JsHttpRequest.query( 'post_edit_action.php', { 'topic_name': document.change_topic_form.topic_name.value, 'topic_id': document.change_topic_form.topic_id.value }, function(result, errors) { document.body.style.cursor = 'default'; if(result['ok'] != 1) { alert('В результате изменения названия темы возникла ошибка.'); document.getElementById('topic_name_WJFC3734').style.display = ''; } else { document.getElementById('topic_name_WJFC3734').innerHTML = result['new_topic_name'] + '   Изменить'; document.getElementById('topic_name_WJFC3734').style.display = ''; } }, true ); } } } /* FILE ARCHIVED ON 18:51:10 Feb 01, 2012 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 13:47:30 Oct 11, 2017. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */