function closeTheme (a) {
console.log( _location );
console.log( $('input[name=ssid]').val() );
var callBack = $.post( '/forum/', {
modopt: "22-1",
fid: _location[0],
tid: _location[1],
p: 0,
a: 22,
t: 1,
ssid: $('input[name=ssid]').val(),
});
callBack.success(function () {
if (a == 1) {
_uWnd.alert('
Тема успешно закрыта!', 'Внимание', {w:200, h:90, pad:'10px'});
}
});
callBack.error(function () {
_uWnd.alert('Произошла ошибка при закрытии темы!', 'clthem', {w:230,h:80, pad:'10px'});
});
}
function garbageBasket (a) {
new _uWnd('moveTheme', 'В корзину', 280, 280, {
align: 'left',
autosize: true,
fadespeed: 500,
fadeclosespeed: 250,
oncontent: function () {
$("#reasonMoveThm").focus() }
}, '');
}
function moveTheme (but, asd) {
var a = $("#reasonMoveThm").val();
if (a) {
$(but).attr({value: "Подождите..."});
var thisForum = $(".forumBar:eq(2)").html();
var thisFhref = $(".forumBar:eq(2)").attr("href");
var thistema = $(".forumBarA:eq(1)").html();
var thistemas = $(".forumBarA:eq(1)").attr("href");
var m = "[url=" + _home_link + "index/8-" + _user_id + "]" + _username + "[/url] Переместил тему [url=" + thistemas + "]" + thistema + "[/url], из раздела [url=" + thisFhref + "]" + thisForum + "[/url].[br]По причине: " + a + "\n\n";
if (asd == 1) closeTheme(0);
$.post("/forum/", {
p: 0,
a: 7,
jkd428: 1,
jkd498: 1,
message: m,
ahtml: 0,
frmt: 1,
smiles_on: 1,
signature_on: 1,
subscribe: 0,
fid: _location[0],
tid: _location[1],
ssid: $("input[name='ssid']").val()
}, function () {
$.get("/forum/" + _location[0] + '-' + _location[1] + "0-20-1",
function (e) {
var myDes;
try {
myDes = $('.thDescr').html();
myDes = myDes.substring(1, myDes.length - 1);
} catch(e) {
myDes = '';
};
$.post("/forum/", {
name: $('input[name="name"]', $('cmd[p="content"]', e).text()).val(),
description: myDes,
nfid: _recucleId,
a: 20,
fid: _location[0],
tt: 1,
t: 1,
tid: _location[1]
}, function () {
setTimeout(function () {
_uWnd.close("moveTheme");
}, 1200);
_uWnd.reload('moveTheme', String(asd == 0 ? 'Тема была перемещена' : 'Тема была закрыта и перемещена')).checksize();
_uWnd.setTitle('moveTheme', 'Тема перемещена');
});
});
});} else {
_uWnd.alert('Не указана причина', 'Внимание', {
w:200,
h:90,
pad:'10px'
});
}
}
$(document).ready(function () {
$(".moderOptions").before(' ');
});