📄 type.pl
字号:
#####################################
sub type {
if ($userlevel>=$level_wordcolor) {
open(WORDCOLOR,"$homedir/wordcolor.txt") || &error("无法打开文件$homedir/wordcolor.txt");
@wordcolor = <WORDCOLOR>;
close(WORDCOLOR);
}
if ($userlevel>=$level_addsays) {
open(ADDSAYS,"$homedir/addsays.txt") || &error("无法打开文件$homedir/addsays.txt");
@addsays = <ADDSAYS>;
close(ADDSAYS);
}
if ($userlevel>=$level_addimage) {
open(IMAGE,"$homedir/image.txt") || &error("无法打开文件$homedir/image.txt");
@image = <IMAGE>;
close(IMAGE);
}
##########################
print qq~
<html><head><title>leejun</title><LINK REL=stylesheet HREF="$homeurl/styles.css" TYPE="text/css">
<script language="JavaScript"><!--
var flag=0;
var max=20;
var whamsg=new Array(20+1);
var base=0;
var p=0;
var j;
var total=0;
for (j=0;j<=max+1;j++)
whamsg[j]='';
function addOne(what){
if (base<max+1) {
whamsg[base]=what;
base++;
} else {
for (i=0;i<max;i++)
whamsg[i]=whamsg[i+1];
whamsg[i]=what;
}
p=base;
}
function goPrev(theForm){
if (p>0) p--;
theForm.says1.value=whamsg[p]
theForm.says1.focus();
}
function goNext(theForm){
if (p<base) p++;
theForm.says1.value=whamsg[p]
theForm.says1.focus();
}
function verify(){
if ( (document.frmtalk.says.value == document.frmtalk.says1.value) && (document.frmtalk.says1.value != "")) {
if (document.frmtalk.towho.value!="") {
alert('请不要对'+document.frmtalk.towho.value+'总说这一句呀,\\n\\n人家会不乐意的呢!');
}else{
alert('请不要重复发言\\n\\n你还是找点别的乐子吧?\\n\\n这样会影响人家呢!');
}
return false;
}
document.frmtalk.says.value = document.frmtalk.says1.value;
document.frmtalk.says1.value="";
document.frmtalk.says1.focus();
if(document.frmtalk.says.value){
addOne(document.frmtalk.says.value);
}
return true;
}
function what(towho){
document.frmtalk.towho.value=towho;
//document.frmtalk.showmut.value='说道';
document.frmtalk.says1.focus();
}
//--></script>
</head><body bgcolor=$onlineback text=$saysword link=$link_color alink=$alink_color vlink=$vlink_color OnLoad="if(parent.frames.length==0)top.location='$fullurl';">
<form method=POST action="$fullurl?job=says$userinfo" name="frmtalk" target="one" OnSubmit="return verify();">
<input type="hidden" name="says" value="">
~;
if ($userlevel>=$level_who) {
print "对<input type=\"text\" name=\"towho\" size=\"13\" MAXLENGTH=\"20\" size=\"1\" readonly>";
}
print "<select name=\"adddone\" size=\"1\"><option value=\"\">说</option>\n";
if ($userlevel>=$level_towho) {
print "<option value=\"private\">私聊</option>\n";
}
print "<option value=\"myself\">动作</option>\n</select>\n";
print "<input type='button' value='〈' language='javascript' onclick='goPrev(document.frmtalk);' ><input type='button' value='〉' language='javascript' onclick='goNext(document.frmtalk);' >";
print "<input type=\"text\" name=\"says1\" size=\"40\" MAXLENGTH=\"$maxsays\"><input type=submit value=\"说\" ><input type=reset value=\"清\" onClick=\"javascript:document.frmtalk.says1.focus();\">";
if ($userlevel>=$level_wordcolor) {
srand;
$ram=int(rand($#wordcolor+1));
$temp=0;
print "<select name=\"wordcolor\" size=\"1\">\n";
foreach $wordcolor_line (@wordcolor) {
if (($wordcolor_line =~ /"$wordcolor"/) || ((!($wordcolor)) && ($temp eq $ram))) {
$wordcolor_line =~ s/>/ selected>/g;
}
print "$wordcolor_line";
$temp=$temp+1;
}
print "</select>";
}
if ($userlevel>=$level_addimage) {
print "<select name=\"addimage\" size=\"1\">\n";
print "<option value=\"\">图案\n";
foreach $image_line (@image) {
if ($image_line =~ /"$addimage"/) {
$image_line =~ s/>/ selected>/g;
}
print "$image_line";
}
print "</select>";
}
if ($userlevel>=$level_addsays) {
print "<select name=\"addsays\" size=\"1\">\n";
print "<option value=\"\">面无表情\n";
foreach $addsays_line (@addsays) {
if ($addsays_line =~ /"$addsays"/) {
$addsays_line =~ s/>/ selected>/g;
}
print "$addsays_line";
}
print "</select>";
}
print "</form>";
if ($userlevel >= $level_createroom) {
open (Create,"<$homedir/createroom.txt")|| &error("无法打开文件$homedir/createroom.txt");
@create=<Create>;
close (Create);
print "<form METHOD=\"POST\" target=\"\" ACTION=\"$cgiurl/chat.pl?job=settype$userinfo\">\n";
print "<select NAME=\"room\" size=\"1\">\n";
foreach $key (@rooms){
print "<OPTION VALUE=\"$key\"";
if ($room eq $key) {
print "SELECTED";
}
print ">$key(系统)\n";
}
foreach $new (@create){
@createroom=split(/=/,$new);
print "<OPTION VALUE=\"@createroom[0]\"";
if ($newroom){
if ($newroom eq @createroom[0]) {
print "SELECTED";
}
}else{
if (-e "$homedir/temp/rooms/$room") {
if ($room eq @createroom[0]) {
print "SELECTED";
}
}else{
if ($oldroom eq @createroom[0]) {
print "SELECTED";
}
}
}
print ">@createroom[0](@createroom[1])\n";
}
print "</select>\n";
print "<select name=\"command\" size=\"1\">\n";
print "<option VALUE=\"chang\">换房</option>\n";
print "<option VALUE=\"create\">开房</option>\n";
print "<option VALUE=\"close\">关门</option>\n";
print "<option VALUE=\"open\">开门</option>\n";
print "</select> <input type=\"text\" name=\"newroom\" size=\"10\" MAXLENGTH=\"10\">\n";
print "<input type=\"hidden\" name=\"oldroom\" value=\"$room\">\n";
print "<input type=\"submit\" value=\"OK!\">\n";
}
print "<input type=\"hidden\" name=\"oldroom\" value=\"$room\">\n";
print qq~
<table border="0" cellpadding="2">
<tr>
~;
print "<table bgcolor=$back><tr><td ><a href=$fullurl?job=online_user$userinfo target=\"three\">刷新名单</a></td>\n";
if ($userlevel>=$level_set_midi){
print "<td ><a href=\"#\" onClick=\"window.open('$fullurl?job=set_midi$userinfo','leejun','width='+(screen.width/2)+',height='+(screen.height-100)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes')\">点歌送歌</a></td>\n";
}
#print "<td ><a href=\"#\" onClick=\"window.open('$cgiurl/frind.pl?id=$id','leejun','width='+(screen.width/2)+',height='+(screen.height-60)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes');\">聊友天地</a></td>\n";
print "<td ><a href=\"#\" onClick=\"window.open('$fullurl?job=look_spccmd$userinfo','leejun','width=150,height='+(screen.height-60)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes');\">对话指令</a></td>\n";
if ($userlevel>=$level_checkuser){
print "<td ><a href=\"#\" onClick=\"window.open('$fullurl?job=online$userinfo','leejun','width=150,height='+(screen.height-60)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes')\">人员资料</a></td>\n";
}
if ($userlevel>=$level_kick){
print "<td ><a href=\"#\" onClick=\"window.open('$fullurl?job=setkick$userinfo','leejun','width='+(screen.width/2)+',height='+(screen.height-60)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes')\">人员管制</a></td>\n";
}
if ($userlevel>=$level_mdf){
print "<td ><a href=\"#\" onClick=\"window.open('$cgiurl/ad.pl?search','leejun','width='+(screen.width/2)+',height='+(screen.height-60)+',top=0,left=0,location=no,directories=no,status=no,toolbar=no,menubar=no,scrollbars=auto,resizable=yes')\">修改资料</a></td>\n";
}
if ($userlevel>=$level_logo){
print "<td ><a href=\"$homeurl/temp/kick_logo.txt\" target=\"_bank\">踢人记录</a></td>\n";
print "<td ><a href=\"$homeurl/temp/logo.txt\" target=\"_bank\">系统记录</a></td>\n";
}
if ($userlevel>=$level_cls) {
print "<td ><a href=$fullurl?job=cls$userinfo target=\"one\">清除屏幕</a>\n";
}
print "<td><acronym title='您真要离开$title的$room吗?'><a href=$fullurl?job=logout$userinfo target=\"_top\">离开聊天</font></a></acronym></td>\n";
print "</tr></table>\n";
print "$leve\n";
print "</form>\n</body>\n</html>\n";
exit (1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -