@ -32,50 +32,69 @@ if(isset($_POST['submit']))
$sContainer->Reinstall();
$sContainer->Reinstall();
$sContainer->Start();
$sContainer->Start();
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, $locale->strings['error-reinstall-success-title'], $locale->strings['error-reinstall-success-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/success", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-success-title'],
'message' => $locale->strings['error-reinstall-success-text']
));
}
}
else
else
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-confirm-title'], $locale->strings['error-reinstall-confirm-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-confirm-title'],
'message' => $locale->strings['error-reinstall-confirm-text']
));
}
}
}
}
catch (NotFoundException $e)
catch (NotFoundException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-notfound-title'], $locale->strings['error-reinstall-notfound-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-notfound-title'],
'message' => $locale->strings['error-reinstall-notfound-text']
));
}
}
catch (TemplateUnavailableException $e)
catch (TemplateUnavailableException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-unavailable-title'], $locale->strings['error-reinstall-unavailable-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-unavailable-title'],
'message' => $locale->strings['error-reinstall-unavailable-text']
));
}
}
catch (ContainerReinstallException $e)
catch (ContainerReinstallException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-failed-title'], $locale->strings['error-reinstall-failed-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-failed-title'],
'message' => $locale->strings['error-reinstall-failed-text']
));
}
}
catch (ContainerStartException $e)
catch (ContainerStartException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_WARNING, $locale->strings['error-reinstall-start-title'], $locale->strings['error-reinstall-start-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-start-title'],
'message' => $locale->strings['error-reinstall-start-text']
));
}
}
catch (ContainerSuspendedException $e)
catch (ContainerSuspendedException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-suspended-title'], $locale->strings['error-reinstall-suspended-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-suspended-title'],
'message' => $locale->strings['error-reinstall-suspended-text']
));
}
}
catch (ContainerTerminatedException $e)
catch (ContainerTerminatedException $e)
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, $locale->strings['error-reinstall-terminated-title'], $locale->strings['error-reinstall-terminated-text']);
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
$sPageContents .= $err->Render();
'title' => $locale->strings['error-reinstall-terminated-title'],
'message' => $locale->strings['error-reinstall-terminated-text']
));
}
}
}
}
else
else
{
{
$err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "No template selected", "You did not select a template from the list. Please select a template and try again.");
/* TODO: Grab text from locale file. */
$sPageContents .= $err->Render();
$sPageContents .= NewTemplater::Render("{$sTheme}/shared/error/error", $locale->strings, array(
'title' => "No template selected",
'message' => "You did not select a template from the list. Please select a template and try again."
));
}
}
}
}
@ -95,7 +114,7 @@ if($display_form === true)
);
);
}
}
$sPageContents .= Templater::AdvancedParse("vps. reinstall", $locale->strings, array(
$sPageContents .= Templater::AdvancedParse("{$sTheme}/client/vps/ reinstall", $locale->strings, array(
'templates' => $sTemplateList
'templates' => $sTemplateList
));
));
}
}