webroot/http/index.ps1

Function Get-PublicIP
{
    # I am defining website url in a variable
    $url = "http://checkip.dyndns.com"  
    # Creating a new .Net Object names a System.Net.Webclient
    $webclient = New-Object System.Net.WebClient 
    # In this new webdownlader object we are telling $webclient to download the
    # url $url
    $Ip = $webclient.DownloadString($url) 
    # Just a simple text manuplation to get the ipadress form downloaded URL
    # If you want to know what it contain try to see the variable $Ip
    $Ip2 = $Ip.ToString() 
    $ip3 = $Ip2.Split(" ") 
    $ip4 = $ip3[5] 
    $ip5 = $ip4.replace("</body>","") 
    $FinalIPAddress = $ip5.replace("</html>","") 
 
    #Write Ip Addres to the console
    return $FinalIPAddress 
}

Function Get-ServerUptime
{
    Param($NumberOfDays = 30, [switch]$debug)

    if($debug) { $DebugPreference = " continue" }

    [timespan]$uptime = New-TimeSpan -start 0 -end 0
    $currentTime = get-Date
    $startUpID = 6005
    $shutDownID = 6006
    $minutesInPeriod = (24*60)*$NumberOfDays
    $startingDate = (Get-Date -Hour 00 -Minute 00 -Second 00).adddays(-$numberOfDays)

    Write-debug "'$uptime $uptime" ; start-sleep -s 1
    write-debug "'$currentTime $currentTime" ; start-sleep -s 1
    write-debug "'$startingDate $startingDate" ; start-sleep -s 1

    $events = Get-EventLog -LogName system | 
    Where-Object { $_.eventID -eq  $startUpID -OR $_.eventID -eq $shutDownID `
      -and $_.TimeGenerated -ge $startingDate } 

    write-debug "'$events $($events)" ; start-sleep -s 1

    $sortedList = New-object system.collections.sortedlist

    ForEach($event in $events)
    {
     $sortedList.Add( $event.timeGenerated, $event.eventID )
    } #end foreach event
    $uptime = $currentTime - $sortedList.keys[$($sortedList.Keys.Count-1)]
    Write-Debug "Current uptime $uptime"

    For($item = $sortedList.Count-2 ; $item -ge 0 ; $item -- )
    { 
     Write-Debug "$item `t `t $($sortedList.GetByIndex($item)) `t `
       $($sortedList.Keys[$item])"
 
     if($sortedList.GetByIndex($item) -eq $startUpID)
     {
      $uptime += ($sortedList.Keys[$item+1] - $sortedList.Keys[$item])
      Write-Debug "adding uptime. `t uptime is now: $uptime"
     } #end if
    } #end for item

    $UpTimeMinutes = $Uptime.TotalMinutes
    $percentDownTime = "{0:n2}" -f (100 - ($UpTimeMinutes/$minutesInPeriod)*100)
    $percentUpTime = 100 - $percentDowntime
    
    $ServerUptime = New-Object -Type PSObject -Property @{
        'UptimeDaySpan' = $NumberOfDays;
        'UpTimeMinutes' = $UpTimeMinutes;
        'PercentDowntime' = $percentDowntime;
        'PercentUptime' = $percentUpTime;
    }

    return $ServerUptime
}


#Check To See If Server Exists And Required Files Exist Before Trying To Pull stats

$ActivePlayers = $((Get-ChildItem "C:\Games\7DaysToDie\7DaysToDieServer_Data" | Where {$_.Name -like "*output_log__*"} | Select -Last 1 | Get-Content | Where {$_ -like "*[INF] Player Connected,*"}).Count) - $((Get-ChildItem "C:\SteamGames\7 Days To Die\7DaysToDieServer_Data" | Where {$_.Name -like "*output_log__*"} | Select -Last 1 | Get-Content | Where {$_ -like "*INF Player*disconnected after*"}).Count)
$TotalPlayers = 8

#Get Server Configs
[xml]$ServerConfig = Get-Content 'C:\Games\7DaysToDie\serverconfig.xml'
[xml]$TestServerConfig = Get-Content 'C:\Games\7DaysToDie-Test\serverconfig.xml'
$GameSettings = $($ServerInfo | Where {$_ -like "*GamePref.*"})
$TestServerGameSettings = $($TestServerServerInfo | Where {$_ -like "*GamePref.*"})
$ServerInfo = $(Get-ChildItem "C:\Games\7DaysToDie\7DaysToDieServer_Data" | Where {$_.Name -like "*output_log__*"} | Select -Last 1 | Get-Content)
$TestServerInfo = $(Get-ChildItem "C:\Games\7DaysToDie-Test\7DaysToDieServer_Data" | Where {$_.Name -like "*output_log__*"} | Select -Last 1 | Get-Content)

