﻿<?php
define('GOOGLE_MAGIC', 0xE6359A60);
class main extends spController {
    function index() {
        $this->SITE_NAME = SITE_NAME;
        $this->SITE_URL = SITE_URL;
        $this->SYSTEM = SYSTEM;
        $this->VERSION = VERSION;
        $this->SearchDomain = "璇疯緭鍏ヨ镆ヨ镄勭綉绔椤烟鍚?;
        $this->display("default/index.html");
    }
    function tool() {
        $this->SITE_NAME = SITE_NAME;
        $this->SITE_URL = SITE_URL;
        $this->SYSTEM = SYSTEM;
        $this->VERSION = VERSION;
        $SBox="璇疯緭鍏ヨ镆ヨ镄勭綉绔椤烟鍚?;
        $Domain=$_GET["S"];
        if($Domain=="璇疯緭鍏ヨ镆ヨ镄勭綉绔椤烟鍚?||$Domain=="") {
            $Domain="";
        }else {
            if (!preg_match("/^[A-Za-z0-9]+(-+[A-Za-z0-9]+)*(\.[A-Za-z0-9\-]+)(\.[A-Za-z0-9\-]+)?\.[A-Za-z]+$/",$Domain)) {
                echo "<Script>alert('鍩熷悕杈揿叆链夎锛岃閲嶆柊杈揿叆锛?);location.href='javascript:history.go(-1)';</Script>";
            }
            $SBox=$Domain;
            $GetPR=spClass('GetPR');
            $GetInfo=spClass('GetInfo');
            $Chs="6".$GetPR->GoogleCH($GetPR->strord("info:".$Domain));
            $ServerType=$GetInfo->GetServerInfo("http://".$Domain);
            $Arr=spliti("Server: ",$ServerType);
            $Arr=spliti("<br />",$Arr[1]);
            $ServerType=$Arr[0];
            $ServerIp=$GetInfo->GetDomainIp($Domain);
        }
        $this->SearchDomain = $SBox;
        $this->Chs = $Chs;
        $this->PR = $GetPR->PageRank($Domain);
        $this->ServerType = $ServerType;
        $this->ServerIp = $ServerIp;
        $this->display("default/tool.html");
    }
}