⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 blog_menu.asp

📁 后台登陆admin.asp
💻 ASP
字号:
<!--#include file="mdb.asp" -->
<%

'****************************************************
dim userid,iid,gourl,blog_user,blog_Grade,UserPhoto,userok
userid=request.Cookies("HX_USER")("uid")
gourl=request("id")
IF userid<>Empty then
    iid=clng(userid)
    sql="select UserName,UserGrade,UserPhoto from [User] where userlock=0 and userid="&iid
    set rsu=server.createobject("adodb.recordset")
    rsu.open sql,conn,1,1
    IF rsu.eof or bof Then
        Response.redirect "/index.asp"
        Response.end
    Else
        blog_user=rsu(0)
        blog_Grade=rsu(1)
        if lcase(left(rsu(2),7))="http://" then
          UserPhoto=rsu(2)
        else
          UserPhoto="/"&rsu(2)
        end if
    End IF
    rsu.Close
    Set rsu=Nothing
    userok=1
Else
    userok=0
    blog_Grade=0
End IF
%>
//<script language="javascript">
// ---------------------------------------------------------------------
	// init value
	var expandState=0;	            
	var isLogin = <%=userok%>;    
	var isVip = <%=blog_Grade%>;
	if(leftgetCookie("leftLoginCookie")!=null){
		expandState=leftgetCookie("leftLoginCookie");
	}
