1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
<?php
function showNotice($message, $url, $buttonText, $buttonIcon, $update = false)
{
global $gL10n;
$onClickText = '';
$form = new HtmlFormInstallation('installation-form', $url);
if($update)
{
$form->setUpdateModus();
}
if($buttonText === $gL10n->get('INS_UPDATE_DATABASE'))
{
$onClickText = $gL10n->get('INS_DATABASE_IS_UPDATED');
}
$form->setFormDescription($message);
$form->addSubmitButton('next_page', $buttonText, array('icon' => $buttonIcon, 'onClickText' => $onClickText));
echo $form->show();
exit();
}
function checkDatabaseVersion(&$db)
{
global $gL10n;
$message = '';
if(version_compare($db->getVersion(), $db->getMinimumRequiredVersion()) === -1)
{
$message = $gL10n->get('SYS_DATABASE_VERSION').': <strong>'.$db->getVersion().'</strong><br /><br />'.
$gL10n->get('INS_WRONG_MYSQL_VERSION', ADMIDIO_VERSION_TEXT, $db->getMinimumRequiredVersion(),
'<a href="http://www.admidio.org/index.php?page=download">', '</a>');
}
return $message;
}
function checkPhpVersion()
{
global $gL10n;
$message = '';
if(version_compare(phpversion(), MIN_PHP_VERSION) === -1)
{
$message = $gL10n->get('SYS_PHP_VERSION').': <strong>'.phpversion().'</strong><br /><br />'.
$gL10n->get('INS_WRONG_PHP_VERSION', ADMIDIO_VERSION_TEXT, MIN_PHP_VERSION,
'<a href="http://www.admidio.org/index.php?page=download">', '</a>');
}
return $message;
}