')
.css({
width: 20,
height: 20,
position: 'absolute',
right: -0,
top: -0,
fontSize: 20,
color: '#fff',
cursor: 'pointer',
background: '#000',
lineHeight: 1,
})
.html('X')
.addClass('closeit')
.appendTo(d);
$.blockUI({
message:
'
' +
d.html(),
css: {
top: ($(window).height() - $('#pre')[0].offsetHeight) / 2 + 'px',
left:
($(window).width() - $('#pre')[0].offsetWidth / 2) / 2 + 'px',
width: $('#pre')[0].offsetWidth + 'px',
backgroundColor: '#fff',
borderWidth: '3px',
borderColor: '#fff',
},
});
$('#pre').remove();
$('.closeit').click(function () {
$.unblockUI();
});
});
};
})(jQuery);
//初始化获取翻页和图片
$(document).ready(function () {
var productid = $('input#productid')[0].value;
$().contentPages(productid);
$().getContent(productid, 0);
});
//支持反对投票
$(document).ready(function () {
$('span#zhichi').click(function () {
var productid = $('input#productid')[0].value;
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=zhichi&productid=' + productid,
success: function (msg) {
if (msg == 'L0') {
$().popLogin(0);
} else if (msg == 'L1') {
$().alertwindow('对不起,您已经投过票了', '');
} else {
$('span#zhichinum').html(msg);
}
},
});
});
$('span#fandui').click(function () {
var productid = $('input#productid')[0].value;
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=fandui&productid=' + productid,
success: function (msg) {
if (msg == 'L0') {
$().popLogin(0);
} else if (msg == 'L1') {
$().alertwindow('对不起,您已经投过票了', '');
} else {
$('span#fanduinum').html(msg);
}
},
});
});
});
//加入收藏
$(document).ready(function () {
$('div#addfav').click(function () {
var productid = $('input#productid')[0].value;
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data:
'act=addfav&productid=' + productid + '&url=' + window.location.href,
success: function (msg) {
if (msg == 'L0') {
$().popLogin(0);
} else if (msg == 'L1') {
$().alertwindow('您已经收藏了当前网址', '');
} else if (msg == 'OK') {
$().alertwindow('已经加入到收藏夹', PDV_RP + 'member/member_fav.php');
} else {
alert(msg);
}
},
});
});
});
//版主管理
$(document).ready(function () {
var productid = $('input#productid')[0].value;
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=ifbanzhu&productid=' + productid,
success: function (msg) {
if (msg == 'YES') {
$('#banzhu')
.append(
'版主管理 |
推荐 |
删除 |
删除并扣分 |'
)
.show();
$().setBg();
//推荐操作
$('#banzhutj').click(function () {
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=banzhutj&productid=' + productid,
success: function (msg) {
if (msg == 'OK') {
$().alertwindow('推荐成功', '');
} else {
alert(msg);
}
},
});
});
//删除操作
$('#banzhudel').click(function () {
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=banzhudel&productid=' + productid,
success: function (msg) {
if (msg == 'OK') {
$().alertwindow('删除成功', '../class/');
} else {
alert(msg);
}
},
});
});
//删除并扣分操作
$('#banzhudelmincent').click(function () {
$.ajax({
type: 'POST',
url: PDV_RP + 'product/post.php',
data: 'act=banzhudel&koufen=yes&productid=' + productid,
success: function (msg) {
if (msg == 'OK') {
$().alertwindow('删除并扣分成功', '../class/');
} else {
alert(msg);
}
},
});
});
} else {
$('#banzhu').empty().hide();
}
},
});
});