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

📄 chat-returntype.pl

📁 java开发的聊天室
💻 PL
字号:
sub return_type {
@online      =&readtxtfile($onlinefile,2);
@online      =sort @online;

print "<html><head>";
print "<LINK REL=stylesheet HREF='$cssurl' TYPE='text/css'>";
print "<title>type</title>\n";
#print "<META HTTP-EQUIV=REFRESH CONTENT='180;URL=$cgiurl?job=settype$userinfo'>\n";
print "<script Language='JavaScript'>\n";
print "function checksays() {\n";
print "var tempwho,tempuser1,tempuser2,tempuser3;";
if ($userlevel<$level_saytwice){
print "tempwho=document.settype.towho.value;";
print "if ( (document.settype.says.value==document.settype.saystemp.value)&&(document.settype.towho1.value==tempwho)) {";
print "alert('好罗嗦哟,别对一个人总说这一句呀!');";
print "return false;}";
print "document.settype.says.value=document.settype.saystemp.value;";
print "document.settype.towho1.value=tempwho;";
}
print "tempuser1=self.parent.allselect.document.forms[0].addwordcolor1.value;\n";
print "document.forms[0].addwordcolor.value=tempuser1;\n";
print "tempuser2=self.parent.allselect.document.forms[0].addsays1.value;\n";
print "document.forms[0].addsays.value=tempuser2;\n";
print "tempuser3=self.parent.allselect.document.forms[0].addsign1.value;\n";
print "document.forms[0].addsign.value=tempuser3;\n";
print "  document.forms[0].says.value='';\n"; 
print "  if (checkempty(document.forms[0].saystemp.value)==false) {\n";
print "     alert('还没写呢,怎么发呀,真是的!');\n";
print "     return false;\n";
print "  }\n";
print "  document.forms[0].says.value=document.forms[0].saystemp.value;\n";
print "  if (document.forms[0].autocls.checked==true) {\n" if ($userlevel>=$level_autocls);
print "  document.forms[0].saystemp.value='';\n";
print "  }\n" if ($userlevel>=$level_autocls); 
print "  self.status='资料已送出';\n";
print "  return true;\n";
print "}\n";
#print <<EOF;
print "function clearsay() {";
print "  self.parent.type.document.forms[0].saystemp.value=''\;";
print "return true;";
print "}";
#EOF
print "function checkempty(txtval){\n";
print "  if (txtval.length==0)\n"; 
print "     return false;\n";
print "  var i=0;\n";
print "  while (i<txtval.length) {\n";    
print "     if (txtval.substring(i,i+1) != '')\n"; 
print "        return true;\n";
print "     i=i+1;\n";
print "  }\n";
print "  return false;\n";
print "}\n";

print "function focussaystemp()";
print "{";
print "document.settype.saystemp.focus\;";
print "}";
$serverhost=$ENV{'SERVER_NAME'};
print "function itgoto(menu)\n";
print "{ var menucontent=''\;\n";
print "var tmian=''\n";
print "  if((menu.selectedIndex != -1)&&(menu.selectedIndex != 0))\n";
print "   { menucontent = menu.options[menu.selectedIndex].value\; }\n";
print "tmian=document.forms[0].room.options[document.forms[0].room.selectedIndex].value;\n";
print "  parent.message.document.location='$cgiurl?job=look$userinfo1&miandarao='+menucontent+'&room='+tmian\;\n";
print "}\n";
print "</script>\n";
print "</head><body bgcolor=$typeback text=$typeword onload=focussaystemp>\n";
print "<div align=right>\n";
#print "$userinfo1";
print "<form method=POST name=settype action='$cgiurl?job=says$userinfo1' target='message' onsubmit='return(checksays());'>\n";
$temps=$username;
print "[$temps]";

print "<input type=hidden name='says' value=''>\n";
print "<input type=hidden name='towho1' value=''>\n";
print "<input type=hidden name='towho' value=''>\n";
print "<input type=text   name='saystemp' size=40 maxlength=200>\n";
print "<input type=submit value='送出发言' $buttonstyle><br>\n";

print "<input type=hidden name=quicksays>";
print "<input type=hidden name=addwordcolor>";
print "<input type=hidden name=addsays>";
print "<input type=hidden name=addsign>\n";

#显示对象
local($temp1)="";
print "对<input name=towhoname type=button value='            '  $buttonstyle size=12 onclick=\"js:{alert('请点右面的在线名单选择聊天对象!');focussaystemp();}\">\n";

if ($userlevel>=$level_autocls) {
print "<input type=checkbox name='autocls' value='yes'";
#print " checked" if ($autocls eq "yes");
print " checked";
print " $buttonstyle>自动清除\n";
}

if ($userlevel>=$level_private) {
print "<input type=checkbox name='towhoway' value='private'";
print " checked" if ($towhoway eq "private"); 
print " $buttonstyle>私下对谈\n";
}

print "<input type=button value='清除发言' onclick='return(clearsay());' $buttonstyle><br>\n";

#显示单间
@addroom     =&readtxtfile($addroomfile);
if ($userlevel>=$level_addroom) {
  print "选择单间:<select name='room' $buttonstyle>\n";
   foreach (@addroom) {
     print "$_";
   } 
   print "</select>\n";
}

if ($miandarao eq 1)
{print "设置免打扰:<select name=miandarao  $buttonstyle onchange='itgoto(this);'><option value=0>没有免打扰<option value=1 selected>一级免打扰<option value=2>二级免打扰</select>\n";}
elsif ($miandarao eq 2)
{print "设置免打扰:<select name=miandarao  $buttonstyle onchange='itgoto(this);'><option value=0>没有免打扰<option value=1>一级免打扰<option value=2 selected>二级免打扰</select>\n";}
else
{print "设置免打扰:<select name=miandarao  $buttonstyle onchange='itgoto(this);'><option value=0 selected>没有免打扰<option value=1>一级免打扰<option value=2>二级免打扰</select>\n";}

print "</form></div></body></html>";
}
1;

⌨️ 快捷键说明

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