admin_left.asp

来自「eayanQuery思燕大学成绩查询系统 版本 V1.6」· ASP 代码 · 共 558 行 · 第 1/2 页

ASP
558
字号
<%option explicit%>
 <!--#include file="../Conn.asp"-->
<!--#include file="../include/md5.asp"-->
<!--#include file="../include/ReplaceHtml.asp"-->
<!--#include file="../include/PublicFunction.asp"-->
<!--#include file="../include/Session.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/my_style2.css" rel="stylesheet" type="text/css">
<title>admin_left.asp左侧管理菜单</title>
<!--Start XP Style Menu-->
<SCRIPT LANGUAGE="Javascript" DEFER="TRUE"> 
<!--
var menuinit=new Array(50),vers;//(don't change this)
for(i=0;i<51;i++)menuinit[i]=new Array(3);//(don't change this)
var bgimages_show = "images/20051228141320118.gif";
var bgimages_hide = "images/20051228141311995.gif";
var onemenu = 0; //open one menu at same time.1 is yes, 0 is no. default=1.
var speedmout = 100; //menu show speed(1~100;default=50) *the large the fast, but also come with more bump.
var speedmin = 100; //menu hide speed(1~100;default=50)
var developversion = true; //when false block all script error if any.
//setting of which menu should be showen. In this example you have 4 menu, which you can switch between "show" and "not show"
//if you want to add extra one, you should follow this order: "menuinit[n][1]=;" (in [a][b], b must be '1', a is the serial number of menu)
menuinit[1][1]="show";
menuinit[2][1]="not show";
menuinit[3][1]="not show";
////////////////////////!!!DO NOT CHANGE BELOW THIS LINE!!!!/////////////////////////////
//
var da=new Date();
var browser=new BrowserDetectLite();
var fstrun=1;
var op="";
var whichContinue="";
var whichOpen="";
var opp=0;
var opd=0;
var opc=0;
var sc=1;sd=1;
var mnunum=0;
var cacheObj,cacheMaxh,cacheObj2;
//----------------------------------------------------------------------------------------
function menuShow(obj,maxh,obj2)
{
var da=new Date();
if(fstrun==1){
 op="show";
 mountmfunc(0,0,0);
 obj2.background=bgimages_hide;
 obj.style.pixelHeight=2;
 obj.style.display='block'; 
 opc=6.18*(speedmout*0.01); //step length
 opp=Math.round(opc); //rounded step length
 opd=(maxh/opp)/100; //times
 sc=1;sd=opd;
 fstrun=0;
 cacheObj=obj;cacheMaxh=maxh;cacheObj2=obj2;
}else{
 if(op!="show") return false;
}
  if(obj.style.pixelHeight<maxh-opp)
  {
           if(opd>1){//for slow speed
              if(sd-sc<1){obj.filters.alpha.opacity+=1;sd+=opd;}
              sc++;
            }else{//for fast speed
              obj.filters.alpha.opacity+=Math.ceil(1/opd);
            }
            
        obj.style.pixelHeight+=opp;
	cacheObj=obj;cacheMaxh=maxh;cacheObj2=obj2;
	setTimeout('menuShow(cacheObj,cacheMaxh,cacheObj2)','5');
  }else{
        obj.style.pixelHeight=maxh;
        obj.filters.alpha.opacity=100;
        fstrun=1;
        op="";
        sc=1;sd=1;
        mountmfunc(1,1,1);
        return true;
  }
}
//----------------------------------------------------------------------------------------
function menuHide(obj,maxh,obj2)
{
da=new Date();
if(fstrun==1){
 op="hide";
 mountmfunc(0,0,0);
 obj2.background=bgimages_show;
 opc=6.18*(speedmout*0.01); //step length
 opp=Math.round(opc); 
 opd=((maxh-3)/opp)/100;
 sc=1;sd=opd;
 fstrun=0;
 cacheObj=obj;cacheMaxh=maxh;cacheObj2=obj2;
}else{
 if(op!="hide") return false;
}
  if(obj.style.pixelHeight-opp>1)
  { 
	    if(opd>1){
              if(sd-sc<1){obj.filters.alpha.opacity-=1;sd+=opd;}
              sc++;
            }else{
               obj.filters.alpha.opacity-=Math.ceil(1/opd)*0.38;
            }
            obj.style.pixelHeight-=opp;
	setTimeout('menuHide(cacheObj,cacheMaxh,cacheObj2)','5');
  }else{
        obj.style.pixelHeight=1;
        obj.style.display='none';
        obj.filters.alpha.opacity=0;
        fstrun=1;
        op="";
        sc=1;sd=1;
        mountmfunc(1,1,1);
        if(whichContinue && onemenu==1) whichContinue.click();
        return true;
  }
}
//----------------------------------------------------------------------------------------
function menuChange(obj,maxh,obj2)
{
  if(obj.style.pixelHeight>1)
  {
    menuHide(obj,maxh,obj2);
	whichOpen='';       
  }
  else
    if(whichOpen)
	{
	  whichContinue=obj2;
          whichOpen.click();
	}
	else
	{
	  menuShow(obj,maxh,obj2);
	  if(onemenu==1)whichOpen=obj2;
	  whichContinue='';
	}
}
//----------------------------------------------------------------------------------------
function mountmfunc(clk,mi,mo){
//var=1 mount, var=0 disable var=2 do nothing
//clk=mouse click function
//mi=mouse over function
//mo=mouse out function
if(clk==1){document.onclick=monclick;}else if(clk==0){document.onclick="return false;";}else{}
if(mi==1){document.onmousemove=monmouseover;}else if(mi==0){document.onmousemove="return false;";}else{}
if(mo==1){document.onmouseout=monmouseout;}else if(mo==0){document.onmouseout="return false;";}else{}
for(i=1;i<mnunum;i++){
eval("document.all.menuTitle"+i+".className='menu_title';");
}
}
//----------------------------------------------------------------------------------------
//[Public]
var regex=new RegExp("menuTitle\d*","i");
var regex1=new RegExp("[0-9]*$","i");
var boo=0;
//----------------------------------------------------------------------------------------
function monmouseover(){
if(event.srcElement.tagName!="TD" || boo==1) return false;
if(regex.test(event.srcElement.id)){
event.srcElement.className="menu_title2";
boo=1;
}
}
//----------------------------------------------------------------------------------------
function monmouseout(){
if(event.srcElement.tagName!="TD") return false;
if(regex.test(event.srcElement.id)){
event.srcElement.className="menu_title";
boo=0;
}
}
//----------------------------------------------------------------------------------------
function monclick(){
if(!browser.isIE5up || browser.isIE55) return true;
if(event.srcElement.tagName=="A") return true;
if(event.srcElement.tagName=="SPAN"){
if(regex.test(event.srcElement.parentNode.id)){
b=event.srcElement.parentNode.id.match(regex1);
codex="menuChange(menu" + b + "," + eval("menuinit[" + b + "][2]") + "," + event.srcElement.parentNode.id+ ")";
eval(codex);
}
}
if(regex.test(event.srcElement.id)){
b=event.srcElement.id.match(regex1);
codex="menuChange(menu" + b + "," + eval("menuinit[" + b + "][2]") + "," + event.srcElement.id+ ")";
eval(codex);
}
}
//----------------------------------------------------------------------------------------
function init(){
if (document.readyState!="complete") return false;
if(!browser.isIE5up || browser.isIE55) return false;
if(!developversion)window.onerror = function(){window.onerror = blockError;return true;};
var mccount=0;
var showornot;
reg=new RegExp("menu[0-9]{1,2}","i");
reg1=new RegExp("[0-9]*$","i");
for(i=0;i<document.all.length;i++){
if(reg.test(document.all[i].id)){
mnunum++;
s=document.all[i].id.match(reg1);
k=eval("document.all.menu" + s + ".children[0].offsetHeight"); //code to get the height
eval("menuinit[s][2]=k");
for(n=0;n<document.all[i].childNodes.length;n++){
if(document.all[i].childNodes.item(n).tagName=="SPAN"){
//document.all[i].childNodes.item(n).
}
}
eval("showornot=menuinit[s][1]");
switch (showornot){
case "show":
if(++mccount>1 && onemenu==1)alert("You do not supposed put on 2 active menu while 'onemenu' on. Check your setting or turn 'onemenu' to '0'");
if(onemenu==1)eval("whichOpen=menuTitle" + s);
document.all[i].style.filter+="alpha(Opacity=100)";
document.all[i].style.overflow="hidden";
document.all[i].style.height=k;
document.all[i].style.display="block";
eval('document.all.menuTitle'+mnunum+'.background="'+bgimages_hide+'"');
break;
case "not show":
document.all[i].style.filter+="alpha(Opacity=0)";
document.all[i].style.overflow="hidden";
document.all[i].style.height="1";
document.all[i].style.display="none";
eval('document.all.menuTitle'+mnunum+'.background="'+bgimages_show+'"');
break;
default: 
alert("Expect 'show' or 'not show' in setting section!");
}
}
}
}
//----------------------------------------------------------------------------------------
function xpmenucmd(op,arg1,arg2){
if (document.readyState!="complete") return false;
switch(op){
case "null":
break;
case "show":
if(arg1!=undefined && arg1>0 && arg1<=mnunum){
if(onemenu){
for(i=1;i<=mnunum;i++){
if(i==arg1){
eval('document.all.menu'+arg1+'.filters.alpha.opacity=100');
eval('document.all.menu'+arg1+'.style.height="'+menuinit[arg1][2]+'"');
eval('document.all.menu'+arg1+'.style.display="block"');
eval('document.all.menuTitle'+arg1+'.background="'+bgimages_hide+'"');
eval('whichOpen=document.all.menuTitle'+arg1);
}else{
eval('document.all.menu'+i+'.filters.alpha.opacity=0');
eval('document.all.menu'+i+'.style.height="1"');
eval('document.all.menu'+i+'.style.display="none"');
eval('document.all.menuTitle'+i+'.background="'+bgimages_show+'"');
}
}
}else{
eval('document.all.menu'+arg1+'.filters.alpha.opacity=100');
eval('document.all.menu'+arg1+'.style.height="'+menuinit[arg1][2]+'"');
eval('document.all.menu'+arg1+'.style.display="block"');
eval('document.all.menuTitle'+arg1+'.background="'+bgimages_hide+'"');
}
}
break;
case "hide":
if(arg1!=undefined && arg1>0 && arg1<=mnunum){
eval('document.all.menu'+arg1+'.filters.alpha.opacity=0');
eval('document.all.menu'+arg1+'.style.height="1"');
eval('document.all.menu'+arg1+'.style.display="none"');
eval('document.all.menuTitle'+arg1+'.background="'+bgimages_show+'"');
whichContinue='';
whichOpen='';
}
break;
case "set mode":

⌨️ 快捷键说明

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