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

📄 count.cgi

📁 1。超强文件读写锁定
💻 CGI
字号:
#!/usr/bin/perl
##################################################################
##                         【CKSIX-V1.2】                       ##
##                                                              ##
## 本版使用于WINDOWS和Unix/Linux等操作系统版                    ## 
##################################################################
$dirname=&mypath;
require "$dirname/setup2002.pl";
require "$dirname/svote.lib";
&read_form;
$countsix=$FORM{'hksix'};
$countsix=~s/[\r\n\t\s+\ ]//g;
if(($countsix =~/^([0-9\,]*)$/)&&($countsix ne "")) {&Countsix;}
&Header("在线号码统计器");
print qq~
<STYLE>.Form { font-size:10pt; border: 1px solid; background-color: #FFFFF0; FONT-FAMILY: "宋体";}</STYLE>
<script Language="JavaScript">
<!--
function getsix(m){ document.FORM.hksix.value =document.FORM.hksix.value + m +",\\n";}
function clearsix(){ document.FORM.hksix.value ="";}
//-->
</Script>
<form name="FORM" method="POST" action="count.cgi">
<table width="770" border="0" cellpadding="0" style="border-collapse: collapse" cellspacing="0"  bgcolor="#8AE4FB">
<tr bgcolor="#5CADAD" height="30"><td>&nbsp;<font color="#FFFFF4" size="3"><b>01-49号码在线统计次数</b></font>
(号码小10的请加“0”,号码之间用半角逗号“,”分隔。)
<tr align="center"><td align="center"><textarea  rows="18" name="hksix" cols="105" class=Form>$sixbody</textarea>
<tr><td height="25" align="center">&nbsp;
<input type="button" value="0尾" name="10,20,30,40" onclick="return getsix(this.name)">
<input type="button" value="1尾" name="01,11,21,31,41" onclick="return getsix(this.name)">
<input type="button" value="2尾" name="02,12,22,32,42" onclick="return getsix(this.name)">
<input type="button" value="3尾" name="03,13,23,33,43" onclick="return getsix(this.name)">
<input type="button" value="4尾" name="04,14,24,34,44" onclick="return getsix(this.name)">
<input type="button" value="5尾" name="05,15,25,35,45" onclick="return getsix(this.name)">
<input type="button" value="6尾" name="06,16,26,36,46" onclick="return getsix(this.name)">
<input type="button" value="7尾" name="07,17,27,37,47" onclick="return getsix(this.name)">
<input type="button" value="8尾" name="08,18,28,38,48" onclick="return getsix(this.name)">
<input type="button" value="9尾" name="09,19,29,39,49" onclick="return getsix(this.name)">&nbsp;
<input type="button" value="鼠" name="08,20,32,44" onclick="return getsix(this.name)">
<input type="button" value="牛" name="07,19,31,43" onclick="return getsix(this.name)">
<input type="button" value="虎" name="06,18,30,42" onclick="return getsix(this.name)">
<input type="button" value="兔" name="05,17,29,41" onclick="return getsix(this.name)">
<input type="button" value="龙" name="04,16,28,40" onclick="return getsix(this.name)">
<input type="button" value="蛇" name="03,15,27,39" onclick="return getsix(this.name)">
<input type="button" value="马" name="02,14,26,38" onclick="return getsix(this.name)">
<input type="button" value="羊" name="01,13,25,37,49" onclick="return getsix(this.name)">
<input type="button" value="猴" name="12,24,36,48" onclick="return getsix(this.name)">
<input type="button" value="鸡" name="11,23,35,47" onclick="return getsix(this.name)">
<input type="button" value="狗" name="10,22,34,46" onclick="return getsix(this.name)">
<input type="button" value="猪" name="09,21,33,45" onclick="return getsix(this.name)">
<tr><td height="25" align="center">&nbsp;
<input type="button" value="01-09" name="01,02,03,04,05,06,07,08,09" onclick="return getsix(this.name)">
<input type="button" value="10-19" name="10,11,12,13,14,15,16,17,18,19" onclick="return getsix(this.name)">
<input type="button" value="20-29" name="20,21,22,23,24,25,26,27,28,29" onclick="return getsix(this.name)">
<input type="button" value="30-39" name="30,31,32,33,34,35,36,37,38,39" onclick="return getsix(this.name)">
<input type="button" value="40-49" name="40,41,42,43,44,45,46,47,48,49" onclick="return getsix(this.name)">
<input type="button" value="红波" name="01,02,07,08,12,13,18,19,23,24,29,30,34,35,40,45,46" onclick="return getsix(this.name)">
<input type="button" value="蓝波" name="03,04,09,10,14,15,20,25,26,31,36,37,41,42,47,48" onclick="return getsix(this.name)">
<input type="button" value="绿波" name="05,06,11,16,17,21,22,27,28,32,33,38,39,43,44,49" onclick="return getsix(this.name)">
<input type="button" value="小码" name="01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" onclick="return getsix(this.name)">
<input type="button" value="大码" name="25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49" onclick="return getsix(this.name)">
<input type="button" value="单码" name="01,03,05,07,09,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49" onclick="return getsix(this.name)">
<input type="button" value="双码" name="02,04,06,08,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48" onclick="return getsix(this.name)">
<tr><td height="25" align="center">&nbsp;
<input type="button" value="合1" name="01,10" onclick="return getsix(this.name)">
<input type="button" value="合2" name="02,11,20" onclick="return getsix(this.name)">
<input type="button" value="合3" name="03,12,21,30" onclick="return getsix(this.name)">
<input type="button" value="合4" name="04,13,22,31,40" onclick="return getsix(this.name)">
<input type="button" value="合5" name="05,14,23,32,41" onclick="return getsix(this.name)">
<input type="button" value="合6" name="06,15,24,33,42" onclick="return getsix(this.name)">
<input type="button" value="合7" name="07,16,25,34,43" onclick="return getsix(this.name)">
<input type="button" value="合8" name="08,17,26,35,44" onclick="return getsix(this.name)">
<input type="button" value="合9" name="09,18,27,36,45" onclick="return getsix(this.name)">
<input type="button" value="合10" name="19,28,37,46" onclick="return getsix(this.name)">
<input type="button" value="合11" name="29,38,47" onclick="return getsix(this.name)">
<input type="button" value="合12" name="39,48" onclick="return getsix(this.name)">
<input type="button" value="合13" name="49" onclick="return getsix(this.name)">
<input type="button" value="合单" name="01,03,05,07,09,10,12,14,16,18,21,23,25,27,29,30,32,34,36,38,41,43,45,47,49" onclick="return getsix(this.name)">
<input type="button" value="合双" name="02,04,06,08,11,13,15,17,19,20,22,24,26,28,31,33,35,37,39,40,42,44,46,48" onclick="return getsix(this.name)">
<tr><td height="25" align="center">&nbsp;
<input type="button" value="3余0" name="06,18,30,42,03,15,27,39,12,24,36,09,21,33,45" onclick="return getsix(this.name)">
<input type="button" value="3余1" name="07,19,31,43,04,16,28,40,01,13,25,37,10,22,34,46" onclick="return getsix(this.name)">
<input type="button" value="3余2" name="05,17,29,41,02,14,26,38,11,23,35,4708,20,32,44" onclick="return getsix(this.name)">
<input type="button" value="4余0" name="04,16,28,40,12,24,36,48,08,20,32,44" onclick="return getsix(this.name)">
<input type="button" value="4余1" name="05,17,29,41,01,13,25,37,49,09,21,33,45" onclick="return getsix(this.name)">
<input type="button" value="4余2" name="06,18,30,42,02,14,26,38,10,22,34,46" onclick="return getsix(this.name)">
<input type="button" value="4余3" name="07,19,31,43,03,15,27,39,11,23,35,47" onclick="return getsix(this.name)">
<input type="button" value="6余0" name="06,18,30,42,12,24,36,48" onclick="return getsix(this.name)">
<input type="button" value="6余1" name="01,13,25,37,49,07,19,31,43" onclick="return getsix(this.name)">
<input type="button" value="6余2" name="02,14,26,38,08,20,32,44" onclick="return getsix(this.name)">
<input type="button" value="6余3" name="03,15,27,39,09,21,33,45" onclick="return getsix(this.name)">
<input type="button" value="6余4" name="04,16,28,40,10,22,34,46" onclick="return getsix(this.name)">
<input type="button" value="6余5" name="05,17,29,41,11,23,35,47" onclick="return getsix(this.name)">
<tr><td align="center" height="40"> <input type="submit" value="次 数 统 计"> <input type="button" value="重 来"onclick="return clearsix()">
</td></tr></table></form><hr>~;
&Tailer;
exit;

###
sub Countsix{
$CGI_Url = "http://$ENV{'SERVER_NAME'}$ENV{'SCRIPT_NAME'}";
$CGI_Url =substr($CGI_Url,0,rindex($CGI_Url,"/"));
$cgiurl ="$CGI_Url"; # CGI的http地址(后面不要加"/")
$Sixerr="";
   @SINGLE = split(/,/,$countsix);
	for ($i=1; $i<50; $i++) { 
		if($i<10){$i="0$i";}
		$j="0";
		foreach $misc(@SINGLE ) {
			$misc=~s/[\r\n\s]//g;
			if($misc==$i){ $j++;}
			if(($i==1)&&(length($misc) !=2)){$Sixerr .="$misc "} 
		}
		$m="$j.$i\n";
		push(@SORTED,$m);
	}
	@SORTED = (sort { $a <=> $b } @SORTED); 
	foreach $SORTED(@SORTED) {
		$SORTED=~s/[\r\n\s]//g;
		($sa,$sname)=split(/\./,$SORTED);
		if($sa1 ne $sa){$sa1="$sa"; $sz=1; $sixbody .="\n\n【$sa1 次】$sname";}
		else {$sz++; $sixbody .=" $sname";}
	}
	if($Sixerr ne ""){$sixbody=" 输入数据有错,统计可能不正确:$Sixerr $sixbody\n";}
  	else{$sixbody=" http://pnqk.51.net  CK联合小组$sixbody\n";}
	unless($ENV{'HTTP_REFERER'} =~ /$cgiurl/){$sixbody="不支持对外链接, http://pnqk.51.net  CK联合小组\n\n请另进入:$ENV{'HTTP_REFERER'}";}
}
##
sub mypath {
$dirname=__FILE__;
if ($dirname=~/\\/) { $dirname=~ s/\\/\//g;}
if ($dirname) {$mypath=substr($dirname,0,rindex($dirname,"/"));}
else {
$mypath=substr($ENV{'PATH_TRANSLATED'},0,rindex($ENV{'PATH_TRANSLATED'},"\\"));
$mypath=~ s/\\/\//g;
}
}
##

⌨️ 快捷键说明

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