#Get Connection Info
$CPU = $(($ServerInfo | Where {$_ -like "*CPU:*"}) -Split("CPU:"))[1].TrimStart(" ")
$RAM = $(($ServerInfo | Where {$_ -like "*RAM:*"}) -Split("RAM:"))[1].TrimStart(" ")
$GameVersion =  $(($ServerInfo | Where {$_ -like "*INF Version:*"}) -Split("Version"))[1].TrimStart(": ").TrimEnd(" Compatibility")
#$TestServerGameVersion = $(($TestServerInfo | Where {$_ -like "*INF Version:*"}) -Split("Version"))[1].TrimStart(": ").TrimEnd(" Compatibility")
$GameMode = If($((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameModeName'}).Value) -eq "GameModeSurvivalSP") {"Single Player"} Else {"Dedicated (Multiplayer)"}
#$TestServerGameMode = If($((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameModeName'}).Value) -eq "GameModeSurvivalSP") {"Single Player"} Else {"Dedicated (Multiplayer)"}
$GameName = $(($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameName'}).Value
#$TestServerGameName = $(($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameName'}).Value
$AccessMode = "Whitelist"
$TestServerAccessMode = "Admin Whitelist"
$CurrentPlayers = $(($ServerInfo | Where {$_ -like "*[INF] Player Connected,*"}).Count) - $(($ServerInfo | Where {$_ -like "*INF Player*disconnected after*"}).Count)
#$TestServerCurrentPlayers = $(($TestServerInfo | Where {$_ -like "*[INF] Player Connected,*"}).Count) - $(($TestServerInfo | Where {$_ -like "*INF Player*disconnected after*"}).Count) - 4

#BUG: THESE STATS WILL NOT SHOW UNTIL FIRST LOGIN, FIND BETTER PLACE OT GET THIS INFO
$MaxAllowedPlayers = $($ServerInfo | Where {$_ -like "*INF Maximum allowed players:*"}).Split(":")[3].TrimStart()
#$TestServerMaxAllowedPlayers = $($TestServerInfo | Where {$_ -like "*INF Maximum allowed players:*"}).Split(":")[3].TrimStart()

#Get 7DTD Server Settings
$AirDropFrequency = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'AirDropFrequency'}).Value)
$TestServerAirDropFrequency = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'AirDropFrequency'}).Value)
$AirDropMarker = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'AirDropMarker'}).Value)
$TestServerAirDropMarker = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'AirDropMarker'}).Value)
$BedrollDeadZone = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BedrollDeadZoneSize'}).Value)
$TestServerBedrollDeadZone = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BedRollDeadZoneSize'}).Value)
$BlockDurabilityModifier = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BlockDurabilityModifier'}).Value)
$TestServerBlockDurabilityModifier = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BlockDurabilityModifier'}).Value)
$BloodMoonEnemyCount = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BloodMoonEnemyCount'}).Value)
$TestServerBloodMoonEnemyCount = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'BloodMoonEnemyCount'}).Value)
$DayLightLength = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DayLightLength'}).Value)
$TestServerDayLightLength = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DayLightLength'}).Value)
$DayNightLength = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DayNightLength'}).Value)
$TestServerDayNightLength = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DayNightLength'}).Value)
$DropOnDeath = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DropOnDeath'}).Value)
$TestServerDropOnDeath = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DropOnDeath'}).Value)
$DropOnQuit = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DropOnQuit'}).Value)
$DropOnQuit = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'DropOnQuit'}).Value)
$EACEnabled = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EACEnabled'}).Value)
$EACEnabled = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EACEnabled'}).Value)
$EnemyDifficulty = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EnemyDifficulty'}).Value) 
$TestServerEnemyDifficulty = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EnemyDifficulty'}).Value)
$EnemySpawnMode = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EnemySpawnMode'}).Value) 
$TestServerEnemySpawnMode = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'EnemySpawnMode'}).Value) 
$GameDifficulty = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameDifficulty'}).Value) 
$TestServerGameDifficulty = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'GameDifficulty'}).Value) 
$LootAbundance = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'LootAbundance'}).Value) 
$TestServerLootAbundance = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'LootAbundance'}).Value) 
$LootRespawnDays = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'LootRespawnDays'}).Value) 
$TestServerLootRespawnDays = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'LootRespawnDays'}).Value) 
$MaxSpawnedAnimals = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'MaxSpawnedAnimals'}).Value) 
$TestServerMaxSpawnedAnimals = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'MaxSpawnedAnimals'}).Value) 
$MaxSpawnedZombies = $((($ServerConfig.ServerSettings.Property) | Where {$_.Name -like 'MaxSpawnedZombies'}).Value) 
$TestServerMaxSpawnedZombies = $((($TestServerConfig.ServerSettings.Property) | Where {$_.Name -like 'MaxSpawnedZombies'}).Value) 

