<?PHP 
$checkZ="check-serverdata-a.inc.php";
include("./../function/datacheck_copy.inc.php");

$serverdatachecktimeT="";$serverdatachecktimeD="";
if (file_exists("./../".$SYSD."/check-serverdata-a.inc.php")){include("./../".$SYSD."/check-serverdata-a.inc.php");}
include("./../configure/check-serverdata-b.inc.php");
$url=$_SERVER["HTTP_HOST"];
$urlX=$wwwX.$url."/".$wssiteL."/".$wssiteA;

$checkserverip="";
$checkserverip=$_SERVER['SERVER_ADDR'];
$checkdokumentroot=$_SERVER['DOCUMENT_ROOT'];
$checkphpS=phpversion();
if($checkphpS < $checkphpA){$checkPHP="false";}else{$checkPHP="true";}

$fileX="";
@$fileX=file_get_contents($urlX."/".$SYST."/modrewrite/test123.html");
if($fileX){$checkmodrewrite="on";}else{$checkmodrewrite="off";}

if(ini_get('safe_mode')){$checksafemode="on";}else{$checksafemode="off";}
if(ini_get('register_globals')){$checkregisterglobals="on";}else{$checkregisterglobals="off";}

$checkmysqlX=mysqli_get_client_version();
$checkmysqlX=$checkmysqlX / 10000;
$checkmysqlS=mysqli_get_client_version();
$checkmysqlS=$checkmysqlS / 10000;
$checkmysqlS=substr($checkmysqlS,0,3);
if($checkmysqlS < $checkmysqlA){$checkMySql="false";}else{$checkMySql="true";}

$checkserversoftware=$_SERVER['SERVER_SOFTWARE'];
$checkserverapi=php_sapi_name();

$checktimeoutS=ini_get('max_execution_time');
$checktimeoutSx=$checktimeoutS;
$checktimeoutAx=$checktimeoutA;
if($checktimeoutSx < $checktimeoutAx){$checktimeout="false";}else{$checktimeout="true";}

$checkmemorylimitS=ini_get("memory_limit");
$checkmemorylimitSx=str_replace("M","",$checkmemorylimitS);
$checkmemorylimitAx=str_replace("M","",$checkmemorylimitA);
if($checkmemorylimitSx < $checkmemorylimitAx){$checkMemorylimit="false";}else{$checkMemorylimit="true";}

$checkpostmaxsizeS=ini_get("post_max_size");
$checkpostmaxsizeSx=str_replace("M","",$checkpostmaxsizeS);
$checkpostmaxsizeAx=str_replace("M","",$checkpostmaxsizeA);
if($checkpostmaxsizeSx < $checkpostmaxsizeAx){$checkPostmaxsize="false";}else{$checkPostmaxsize="true";}

$checkuploadmaxfilesizeS=ini_get("upload_max_filesize");
$checkuploadmaxfilesizeSx=str_replace("M","",$checkuploadmaxfilesizeS);
$checkuploadmaxfilesizeAx=str_replace("M","",$checkuploadmaxfilesizeA);
if($checkuploadmaxfilesizeSx < $checkuploadmaxfilesizeAx){$checkUploadsize="false";}else{$checkUploadsize="true";}

$checkserversignature="";
$checkserversignature=$_SERVER['SERVER_SIGNATURE'];

include("./../function/timestamp.inc.php");
$timedateX=$timestampZ;

//$checktimeN=$serverdatachecktimeT + $timeSx;
$checktimeX=$timestamp + $timeSx;

if($timestamp >= $checktimeX){$stest01=1;}else{$stest01=0;}
if($checkserverip == ""){$stest03=0;}else{$stest03=0;}
if($checkphpS == ""){$stest04=1;}else{$stest04=0;}
if($checkPHP == "true"){$stest05=0;}else{$stest05=1;}
if($checkmodrewrite == "off"){$stest06=1;}else{$stest06=0;}
if($checksafemode == "on"){$stest07=0;}else{$stest07=0;}
if($checkregisterglobals == "on"){$stest08=1;}else{$stest08=0;}
if($checkmysqlS == ""){$stest09=1;}else{$stest09=0;}
if($checkMySql == "true"){$stest10=0;}else{$stest10=1;}
if($checktimeout == "true"){$stest11=0;}else{$stest11=1;}
if($checkMemorylimit == "true"){$stest12=0;}else{$stest12=1;}
if($checkPostmaxsize == "true"){$stest13=0;}else{$stest13=1;}
if($checkUploadsize == "true"){$stest14=0;}else{$stest14=1;}
$servercheckFalse=$stest01+$stest03+$stest04+$stest05+$stest06+$stest07+$stest08+$stest09+$stest10+$stest11+$stest12+$stest13+$stest14;
if($servercheckFalse == "1"){$servercheckX=$serverdata20;}else{$servercheckX=$serverdata21;}

$serverdataX="<?PHP 
\$serverdatachecktimeD='$timedateX';

\$serverdatachecktimeT='$timestamp';
\$checkserverip='$checkserverip';
\$checkdokumentroot='$checkdokumentroot';
\$checkphpS='$checkphpS';
\$checkmodrewrite='$checkmodrewrite';
\$checksafemode='$checksafemode';
\$checkregisterglobals='$checkregisterglobals';
\$checkmysqlS='$checkmysqlS';
\$checkserversoftware='$checkserversoftware';
\$checkserverapi='$checkserverapi';
\$checktimeoutS='$checktimeoutS';
\$checkmemorylimitS='$checkmemorylimitS';
\$checkpostmaxsizeS='$checkpostmaxsizeS';
\$checkuploadmaxfilesizeS='$checkuploadmaxfilesizeS';
\$checkserversignature='$checkserversignature';
\$servercheckFalse='$servercheckFalse';
?>";
$handle=fopen("./../".$SYSD."/check-serverdata-a.inc.php", "w");
fwrite($handle,$serverdataX);
fclose($handle);

$tmpfile="./../tmp/check-serverdata.inc.php";
if (file_exists($tmpfile)){unlink($tmpfile);}
?>

<div class="box-body">
<table class="col-md-12 table table-bordered table-condensed">
<tr class="trcolor">
<th class="font18"><?PHP echo $areaX;?></th>
<th class="font18"><?PHP echo $resultX;?></th>
<th class="font18 txtC"><?PHP echo $statusX;?></th>
</tr>