// ---------------------------------------------------------------------
	// creat shell
	// ------------------------------
	function creatMenuShell(id_str,z_num,w_num,h_num){
		var temp_str='<font id="'+id_str+'" '
			+'style="position:absolute;'
			+'width:'+w_num+';'
			+'height:'+h_num+';'
			+'z-index:'+z_num+'">';
		return temp_str
	}
	function creatTitleLink(title_str,link_str){
		var temp_str='<div style="font-size:12px; margin-left:3px; margin-right:3px; margin-top:2px; padding:2px;" onmouseover="this.style.background=\'#DFE8F4\'" onmouseout="this.style.background=\'#FFFFFF\'">'
			+'<a href="';
		if(link_str==null){
			temp_str+='"'
				+'onclick="expandOfLog(\''
				+title_str
				+'\');return false;"'
		}else{
			temp_str+=link_str;
			temp_str+='" target="_blank"';
		}
		temp_str+=' style="font-size:12px; color:#5876A0; text-decoration:none;line-height:14px">'
			+'<span style="color:#799ED2;font-size:8px;font-weight:bold;margin-left:5px; font-family:\'宋体\'">> </span>'
			+title_str
			+'</a></div>';
		return temp_str;
	}
	function creatLabelLink(title_str,link_str){
		var temp_str='<div style="font-size:12px; margin-left:20px; margin-right:3px; margin-top:2px; padding:2px;" onmouseover="this.style.background=\'#DFE8F4\'" onmouseout="this.style.background=\'#FFFFFF\'">'
			+'<a href="'
			+link_str
			+'" target="_blank" style="font-size:12px; color:#6C6D6F; text-decoration:none;line-height:14px; font-family:\'宋体\'">·'
			+title_str
			+'</a></div>';
		return temp_str;
	}
	// ------------------------------
	// menu action
	var menuAction_str='<a href="" onmouseover="expand()">'
		+'<img src="/img/menu/imc_07.gif" border="0" />'
		+'<br />'
		+'<img src="/img/menu/imc_08.gif" border="0" />'
		+'</a>'
	// ------------------------------
	// menu login
	var menuLogin_str='<table width="150" height="183" border="0" cellpadding="0" cellspacing="0" background="/img/menu/imm_03.png">'
		+'<tr><td align="center" valign="top">'
		+'<table width="150" border="0" cellspacing="0" cellpadding="0">'
		+'<tr><td width="20" height="28"></td>'
		+'<td width="110" align="center" style="font-size:12px; color:#D7E3F4; line-height:28px">用户登录</td>'
		+'<td width="20" align="left" valign="top">'
		+'<a href="javascript:expand()"><img src="/img/menu/imm_01.gif" vspace="6" border="0" /></a>'
		+'</td></tr></table>'
		+'<form name="HWLoginForm" action="/UserChkLogin.asp?hx66=login" method="post" onsubmit="return CheckHWLoginForm();" style="margin:0px">'
		+'<table width="150" border="0" cellpadding="0" cellspacing="0">'
		+'<tr><td height="54" align="center" style="font-size:12px; color:#5876A0;">'
		+'用户名'
		+'<input name="username" type="text" value="" style="font-size:12px; border:solid; border-color:#799ED2; border-width:1px; width:80px; height:16px; margin:3px; vertical-align:middle" />'
		+'<br />'
		+'密 码'
		+'<input name="password" type="password" value="" style="font-size:12px; border:solid; border-color:#799ED2; border-width:1px; width:80px; height:16px; margin:2px; vertical-align:middle" />'
		+'</td></tr>'
		+'<tr><td height="24" align="left">'
		+'<input type="image" border="0" src="/img/menu/dl_1.gif" name="btnlogin" hspace="50" vspace="3">'
		+'</td></tr>'
		+'<tr><td height="50" align="left" style="font-size:12px; color:#5876A0;">'
		+'  <input type="checkbox" name="userhidden" value="1" onclick="Click_Name(this)"  />隐身登录<br />'
		+'  <input type="checkbox" name="CookieDate" value="1" onclick="Click_Auto(this)"  />自动登录'
		+'</td></tr>'
		+'<tr><td height="27" align="center">'
		+'<a href="/UserReg.asp" target="_blank" style="color:#5876A0; text-decoration:none">[注册]</a>  '
		+'<a href="/user_password.asp" target="_blank" style="color:#5876A0; text-decoration:none">[忘记密码]</a>'
		+'</td></tr>'
		+'</table>'
		+'</form></td></tr>'
		+'</table>';
	// ------------------------------
	// menu logout
	var menuLogout1_str='<table width="150" border="0" cellspacing="0" cellpadding="0">'
		+'<tr><td height="22" background="/img/menu/imc_11.gif">'
		+'<table width="150" border="0" cellspacing="0" cellpadding="0">'
		+'<tr><td width="20" height="22"></td>'
		+'<td width="110" align="center" valign="bottom" style="font-size:12px; color:#D7E3F4; line-height:18px">欢迎回来</td>'
		+'<td width="20" align="left" valign="bottom">'
		+'<a href="javascript:expand()"><img src="/img/menu/imm_01.gif" vspace="3" border="0" /></a>'
		+'</td></tr></table>'
		+'</td></tr>'
		+'<tr><td height="48" background="/img/menu/imc_12.gif" style="text-indent: 3px; text-align:left"">'
		+'<img src="<%=UserPhoto%>" width="40" height="40" hspace="3" align="absmiddle" />'
		+'<img src="/img/menu/imc_15.gif" width="4" height="40" align="absmiddle" />'
		+'<font style="font-size:12px; color:#FFFFFF"><%=blog_user%></font>'
		+'</td></tr>'
		+' <tr><td background="/img/menu/imc_13.gif" style="color:#000000; text-align:left" id="leftMenuCT">';
	var menuLogout2_str='</td></tr>'
		+'<tr><td height="29" background="/img/menu/imc_14.gif" align="center">'
		+'<a href="/UserChkLogin.asp?hx66=logout&gourl=<%=gourl%>" style="font-size:12px; color:#5876A0; text-decoration:none">[安全登出]</a>'
		+'</td></tr></table>';
	var menuLogout_array=new Array();
		var temp_obj=new Object();
		if(isVip == 1){
			temp_obj.title_str='我的VIP';
			temp_obj.link_str='http://www.ynsky.com.cn';
		}else{
			temp_obj.title_str='升级VIP';
			temp_obj.link_str='http://www.ynsky.com.cn';
		}
		temp_obj.open_bool=false;
		menuLogout_array.push(temp_obj);
		delete temp_obj;
		var temp_obj=new Object();
		temp_obj.title_str='会员中心';
		temp_obj.open_bool=false;
		temp_obj.label_array=new Array();
		temp_obj.link_array=new Array();
		temp_obj.label_array.push('个人资料');
		temp_obj.link_array.push('/User_main.asp');
		temp_obj.label_array.push('修改信息');
		temp_obj.link_array.push('/User_main.asp?action=edit');
		temp_obj.label_array.push('我的短信');
		temp_obj.link_array.push('/messager.asp?action=new');
		temp_obj.label_array.push('音乐收藏');
		temp_obj.link_array.push('/User_main.asp?action=collect');
		temp_obj.label_array.push('我的书签');
		temp_obj.link_array.push('/User_book.asp');
		temp_obj.label_array.push('我的好友');
		temp_obj.link_array.push('/User_main.asp?action=friend');
		temp_obj.label_array.push('我的定单');
		temp_obj.link_array.push('/shop_myuser.asp?action=dingdan');
		menuLogout_array.push(temp_obj);
		delete temp_obj;
		var temp_obj=new Object();
		temp_obj.title_str='我的文集';
		temp_obj.open_bool=false;
		temp_obj.label_array=new Array();
		temp_obj.link_array=new Array();
		temp_obj.label_array.push('我的文集');
		temp_obj.link_array.push('/user_corpus.asp');
		menuLogout_array.push(temp_obj);
		delete temp_obj;
		var temp_obj=new Object();
		temp_obj.title_str='发布信息';
		temp_obj.open_bool=false;
		temp_obj.label_array=new Array();
		temp_obj.link_array=new Array();
		temp_obj.label_array.push('发布新闻');
		temp_obj.link_array.push('/User_put.asp?action=news');
		temp_obj.label_array.push('发表线路');
		temp_obj.link_array.push('/User_put.asp?action=art');
		temp_obj.label_array.push('发布音乐');
		temp_obj.link_array.push('/User_put.asp?action=dj');
		temp_obj.label_array.push('发布软件');
		temp_obj.link_array.push('/User_put.asp?action=down');
		temp_obj.label_array.push('上传贴图');
		temp_obj.link_array.push('/User_put.asp?action=pic');
		temp_obj.label_array.push('推荐网站');
		temp_obj.link_array.push('/User_put.asp?action=web');
		temp_obj.label_array.push('发布产品');
		temp_obj.link_array.push('/User_put.asp?action=shop');
		menuLogout_array.push(temp_obj);
		delete temp_obj;
		var temp_obj=new Object();
		temp_obj.title_str='栏目导航';
		temp_obj.open_bool=false;
		temp_obj.label_array=new Array();
		temp_obj.link_array=new Array();
		temp_obj.label_array.push('新闻资讯');
		temp_obj.link_array.push('/news.asp');
		temp_obj.label_array.push('旅游线路');
		temp_obj.link_array.push('/art.asp');
		temp_obj.label_array.push('歌曲音乐');
		temp_obj.link_array.push('/dj.asp');
		temp_obj.label_array.push('影视中心');
		temp_obj.link_array.push('/vid.asp');
		temp_obj.label_array.push('精美图片');
		temp_obj.link_array.push('/pic.asp');
		temp_obj.label_array.push('资源下载');
		temp_obj.link_array.push('/down.asp');
		temp_obj.label_array.push('在线商城');
		temp_obj.link_array.push('/shop.asp');
		temp_obj.label_array.push('酷站推荐');
		temp_obj.link_array.push('/web.asp');
		temp_obj.label_array.push('网页特效');
		temp_obj.link_array.push('/js.asp');
		temp_obj.label_array.push('精彩动漫');
		temp_obj.link_array.push('/flash.asp');
		temp_obj.label_array.push('网站留言');
		temp_obj.link_array.push('/book.asp');
		temp_obj.label_array.push('论坛讨论');
		temp_obj.link_array.push('/bbs/');
		menuLogout_array.push(temp_obj);
		delete temp_obj;
	function creatLogMenu(get_str){
		var temp_str='';
		for(var loops=0;loops<menuLogout_array.length;loops++){
			temp_str+=creatTitleLink(menuLogout_array[loops].title_str,menuLogout_array[loops].link_str)
			if(menuLogout_array[loops].title_str==get_str){
				menuLogout_array[loops].open_bool=!menuLogout_array[loops].open_bool;
			}else if(get_str!=null){
				menuLogout_array[loops].open_bool=false;
			}
			if(menuLogout_array[loops].open_bool){
				for(loops_=0;loops_<menuLogout_array[loops].label_array.length;loops_++){
					temp_str+=creatLabelLink(menuLogout_array[loops].label_array[loops_],menuLogout_array[loops].link_array[loops_])
				}
			}
		}
		return temp_str;
	}