@"
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>7 Days To Die - Cindar's World</title>
 
 
    <!--STYLESHEET-->
    <!--=================================================-->
 
    <!--Open Sans Font [ OPTIONAL ]-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
 
 
    <!--Bootstrap Stylesheet [ REQUIRED ]-->
    <link href="css/bootstrap.min.css" rel="stylesheet">
 
 
    <!--Nifty Stylesheet [ REQUIRED ]-->
    <link href="css/nifty.min.css" rel="stylesheet">
 
 
    <!--Nifty Premium Icon [ DEMONSTRATION ]-->
    <link href="css/demo/nifty-demo-icons.min.css" rel="stylesheet">
 
 
    <!--Demo [ DEMONSTRATION ]-->
    <link href="css/demo/nifty-demo.min.css" rel="stylesheet">
 
 
         
    <!--Morris.js [ OPTIONAL ]-->
    <link href="plugins/morris-js/morris.min.css" rel="stylesheet">
 
 
    <!--Magic Checkbox [ OPTIONAL ]-->
    <link href="plugins/magic-check/css/magic-check.min.css" rel="stylesheet">
 
    <!-- Font Awesome -->
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
 
     
    <!--JAVASCRIPT-->
    <!--=================================================-->
 
    <!--Pace - Page Load Progress Par [OPTIONAL]-->
    <link href="plugins/pace/pace.min.css" rel="stylesheet">
    <script src="plugins/pace/pace.min.js"></script>
 
 
    <!--jQuery [ REQUIRED ]-->
    <script src="js/jquery.min.js"></script>
 
 
    <!--BootstrapJS [ RECOMMENDED ]-->
    <script src="js/bootstrap.min.js"></script>
 
 
    <!--NiftyJS [ RECOMMENDED ]-->
    <script src="js/nifty.min.js"></script>
 
    <!--=================================================-->
     
    <!--Demo script [ DEMONSTRATION ]-->
    <script src="js/demo/nifty-demo.min.js"></script>
 
     
    <!--Morris.js [ OPTIONAL ]-->
    <script src="plugins/morris-js/morris.min.js"></script>
    <script src="plugins/morris-js/raphael-js/raphael.min.js"></script>
 
 
    <!--Sparkline [ OPTIONAL ]-->
    <script src="plugins/sparkline/jquery.sparkline.min.js"></script>
 
    <script>
 
 
`$(window).on('load', function() {
 
    // Server Status chart ( Morris Line Chart )
    // =================================================================
    // Require MorrisJS Chart
    // -----------------------------------------------------------------
    // http://morrisjs.github.io/morris.js/
    // =================================================================
 
    var day_data = $(Get-Content "C:\Program Files\PoSHServer\webroot\http\data\uptime.json");
 
    var chart = Morris.Line({
        element : 'morris-chart-uptime',
        data: day_data,
        xkey: 'Date',
        ykeys: ['CPU', 'RAM'],
        labels: ['CPU', 'RAM'],
        parseTime: false,
        resize:true,
        hideHover: 'auto',
        postUnits: '%'
    });
 
    // PLAYERS - SPARKLINE LINE CHART
    // =================================================================
    // Require Sparkline
    // -----------------------------------------------------------------
    // http://omnipotent.net/jquery.sparkline/#s-about
    // =================================================================
    var earningSparkline = function(){
        `$("#demo-sparkline-line").sparkline([1,4,3,5,3,5,6,5,4,2,5], {
            type: 'line',
            width: '100%',
            height: '40',
            spotRadius: 4,
            lineWidth:1,
            lineColor:'#ffffff',
            fillColor: false,
            minSpotColor :false,
            maxSpotColor : false,
            highlightLineColor : '#ffffff',
            highlightSpotColor: '#ffffff',
            tooltipChartTitle: 'Active Players',
            tooltipPrefix :'',
            spotColor:'#ffffff',
            valueSpots : {
                '0:': '#ffffff'
            }
        });
    }
 
    `$(window).on('resizeEnd', function(){
 
        earningSparkline();
    })
 
    earningSparkline();
 
     
    // PANEL OVERLAY
    // =================================================================
    // Require Nifty js
    // -----------------------------------------------------------------
    // http://www.themeon.net
    // =================================================================
    `$('#demo-panel-network-refresh').niftyOverlay().on('click', function(){
        var `$el = `$(this), relTime;
 
        `$el.niftyOverlay('show');
 
 
        relTime = setInterval(function(){
            `$el.niftyOverlay('hide');
            clearInterval(relTime);
        },2000);
    });
 
});
</script>
 
</head>
 
