<?php


if (!defined('ACCESSCONST')) {
    die();
}

  function debian_version() {

     $getdebversion = shell_exec("lsb_release -irc");
     $getlines = explode("\n", $getdebversion);

     $getdatainit = array_filter(array_map('trim', $getlines));
     $getlinedata = array_values($getdatainit);

     $lineinfo = [];
     foreach ($getlinedata as $reskey => $resline) {
        $getdata = explode(":", $resline);
        $lineinfo[] = $getdata[1];
     }

     $finalarr = [];
     foreach ($lineinfo as $linekey => $linevalue) {
             $finalarr[] = str_replace(array(" ", "\t"), "", $linevalue);
     }

     $finalarr[2] = "(" . $finalarr[2] . ")";
     $fininfoverinit = implode(" ", $finalarr);
     $fininfover = str_replace ("Debian", "", $fininfoverinit);

     // Get the Linux kernel version
     $getkernel = exec("uname -r");
     $finkernel = "Kernel: " . $getkernel;

     $inforow = $fininfover . " | " . $finkernel;

     return $inforow;
  }


?>