<tr class="menu-out2">
<td class="wd200"><?PHP echo $checkdate1;?>:</td>
<td><?PHP echo $timestampZ;?></td>
<td class="txtC"><?PHP if($timestamp >= $checktimeX){echo "<i class=\"fa fa-times resF\"></i>";}else{echo "<i class=\"fa fa-check resT\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata16;?>:</td>
<td><?PHP 
if($serverdatachecktimeD == ""){$serverdatachecktimeD=$serverdata52;}else{$serverdatachecktimeD=$serverdatachecktimeD;}
echo $serverdatachecktimeD;
?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata18;?>:</td>
<td><?PHP if($servercheckFalse == "0"){
echo $serverdata19;
}else{
echo "<span class=\"resF\">".$servercheckFalse." ".$servercheckX."</span>";
}
?></td>
<td class="txtC"><?PHP if($servercheckFalse == "0"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata05;?>:</td>
<td><?PHP echo $checkserverip;?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata06;?>:</td>
<td><?PHP echo $checkdokumentroot;?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata01;?>:</td>
<td><?PHP if($checkphpS == ""){echo "<span class=\"resF\">".$deactiveX."</span>";}else{echo "<span class=\"resT\">".$activeX."</span>";}?></td>
<td class="txtC"><?PHP if($checkphpS == ""){echo "<i class=\"fa fa-times resF\"></i>";}else{echo "<i class=\"fa fa-check resT\"></i>";}?></td>
</tr>

<?PHP if($checkphpS == ""){}else{?>
<tr class="menu-out2">
<td><?PHP echo $serverdata02;?>:</td>
<td><?PHP if($checkPHP == "true"){
echo $checkphpS;
}else{
echo "<span class=\"resF\">".$checkphpS."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata54." <b>".$checkphpA."</b> ".$serverdata55."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkPHP == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>
<?PHP } ?>

<tr class="menu-out2">
<td><?PHP echo $serverdata12;?>:</td>
<td><?PHP if($checkmodrewrite == "off"){
echo "<span class=\"resF\">".$offX."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata56."</span>";
}else{
echo $onX;
}
?></td>
<td class="txtC"><?PHP if($checkmodrewrite == "off"){echo "<i class=\"fa fa-times resF\"></i>";}else{echo "<i class=\"fa fa-check resT\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata13;?>:</td>
<td><?PHP if($checksafemode == "off"){
echo $offX;
}else{
echo "<span class=\"resF\">".$onX."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata57."</span>";
}
?></td>
<td class="txtC"><?PHP if($checksafemode == "off"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata14;?>:</td>
<td><?PHP if($checkregisterglobals == "off"){
echo $offX;
}else{
echo "<span class=\"resF\">".$onX."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata58."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkregisterglobals == "off"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata03;?>:</td>
<td><?PHP if($checkmysqlS == ""){echo "<span class=\"resF\">".$deactiveX."</span>";}else{echo "<span class=\"resT\">".$activeX."</span>";}?></td>
<td class="txtC"><?PHP if($checkmysqlS == ""){echo "<i class=\"fa fa-times resF\"></i>";}else{echo "<i class=\"fa fa-check resT\"></i>";}?></td>
</tr>

<?PHP if($checkmysqlS == ""){}else{?>
<tr class="menu-out2">
<td><?PHP echo $serverdata04;?>:</td>
<td><?PHP if($checkMySql == "true"){
echo $checkmysqlX;
}else{
echo "<span class=\"resF\">".$checkmysqlX."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata59." <b>".$checkmysqlA."</b> ".$serverdata55."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkMySql == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>
<?PHP } ?>

<tr class="menu-out2">
<td><?PHP echo $serverdata07;?>:</td>
<td><?PHP echo $checkserversoftware;?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata08;?>:</td>
<td><?PHP echo $checkserverapi;?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata62;?>:</td>
<td><?PHP if($checktimeout == "true"){
echo $checktimeoutS;
}else{
echo "<span class=\"resF\">".$checktimeoutS."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata62a." <b>".$checktimeoutA."</b> ".$serverdata62b."</span>";
}
?></td>
<td class="txtC"><?PHP if($checktimeout == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata09;?>:</td>
<td><?PHP if($checkMemorylimit == "true"){
echo $checkmemorylimitS;
}else{
echo "<span class=\"resF\">".$checkmemorylimitS."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata60." <b>".$checkmemorylimitA."</b> ".$serverdata61."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkMemorylimit == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata10;?>:</td>
<td><?PHP if($checkPostmaxsize == "true"){
echo $checkpostmaxsizeS;
}else{
echo "<span class=\"resF\">".$checkpostmaxsizeS."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata60." <b>".$checkpostmaxsizeA."</b> ".$serverdata61."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkPostmaxsize == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata11;?>:</td>
<td><?PHP if($checkUploadsize == "true"){
echo $checkuploadmaxfilesizeS;
}else{
echo "<span class=\"resF\">".$checkuploadmaxfilesizeS."*</span>";
echo "<br><span class=\"font14 resF\">*".$serverdata60." <b>".$checkuploadmaxfilesizeA."</b> ".$serverdata61."</span>";
}
?></td>
<td class="txtC"><?PHP if($checkUploadsize == "true"){echo "<i class=\"fa fa-check resT\"></i>";}else{echo "<i class=\"fa fa-times resF\"></i>";}?></td>
</tr>

<tr class="menu-out2">
<td><?PHP echo $serverdata15;?>:</td>
<td><?PHP echo $checkserversignature;?></td>
<td class="txtC"><i class="fa fa-info"></i></td>
</tr>

<tr>
<td class="txtC" colspan="3">
<a href='check-pinfo-index.php'>
<div class="vlinkS">
<i class="hvL fa fa-arrow-circle-right padd-right5"></i>
<span class="hvS"><?PHP echo $serverdata90;?></span>
</div>
</a>
</td>
</tr>

</table>
<div class="clearX box-footer"><?PHP echo $noguarantee1;?></div>
</div>
