/**--------------公共变量 begin------------*/
var this_url = window.location.href.toLowerCase();
var regemail = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
var regtelphone = /(^(\d{11})$|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/;
var regnum = /^\d+$/;
var regcode = /[1-9]\d{5}(?!\d)/;
var regID = /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])(\d{4}|\d{3}x)$/;
var this_protocol = window.location.protocol;
var this_host = window.location.host;
var GetDomain = this_protocol + '//' + this_host;
var hash = {
'qq.com': 'http://mail.qq.com',
'gmail.com': 'http://mail.google.com',
'sina.com': 'http://mail.sina.com.cn',
'163.com': 'http://mail.163.com',
'126.com': 'http://mail.126.com',
'yeah.net': 'http://www.yeah.net/',
'sohu.com': 'http://mail.sohu.com/',
'tom.com': 'http://mail.tom.com/',
'sogou.com': 'http://mail.sogou.com/',
'139.com': 'http://mail.10086.cn/',
'hotmail.com': 'http://www.hotmail.com',
'live.com': 'http://login.live.com/',
'live.cn': 'http://login.live.cn/',
'live.com.cn': 'http://login.live.com.cn',
'189.com': 'http://webmail16.189.cn/webmail/',
'yahoo.com.cn': 'http://mail.cn.yahoo.com/',
'yahoo.cn': 'http://mail.cn.yahoo.com/',
'eyou.com': 'http://www.eyou.com/',
'21cn.com': 'http://mail.21cn.com/',
'188.com': 'http://www.188.com/',
'foxmail.coom': 'http://www.foxmail.com'
};
/**--------------公共变量 end------------*/
/*别墅装修 专题调查*/
$('.bs-special-vote .s-v-l-span').on('click', function () {
getVoteBieshu('1')
});
$('.bs-special-vote .s-v-r-span').on('click', function () {
getVoteBieshu('2');
})
function getVoteBieshu(n) {
var data = "cmd=getVoteBieshu&n=" + TDES.encrypt(n) + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == '1') {
var zong = Number(unescape(obj.zong));//ajax请求得到点评总数
var good = Number(unescape(obj.good));//ajax请求得到好评
var guli = Number(unescape(obj.guli));//再接在励
var bfb = Math.floor(good / zong * 10000);
var cha = guli / zong;
var goodwidth = bfb * 910 / 10000;
$("#s-v-m-like").css('width', goodwidth + 'px');
$("#s-v-m-like").html(bfb / 100 + '%');
$("#s-v-m-dislkie").css('width', (910 - goodwidth) + 'px');
$("#s-v-m-dislkie").html((10000 - bfb) / 100 + '%');
} else {
layer.msg(unescape(obj.info));
}
});
}
/*老房装修 专题调查*/
$('.laof-special-vote .s-v-l-span').on('click', function () {
getVoteLaofang('1')
});
$('.laof-special-vote .s-v-r-span').on('click', function () {
getVoteLaofang('2');
})
function getVoteLaofang(n) {
var data = "cmd=getVoteLaofang&n=" + TDES.encrypt(n) + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == '1') {
var zong = Number(unescape(obj.zong));//ajax请求得到点评总数
var good = Number(unescape(obj.good));//ajax请求得到好评
var guli = Number(unescape(obj.guli));//再接在励
var bfb = Math.floor(good / zong * 10000);
var cha = guli / zong;
var goodwidth = bfb * 910 / 10000;
$("#s-v-m-like").css('width', goodwidth + 'px');
$("#s-v-m-like").html(bfb / 100 + '%');
$("#s-v-m-dislkie").css('width', (910 - goodwidth) + 'px');
$("#s-v-m-dislkie").html((10000 - bfb) / 100 + '%');
} else {
layer.msg(unescape(obj.info));
}
});
}
$(function () {
var ids = '';
$('.good').map(function () {
ids += $(this).attr('data-id') + ',';
});
ids = ids.substring(0, ids.length-1);
var data = "cmd=getgood&ids=" + TDES.encrypt(ids) + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
var idsArr=ids.split(',');
if (unescape(obj.state) == "1") {
var hits = unescape(obj.info);
for (var i = 0; i < hits.split(',').length; i++) {
var $this= $('.good').eq(i);
if ($this.parent().find('#count').length > 0) {
$this.parent().find('#count').text(hits.split(',')[i]);
} else if ($this.parent().find('.count').length > 0) {
$this.parent().find('.count').text(hits.split(',')[i]);
} else if ($this.parent().find('.one').length > 0) {
//if ($this.attr('data-id') == idsArr[i]) {
// $this.parent().find('.one').addClass('onexin');
//}
} else {
$this.text(hits.split(',')[i]);
}
}
}
})
})
$('.good').on('click', function () {
var cid = $(this).attr('data-cid');
var id = $(this).attr('data-id');
var data = "cmd=good&cid=" + TDES.encrypt(cid) + "&id=" + TDES.encrypt(id) + "";
var $this = $(this);
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
layer.msg(unescape(obj.info));
if (unescape(obj.state) == "1") { if ($this.parent().find('#count').length > 0) {
$this.parent().find('#count').text(unescape(obj.num));
}else if($this.parent().find('.one').length > 0) {
$this.parent().find('.one').addClass('onexin');
} else if ($this.parent().find('.count').length > 0) {
$this.parent().find('.count').text(unescape(obj.num));
} else {
//$this.parent().find('.count').text(unescape(obj.num));
$this.text(unescape(obj.num));
}
}
})
});
/*-----------------------------新全站搜索-------------------------------------------------------------------------*/
$(function () {
$(function () {
$(document).on("click", "#btnSearch", function () {
if ($.trim($("#formd_search_id").val()) == '' || $.trim($('#formd_search_id').val()) == '请输入关键字') {
$('#formd_search_id').focus();
alert("请输入搜索内容!");
return;
}
else {
window.location = "/other/search.html?key=" + escape($.trim($("#formd_search_id").val())) + "";
}
});
$('#btnSearch2').click(function () {
if ($.trim($("#formd_search_id2").val()) == '' || $.trim($("#formd_search_id2").val()) == '请输出要搜索的关键词') {
$('#formd_search_id2').focus();
alert("请输入搜索内容!");
return;
}
$('#resultem').text($("#formd_search_id2").val());
//getList_LB(escape($.trim($("#formd_search_id2").val())), 1);
//全新搜索
getLucenesSearch(escape($.trim($("#formd_search_id2").val())), 1);
//全新搜索加载更多
//getLucenesSearch_More(escape($.trim($("#formd_search_id2").val())), 1);
});
})
})
/*----------------------当前位置定位-------------------*/
$(function () {
var MenuName = $.trim($("div.site>div.wrap span").text());
$('div.header_r>nav>ul>li>a').map(function () {
if ($.trim($(this).text()) == MenuName) {
$(this).parent().addClass('on').siblings().removeClass('on');
}
});
MenuName = $.trim($("div.site>div.wrap a:eq(1)").text());
$('div.header_r>nav>ul>li>a').map(function () {
if ($.trim($(this).text()) == MenuName) {
$(this).parent().addClass('on').siblings().removeClass('on');
}
});
})
/*---------------------列表点赞----------------------*/
$(document).on('click', '.Mylike', function () {
var strid = $(this).attr("data-id");//ID
var objMylike = $(this);
var data = "cmd=SetMylike&id=" + strid + "&Fieldlike=E91AD3948CAC48995386DD4F02C8DB76&Type=1&Count=1&ClassID=37";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == "1") {
$('span.Mylikelist').text(Number($('span.Mylikelist').text()) + Number(1))
}
else {
alert(unescape(obj.info));
}
})
});
/*---------------------获取列表点赞----------------------*/
$(function () {
var ids = '';
$('.Mylikelist').map(function () {
ids += $(this).attr('data-id') + ',';
});
if (ids.length == 0) {
return;
}
var data = "cmd=GetHitsField&ids=" + TDES.encrypt(ids) + "&Field=E91AD3948CAC48995386DD4F02C8DB76";
ajaxhelpS(data,
function (msg) {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == 1) {
var hits = unescape(obj.info);
for (var i = 0; i < hits.split(',').length; i++) {
$('.Mylikelist').eq(i).text(hits.split(',')[i]);
}
}
});
});
/*--------------浏览次数绑定-------------*/
$(function () {
var ids = '';
$('.hits').map(function () {
ids += $(this).attr('data-id') + ',';
});
if (ids.length == 0) {
return;
}
var data = "cmd=getHits&ids=" + TDES.encrypt(ids) + "";
ajaxhelpS(data,
function (msg) {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == 1) {
var hits = unescape(obj.info);
for (var i = 0; i < hits.split(',').length; i++) {
$('.hits').eq(i).text(hits.split(',')[i]);
}
}
});
});
$(function () {
$(document).on("click", "#btnReset", function () {
window.location.href = this_url;
});
EnterFunction('#formd_search_id', '#btnSearch');
EnterFunction('#formd_search_id2', '#btnSearch2');
EnterFunction('#formd_search_id3', '#btnSearch3');
})
function getSearch(key, page) {
$('#ajaxList').html('');
$('#ajaxPage').html('');
var searchKey = unescape(key);
var thisIndex = layer.msg('数据搜索中,请稍后…', {
time: 0,
icon: 16
});
var data = "cmd=getSearch&k=" + TDES.encrypt(searchKey) + "&pi=" + TDES.encrypt(page) + "&lh=" + $('.lucenes>#lh').val() + "&ph=" + $('.lucenes>#ph').val() + "&ps=" + $('.lucenes>#ps').val() + "&pt=" + $('.lucenes>#pt').val() + "&nt=" + $('.lucenes>#nt').val() + "&fs=" + $('.lucenes>#fs').val() + "";
ajaxhelpS(data, function (msg) {
layer.close(thisIndex);
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == '2') {
thisIndex = layer.alert(unescape(obj.info), {
time: 0,
title: '提示信息',
closeBtn: 0,
btn: ['确定'],
yes: function (index) {
window.location = '/';
}
});
} else {
$('#ajaxList').html(unescape(obj.list));
$('#ajaxPage').html(unescape(obj.page));
$("#SearchNum").html(unescape(obj.count));
}
});
}
/*---全文检索通用搜索---*/
function getLucenesSearch(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
$('#ajaxList').html('');
$('#ajaxPage').html('');
var searchKey = unescape(key);
$('#formd_search_id').val(searchKey);
$('#formd_search_id2').val(searchKey);
$('#resultem').html(searchKey);
var thisIndex = layer.msg('数据搜索中,请稍后…', {
time: 0,
icon: 16
});
var data = "cmd=getLucenesSearch&k=" + TDES.encrypt(searchKey) + "&pi=" + TDES.encrypt(page) + "&lh=" + $('#lh').val() + "&ph=" + $('#ph').val() + "&ps=" + $('#ps').val() + "&pt=" + $('#pt').val() + "&nt=" + $('#nt').val() + "&fs=" + $('#fs').val() + "";
ajaxhelpS(data, function (msg) {
layer.close(thisIndex);
try {
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == '2') {
thisIndex = layer.alert(unescape(obj.info), {
time: 0,
title: '提示信息',
closeBtn: 0,
btn: ['确定'],
yes: function (index) {
window.location = '/';
}
});
} else {
$('#ajaxList').html(unescape(obj.list));
$('#ajaxPage').html(unescape(obj.page));
$("#SearchNum").html(unescape(obj.count));
}
} catch (e) {
}
});
}
/*--------------------根据查询条件,加载更多-------------------------------*/
$(document).on('click', '.moreFlye', function () {
if (Number($('#moreFlye').attr('data-next')) < Number($('#moreFlye').attr('data-max')) + 1) {
getLucenesSearch_More($('#moreFlye').attr('data-key'), Number($('#moreFlye').attr('data-next')));
}
});
function getLucenesSearch_More(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
$('#ajaxList').html('');
$('#ajaxPage').html('');
var searchKey = unescape(key);
$('#formd_search_id2').val(searchKey);
$('#resultem').html(searchKey);
var thisIndex = layer.msg('数据搜索中,请稍后…', {
time: 0,
icon: 16
});
var data = "cmd=getLucenesSearch&k=" + TDES.encrypt(searchKey) + "&pi=" + TDES.encrypt(page) + "&lh=" + $('.lucenes>#lh').val() + "&ph=" + $('.lucenes>#ph').val() + "&ps=" + $('.lucenes>#ps').val() + "&pt=" + $('.lucenes>#pt').val() + "&nt=" + $('.lucenes>#nt').val() + "&fs=" + $('.lucenes>#fs').val() + "";
ajaxhelpS(data, function (msg) {
layer.close(thisIndex);
var obj = eval('(' + msg + ')');
if (unescape(obj.state) == '2') {
thisIndex = layer.alert(unescape(obj.info), {
time: 0,
title: '提示信息',
closeBtn: 0,
btn: ['确定'],
yes: function (index) {
window.location = '/';
}
});
} else {
$('#ajaxList').append(unescape(obj.list));
$('#ajaxPage').append(unescape(obj.page));
$("#SearchNum").html(unescape(obj.count));
/*--------------------加载更多------------------------------------------*/
var intval = Number(page) + Number(1);
if (Number(intval) <= Number(unescape(obj.count))) {
$('#more').html("")
$('#moreFlye').attr('data-next', intval).attr('data-max', unescape(obj.count)).attr('data-key', key).show();
} else {
$('#more').html("");
$('#moreFlye').attr('data-next', intval).attr('data-max', unescape(obj.count)).attr('data-key', key).hide();
}
}
});
}
//全站搜索功能js方法
function getList(keyserch, page) {
if (!checkAjaxSql(unescape(keyserch))) {
return false;
}
$('#ajaxList').html(lang.loading);
$('#ajaxPage').html('');
var ajaxListDate = $('#ajaxListDate').val();
var ajaxPageDate = $('#ajaxPageDate').val();
var ajaxSiteId = $('#ajaxSiteId').val();
var ajaxGroupId = $('#ajaxGroupId').val();
var ajaxPageSite = $('#ajaxPageSite').val();
$('#formd_search_id').val(unescape(keyserch));
$("#formd_search_id2").val(unescape(keyserch));
$("#resultem").html(unescape(keyserch));
var data = "cmd=_saveListAndPageDate&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "";
ajaxhelpS(data, function () {
data = "cmd=search&key=" + keyserch + "&page=" + page + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
$('#ajaxList').html(unescape(obj.list));
$('#ajaxPage').html(unescape(obj.page));
$("#SearchNum").html(unescape(obj.count));
});
});
}
//全站列表功能js方法
function getList_LB(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
var _ajaxlist = "ajaxList";
var _ajaxpage = "ajaxPage";
var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class
if ($('#ajaxListIndex').val() != undefined) {
listidx = $.trim($('#ajaxListIndex').val());
}
if ($('#ajaxListClass').val() != undefined) {
listcls = $.trim($('#ajaxListClass').val());
}
if ($('#ajaxPageIndex').val() != undefined) {
pageidx = $.trim($('#ajaxPageIndex').val());
}
if ($('#ajaxPageClass').val() != undefined) {
pagecls = $.trim($('#ajaxPageClass').val());
}
var bon = false;//是否是切换类型
var dataBon = false;
//如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
bon = true;
}
var listi = 0;
var pagei = 0;
//判断是否加载数据
if (bon) {
$('.' + listcls).map(function () {
if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
if (page == -1) page = 1;
dataBon = true;
}
listi++;
});
}
else {
$('#' + _ajaxlist).html(lang.loading);
$('#' + _ajaxlist).html('');
$('#' + _ajaxpage).html('');
dataBon = true;
}
var ajaxListDate = $('#ajaxListDate').val();
var ajaxPageDate = $('#ajaxPageDate').val();
var ajaxSiteId = $('#ajaxSiteId').val();
var ajaxGroupId = $('#ajaxGroupId').val();
var ajaxPageSite = $('#ajaxPageSite').val();
var ajaxClassId = $('#ajaxClassId').val();
var ajaxXgid = $('#ajaxXgid').val();
var ajaxCategory = $('#ajaxCategory').val();
var ajaxAboutDownload = $('#ajaxAboutDownload').val();
var ajaxParentId = $('#ajaxParentId').val();
if (dataBon) {
var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
ajaxhelpS(data, function () {
data = "cmd=search_LB&key=" + key + "&page=" + page + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (bon) {
listi = 0;
$('.' + listcls).map(function () {
if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
$(this).html(unescape(obj.list));
}
listi++;
});
pagei = 0;
$('.' + pagecls).map(function () {
if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
$(this).html(unescape(obj.page));
}
pagei++;
});
} else {
$('#' + _ajaxlist).html(unescape(obj.list));
$('#' + _ajaxpage).html(unescape(obj.page));
$("#SearchNum").html(unescape(obj.count));
}
try {
var scriptStr = "";
$('#ajaxScriptCallback').html(scriptStr);
} catch (e) {
}
}, false);
});
}
}
function getList_FC(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
var _ajaxlist = "ajaxList";
var _ajaxpage = "ajaxPage";
var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class
if ($('#ajaxListIndex').val() != undefined) {
listidx = $.trim($('#ajaxListIndex').val());
}
if ($('#ajaxListClass').val() != undefined) {
listcls = $.trim($('#ajaxListClass').val());
}
if ($('#ajaxPageIndex').val() != undefined) {
pageidx = $.trim($('#ajaxPageIndex').val());
}
if ($('#ajaxPageClass').val() != undefined) {
pagecls = $.trim($('#ajaxPageClass').val());
}
var bon = false;//是否是切换类型
var dataBon = false;
//如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
bon = true;
}
var listi = 0;
var pagei = 0;
//判断是否加载数据
if (bon) {
$('.' + listcls).map(function () {
if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
if (page == -1) page = 1;
dataBon = true;
}
listi++;
});
}
else {
$('#' + _ajaxlist).html(lang.loading);
$('#' + _ajaxlist).html('');
$('#' + _ajaxpage).html('');
dataBon = true;
}
var ajaxListDate = $('#ajaxListDate').val();
var ajaxPageDate = $('#ajaxPageDate').val();
var ajaxSiteId = $('#ajaxSiteId').val();
var ajaxGroupId = $('#ajaxGroupId').val();
var ajaxPageSite = $('#ajaxPageSite').val();
var ajaxClassId = $('#ajaxClassId').val();
var ajaxXgid = $('#ajaxXgid').val();
var ajaxCategory = $('#ajaxCategory').val();
var ajaxAboutDownload = $('#ajaxAboutDownload').val();
var ajaxParentId = $('#ajaxParentId').val();
if (dataBon) {
var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
ajaxhelpS(data, function () {
var data = "cmd=SaveCiphertexDate_FC&Ciphertext=" + $('#ajaxCiphertext').val() + "&CiphertextField=" + $('#ajaxCiphertextField').val();
ajaxhelpS(data, function () {
data = "cmd=search_FC&key=" + key + "&page=" + page;
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (bon) {
listi = 0;
$('.' + listcls).map(function () {
if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
$(this).html(unescape(obj.list));
}
listi++;
});
pagei = 0;
$('.' + pagecls).map(function () {
if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
$(this).html(unescape(obj.page));
}
pagei++;
});
} else {
$('#' + _ajaxlist).html(unescape(obj.list));
$('#' + _ajaxpage).html(unescape(obj.page));
}
});
}, false);
}, false);
}
}
/*--------------------根据查询条件,加载更多-------------------------------*/
function getList_FC_More(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
var _ajaxlist = "ajaxList";
var _ajaxpage = "ajaxPage";
var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class
if ($('#ajaxListIndex').val() != undefined) {
listidx = $.trim($('#ajaxListIndex').val());
}
if ($('#ajaxListClass').val() != undefined) {
listcls = $.trim($('#ajaxListClass').val());
}
if ($('#ajaxPageIndex').val() != undefined) {
pageidx = $.trim($('#ajaxPageIndex').val());
}
if ($('#ajaxPageClass').val() != undefined) {
pagecls = $.trim($('#ajaxPageClass').val());
}
var bon = false;//是否是切换类型
var dataBon = false;
//如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
bon = true;
}
var listi = 0;
var pagei = 0;
//判断是否加载数据
if (bon) {
$('.' + listcls).map(function () {
if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
if (page == -1) page = 1;
dataBon = true;
}
listi++;
});
}
else {
//$('#' + _ajaxlist).html(lang.loading);
//$('#' + _ajaxlist).html('');
//$('#' + _ajaxpage).html('');
dataBon = true;
}
var ajaxListDate = $('#ajaxListDate').val();
var ajaxPageDate = $('#ajaxPageDate').val();
var ajaxSiteId = $('#ajaxSiteId').val();
var ajaxGroupId = $('#ajaxGroupId').val();
var ajaxPageSite = $('#ajaxPageSite').val();
var ajaxClassId = $('#ajaxClassId').val();
var ajaxXgid = $('#ajaxXgid').val();
var ajaxCategory = $('#ajaxCategory').val();
var ajaxAboutDownload = $('#ajaxAboutDownload').val();
var ajaxParentId = $('#ajaxParentId').val();
if (dataBon) {
var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
ajaxhelpS(data, function () {
data = "cmd=search_FC&key=" + key + "&page=" + page + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (bon) {
listi = 0;
$('.' + listcls).map(function () {
if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
$(this).html(unescape(obj.list));
}
listi++;
});
pagei = 0;
$('.' + pagecls).map(function () {
if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
$(this).html(unescape(obj.page));
}
pagei++;
});
} else {
$('#' + _ajaxlist).append(unescape(obj.list));
$('#' + _ajaxpage).append(unescape(obj.page));
/*--------------------加载更多------------------------------------------*/
var intval = Number(page) + Number(1);
if (Number(intval) <= Number(unescape(obj.count))) {
$('#more').html("")
$('#moreFlye').attr('data-next', intval).attr('data-max', unescape(obj.count)).attr('data-key', key).show();
} else {
$('#more').html("");
$('#moreFlye').attr('data-next', intval).attr('data-max', unescape(obj.count)).attr('data-key', key).hide();
}
}
});
});
}
}
function getList_CZ(key, page) {
if (!checkAjaxSql(unescape(key))) {
return false;
}
var _ajaxlist = "ajaxList";
var _ajaxpage = "ajaxPage";
var listidx = "", listcls = "", pageidx = "", pagecls = "";//列表索引 列表Class 分页索引 分页Class
if ($('#ajaxListIndex').val() != undefined) {
listidx = $.trim($('#ajaxListIndex').val());
}
if ($('#ajaxListClass').val() != undefined) {
listcls = $.trim($('#ajaxListClass').val());
}
if ($('#ajaxPageIndex').val() != undefined) {
pageidx = $.trim($('#ajaxPageIndex').val());
}
if ($('#ajaxPageClass').val() != undefined) {
pagecls = $.trim($('#ajaxPageClass').val());
}
var bon = false;//是否是切换类型
var dataBon = false;
//如果列表索引 列表Class 分页索引 分页Class都不为空时 则是切换类型
if (listidx != '' && listcls != '' && pageidx != '' && pagecls != '') {
bon = true;
}
var listi = 0;
var pagei = 0;
//判断是否加载数据
if (bon) {
$('.' + listcls).map(function () {
if (listi == listidx && ((($.trim($(this).html()) == lang.loading || $.trim($(this).html()) == lang.loading) && page == -1) || page >= 1)) {
if (page == -1) page = 1;
dataBon = true;
}
listi++;
});
}
else {
$('#' + _ajaxlist).html(lang.loading);
$('#' + _ajaxlist).html('');
$('#' + _ajaxpage).html('');
dataBon = true;
}
var ajaxListDate = $('#ajaxListDate').val();
var ajaxPageDate = $('#ajaxPageDate').val();
var ajaxSiteId = $('#ajaxSiteId').val();
var ajaxGroupId = $('#ajaxGroupId').val();
var ajaxPageSite = $('#ajaxPageSite').val();
var ajaxClassId = $('#ajaxClassId').val();
var ajaxXgid = $('#ajaxXgid').val();
var ajaxCategory = $('#ajaxCategory').val();
var ajaxAboutDownload = $('#ajaxAboutDownload').val();
var ajaxParentId = $('#ajaxParentId').val();
if (dataBon) {
var data = "cmd=_saveListAndPageDate_LB&ajaxListDate=" + ajaxListDate + "&ajaxPageDate=" + ajaxPageDate + "&ajaxSiteId=" + ajaxSiteId + "&ajaxGroupId=" + ajaxGroupId + "&ajaxPageSite=" + ajaxPageSite + "&ajaxClassId=" + ajaxClassId + "&ajaxXgid=" + ajaxXgid + "&ajaxCategory=" + ajaxCategory + "&ajaxAboutDownload=" + ajaxAboutDownload + "&ajaxParentId=" + ajaxParentId + "";
ajaxhelpS(data, function () {
data = "cmd=search_CZ&key=" + key + "&page=" + page + "";
ajaxhelpS(data, function (msg) {
var obj = eval('(' + msg + ')');
if (bon) {
listi = 0;
$('.' + listcls).map(function () {
if (listi == listidx && ($.trim($(this).html()) == lang.loading || page >= 1)) {
$(this).html(unescape(obj.list));
}
listi++;
});
pagei = 0;
$('.' + pagecls).map(function () {
if (pagei == pageidx && ($.trim($(this).html()) == '' || page >= 1)) {
$(this).html(unescape(obj.page));
}
pagei++;
});
} else {
$('#' + _ajaxlist).html(unescape(obj.list));
$('#' + _ajaxpage).html(unescape(obj.page));
}
try {
var scriptStr = "";
$('#ajaxScriptCallback').html(scriptStr);
} catch (e) {
}
});
});
}
}
/*--------------------过滤危险字符---------------------------------------------------*/
$(function () {
$(document).on('keyup', 'input[type=text],textarea,input[type=password]', function () {
var val = $(this).val();
// //});
//$('input[type=text],textarea,input[type=password]').keyup(function () {
if (!checkAjaxSql(val)) {
alert('不能包含危险字符!');
$(this).val('');
}
});
})
function checkAjaxSql(val) {
var otherKey = " and | exec | count | chr | mid | master | or | truncate | char | declare | join |<|>|*|/*|*/|'|;|\\u|insert|select|delete|update|create|drop|script|javascript|alert";
for (var i = 0; i < otherKey.split('|').length ; i++) {
if (val.indexOf(otherKey.split('|')[i]) != -1) {
return false;
}
}
return true;
}
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-24]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('0 EnterFunction(1,2){$(1).keydown(0(e){var 4=e.which;if(4==13){$(2).click()}})}', [], 5, 'function|ElementInput|ElementBtn||curKey'.split('|'), 0, {}));
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getValue(0){return $.trim($(0).val())}', [], 1, 'obj'.split('|'), 0, {}));
eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(36) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-9a-g]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getValueDefaultError(3,6,7,5,4,8){9 1=true;9 0=$.trim($(3).val());2(0==6||0==\'\'){a.b(7);1=c;2(5){$(3).d()}}2((4!=""||4!=null)&&0!=\'\'){2(0.length<4){a.b(8);1=c;2(5){$(3).d()}}e f g(0,1)}e f g(0,1)}', [], 17, 'Temp|Validator|if|Element|Length|Focus|DefaultVal|ErrorInfo|LengthErrorInfo|var|layer|alert|false|focus|return|new|Array'.split('|'), 0, {}));
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-7]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getLengthDefaultError(1,3,4,5){6 2=true;6 0=$.trim($(1).val());7(0.length<3||0==\'\'){alert(4);2=false;7(5){$(1).focus()}}return new Array(0,2)}', [], 8, 'Temp|Element|Validator|DefaultVal|ErrorInfo|Focus|var|if'.split('|'), 0, {}));
/*------------取元素value值 end-----------*/
/*----------------取元素text值-------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getText(0){return $.trim($(0).text())}', [], 1, 'obj'.split('|'), 0, {}));
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-7]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function getTextDefaultError(0,3,4,5){6 1=true;6 2=$.trim($(0).val());7(2==3){alert(4);1=false;7(5){$(0).focus()}}return new Array(2,1)}', [], 8, 'Element|Validator|Temp|DefaultVal|ErrorInfo|Focus|var|if'.split('|'), 0, {}));
/*--------------验证元素输入的电话号码|手机号码格式是否正确-------------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsTelOrPhone(0){if(!regtelphone.test($(0).val())){alert(lang.telformat);$(0).focus()}}', [], 1, 'obj'.split('|'), 0, {}));
/*-----------------元素输入的数字格式,如果输入非数字的字符 将默认设置为1------------*/
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('$(6 () { $(\'.1>8\').9(6 (5) { d 7 = $(\'.1>8\').7($(b)); $(\'#2\').c($(b).3("4-0")); a(7); });});', 62, 14, 'ClassId|ajaxBQQH|ajaxClassId|attr|data|e|function|index|li|mouseover|setListAndPageHtml|this|val|var'.split('|'), 0, {}));
eval(function (p, a, c, k, e, d) { e = function (c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('6 e(a) { $(\'#3\').h(a); $(\'#4\').h(a); 9 ($.g($(\'.\' + $(\'#2\').h()).5(a).f()).c == 0) { $(\'.\' + $(\'#2\').h()).5(a).8(b.d); } 7("", -1);}', 62, 18, '||ajaxListClass|ajaxListIndex|ajaxPageIndex|eq|function|getList_LB|html|if|index|lang|length|loading|setListAndPageHtml|text|trim|val'.split('|'), 0, {}));
/*---------------退订 订阅信息 begin----------*/
/*------------取元素value值-----------*/
eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(36) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-9a-l]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('a getValue(i){5 $.b($(i).c())}a getValueDefaultError(2,6,7,4,8,j){9 1=k;9 0=$.b($(2).c());3(0==6||0==\'\'){d(7);1=e;3(4){$(2).f()}}3((8!=""||8!=null)&&0!=\'\'){3(0.l<8){d(j);1=e;3(4){$(2).f()}}5 g h(0,1)}5 g h(0,1)}a getLengthDefaultError(2,6,7,4){9 1=k;9 0=$.b($(2).c());3(0.l<6||0==\'\'){d(7);1=e;3(4){$(2).f()}}5 g h(0,1)}', [], 22, 'Temp|Validator|Element|if|Focus|return|DefaultVal|ErrorInfo|Length|var|function|trim|val|alert|false|focus|new|Array|obj|LengthErrorInfo|true|length'.split('|'), 0, {}));
/*----------------取元素text值-------------*/
eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(36) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-9a-c]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('3 getText(4){5 $.6($(4).7())}3 getTextDefaultError(0,8,9,a){b 1=true;b 2=$.6($(0).7());c(2==8){alert(9);1=false;c(a){$(0).focus()}}5 new Array(2,1)}', [], 13, 'Element|Validator|Temp|function|obj|return|trim|text|DefaultVal|ErrorInfo|Focus|var|if'.split('|'), 0, {}));
/*--------------验证元素输入的电话号码|手机号码格式是否正确-------------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsTelOrPhone(0){if(!regtelphone.test($(0).val())){alert(\'电话号码格式不正确!\');$(0).focus()}}', [], 1, 'obj'.split('|'), 0, {}));
/*-----------------元素输入的数字格式,如果输入非数字的字符 将默认设置为1------------*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[0-2]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function IsNum(0,1){if(!regnum.test($(0).2())){$(0).2(1)}}', [], 3, 'obj|obj2|val'.split('|'), 0, {}));
/*-点击次数*/
$(function () {
UpdateCrt('#views')
});
function UpdateCrt(obj) {
var this_href = window.location.href;
var reg = /(\d{1,})\.html/;
if (reg.test(this_href)) {
var data = "cmd=updatecrt&id=" + TDES.encrypt(getInfoID()) + "";
ajaxhelpS(data,
function (msg) {
$(obj).text(msg+'次')
})
} else {
var data = "cmd=updateMenuCrt&cid=" + TDES.encrypt(getClassID()) + "&id=" + TDES.encrypt(getInfoID()) + "";
ajaxhelpS(data,
function (msg) { })
}
}
/*-重置按钮*/
eval(function (p, a, c, k, e, r) { e = String; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '^$' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('$(document).on("click","#btnReset",function(){window.location.href=this_url});', [], 1, ''.split('|'), 0, {}));
/*-----------------------身份证号码真伪验证-----------------------------
**返回结果
**0 表示身份证号码正确
**1 表示非法身份证号
**2 表示非法地区
**3 表示非法生日
*/
eval(function (p, a, c, k, e, r) { e = function (c) { return (c < 62 ? '' : e(parseInt(c / 62))) + ((c = c % 62) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if ('0'.replace(0, e) == 0) { while (c--) r[e(c)] = k[c]; k = [function (e) { return r[e] || e }]; e = function () { return '[579bcefhjl-wyzA-F]' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('function cardValid(s){7 t={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"};7 l=0;7 5=s;7 u=5.v;9(!/^\\d{17}(\\d|x)$/i.w(5)&&!/^\\d{15}$/i.w(5)){b 1}9(t[y(5.c(0,2))]==null){b 2}9(u==15){e="19"+5.c(6,2)+"-"+h(5.c(8,2))+"-"+h(5.c(10,2));7 d=f m(e.n(/-/g,"/"));7 z=d.o().toString()+"-"+(d.A()+1)+"-"+d.B();9(e!=z){b 3}5=5.p(0,6)+"19"+5.p(6,15);5=5+GetVerifyBit(5)}7 C=f m();7 q=C.o();7 D=q-150;7 r=5.p(6,10);9(rq){b 3}5=5.n(/x$/i,"a");e=5.c(6,4)+"-"+h(5.c(10,2))+"-"+h(5.c(12,2));7 d=f m(e.n(/-/g,"/"));9(e!=(d.o()+"-"+(d.A()+1)+"-"+d.B())){b 3}E(7 i=17;i>=0;i--){l+=(Math.pow(2,i)%11)*y(5.charAt(17-i),11)}9(l%11!=1){b 1}7 j=f F();j=f F("11111119111111111","12121219121212121","123456789087654321");E(7 k=0;k 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function (e) { return d[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('d 6(9, c) { r n = -1; h (l) { n = i.j(\'数据请求中,请稍后…\', { o: 0, g: 2 }); } $.5({ "p": "k", "q": "" + e() + "/3/4.7", "9": 9, "a": "f", "m": d (j) { h (l) { i.8(n); } h (c) { c(j) } }, "b": d () { h (l) { i.8(n) } } })}', 62, 28, '||16|Ajax|AjaxHandler_MJZS|ajax|ajaxhelpS|ashx|close|data|datatype|error|fn|function|getRootPath|html|icon|if|layer|msg|post|showLoading|success|thisIndex|time|type|url|var'.split('|'), 0, {}));