// ---------------------------------------------------------------------
// init menu
	var creatLeftMenu_obj;
	function leftMenuInit(){
		document.write((creatMenuShell('leftMenuMaster','115',10,10))+'</font>');	
		creatLeftMenu_obj=setInterval(function(){
			if(document.getElementById("leftMenuMaster")!=null){
				if(expandState == 1){
					if(isLogin==1){
						document.getElementById("leftMenuMaster").innerHTML=menuLogout1_str+creatLogMenu()+menuLogout2_str;
					}else{
						document.getElementById("leftMenuMaster").innerHTML=menuLogin_str;
					}
				}else{
					document.getElementById("leftMenuMaster").innerHTML=menuAction_str;
				}
				clearInterval(creatLeftMenu_obj);
				leftMenuScroll();
			}
		},300);
	}
	leftMenuInit();
// ---------------------------------------------------------------------
// init menu
	window.scrollBy(0,1);
	var leftMenuBodyBase_obj=(document.documentElement.scrollTop>document.body.scrollTop?document.documentElement:document.body);
	var leftMenuPageScroll_num=leftMenuBodyBase_obj.scrollTop;
	function leftMenuScroll(){	
		if(document.getElementById("leftMenuMaster")!=null){
			document.getElementById("leftMenuMaster").style.top=leftMenuBodyBase_obj.scrollTop+'px';
			document.getElementById("leftMenuMaster").style.left=leftMenuBodyBase_obj.scrollLeft+'px';
		}
	}
	
	// on Scroll
	if(scrollList_array!=null){
		scrollList_array.push(leftMenuScroll);
		var scrollList_num=leftMenuBodyBase_obj.scrollTop;
	}else{
		var scrollList_array=new Array();
		scrollList_array.push(leftMenuScroll);	
		setInterval(function(){
			if(scrollList_num!=leftMenuBodyBase_obj.scrollTop){
				for(var loops in scrollList_array){
					scrollList_array[loops]();
				}
				
			}
			scrollList_num=leftMenuBodyBase_obj.scrollTop;
		},50);
	}
