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

📄 system.htm

📁 系统框架设计,可以直接使用,少量修改,可以扩展
💻 HTM
📖 第 1 页 / 共 2 页
字号:
		   var today=new Date();
		   var v8=today.getHours()+":"+today.getMinutes()+":"+today.getSeconds();
		   parent.send.word7.value="";
		   oldname=v31;
		   oldword=v7;
		   nstormchat_timeout=1200;
		   print_ms(v6,v0,v11,v2,v31,v4,v5,v7,v8);
		   setsubmit(v0,v11,v2,v31,v4,v5,v6,v7);
		   addthis(v7);
		   document.postwords.submit();
		   parent.send.word7.focus();
		}
		
function timeline()
{
parent.send.word12.value = nstormchat_timeout;
if (nstormchat_timeout <=0)
{
     parent.h3.location.href = "exit.aspx";
     parent.h2.location.href="about:blank";
     allms="<img src=\"images/sys.gif\"><font color=\"#ff0000\">你已经离开了聊天室,你可以重新登陆!</font>";
     parent.show1.scroll(0, 64000);
     parent.show1.document.writeln("<div width=\"100%\" class=\"gb12\" height=\"16\">"+allms+"</div>");
     parent.nstormchat_userid="";
     myid="";
     parent.nstormchat_username="";
     parent.nstormchat_userface="";
}
else
{
if (nstormchat_timeout == 180)
{
    alert("三分钟内还不发言你将自动退出!");
}
setTimeout("timeline()",1000);
}
nstormchat_timeout --;
}
		
var whamsg = new Array(10);
var base = 0;
var zp = 0;
var j;
for (j = 0; j <10; j ++)
{
	whamsg[j] = "";
}
		
function wordback()
{
	if (zp > 0)
	{
		zp --;
		parent.send.word7.value = whamsg[zp];
		parent.send.word7.focus();
	}
}

function wordgo()
{
	if (zp < base)
	{
		zp ++;
		parent.send.word7.value = whamsg[zp];
		parent.send.word7.focus();
	}
}