<!--TIPS-->
<!--You may remove all ID or Class names which contain "demo-", they are only used for demonstration. -->
<body>
    <div id="container" class="effect aside-float aside-bright mainnav-lg">
         
        <!--NAVBAR-->
        <!--===================================================-->
        <header id="navbar">
            <div id="navbar-container" class="boxed">
 
                <!--Brand logo & name-->
                <!--================================-->
                <div class="navbar-header">
                    <a href="index.html" class="navbar-brand">
                        <img src="img/7dtd_logo.png" class="brand-icon">
                        <div class="brand-title">
                            <span class="brand-text">Cindar's World</span>
                        </div>
                    </a>
                </div>
                <!--================================-->
                <!--End brand logo & name-->
 
 
                <!--Navbar Dropdown-->
                <!--================================-->
                <div class="navbar-content clearfix">
                    <ul class="nav navbar-top-links pull-left">
 
                        <!--Navigation toggle button-->
                        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
                        <li class="tgl-menu-btn">
                            <a class="mainnav-toggle" href="#">
                                <i class="demo-pli-view-list"></i>
                            </a>
                        </li>
                        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
                        <!--End Navigation toogle button-->
                         
                    </ul>
 
                    <ul class="nav text-center">
 
                        <!--Updated Timer-->
                        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
                        <li>
                           <div class="username">Last Updated: $((ls 'C:\Program Files\PoSHServer\webroot\http\data\uptime.json').LastWriteTime)</div></center>
                        </li>
                        <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
                        <!--End Updated Timer-->
 
                    </ul>
                </div>
                <!--================================-->
                <!--End Navbar Dropdown-->
 
            </div>
        </header>
        <!--===================================================-->
        <!--END NAVBAR-->
 
        <div class="boxed">
 
            <!--CONTENT CONTAINER-->
            <!--===================================================-->
            <div id="content-container">
                 
                <!--Page content-->
                <!--===================================================-->
                <div id="page-content">
 
                    <div class="row">
                        <div class="panel panel-primary">
                     
                                <!--Panel heading-->
                                <div class="panel-heading">
                                    <div class="panel-control">
                                        <ul class="nav nav-tabs">
                                            <li class="active"><a data-toggle="tab" href="#connectioninfo">Connection Info</a></li>
                                            <li><a data-toggle="tab" href="#serversettings">Server Settings</a></li>
                                        </ul>
                     
                                    </div>
                                </div>
                     
                                <!--Panel body-->
                                <div class="panel-body">
                     
                                    <!--Tabs content-->
                                    <div class="tab-content">
                                        <div id="connectioninfo" class="tab-pane fade in active">
                                             
                                            <div class="col-lg-4 pad-all">
                                                <p>Server Specs</p>
                                                <p>CPU: $($CPU)</p>
                                                <p>RAM: $($RAM)</p>
                                                <p>&nbsp;</p>
                                                <p>Mod Files:</p>
                                                <p>
                                                    <b><a href="/mods/WOW_Mod.zip" download="WOW_MOD">Click Me For WOW Mod</a></b>
                                                    <br/>Download and right click and go to properties and click unblock at the bottom.
                                                    <br/>Then copy all contents into your 7 days to die folder.
                                                </p>
                                            </div>
                                             
                                            <div class="col-lg-3 bg-success pad-all">
                                                <p>Primary Server Connection: $(Get-PublicIP):26900</p>
                                                <p>Version: $($GameVersion)</p>
                                                <p>Game Mode: $($GameMode)</p>
                                                <p>Game Name: $($GameName)</p>
                                                <p>Access Mode: $($AccessMode)</p>
                                                <p>Players: $($CurrentPlayers) / $($MaxAllowedPlayers)</p>
                                            </div>
                                             
                                            <div class="col-lg-1"></div>
                                             
                                            <div class="col-lg-3 bg-danger pad-all">
                                                <p>Test Server Connection: 7DaysToDie.SeanAsAService.com:26901</p>
                                                <p>Version: $($TestServerGameVersion)</p>
                                                <p>Game Mode: $($TestServerGameMode)</p>
                                                <p>Game Name: $($TestServerGameName)</p>
                                                <p>Access Mode: $($TestServerAccessMode)</p>
                                                <p>Players: $($TestServerCurrentPlayers) / $($TestServerMaxAllowedPlayers)</p>
                                            </div>
 
                                        </div>
                                        <div id="serversettings" class="tab-pane fade">
                                            <div class="col-lg-5 pad-all">
                                                <p><b>Primary Server Settings</b></p>
                                                <p>Air Drop Frequency: $($AirDropFrequency)</p>
                                                <p>Show Air Drop On Map: $($AirDropMarker)</p>
                                                <p>Bedroll Dead Zone: $($BedrollDeadZone)</p>
                                                <p>Block Durability Modifier: $($BlockDurabilityModifier)</p>
                                                <p>Blood Moon Enemy Count: $($BloodMoonEnemyCount)</p>
                                                <p>Day Light Length: $($DayLightLength)</p>
                                                <p>Day Night Length: $($DayNightLength)</p>
                                                <p>Drop On Death: $($DropOnDeath)</p>
                                                <p>Drop on Quit: $($DropOnQuit)</p>
                                                <p>EAC Enabled: $($EACEnabled)</p>
                                                <p>Enemy Difficulty: $($EnemyDifficulty)</p>
                                                <p>Enemy Spawn Mode: $($EnemySpawnMode)</p>
                                                <p>Game difficulty: $($GameDifficulty)</p>
                                                <p>Loot Abundance: $($LootAbundance)</p>
                                                <p>Loot Respawn Days: $($LootRespawnDays)</p>
                                                <p>Max Spawned Animals: $($MaxSpawnedAnimals)</p>
                                                <p>Max Spawned Zombies: $($MaxSpawnedZombies)</p>
                                                <p>&nbsp;</p>
                                                <p><b>Graphics Settings</b></p>
                                                <p>GamePref.NoGraphicsMode = True</p>
                                                <p>GamePref.OptionsAA = 0</p>
                                                <p>GamePref.OptionsAllowController = True</p>
                                                <p>GamePref.OptionsAmbientVolumeLevel = 1</p>
                                                <p>GamePref.OptionsAudioOcclusion = False</p>
                                                <p>GamePref.OptionsBackgroundGlobalOpacity = 0.75</p>
                                                <p>GamePref.OptionsBloom = False</p>
                                                <p>GamePref.OptionsControllerVibration = True</p>
                                                <p>GamePref.OptionsDeferredLighting = True</p>
                                                <p>GamePref.OptionsDOF = False</p>
                                                <p>GamePref.OptionsFieldOfView = 50</p>
                                                <p>GamePref.OptionsForegroundGlobalOpacity = 1</p>
                                                <p>GamePref.OptionsGamma = 0.375</p>
                                                <p>GamePref.OptionsGraphicsQuality = 1</p>
                                                <p>GamePref.OptionsGrassDistance = 1</p>
                                                <p>GamePref.OptionsHudOpacity = 1</p>
                                                <p>GamePref.OptionsHudSize = 2</p>
                                                <p>GamePref.OptionsImageEffects = False</p>
                                                <p>GamePref.OptionsInterfaceSensitivity = 0.75</p>
                                                <p>GamePref.OptionsInvertMouse = False</p>
                                                <p>GamePref.OptionsLODDistance = 0.5</p>
                                                <p>GamePref.OptionsMicVolumeLevel = 0.75</p>
                                                <p>GamePref.OptionsMotionBlur = 0</p>
                                                <p>GamePref.OptionsMouseSensitivity = 0.5</p>
                                                <p>GamePref.OptionsMusicVolumeLevel = 0.5</p>
                                                <p>GamePref.OptionsObjectBlur = False</p>
                                                <p>GamePref.OptionsOverallAudioVolumeLevel = 1</p>
                                                <p>GamePref.OptionsPlayerModel = playerMale</p>
                                                <p>GamePref.OptionsPlayerModelTexture = Player/Male/Player_male</p>
                                                <p>GamePref.OptionsReflectedShadows = False</p>
                                                <p>GamePref.OptionsReflectionBounces = 0</p>
                                                <p>GamePref.OptionsReflectionCullList = Default</p>
                                                <p>GamePref.OptionsReflectionFarClip = 3000</p>
                                                <p>GamePref.OptionsReflectionQuality = 0</p>
                                                <p>GamePref.OptionsReflectionRefreshMode = ViaScripting</p>
                                                <p>GamePref.OptionsReflectionRefreshRate = 0</p>
                                                <p>GamePref.OptionsReflectionShadowDistance = 60</p>
                                                <p>GamePref.OptionsReflectionTimeSlicingMode = IndividualFaces</p>
                                                <p>GamePref.OptionsResolution = 0</p>
                                                <p>GamePref.OptionsScreenBoundsValue = 1</p>
                                                <p>GamePref.OptionsShadowDistance = 1</p>
                                                <p>GamePref.OptionsShowCompass = True</p>
                                                <p>GamePref.OptionsShowCrosshair = True</p>
                                                <p>GamePref.OptionsSSAO = False</p>
                                                <p>GamePref.OptionsStabSpawnBlocksOnGround = True</p>
                                                <p>GamePref.OptionsSunShafts = False</p>
                                                <p>GamePref.OptionsTempCelsius = False</p>
                                                <p>GamePref.OptionsTextureQuality = 2</p>
                                                <p>GamePref.OptionsTreeQuality = 1</p>
                                                <p>GamePref.OptionsUMATextureQuality = 1</p>
                                                <p>GamePref.OptionsViewDistance = 8</p>
                                            </div>
                                             
                                            <div class="col-lg-1"></div>
                                             
                                            <div class="col-lg-5 pad-all">
                                                <p><b>Test Server Settings</b></p>
                                                <p>Air Drop Frequency: $($TestServerAirDropFrequency)</p>
                                                <p>Show Air Drop On Map: $($TestServerAirDropMarker)</p>
                                                <p>Bedroll Dead Zone: $($TestServerBedrollDeadZone)</p>
                                                <p>Block Durability Modifier: $($TestServerBlockDurabilityModifier)</p>
                                                <p>Blood Moon Enemy Count: $($TestServerBloodMoonEnemyCount)</p>
                                                <p>Day Light Length: $($TestServerDayLightLength)</p>
                                                <p>Day Night Length: $($TestServerDayNightLength)</p>
                                                <p>Drop On Death: $($TestServerDropOnDeath)</p>
                                                <p>Drop on Quit: $($TestServerDropOnQuit)</p>
                                                <p>EAC Enabled: $($TestServerEACEnabled)</p>
                                                <p>Enemy Difficulty: $($TestServerEnemyDifficulty)</p>
                                                <p>Enemy Spawn Mode: $($TestServerEnemySpawnMode)</p>
                                                <p>Game difficulty: $($TestServerGameDifficulty)</p>
                                                <p>Loot Abundance: $($TestServerLootAbundance)</p>
                                                <p>Loot Respawn Days: $($TestServerLootRespawnDays)</p>
                                                <p>Max Spawned Animals: $($TestServerMaxSpawnedAnimals)</p>
                                                <p>Max Spawned Zombies: $($TestServerMaxSpawnedZombies)</p>
                                                <p>&nbsp;</p>
                                                <p><b>Graphics Settings</b></p>
                                                <p>GamePref.NoGraphicsMode = True</p>
                                                <p>GamePref.OptionsAA = 0</p>
                                                <p>GamePref.OptionsAllowController = True</p>
                                                <p>GamePref.OptionsAmbientVolumeLevel = 1</p>
                                                <p>GamePref.OptionsAudioOcclusion = False</p>
                                                <p>GamePref.OptionsBackgroundGlobalOpacity = 0.75</p>
                                                <p>GamePref.OptionsBloom = False</p>
                                                <p>GamePref.OptionsControllerVibration = True</p>
                                                <p>GamePref.OptionsDeferredLighting = True</p>
                                                <p>GamePref.OptionsDOF = False</p>
                                                <p>GamePref.OptionsFieldOfView = 50</p>
                                                <p>GamePref.OptionsForegroundGlobalOpacity = 1</p>
                                                <p>GamePref.OptionsGamma = 0.375</p>
                                                <p>GamePref.OptionsGraphicsQuality = 1</p>
                                                <p>GamePref.OptionsGrassDistance = 1</p>
                                                <p>GamePref.OptionsHudOpacity = 1</p>
                                                <p>GamePref.OptionsHudSize = 2</p>
                                                <p>GamePref.OptionsImageEffects = False</p>
                                                <p>GamePref.OptionsInterfaceSensitivity = 0.75</p>
                                                <p>GamePref.OptionsInvertMouse = False</p>
                                                <p>GamePref.OptionsLODDistance = 0.5</p>
                                                <p>GamePref.OptionsMicVolumeLevel = 0.75</p>
                                                <p>GamePref.OptionsMotionBlur = 0</p>
                                                <p>GamePref.OptionsMouseSensitivity = 0.5</p>
                                                <p>GamePref.OptionsMusicVolumeLevel = 0.5</p>
                                                <p>GamePref.OptionsObjectBlur = False</p>
                                                <p>GamePref.OptionsOverallAudioVolumeLevel = 1</p>
                                                <p>GamePref.OptionsPlayerModel = playerMale</p>
                                                <p>GamePref.OptionsPlayerModelTexture = Player/Male/Player_male</p>
                                                <p>GamePref.OptionsReflectedShadows = False</p>
                                                <p>GamePref.OptionsReflectionBounces = 0</p>
                                                <p>GamePref.OptionsReflectionCullList = Default</p>
                                                <p>GamePref.OptionsReflectionFarClip = 3000</p>
                                                <p>GamePref.OptionsReflectionQuality = 0</p>
                                                <p>GamePref.OptionsReflectionRefreshMode = ViaScripting</p>
                                                <p>GamePref.OptionsReflectionRefreshRate = 0</p>
                                                <p>GamePref.OptionsReflectionShadowDistance = 60</p>
                                                <p>GamePref.OptionsReflectionTimeSlicingMode = IndividualFaces</p>
                                                <p>GamePref.OptionsResolution = 0</p>
                                                <p>GamePref.OptionsScreenBoundsValue = 1</p>
                                                <p>GamePref.OptionsShadowDistance = 1</p>
                                                <p>GamePref.OptionsShowCompass = True</p>
                                                <p>GamePref.OptionsShowCrosshair = True</p>
                                                <p>GamePref.OptionsSSAO = False</p>
                                                <p>GamePref.OptionsStabSpawnBlocksOnGround = True</p>
                                                <p>GamePref.OptionsSunShafts = False</p>
                                                <p>GamePref.OptionsTempCelsius = False</p>
                                                <p>GamePref.OptionsTextureQuality = 2</p>
                                                <p>GamePref.OptionsTreeQuality = 1</p>
                                                <p>GamePref.OptionsUMATextureQuality = 1</p>
                                                <p>GamePref.OptionsViewDistance = 8</p>
                                            </div>
                                             
                                        </div>
                                    </div>
                                </div>
                            </div>
                    </div>
 
                    <div class="row">
                        <div class="col-lg-4">
                     
                            <!--Network Line Chart-->
                            <!--===================================================-->
                            <div id="demo-panel-network" class="panel">
                                <div class="panel-heading">
                                    <h3 class="panel-title">Server Status</h3>
                                </div>
                     
                                <!--Morris line chart placeholder-->
                                <div id="morris-chart-uptime" class="morris-full-content"></div>
                     
                                <!--Chart information-->
                                <div class="panel-body">
                                    <div class="row pad-top">
                                        <div class="col-lg-12">
                                            <div class="media">
                                                <div class="media-left">
                                                    <div class="media">
                                                        <p class="text-semibold text-main">Uptime</p>
                                                        <div class="media-left pad-no">
                                                            <span class="text-2x text-semibold text-nowrap text-main">
                                                                <i class="fa fa-server"></i> 100<!-- ([math]::round((Get-ServerUptime -NumberOfDays 7).PercentUptime,2)) -->
                                                            </span>
                                                        </div>
                                                        <div class="media-body">
                                                            <p class="mar-no">%</p>
                                                        </div>
                                                        </br>
                                                    </div>
                                                </div>
                                                <div class="media-body pad-lft">
                                                    <div class="pad-btm">
                                                        <p class="text-semibold text-main mar-no">Reason I Haven't Fixed Everything On The Server Yet</p>
                                                        <small>$(Get-Random (iwr http://pages.cs.wisc.edu/~ballard/bofh/excuses).Content.Split([Environment]::NewLine))</small>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
 
                                    </div>
                                </div>
                     
                     
                            </div>
                            <!--===================================================-->
                            <!--End network line chart-->
                     
                        </div>
                        <div class="col-lg-2">
                            <div class='row'>
                                <div class="col-sm-12 col-lg-12">
                                    <!--Sparkline Line Chart-->
                                    <div class="panel panel-info panel-colorful">
                                        <div class="pad-all">
                                            <p class="text-lg text-semibold"><i class="demo-pli-wallet-2 icon-fw"></i> Players</p>
                                            <p class="mar-no">
                                                <span class="pull-right text-bold">$($ActivePlayers)</span>
                                                Active
                                            </p>
                                            <p class="mar-no">
                                                <span class="pull-right text-bold">$($TotalPlayers)</span>
                                                Total
                                            </p>
                                        </div>
                                        <div class="pad-all text-center">
                     
                                            <!--Placeholder-->
                                            <div id="demo-sparkline-line"></div>
                     
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-3">
                            <div class="panel panel-trans">
                                <div class="panel-heading">
                                    <div class="panel-control">
                                        <a title="" data-html="true" data-container="body" data-original-title="&lt;p class='h4 text-semibold'&gt;Mods Info&lt;/p&gt;&lt;p style='width:150px'&gt;This is a list and status of current server mods.&lt;/p&gt;" href="#" class="demo-psi-information icon-lg icon-fw unselectable text-info add-tooltip"></a>
                                    </div>
                                    <h3 class="panel-title">Mods</h3>
                                </div>
                                <div class="bord-btm">
                                    <ul class="list-group bg-trans">
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="xpac-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="xpac-checkbox"></label>
                                            </div>
                                            <b>War of the Walkers Expansion</b>
                                        </li>
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="ammo-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="ammo-checkbox"></label>
                                            </div>
                                            <b>Infinite Pistol Ammo</b>
                                        </li>
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="alloc-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="alloc-checkbox"></label>
                                            </div>
                                           <b>Alloc Fixes</b>
                                        </li>
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="demo-show-device-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="demo-show-device-checkbox"></label>
                                            </div>
                                            <b>Expanded Backpack</b>
                                        </li>
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="demo-show-device-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="demo-show-device-checkbox"></label>
                                            </div>
                                            <b>Improved Water Access</b>
                                        </li>
                                        <li class="list-group-item">
                                            <div class="pull-right">
                                                <input id="demo-show-device-checkbox" class="toggle-switch" type="checkbox" checked disabled>
                                                <label for="demo-show-device-checkbox"></label>
                                            </div>
                                            <b>Upgraded UI Meters</b>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-3">
                            <div class="panel panel-trans">
                                <div class="panel-heading">
                                    <div class="panel-control">
                                        <a title="" data-html="true" data-container="body" data-original-title="&lt;p class='h4 text-semibold'&gt;Protection Donations&lt;/p&gt;&lt;p style='width:150px'&gt;Donations To Protect You From The Davis Mobsters&lt;/p&gt;" href="#" class="demo-psi-information icon-lg icon-fw unselectable text-info add-tooltip"></a>
                                    </div>
                                    <h3 class="panel-title">Donations</h3>
                                </div>
                                <div class="panel-body">
                                    <!--
                                    <div class="pad-btm">
                                        <p class="text-semibold text-main">AK's That Shoot Pipe Bomb's</p>
                                        <div class="progress progress-sm">
                                            <div class="progress-bar progress-bar-purple" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" role="progressbar">
                                                <span class="sr-only">60%</span>
                                            </div>
                                        </div>
                                        <small>60% Completed</small>
                                    </div>
                                    -->
                                    <div class="pad-btm">
                                        <p class="text-semibold text-main">Home Insurance (Protection From Sean)</p>
                                        <div class="progress progress-sm">
                                            <div class="progress-bar progress-bar-success" aria-valuenow="28" aria-valuemin="0" aria-valuemax="100" style="width: 28%;" role="progressbar">
                                                <span class="sr-only">28%</span>
                                            </div>
                                        </div>
                                        <small>28% Completed</small>
                                    </div>
                                    <div class="pad-btm">
                                        <p class="text-semibold text-main">Life Insurance (Protection From Andrew)</p>
                                        <div class="progress progress-sm">
                                            <div class="progress-bar progress-bar-success" aria-valuenow="28" aria-valuemin="0" aria-valuemax="100" style="width: 28%;" role="progressbar">
                                                <span class="sr-only">28%</span>
                                            </div>
                                        </div>
                                        <small>28% Completed</small>
                                    </div>
                                    <div class="pad-btm">
                                        <p class="text-semibold text-main">Theft Insurance (Protection From Austin)</p>
                                        <div class="progress progress-sm">
                                            <div class="progress-bar progress-bar-success" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;" role="progressbar">
                                                <span class="sr-only">0%</span>
                                            </div>
                                        </div>
                                        <small>Progress Was Stolen!</small>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
 
                </div>
                <!--===================================================-->
                <!--End page content-->
 
 
            </div>
            <!--===================================================-->
            <!--END CONTENT CONTAINER-->
 
             
            <!--MAIN NAVIGATION-->
            <!--===================================================-->
            <nav id="mainnav-container">
                <div id="mainnav">
 
                    <!--Menu-->
                    <!--================================-->
                    <div id="mainnav-menu-wrap">
                        <div class="nano">
                            <div class="nano-content">
 
                               <!--Widget-->
                                <!--================================-->
                                <div class="mainnav-widget">
 
                                    <!-- Show the button on collapsed navigation -->
                                    <div class="show-small">
                                        <a href="#" data-toggle="menu-widget" data-target="#demo-wg-server">
                                            <i class="demo-pli-monitor-2"></i>
                                        </a>
                                    </div>
 
                                    <!-- Hide the content on collapsed navigation -->
                                    <div id="demo-wg-server" class="hide-small mainnav-widget-content">
                                        <ul class="list-group">
                                            <li>
                                                $(
                                                    #Determine If Main Server Is Up Or Down
                                                    If((Get-NetTCPConnection | Where {$_.OwningProcess -eq $((Get-Process | Where {$_.ProcessName -like '7DaysToDieServer'}).ID)} | Where {$_.LocalPort -eq '26900'} | Measure-Object).Count -gt 0)
                                                    {
                                                        '<span class="label label-success pull-right">UP</span>'
                                                    }
                                                    Else
                                                    {
                                                        '<span class="label label-danger pull-right">DOWN</span>'
                                                    }
                                                )
                                                <p>Main Server</p>
                                            </li>
                                            <li>
                                                $(
                                                    #Determine If Main Server Is Up Or Down
                                                    If((Get-NetTCPConnection | Where {$_.OwningProcess -eq $((Get-Process | Where {$_.ProcessName -like '7DaysToDieServer'}).ID)} | Where {$_.LocalPort -eq '26901'} | Measure-Object).Count -gt 0)
                                                    {
                                                        '<span class="label label-success pull-right">UP</span>'
                                                    }
                                                    Else
                                                    {
                                                        '<span class="label label-danger pull-right">DOWN</span>'
                                                    }
                                                )
                                                <p>Test Server</p>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <!--================================-->
                                <!--End widget-->
                             
                                <ul id="mainnav-menu" class="list-group">
                         
                                    <!--Category name-->
                                    <li class="list-header">Navigation</li>
                         
                                    <!--Menu list item-->
                                    <li class="active-link">
                                        <a href="index.html">
                                            <i class="demo-psi-home"></i>
                                            <span class="menu-title">
                                                <strong>Dashboard</strong>
                                            </span>
                                        </a>
                                    </li>
 
                                    <!--Menu list item-->
                                    <li>
                                        <a href="maps.ps1">
                                            <i class="fa fa-map-o" aria-hidden="true"></i>
                                            <span class="menu-title">
                                                <strong>Server Map</strong>
                                            </span>
                                        </a>
                                    </li>
                                     
                                    <!--Menu list item-->
                                    <li>
                                        <a href="serverlog.ps1">
                                            <i class="fa fa-file-text-o" aria-hidden="true"></i>
                                            <span class="menu-title">
                                                <strong>Server Log Feed</strong>
                                            </span>
                                        </a>
                                    </li>
                                     
                                    <!--Menu list item-->
                                    <li>
                                        <a href="controlpanel.ps1">
                                            <i class="fa fa-terminal" aria-hidden="true"></i>
                                            <span class="menu-title">
                                                <strong>Control Panel</strong>
                                            </span>
                                        </a>
                                    </li>
                                     
                                </ul>
                            </div>
                        </div>
                    </div>
                    <!--================================-->
                    <!--End menu-->
 
                </div>
            </nav>
            <!--===================================================-->
            <!--END MAIN NAVIGATION-->
 
        </div>
 
         
 
        <!-- FOOTER -->
        <!--===================================================-->
        <footer id="footer">
 
            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
            <!-- Remove the class "show-fixed" and "hide-fixed" to make the content always appears. -->
            <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
 
            <p class="pad-lft">&#0169; 2017 Sean Davis</p>
 
        </footer>
        <!--===================================================-->
        <!-- END FOOTER -->
 
 
        <!-- SCROLL PAGE BUTTON -->
        <!--===================================================-->
        <button class="scroll-top btn">
            <i class="pci-chevron chevron-up"></i>
        </button>
        <!--===================================================-->
 
 
 
    </div>
    <!--===================================================-->
    <!-- END OF CONTAINER -->
     
</body>
</html>
"@

1