09-07
14
PJ3不能发表评论BUG
作者:Java伴侣 日期:2009-07-14
将common/common.js文件中的函数
替换成
复制内容到剪贴板 程序代码
//初始化登陆态的表现 ,for static mode
function initLogin(CookieName){
...
}
function initLogin(CookieName){
...
}
替换成
复制内容到剪贴板 程序代码
//初始化登陆态的表现 ,for static mode
function initLogin(CookieName){
var n = getCookie(CookieName);
if (n) {
//用户登陆
var u = /memName=(\w+)/.exec(n);
var ucn = /memName=([^\u4e00-\u9fa5]*)/.exec(n);
var cnvalue = decodeURI(ucn[1]).split("&")[0];
if (u){
var un = document.forms["frm"]["username"];
un.value = u[1];
un.readOnly = true;
if ($("passArea")) $("passArea").parentNode.removeChild($("passArea"));
}else if(cnvalue.length > 0){
var cnun = document.forms["frm"]["username"];
cnun.value = cnvalue;
cnun.readOnly = true;
if ($("passArea")) $("passArea").parentNode.removeChild($("passArea"));
}
//blog目前的权限
var m = /memRight=(\d+)/.exec(n);
if (m) {
var rn = parseInt(m[1],2);
var ss = document.styleSheets[0];
var rule = ss.rules || ss.cssRules;
if (rn&(1<<2) && rn&(1<<4)) rule[0].style.display = "";
if (rn&(1<<8)) {rule[1].style.display = "";}
}
}
}
function initLogin(CookieName){
var n = getCookie(CookieName);
if (n) {
//用户登陆
var u = /memName=(\w+)/.exec(n);
var ucn = /memName=([^\u4e00-\u9fa5]*)/.exec(n);
var cnvalue = decodeURI(ucn[1]).split("&")[0];
if (u){
var un = document.forms["frm"]["username"];
un.value = u[1];
un.readOnly = true;
if ($("passArea")) $("passArea").parentNode.removeChild($("passArea"));
}else if(cnvalue.length > 0){
var cnun = document.forms["frm"]["username"];
cnun.value = cnvalue;
cnun.readOnly = true;
if ($("passArea")) $("passArea").parentNode.removeChild($("passArea"));
}
//blog目前的权限
var m = /memRight=(\d+)/.exec(n);
if (m) {
var rn = parseInt(m[1],2);
var ss = document.styleSheets[0];
var rule = ss.rules || ss.cssRules;
if (rn&(1<<2) && rn&(1<<4)) rule[0].style.display = "";
if (rn&(1<<8)) {rule[1].style.display = "";}
}
}
}
评论: 0 | 引用: 0 | 查看次数: 463
发表评论