getThemeName(); $onload_function = ''; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $safemode = '/boot/unraidsafemode'; $progress = (_var($var,'fsProgress')!='') ? "
{$var['fsProgress']}" : "
 "; // Determine the onload function and execute system command switch (_var($_POST,'cmd','shutdown')) { case 'reboot': if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode); $onload_function = 'reboot_now()'; exec('/sbin/reboot -n'); break; case 'shutdown': if (isset($_POST['safemode'])) touch($safemode); else @unlink($safemode); $onload_function = 'shutdown_now()'; exec('/sbin/poweroff -n'); break; } // Determine array status display $array_status = ''; switch (_var($var,'fsState')) { case 'Stopped': $array_status = "" . _('Array Stopped') . "$progress"; break; case 'Starting': $array_status = "" . _('Array Starting') . "$progress"; break; case 'Stopping': $array_status = "" . _('Array Stopping') . "$progress"; break; default: $array_status = "" . _('Array Started') . "$progress"; break; } } else { $onload_function = 'redirectToMainPage()'; } ?> lang="" class="getThemeHtmlClass() ?>"> "> "> ">