* Copyright 2015, Derek Macias, Eric Schultz, Jon Panozzo. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. */ ?> <? require_once('/usr/local/emhttp/webGui/include/Helpers.php'); require_once('/usr/local/emhttp/plugins/dynamix.vm.manager/classes/libvirt.php'); require_once('/usr/local/emhttp/plugins/dynamix.vm.manager/classes/libvirt_helpers.php'); $arrValidMachineTypes = getValidMachineTypes(); $arrValidGPUDevices = getValidGPUDevices(); $arrValidAudioDevices = getValidAudioDevices(); $arrValidOtherDevices = getValidOtherDevices(); $arrValidUSBDevices = getValidUSBDevices(); $arrValidDiskDrivers = getValidDiskDrivers(); $arrValidBridges = getNetworkBridges(); $strCPUModel = getHostCPUModel(); $arrOpenELECVersions = [ '5.95.3_1' => [ 'name' => '6.0.0 Beta3', 'url' => 'https://s3.amazonaws.com/dnld.lime-technology.com/images/OpenELEC/OpenELEC-unRAID.x86_64-5.95.3_1.tar.xz', 'size' => 153990180, 'md5' => '8936cda74c28ddcaa165cc49ff2a477a', 'localpath' => '',
function getLatestMachineType($strType = 'i440fx') { $arrMachineTypes = getValidMachineTypes(); foreach ($arrMachineTypes as $key => $value) { if (stripos($key, $strType) !== false) { return $key; } } return array_shift(array_keys($arrMachineTypes)); }