function addthis(v)
{
	if (base < 10)
	{
		whamsg[base] = v;
		base ++;
	}
	else
	{
		for (i = 0; i < 9; i ++)
		{
			whamsg[i] = whamsg[i+1];
		}
		whamsg[i] = v;
	}
	zp = base;
}
		
		function getname(id)
		{
		     if (id=="大家") 
		         return String("大家");
		     var name;
		     if (id==myid)
		         return String(parent.nstormchat_username); 
		     var mlist=parent.nstormchat_memeber;
		     var mcount=mlist.length;
		     for(var i=0;i<mcount;i++)
		     {
		          if(mlist[i].indexOf(id)!=-1)
		          {
		              name=mlist[i].split("|"); 
		              return String(name[2]); 
		          }
		      }  
		     return String(id+"(已离开)");
		}
		
		function getface(id)
		{
		     if (id=="大家") 
		         return String("head1.gif");
		     var name; 
		     var mlist=parent.nstormchat_memeber;
		     var mcount=mlist.length;
		     for(var i=0;i<mcount;i++)
		     {
		          if(mlist[i].indexOf(id)!=-1)
		          {
		              name=mlist[i].split("|"); 
		              return String(name[1]); 
		          }
		      }  
		     return String("head1.gif");
		}
	
		function print_ms(tp,suf,sayid,touf,toid,saypress,saycolor,sayms,times)
		{
		    switch(tp)
		    {
		       case "toall":
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          if(sayms.indexOf("##")<0)
		          {
		              allms="<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          }
		          else
		          {
		              allms=sayms.replace(/##/g,"<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a>");
		              allms=allms.replace(/%%/g,"<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>");
		              allms="<font color=\"#ff0000\">"+allms+"</font>";
		          }
		          break;
		       case "toonly":
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          if(sayms.indexOf("##")<0)
		          {
		              allms="<font color=\"red\">◆[密谈]</font><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          }
		          else
		          {
		              allms=sayms.replace(/##/g,"<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a>");
		              allms=allms.replace(/%%/g,"<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>");
		              allms="◆[密谈]"+allms;
		              allms="<font color=\"#ff0000\">"+allms+"</font>";
		          }
		          break;
		       case "in":
		          reload_mlist();
		          sayname=parent.h0.getname(sayid);
		          allms="<img src=\"images/sys.gif\">欢迎<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+toid+"</a><font color=\"#ff0000\">加入!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       case "del":
		          reload_mlist();
		          if(sayms!="")
		             sayms="("+sayms+")";
		          allms="<img src=\"images/sys.gif\"><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\">"+sayname+"<font color=\"#ff0000\">离开了聊天室"+sayms+"!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       case "change":
		          reload_mlist();
		          allms="<img src=\"images/sys.gif\"><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\">"+sayms+"改名为:<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><font color=\"#ff0000\">"+toid+"!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       default:
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          allms="<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;    
		    }
		
                    if(sayid==myid || toid==myid)
                    {
		        parent.show1.document.writeln("<div width=\"100%\" style=\"background-color:#ECFAFF\" class=\"gb12\" height=\"16\">"+allms+"</div>");
                    }
                    else
                    {
		        parent.show1.document.writeln("<div width=\"100%\" class=\"gb12\" height=\"16\">"+allms+"</div>");
                    }
			
					
			//parent.show1.document.writeln(allms+"<br>");	
		    parent.show1.scroll(0, 64000);
		}
		
		function addtobody(id)
		{
		    nstormchat_timeout=1200;
		    if(id=="大家") 
		    {
		        parent.nstormchat_toid="大家";
		        parent.nstormchat_toname="大家";
		        parent.nstormchat_toface="head1.gif";
		        parent.send.word1.value="大家";
		        parent.send.word7.focus();
		        return;
		    }
		   if(id!=myid)
		   {
		       var name,lv,lt;
		       var mlist=parent.nstormchat_memeber;
		       var mcount=mlist.length;
		       for(var i=0;i<mcount;i++)
		       {
		          if(mlist[i].indexOf(id)!=-1)
		          {
		              name=mlist[i].split("|");
		              parent.nstormchat_toid=id;
		              parent.nstormchat_toname=name[2];
		              parent.nstormchat_toface=name[1];
		              var listnum=parent.send.word1.all.length;
		              var fl=false;
		              var num=0;
		              for(var j=0;j<listnum;j++)
		              {
		                  lt=parent.send.word1.children[j].value;
		                  if(lt.indexOf(id)!=-1) 
		                  {
		                     fl=true;
		                     num=j;
		                     break;
		                   }
		              }
		              if(fl)
		              {
		                  parent.send.word1.children[num].selected=true;
		              }
		              else
		              {
		                  var oOption = parent.send.document.createElement("OPTION");
                          oOption.text = getname(id);
                          oOption.value =id;
                          parent.send.word1.options.add(oOption);
                          parent.send.word1.children[listnum].selected=true;
		              }
		              parent.send.word7.focus();
		              return; 
		          }
		       } 
		     }
		     parent.send.word7.focus();
		     return;
		}
		
		function autoreload_show()
		{
		    if(parent.send.word11.checked==true)
		    {
		        myautors=setTimeout("parent.h0.reload_show()",300000);
		    }
		    else
		    {
		        clearTimeout(myautors);
		    }
		}
		
        function autogetword()
        {
            setTimeout("parent.h2.location.reload();autogetword();",2000);
        }
        
        
		function setsubmit(v0, v1, v2, v3, v4, v5, v6, v7)
        {
            document.postwords.v0.value = v0;
	        document.postwords.v1.value = v1;
	        document.postwords.v2.value = v2;
	        document.postwords.v3.value = v3;
	        document.postwords.v4.value = v4;
	        document.postwords.v5.value = v5;
	        document.postwords.v6.value = v6;
	        document.postwords.v7.value = v7;
        }
        
        
        function changems(uname,usex,uhead)
        {
            nstormchat_timeout=1200;
            if(uname!="" && (parent.nstormchat_username!=uname || parent.nstormchat_usersex!=usex || parent.nstormchat_userface!=uhead))
            {
             uname=uname.replace(/ /g,"");
             document.chms.m0.value = parent.nstormchat_userface;
             document.chms.m1.value = parent.nstormchat_username;
             parent.nstormchat_username=uname;
             parent.nstormchat_usersex=usex;
             parent.nstormchat_userface=uhead;
             parent.send.word0.value=uname;
             document.chms.m3.value = uname;
             document.chms.m2.value = uhead;
             document.chms.m4.value = usex;
             document.chms.submit();    
             }
        }
        
        function reload_show()
        {
            parent.show1.document.close();
            nstormchat_timeout=1200;
            load_show();
        }
		
        function closechat()
        {
           parent.show1.document.close();
           parent.h1.location.href="exit.aspx?id=1";
        }
		    load_show();
		    load_send();
		    load_list();
		    timeline();
		    parent.h2.location.href="getms.aspx";
		    autogetword();
		    parent.send.word7.focus();
		</script>
	</HEAD>
	<body>
		<form id="postwords" name="postwords" method="post" action="addmsg.aspx" target="h1">
			<input id="v0" type="hidden" name="v0" /> <input id="v1" type="hidden" name="v1" />
			<input id="v2" type="hidden" name="v2" /> <input id="v3" type="hidden" name="v3" />
			<input id="v4" type="hidden" name="v4" /> <input id="v5" type="hidden" name="v5" />
			<input id="v6" type="hidden" name="v6" /> <input id="v7" type="hidden" name="v7" />
		</form>
		<form id="chms" name="chms" method="post" action="changms.aspx" target="h1">
			<input id="m0" type="hidden" name="m0" /> <input id="m1" type="hidden" name="m1" />
			<input id="m2" type="hidden" name="m2" /> <input id="m3" type="hidden" name="m3" />
			<input id="m4" type="hidden" name="m4" />
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

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