频道直达 - 学院 - 下载 - 交易 - 特效 - 字库 - 手册 -排名-工具- 繁體
网页教学网站开发 设为首页
加入收藏
联系我们
建站搜索: 常用广告代码   用户注册 | 用户登陆
您当前的位置:中国建站之家 -> 网站开发设计技术教程 -> PHP教程 -> 采用行写方式的聊天程序(之三)

采用行写方式的聊天程序(之三)

作者:未知  来源:转载  发布时间:2005-7-30 20:47:59  发布人:acx

减小字体 增大字体

ltsayno.php
该程序为系统的核心,处理所关联的所有函数信息

<?session_start();?>
<html>
<head>
<title>发言区</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
body{background:59ACFF;color:black}
body{font-size:9pt;line-height:160%}
table{font-size:10.5pt}
input{font-size:9pt}
A{color:black;text-decoration:none}
A:Hover{text-decoration:underline}
</style>
<script Language=Javascript>

//大家的信息
function dj(){
  document.forms[0].towho.options[0].value="大家";
  document.forms[0].towho.options[0].text="大家";
  document.forms[0].saystemp.focus();
}

//动作,把该动作的信息添加到发言板中
function rc(list){
  if (list!="0"){
     document.forms[0].saystemp.value=list;
     document.forms[0].saystemp.focus();
  }
}


function backsays() {
  document.forms[0].saystemp.value=document.forms[0].oldsays.value;
  document.forms[0].saystemp.focus();
  return true;
}


function checksays(){
  if(document.fyq.saystemp.value==""){
    alert("请输入发言。");
    document.fyq.saystemp.focus();
    return false;
   }
  if(document.fyq.saystemp.value==document.fyq.oldsays.value){
     alert("内容不可重复。");
     document.fyq.saystemp.focus();
     document.fyq.saystemp.select();
     return false;
    }
    document.fyq.oldsays.value=document.fyq.saystemp.value;
    document.fyq.saystemp.value="";
    document.fyq.saystemp.focus();
    document.fyq.send.disabled=1;
    setTimeout("document.fyq.send.disabled=0",30);
    return true;
}

function cls(){
  parent.f1.location.href="about:blank";
  setTimeout("write(1)",500);
}

function write(cls){
  var ffsize;   
  var lheight;  
  if (cls==1){
     ffsize=parent.f2.document.fyq.fontsize.value;
     lheight=parent.f2.document.fyq.lineheight.value;
   }else{
     ffsize='10.5';
     lheight='145';
   }
  parent.f1.document.open();
  parent.f1.document.writeln("<html><head><title>对话区</title>");
  parent.f1.document.writeln("<meta http-equiv=Content-Type content="text/html; charset=gb2312">");
  parent.f1.document.writeln("<style type=text/css>.t{color:FF00FF;font-size:9pt;}");
  parent.f1.document.writeln("body{font-family:"宋体";font-size:"+ffsize+"pt;line-height:" + lheight + "%;}A{text-decoration:none}A:Hover{text-decoration:underline}A:visited{color:blue}</style></head>");
  parent.f1.document.writeln("<script Language="Javascript1.1">");
  parent.f1.document.writeln("var autoScrollOn=1;");
  parent.f1.document.writeln("var scrollOnFunction;var scrollOffFunction;");
  parent.f1.document.writeln("function scrollit()");
  parent.f1.document.writeln("{if(!parent.f2.document.fyq.as.checked)");
parent.f1.document.writeln("{autoScrollOn=0;return true;}else{autoScrollOn=1;StartUp();return true;}}");
parent.f1.document.writeln(" function scrollWindow()");
parent.f1.document.writeln("{if(autoScrollOn==1)");
parent.f1.document.writeln("{this.scroll(0,65000);setTimeout('scrollWindow()',200);}}");
parent.f1.document.writeln("function scrollOn(){autoScrollOn=1;scrollWindow();}");
parent.f1.document.writeln("function scrollOff(){autoScrollOn=0;}");
parent.f1.document.writeln("function StartUp()");
parent.f1.document.writeln("{parent.onblur=scrollOnFunction;");
parent.f1.document.writeln("parent.onfocus=scrollOffFunction;scrollWindow();}");
parent.f1.document.writeln("scrollOnFunction=new Function('scrollOn()');");
parent.f1.document.writeln("scrollOffFunction=new Function('scrollOff()');");
parent.f1.document.writeln("StartUp();</script>");
parent.f1.document.writeln("<body bgcolor=ffffff text=000000>");
parent.f1.document.writeln("<hr size=1><center>欢迎光临PHP无刷新功能聊天室!</center><hr size=1>");
parent.tforlt4.location.href="lt4.php";
document.fyq.saystemp.focus();
}


