<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Windows全版本激活工具激活成功率统计系统</title>
<head>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style type="text/css">
table.imagetable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: green;
border-collapse: collapse;
}
table.imagetable th {
/*background:#b5cfd2 url('cell-blue.jpg');*/
background:#b5cfd2 url('cell-blue.jpg');
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #999999;
}
table.imagetable td {
background:#dcddc0 url('cell-grey.jpg');
background:white url('cell-grey.jpg');
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #999999;
}
</style>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">Windows全版本激活工具</a>
</div>
<div>
<ul class="nav navbar-nav">
<li ><a href="http://act.1314.cool/">简介</a></li>
<li ><a href="http://dl.1314.cool/">下载</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
更多
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li><a href="http://update.1314.cool/update/act/">激活成功率</a></li>
<li><a href="http://update.1314.cool/">软件源代码公示</a></li>
<!--<li><a href="#">EJB</a></li>-->
<!--<li><a href="#">Jasper Report</a></li>-->
<!--<li class="divider">d</li>-->
<!--<li><a href="#">分离的链接</a></li>-->
<!--<li class="divider">sdf</li>-->
<!--<li><a href="#">另一个分离的链接</a></li>-->
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class=container>
<?php
$handler = opendir('counter/');
$sysnum=0;
function check($exists)
{
global $sysnum,$syslist;
for($xa=0;$xa<=$sysnum;$xa++)
{
if($exists==$syslist[$xa])
{
return false;
break;
}
}
return true;
}
//2、循环的读取目录下的所有文件
//其中$filename = readdir($handler)是每次循环的时候将读取的文件名赋值给$filename,为了不陷于死循环,所以还要让$filename !== false。一定要用!==,因为如果某个文件名如果叫’0′,或者某些被系统认为是代表false,用!=就会停止循环*/
while( ($filename = readdir($handler)) !== false ) {
//3、目录下都会有两个文件,名字为’.'和‘..’,不要对他们进行操作
if($filename != "." && $filename != ".."){
//4、进行处理
//这里简单的用echo来输出文件名
$abc=explode('_', $filename);
if($abc[1] !="Office2019" && $abc[1] !="Office2016" && $abc[1] !="")
{
// if($abc[1]!=$syslist[$sysnum-1]&&$abc[1]!=$syslist[$sysnum-2]&&$abc[1]!=$syslist[$sysnum-3]&&$abc[1]!=$syslist[$sysnum-4]&&$abc[1]!=$syslist[$sysnum-5])
// {
// $syslist[$sysnum]=$abc[1];
// $sysnum++;
// }
if(check($abc[1])==true)
{
$syslist[$sysnum]=$abc[1];
$sysnum++;
}
}
}
}
echo "<table class=imagetable><tr><th>系统版本</th><th>永久激活成功次数</th><th>失败次数</th><th>激活成功率</th></tr>";
for ($x=0; $x<=$sysnum+1; $x++)
{
if(file_exists("counter/counter_".$syslist[$x]."_YJ_success.dat")==true)
{
$succcishu=file_get_contents("counter/counter_".$syslist[$x]."_YJ_success.dat");
$failcishu=0;
if(file_exists("counter/counter_".$syslist[$x]."_YJ_fail.dat")==true)
{
$failcishu=file_get_contents("counter/counter_".$syslist[$x]."_YJ_fail.dat");
}
$cgl=round(($succcishu)/($succcishu+$failcishu)*100,2);
// echo "$syslist[$x] 永久激活成功次数:$succcishu 失败次数:$failcishu 激活成功率:$cgl %<br>";
$e_array=array(
array($syslist[$x],"$succcishu","$failcishu","$cgl %<br>"));
foreach($e_array as $key=>$value)
{ list($xh,$xm,$zy,$zz)=$value;
echo "<tr><td>$xh</td><td>$xm</td><td>$zy</td><td>$zz</td></tr>";
}
}
}
echo "</table>";
echo "<table class=imagetable><tr><th>系统版本</th><th>KMS激活成功次数</th><th>失败次数</th><th>激活成功率</th></tr>";
for ($x=0; $x<=$sysnum+1; $x++)
{
if(file_exists("counter/counter_".$syslist[$x]."_KMS_fail.dat")==true)
{
$failcishu=file_get_contents("counter/counter_".$syslist[$x]."_KMS_fail.dat");
$succcishu=0;
if(file_exists("counter/counter_".$syslist[$x]."_KMS_success.dat")==true)
{
$succcishu=file_get_contents("counter/counter_".$syslist[$x]."_KMS_success.dat");
}
$cgl=round(($succcishu)/($succcishu+$failcishu)*100,2);
// echo "$syslist[$x] KMS激活成功次数:$succcishu 失败次数:$failcishu 激活成功率:$cgl %<br>";
$e_array=array(
array($syslist[$x],"$succcishu","$failcishu","$cgl %<br>"));
foreach($e_array as $key=>$value)
{ list($xh,$xm,$zy,$zz)=$value;
echo "<tr><td>$xh</td><td>$xm</td><td>$zy</td><td>$zz</td></tr>";
}
}
}
echo "</table>";
$o2016succcishu=file_get_contents("counter/counter_Office2016_success.dat");
$o2019succcishu=file_get_contents("counter/counter_Office2019_success.dat");
$o2021succcishu=file_get_contents("counter/counter_Office2021_success.dat");
$o2016failcishu=0;
$o2019failcishu=0;
$o2021failcishu=0;
if(file_exists("counter/counter_Office2019_fail.dat")==true)
{
$o2019failcishu=file_get_contents("counter/counter_Office2019_fail.dat");
}
if(file_exists("counter/counter_Office2016_fail.dat")==true)
{
$o2016failcishu=file_get_contents("counter/counter_Office2016_fail.dat");
}
if(file_exists("counter/counter_Office2021_fail.dat")==true)
{
$o2021failcishu=file_get_contents("counter/counter_Office2021_fail.dat");
}
$o2016cgl=round(($o2016succcishu)/($o2016failcishu+$o2016succcishu)*100,2);
$o2019cgl=round(($o2019succcishu)/($o2019failcishu+$o2019succcishu)*100,2);
$o2021cgl=round(($o2021succcishu)/($o2021failcishu+$o2021succcishu)*100,2);
// echo "Office2016 激活成功次数:$o2016succcishu 失败次数:$o2016failcishu 激活成功率:$o2016cgl %<br>";
// echo "Office2019 激活成功次数:$o2019succcishu 失败次数:$o2019failcishu 激活成功率:$o2019cgl %<br>";
//5、关闭目录
closedir($handler);
echo "</table>";
?>
<?php
print<<<EOT
<table class=imagetable>
<tr>
<th>Office版本</th>
<th>激活成功次数</th>
<th>激活失败次数</th>
<th>激活成功率</th>
</tr>
<tr>
<td>Office2016</td>
<td>$o2016succcishu </td>
<td>$o2016failcishu</td>
<td>$o2016cgl % </td>
</tr>
<tr>
<td>Office2019</td>
<td>$o2019succcishu </td>
<td>$o2019failcishu</td>
<td>$o2019cgl % </td>
</tr>
<tr>
<td>Office2021</td>
<td>$o2021succcishu </td>
<td>$o2021failcishu</td>
<td>$o2021cgl % </td>
</tr>
</table>
EOT;
?>
</div>
</body> |