﻿<!--
function RequestGroupLock()
{
	var httpRequest = AjaxRequest();
	var Request = new aspRequest(document.URL);
	var UserBlog = new getUserBlog(Request);
	var strBlog = UserBlog.Blog;

	document.body.style.display = "none";

	if (httpRequest && strBlog != "")
	{
		httpRequest.onreadystatechange = function() {

			if (httpRequest.readyState == 4 && httpRequest.status == 200)
			{
				var xmldoc = httpRequest.responseXML;
				var rowsElement = xmldoc.getElementsByTagName("unlock");

				if (rowsElement.length > 0)
				{
					var strCN = rowsElement[0].childNodes[0].firstChild.data;
					var strUNLOCK = rowsElement[0].childNodes[1].firstChild.data;

					if (strUNLOCK == "True")
					{
						var objElement = document.getElementById("LogLink");

						objElement.href = "../../Logout.aspx";
						objElement.innerHTML = "登出";

						objElement = document.getElementById("LogLine");
						objElement.innerHTML = "<a href='../../My/" + strCN + "'>" + strCN + "</a>，您好～進入「<a href='../../Interface.htm' style='font-size: 12px;'>我的管理介面</a>」";

						document.body.style.display = "";

						if (document.all)
						{
							DocumentModelLoad();

							if (self.frames.length > 0 && self.frames["NewsClub"])
								self.frames["NewsClub"].location.href = "../../Xml/NewsClub.asp";
						}
						else
						{
							if (self.frames.length > 0 && self.frames["NewsClub"])
								self.frames["NewsClub"].location.href = "../../Xml/NewsClub.asp";

							DocumentModelLoad();
						}
					}
					else
					{

						if (strCN == "")
							location.href = "Lock.htm";
						else
							location.href = "LockMember.htm";

					}
				}
			}
		}

		var url = "../../Xml/GroupLock.aspx?GROUP=" + strBlog + "&rnd=" + Rnd();

		httpRequest.open("GET", url, true);
		httpRequest.send(null);
	}
}

RequestGroupLock();
//-->