<?php
  if(!(isset($apppath))){$apppath = "/home/relayup/";}
  $settingfile = $apppath . "dev/Shield";

  $VER_home_css     = "1";
  $VER_home         = "1";
  $VER_index_css    = "2";
  $VER_index        = "1";
  $VER_info_css     = "1";
  $VER_info         = "1";
  $VER_logs_css     = "1";
  $VER_logs         = "1";
  $VER_settings_css = "1";
  $VER_settings     = "1";
  $VER_style_css    = "1";

  $VER_login        = "1";
  $VER_logintest    = "1";
  $VER_readsettings = "1";
  $VER_ajax_js      = "1";
  $VER_ajax_php     = "1";
  $VER_utils_js     = "1";
  $VER_vers         = "1";
  $VER_webstatus    = "1";

  $VER_app          = "1";
  $VER_os           = "1";
  $VER_vpn          = "1";

  $filename = "./home.css";             $VER_home_css     = date ("zBs", filemtime($filename));
  $filename = "./home.html";            $VER_home         = date ("zBs", filemtime($filename));
  $filename = "./index.css";            $VER_index_css    = date ("zBs", filemtime($filename));
  $filename = "./index.html";           $VER_index        = date ("zBs", filemtime($filename));
  $filename = "./logs.css";             $VER_logs_css     = date ("zBs", filemtime($filename));
  $filename = "./logs.html";            $VER_logs         = date ("zBs", filemtime($filename));
  $filename = "./settings.css";         $VER_settings_css = date ("zBs", filemtime($filename));
  $filename = "./settings.html";        $VER_settings     = date ("zBs", filemtime($filename));
  $filename = "./style.css";            $VER_style_css    = date ("zBs", filemtime($filename));
 
  $filename = "./utils.js";             $VER_utils_js     = date ("zBs", filemtime($filename));

  $filename = "./ZZ_login2.php";        $VER_login        = date ("zBs", filemtime($filename));
  $filename = "./ZZ_logintest.php";     $VER_logintest    = date ("zBs", filemtime($filename));
  $filename = "./ZZ_readsettings.php";  $VER_readsettings = date ("zBs", filemtime($filename));
  $filename = "./ZZ_shieldajax.js";     $VER_ajax_js      = date ("zBs", filemtime($filename));
  $filename = "./ZZ_shieldajax.php";    $VER_ajax_php     = date ("zBs", filemtime($filename));
  $filename = "./ZZ_versions.php";      $VER_vers         = date ("zBs", filemtime($filename));
  $filename = "./ZZ_webstatus.php";     $VER_webstatus    = date ("zBs", filemtime($filename));

  $filename = $apppath . "dev/Shield"; $VER_app          = date ("zBs", filemtime($filename));


function getOSInformation(){
  if (false == function_exists("shell_exec") || false == is_readable("/etc/os-release")){
    return "Dont Know";
  }
  $os         = shell_exec('cat /etc/os-release');
  $listIds    = preg_match_all('/.*=/', $os, $matchListIds);
  $listIds    = $matchListIds[0];

  $listVal    = preg_match_all('/=.*/', $os, $matchListVal);
  $listVal    = $matchListVal[0];
  array_walk($listIds, function(&$v, $k){
    $v = strtolower(str_replace('=', '', $v));
  });
  array_walk($listVal, function(&$v, $k){
    $v = preg_replace('/=|"/', '', $v);
  });
  return array_combine($listIds, $listVal);
}
?>