function sw(list){
document.fyq.towho.options[0].value=list;
document.fyq.towho.options[0].text=list;
document.fyq.saystemp.focus();
}

function sw11(username){
  var usna;
  usna=username.substring(1,username.length-1);
  document.fyq.towho.options[0].value=usna;
  document.fyq.towho.options[0].text=usna;
  document.fyq.saystemp.focus();
  return;
}

function w(un,sa,tn,dt){
  var show;
  show="【"+tn+" 发言】";
  show=show+"<a href=javascript:parent.f2.sw('[" + un + "]'); target=f2>" + un + "</a>:" + sa + "<font class=t>"
  show=show + " (" + dt + ")</font><br>";
  parent.f1.document.writeln(show);
}

function nw(zt,un,tw,sa){
   parent.f2.document.fyq.addsign.options[0].selected=true;
   var show="";
  var sw_un=un.indexOf(">");
  var yun=un.substring(sw_un+1,un.length-7);
  var name_self="<?echo $uname;?>";
  if (zt==0){
     if (name_self!=un && name_self!=tw){
        show="<a href=javascript:parent.f2.sw('" + un + "'); target=f2>" + un + "</a>对"+"<a href=javascript:parent.f2.sw('" + tw + "'); target=f2>" + tw + "</a>说:"+sa+"<br>";
       parent.f1.document.writeln(show);
     }else{
        if(name_self==un){
           show="<font color=red>〖"+un+"〗</font>对";
           show=show+"<a href=javascript:parent.f2.sw('" + tw + "'); target=f2>" + tw + "</a>说:" + sa + "<br>";
           parent.f1.document.writeln(show);
        }else{
             show="<a href=javascript:parent.f2.sw('" + un + "'); target=f2>" + un + "</a>对";
             show=show+"<font color=red>〖"+tw+"〗</font>说:" + sa + "<br>";
             parent.f1.document.writeln(show);
             }
       }
   }
}

function change_color(){
   var change_color=document.fyq.sayscolor.options[document.fyq.sayscolor.selectedIndex].value;
   document.fyq.saystemp.style.color=change_color;
   document.fyq.saystemp.focus();
}
</script>

</head>

将本文收藏到QQ书签与更多好友分享
[打 印]
[] [返回上一页] [收 藏]
∷相关文章评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
精彩推荐
热门文章
· 注册码大全二
· 注册码大全四
· 注册码大全一
· 要10G免费网络硬盘的请进..
· 通过google 赶快来赚美金..
· 注册码大全十
· 头像-qq头像(qq新头像)4..
· 让你轻松架设FTP服务器1..
· 注册码大全三
· 梦幻背景图片7
· 卡通动物图片6
· 网页制作素材-按钮素材2..
· 让你轻松架设FTP服务器5..
· 风景图片8
· 注册码大全九
· 让你轻松架设FTP服务器2..
关注此文读者还看过
· 《福布斯》评出网上名人..
· Flash8绘制秋之落叶4
· 网页制作总结之iframe 的..
· 我的论坛源代码(三)
· 老板博客搅局草根江湖 身..
· 用 Photoshop 合成的机械..
· Tomcat中用web.xml控制W..
· 雅虎与喜来登合作 推免费..
· 电驴3000万与唱片商和解..
· 网页脚本攻击防范全攻略..
· 微软IE7浏览器刚推出就现..
· Dreamweaver CS3 新功能..
· 百度股价超300美元 市值..
· 专访张朝阳:Google侵权..
· Java应用技巧:对于 Coo..
· 模仿OSO的论坛(四)
相关文章
· 采用行写方式的聊天程序(之..
· 采用行写方式的聊天程序(之..
· 一个模仿oso的论坛程序(之..
· 采用行写方式的聊天程序(之..
· 采用行写方式的聊天程序(之..
· 怎样做自己的二级域名(之三..
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 人才招聘
网站合作、内容监督、商务咨询:QQ: 9576619
Copyright ? 2005--2008 中国建站之家版权所有
粤ICP备05092265号