// ---------------------------------------------------------------------
// public method
	function leftsetCookie(name, value, expires, path, domain, secure) { 
		var expdate = new Date();
		expdate.setTime (expdate.getTime() + (86400 * 1000 * 31));
		var curCookie = name + "=" + escape(value) + "; expires=" + expdate.toGMTString() + 
						"; path=/" + 
						"; domain=hx66.com.cn"
		document.cookie = curCookie 
	}
	function leftgetCookie(name) { 
		var prefix = name + "=" 
		var cookieStartIndex = document.cookie.indexOf(prefix) 
		if (cookieStartIndex == -1) 
		return null 
		var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length) 
		if (cookieEndIndex == -1) 
		cookieEndIndex = document.cookie.length 
		return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)) 
	}
	function expand(){
		if(expandState == 0){
			leftsetCookie("leftLoginCookie","1");
			if(document.getElementById("leftMenuMaster")!=null){
				if(isLogin==1){
					document.getElementById("leftMenuMaster").innerHTML=menuLogout1_str+creatLogMenu()+menuLogout2_str;
				}else{
					document.getElementById("leftMenuMaster").innerHTML=menuLogin_str;
				}
			}
			expandState=1;
		}
		else{
			leftsetCookie("leftLoginCookie","0");
			document.getElementById("leftMenuMaster").innerHTML=menuAction_str;
			expandState=0;
		}
	}
	function expandOfLog(get_str){
		if(get_str!=null&&isLogin==1){
			document.getElementById("leftMenuCT").innerHTML=creatLogMenu(get_str);
		}
	}
	function CheckHWLoginForm(){
		if(HWLoginForm.username.value==''){
			alert('请填写用户名!');
			HWLoginForm.username.focus();
			return false;
		}else if(HWLoginForm.password.value==''){
			alert('请填写密码!');
			HWLoginForm.password.focus();
			return false;
		}
		document.HWLoginForm.submit();
	}
	function Click_Name(){
		if(document.HWLoginForm.userhidden.checked == true)	{	
			alert("选中你将以隐身身份登陆本站。");	
			document.HWLoginForm.CookieDate.checked	     = false;		
		} 
	}
	function Click_Auto(){
		if(document.HWLoginForm.CookieDate.checked == true){
			alert("选中可能产生密码安全问题,建议仅限于非公共场所使用。");
			document.HWLoginForm.userhidden.checked      = false;
		}
	 
	}
//</script>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -