#!/usr/bin/php -q
$docroot ??= ($_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp');
require_once "$docroot/webGui/include/Helpers.php";
extract(parse_plugin_cfg('dynamix',true));
// add translations
$_SERVER['REQUEST_URI'] = 'dashboard';
$login_locale = _var($display,'locale');
require_once "$docroot/webGui/include/Translations.php";
$boot = "/boot/config/plugins/dynamix";
$file = $argv[1];
$cmodel = is_file("$boot/$file") ? file_get_contents("$boot/$file") : '';
?>
$cases = file("$docroot/webGui/styles/default-cases.css",FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
foreach ($cases as $case) if (substr($case,0,6)=='.case-') $models[] = substr($case,1,strpos($case,':')-1);
natsort($models);
for ($i=0; $i < count($models); $i++) {
$model = $models[$i];
$name = substr($model,5);
$title = str_replace('3u-avs-10-4','3u-avs-10/4',$name);
$select = $name==$cmodel ? 'color:#e68a00' : '';
echo "
\n";
}
$select = $cmodel=='case-model.png' ? 'color:#e68a00' : '';
?>