将下面的代码替换 static/js/system.js 即可
修改后的JS文件下载:system.js
$(function() {
$("a").bind("focus",
function() {
this.blur && this.blur();
});
$("a.pageload,.left_link a").click(function() {
page_loading();
});
$("#admin_sub_title a").click(function() {
var a = $(this).attr("href").toLowerCase();
top.$("#left ul.dis a").each(function(b) {
$(this).attr("href").toLowerCase() == a && top.$(".left_link_over").attr("class", "left_link") && $(this).parent().attr("class", "left_link_over");
});
});
});
page_loading_close();
var cookiepre = "xbwseo_",
cookiedomain = "",
cookiepath = "/",
licencetip = true;
editoption = {
resizeType: 1,
allowPreviewEmoticons: false,
allowImageUpload: true,
imageSizeLimit: UPLOAD_MAX_FILESIZE,
uploadJson: "?g=plus&m=editor&a=upload&PHPSID=" + PHPSESSID,
fileManagerJson: "?g=plus&m=editor&a=fileManager",
allowFileManager: true,
langType: "zh_CN",
items: "source preview | undo redo | fontname fontsize forecolor hilitecolor bold italic underline removeformat | justifyleft justifycenter justifyright | image multiimage baidumap | link unlink insertfile fullscreen page".split(" ")
};
function showimg(a, b, c) {
c && (c = "?", -1 < a.indexOf("?") && (c = "&"), a += c + "_t=" + Math.random());
top.art.dialog({
id: "showimg",
lock: 1,
opacity: 0.1,
title: b ? b: "查看图片",
content: "<img src=\"" + a + "\" onload=\"top.art.dialog.list['showimg']._reset();\" id=\"showimg\" />"
});
}
function classCutover(a, b, c) {
c = isUndefined(c) ? 10 : c;
for (i = 1; i <= c; i++) {
$(a + "_" + i).hide();
}
$(a + "_" + b).show();
}
var showDialogST = null;
function showDialog(a, b, c, d, e, f, g, k, h, l, m) {
clearTimeout(showDialogST);
e = isUndefined(e) ? "info" == b ? false: true: e;
g = isUndefined(g) ? "": g;
b = in_array(b, ["confirm", "notice", "info", "success"]) ? b: "error";
var n = $(".art_dialog");
if (isUndefined(a)) {
return art.dialog({
id: "art_dialog"
});
}
oktxtdefault = "确定";
l = isUndefined(l) ? null: l;
closefunc = function() {
"function" == typeof d ? d() : eval(d);
};
l && (g = "<span id=\"closetime\">" + l + "</span> 秒后窗口关闭<script>lastNum(\"closetime\"," + l + ")</script>", showDialogST = setTimeout(closefunc, 1000 * l));
if (m = isUndefined(m) ? "": m) {
g = "<span id=\"locationtime\">" + m + "</span> 秒后页面跳转<script>lastNum(\"locationtime\"," + m + ")</script>",
showDialogST = setTimeout(closefunc, 1000 * m);
}
k = k ? k: oktxtdefault;
h = h ? h: "取消";
n && art.dialog({
id: "art_dialog"
}).close();
leftfunc = function() {
g && $("<span style=\"color: #999999;float: left;line-height: 25px;\">" + g + "</span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
};
art.dialog({
id: "art_dialog",
title: c ? c: "提示信息",
time: l,
opacity: 0.3,
lock: e,
content: a,
icon: "info" == b ? "": b,
init: leftfunc,
okVal: k,
ok: "info" == b ? false: function() {
"function" == typeof d ? d() : eval(d);
},
cancelVal: h,
cancel: "confirm" != b ? false: function() {
"function" == typeof f ? f() : eval(f);
}
});
}
function lastNum(a, b) {
document.getElementById(a).innerHTML = b;
if (1 == b) {
return false;
}
b--;
setTimeout("lastNum('" + a + "'," + b + ")", 1000);
}
function showAlert(a, b, c, d) {
b = b.replace(/<script[^\>]*?>([^\x00]*?)<\/script>/gi, "");
d = d ? d: 2;
"null" == d && (d = null);
"" !== b && (c ? showDialog(b, a, null, "location.href=\"" + c + "\";", 1, null, null, null, null, 2, 1) : showDialog(b, a, null, true, true, null, null, null, null, d));
}
function description(a) {
document.write("<a href=\"javasctipt:\" onclick=\"showDialog('" + a + "','confirm');\"><img src=\"static/images/description.png\" title=\"点击查看此选项说明\" /></a>");
}
function showWindow(a, b, c, d, e) {}
var lastCtrl = {};
function selemenu(a) {
$(".left_link_over").attr("class", "left_link");
a.className = "left_link_over";
lastCtrl = a;
}
function selectTab(a, b) {
var c = $("#admin_sub_title")[0].getElementsByTagName("li"),
d = c.length;
for (i = 0; i < d; i++) {
c[i].className = "unsub";
}
b.parentNode.className = "sub";
for (i = 0; j = $("#config" + i)[0]; i++) {
j.style.display = "none";
}
$("#" + a)[0].style.display = "";
}
function checkselect(a, b) {
for (var c = a.checked ? true: false, d = 0; d < b.length; d++) {
b.all[d].selected = c;
}
}
function isUndefined(a) {
return "undefined" == typeof a ? true: false;
}
function in_array(a, b) {
if ("string" == typeof a || "number" == typeof a) {
for (var c in b) {
if (b[c] == a) {
return true;
}
}
}
return false;
}
function trim(a) {
return (a + "").replace(/(\s+)$/g, "").replace(/^\s+/g, "");
}
function strlen(a) {
return BROWSER.ie && -1 != a.indexOf("\n") ? a.replace(/\r?\n/g, "_").length: a.length;
}
function mb_strlen(a) {
for (var b = 0,
c = 0; c < a.length; c++) {
b += 0 > a.charCodeAt(c) || 255 < a.charCodeAt(c) ? "utf-8" == charset ? 3 : 2 : 1;
}
return b;
}
function mb_cutstr(a, b, c) {
var d = 0,
e = "";
c = c ? c: "...";
b -= c.length;
for (var f = 0; f < a.length; f++) {
d += 0 > a.charCodeAt(f) || 255 < a.charCodeAt(f) ? "utf-8" == charset ? 3 : 2 : 1;
if (d > b) {
e += c;
break;
}
e += a.substr(f, 1);
}
return e;
}
function preg_replace(a, b, c, d) {
d = d ? d: "ig";
for (var e = a.length,
f = 0; f < e; f++) {
re = new RegExp(a[f], d),
c = c.replace(re, "string" == typeof b ? b: b[f] ? b[f] : b[0]);
}
return c;
}
function htmlspecialchars(a) {
return preg_replace(["&", "<", ">", "\""], ["&", "<", ">", "\""], a);
}
function display(a) {
a = $(a);
a.style.visibility ? (a.style.visibility = "visible" == a.style.visibility ? "hidden": "visible") : (a.style.display = "" == a.style.display ? "none": "");
}
function checkall(a, b, c) {
c = c ? c: "chkall";
for (var d = count = 0; d < a.elements.length; d++) {
var e = a.elements[d];
e.name && e.name != c && !e.disabled && (!b || b && e.name.match(b)) && (e.checked = a.elements[c].checked, e.checked && count++);
}
return count;
}
function setcookie(a, b, c, d, e, f) {
var g = new Date;
if ("" == b || 0 > c) {
b = "",
c = -2592000;
}
g.setTime(g.getTime() + 1000 * c);
e = e ? e: cookiedomain;
d = d ? d: cookiepath;
document.cookie = escape(cookiepre + a) + "=" + escape(b) + (g ? "; expires=" + g.toGMTString() : "") + (d ? "; path=" + d: "/") + (e ? "; domain=" + e: "") + (f ? "; secure": "");
}
function getcookie(a, b) {
a = cookiepre + a;
var c = document.cookie.indexOf(a),
d = document.cookie.indexOf(";", c);
if ( - 1 == c) {
return "";
}
c = document.cookie.substring(c + a.length + 1, d > c ? d: document.cookie.length);
return b ? c: unescape(c);
}
function urlencode(a) {
var b, c, d = "";
for (b = 0; b < a.length; b++) {
c = a.charCodeAt(b).toString(16),
d += "%" + c;
}
return d;
}
function urldecode(a) {
var b, c = a.split("%");
for (a = 1; a < c.length; a++) {
b += String.fromCharCode(parseInt(c[a], 16));
}
return b;
}
function bytesToSize(a) {
if (0 === a) {
return "0 B";
}
var b = Math.floor(Math.log(a) / Math.log(1000));
return (a / Math.pow(1000, b)).toPrecision(3) + " " + "B KB MB GB TB PB EB ZB YB".split(" ")[b];
}
function get_line_count(a, b) {}
function upload(a, b, c, d, e) {
var f = $(a),
g = $(".uploader-list", f),
k = $(".uploadbtn", f),
h;
b = b ? b: "txt";
"undefined" == d && (d = "");
$accept = {
txt: {
title: "TXT文件",
extensions: "txt",
mimeTypes: "text/*"
},
image: {
title: "图片文件",
extensions: "jpg,jpeg,png,gif,bmp",
mimeTypes: "image/*"
}
};
a = {
resize: false,
auto: false,
swf: "./static/js/webuploader/uploader.swf",
formData: {
PHPSID: PHPSESSID,
filename: c ? c: "",
filetype: b,
dirname: d
},
server: "?admin-tools-webuptxt",
accept: $accept[b],
pick: {
id: $(a + " .picker"),
multiple: "" != d ? true: false
}
};
h = WebUploader.create(a);
k.on("click",
function() {
if ($(this).hasClass("disabled")) {
return false;
}
if ("" == h.getFiles() || "undefined" == h.getFiles()) {
return showAlert("error", "请先选择文件"),
false;
}
k.removeClass("disabled").addClass("disabled");
h.upload();
});
g.on("click", ".file-item-close",
function() {
$parent = $(this).parent();
$file = h.getFile($parent.attr("id"));
h.removeFile($file, true);
$parent.remove();
});
h.on("fileQueued",
function(a) {
g.append("<div id=\"" + a.id + "\" class=\"file-item\"><span class=\"file-item-close\">x</span><span class=\"tt name\">" + a.name + "</span><span class=\"tt size\">" + bytesToSize(a.size) + "</span><span class=\"tt status\">等待上传...</span></div>");
});
h.on("uploadProgress",
function(a, b) {
var c = $("#" + a.id, f),
d = c.find(".progress .progress-bar");
d.length || (d = $("<div class=\"progress\"><div class=\"progress-bar\" style=\"width: 0%;\"></div></div>").appendTo(c).find(".progress-bar"));
c.find("span.status").html("上传中<span class=\"progress-text\"></span>");
c.find("span.progress-text").text(100 * b + "%");
d.css("width", 100 * b + "%");
});
h.on("uploadSuccess",
function(a) {
$("#" + a.id, f).find("span.status").html("<font color=\"green\">上传成功</font>");
$("#" + a.id, f).addClass("file-item-success");
k.removeClass("retry");
"function" == typeof e ? e() : e && eval(e);
});
h.on("uploadError",
function(a) {
$("#" + a.id, f).find("span.status").html("<font color=\"red\">上传失败</font>");
$("#" + a.id, f).addClass("file-item-error");
k.addClass("retry").text("重新上传");
$("button.retry", f).on("click",
function() {
$("#" + a.id, f).removeClass("file-item-error");
h.retry();
});
});
h.on("uploadAccept",
function(a, b) {
if (b.status) {
return true;
}
alert(b.info);
return false;
});
h.on("uploadComplete",
function(a) {
k.removeClass("disabled");
});
}
function page_loading(a) {
a || (a = "数据加载中...");
top.$(".page_loading").remove();
top.$("#right").css({
opacity: 0.8
});
top.$("body").append("<div class=\"page_loading\"><span onclick=\"page_loading_close();\" class=\"page_close\">\xD7</span><img src=\"./static/images/page_loading.gif\"/> <span>" + a + "</span></div>");
}
function page_loading_close() {
top.$(".page_loading").remove();
top.$("#right").css({
opacity: 1
});
}
var thisurl = document.location.href,
hostname = encodeURIComponent(window.location.hostname);
/*
if (thisurl.indexOf("txtdata") > -1 || thisurl.indexOf("robot") > -1 || thisurl.indexOf("config") > -1) {
if (hostname != "zhizhuchi.cm") {
$.getScript("http://www.xbwseo.com/update.php?ajax=1&m=check&a=licence&type=" + viptype + "&vs=" + vipver + "&code=" + vipcode + "&host=" + hostname);
}
}
var updatetips;
function update_check() {
$.ajax({
url: "http://www.xbwseo.com/update.php?ajax=1&m=check&a=update&type=" + viptype + "&vs=" + vipver + "&code=" + vipcode + "&host=" + hostname,
dataType: "jsonp",
timeout: 5000,
success: function(a) {
1 == a.status && (updatetips = art.dialog.notice({
title: "升级提示",
width: 220,
lock: true,
content: "<div style=\"border-bottom: 1px solid #eee;border-top: 1px solid #eee;text-align: left;padding:10px;margin-bottom:10px;font-size:13px;max-width:300px;height:180px;overflow:auto;background:#f8f8f8;line-height:22px;\">" + a.msg + "</div><a class=\"button\" href=\"?admin-update-index\" target=\"main\">前往升级</a> <a class=\"button button_grey\" href=\"javascript:\" onclick=\"setcookie('updatetips','0',(3600*24));updatetips.close();\">不再提示</a></p>",
time: 0
}));
}
});
}
*/
jQuery.download = function(a, b, c) {
if (b) {
b = "string" == typeof b ? b: jQuery.param(b);
var d = "";
jQuery.each(b.split("&"),
function() {
var a = this.split("=");
d += "<input type=\"hidden\" name=\"" + a[0] + "\" value=\"" + a[1] + "\" />";
});
} else {
d = "<input type=\"hidden\" name=\"d\" value=\"" + (new Date).getMilliseconds() + "\" />";
}
jQuery("<form action=\"" + a + "\" method=\"" + (c || "post") + "\">" + d + "</form>").appendTo("body").submit().remove();
};
art.dialog.notice = function(a) {
var b = a || {},
c, d, e, f, g;
a = {
id: "Notice",
left: "100%",
top: "100%",
fixed: true,
drag: false,
resize: false,
follow: null,
lock: false,
init: function(a) {
c = this;
d = c.config;
f = c.DOM.wrap;
g = parseInt(f[0].style.top);
e = g + f[0].offsetHeight;
f.css("top", e + "px").animate({
top: g + "px"
},
800,
function() {
b.init && b.init.call(c, a);
});
},
close: function(a) {
f.animate({
top: e + "px"
},
800,
function() {
b.close && b.close.call(this, a);
d.close = $.noop;
c.close();
});
return false;
}
};
for (var k in b) {
a[k] = b[k];
}
return artDialog(a);
};
artDialog.fn.shake = function() {
var a = this.DOM.wrap[0].style,
b = [4, 8, 4, 0, -4, -8, -4, 0],
b = b.concat(b.concat(b));
timerId = setInterval(function() {
a.marginLeft = b.shift() + "px";
0 >= b.length && (a.marginLeft = 0, clearInterval(timerId));
},
13);
return this;
};
function lock_page() {
$("input").attr("disabled", "disabled");
$("textarea").attr("disabled", "disabled");
}
function licence_die(a) {
top.art.dialog({
content: "<div id=\"licence-box\"><p>《<font color=\"green\">小霸王万能蜘蛛池</font>》为商业程序,需购买授权才能使用</p><p>请输入授权码:(<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">点击在线购买</font></a>)</p><p><textarea name=\"code\" class=\"inputs\" id=\"licence-code\"></textarea></p><p id=\"licence-msg\"></p></div>",
fixed: true,
esc: false,
title: "请输入授权码",
lock: true,
id: "licencebox",
okVal: "提交授权",
init: function() {
showAlert("error", "dsmsg", "", "null");
1 > top.$("#dialog_foot").length && top.$("<span style=\"float: left;line-height: 25px;\" id=\"dialog_foot\">客服QQ:<a href=\"http://wpa.qq.com/msgrd?v=3&uin=996948519&site=qq&menu=yes\" target=\"_blank\"><font color=\"red\">996948519</font></a> 官网:<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">xbwseo.com</font></a></span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
},
ok: function() {
var a = $("#licence-code"),
c = this;
$.ajax({
url: "?admin-index-licence",
type: "post",
data: "code=" + $.trim(a.val()),
success: function(d) {
1 == d.status ? (alert("授权成功!"), top.location.reload()) : (c.shake && c.shake(), a.select(), a.focus(), $("#licence-msg").html(d.info).show().fadeOut(3000));
}
});
return false;
},
cancel: false
});
return true;
}
function licence_lock(a) {
licencetip = true;
top.art.dialog({
content: "<div id=\"licence-box\"><p>" + a + "</p></div>",
fixed: true,
esc: false,
title: "提示信息",
lock: true,
id: "nolicencebox",
okVal: "确定",
icon: "face-sad",
init: function() {
1 > top.$("#dialog_foot").length && top.$("<span style=\"float: left;line-height: 25px;\" id=\"dialog_foot\">客服QQ:<a href=\"http://wpa.qq.com/msgrd?v=3&uin=996948519&site=qq&menu=yes\" target=\"_blank\"><font color=\"red\">996948519</font></a> 官网:<a href=\"http://www.xbwseo.com\" target=\"_blank\"><font color=\"red\">xbwseo.com</font></a></span>").prependTo(".aui_dialog .aui_footer .aui_buttons");
},
ok: function() {
window.open("http://www.xbwseo.com/", "newwin");
return false;
},
cancel: false
});
$.ajax({
url: "?admin-index-licence"
});
}