DayZ-Stat-Server/mods.php

134 lines
8.6 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<?php
//$page = $_SERVER['PHP_SELF'];
//$sec = "300";
ini_set('display_errors', 'on');
error_reporting(E_ALL); // Display all types of error
ini_set('max_execution_time', 2); //300 seconds = 5 minutes
ini_set('default_socket_timeout', 2); // 100 seconds = 1 Minutes 40 sec
include_once('config/config.php');
include_once('config/consql.php');
?>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<!--
<title><?php echo "MODS on TOX server"; ?></title>
<meta name='description' content='<?php echo "$descript"; ?>'>
-->
<meta name="author" content="Erreur32">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" href="/favicon.png"/>
<meta name="keyword" content="tox,server,dayz,map,namalsk,namalsk island">
<!-- <link id="theme-style" href="css/style_dark.css" rel="stylesheet">-->
<style>
.tab-content {margin-top: -1px; background: #3a4149;border: none;border-radius: 0 0 .25rem .25rem;}
a,a:visited {color: #20A8D8;text-decoration: none;}
a:hover {color: orange; text-decoration: none;}
.description-header {color: #26A65B;}
.label-danger { background-color: #EF4836;}
.label-warning {background-color: #F89406;color: white; }
.label-success {background-color: #26A65B;}
.label-primary {background-color: #4183D7;color: green; }
.label-info { background-color: #5bc0de;}
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
.selection { color: black !important;}
.select2-results { color: black !important;}
.select2-results__option--highlighted { background-color: #3875d7 !important;}
.pull-left { float: left !important;}
.pull-right { float: right !important;}
.navbar-brand-logo { margin-left: 2rem;}
</style>
<br>
<hr>
<?php
// OK
//$homepage = file_get_contents('http://dayz.echosystem.fr');
//echo $homepage;
echo "<br>";
$w = stream_get_wrappers();
echo 'openssl: ', extension_loaded ('openssl') ? 'yes':'no', "\n<br>";
echo 'http wrapper: ', in_array('http', $w) ? 'yes':'no', "\n<br>";
echo 'https wrapper: ', in_array('https', $w) ? 'yes':'no', "\n<br>";
echo 'wrappers: ', var_export($w);
// exit
?>
<br><hr>
<div class="tab-pane tab_content fade" id="modlist" role="tabpanel" aria-labelledby="modlist-tab">
<div class="row">
<div class="col-lg-5 col-sm-12">
<div class="card">
<div class="card-header"><i class="fas fa-users"></i>
MOD list on <span style="color:grey;"><?php echo $Info['HostName'] ; ?></span>
</div>
<div class="card-body">
<p class="before-list">
<center>
<span style="padding: 5px 0px 2px 20px;"><?php echo count($modnum); ?> MODS </span>
<span style="padding: 5px 0px 2px 20px;">IP: <a href="http://<?php echo $ipserv.":".$modport;?>"><span style="color: orange;"><?php echo $ipserv.":".$modport;?></span></a></span>
</center>
</p>
<table class="table_ table-bordered_ table-striped_">
<thead>
<tr>
<th style="text-align:left;"><span class='label label-info'>MOD Name</span>
</th>
<!-- <th><span class='label label-info'>steamWorkshopId</span></th>-->
</tr>
</thead>
<tbody>
<tr><td><br></td><td></td><br></tr>
<?php // $modnum=json_decode($json0); //converts to an array of objects
foreach( $modnum as $item ) { ?>
<tr>
<td><a href="http://steamcommunity.com/sharedfiles/filedetails/?id=<?php echo $item->steamWorkshopId; ?>" data-type="Link"><?php echo $item->name; ?></a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>