Exemple #1
0
            }
            $q = $_DB->query($sSQL, $aSQL, true, true);
            // Write to log...
            lovd_writeLog('Event', LOG_EVENT, 'Edited system configuration');
            // Thank the user...
            header('Refresh: 3; url=' . lovd_getInstallURL() . 'setup');
            $_T->printHeader();
            $_T->printTitle();
            lovd_showInfoTable('Successfully edited the system settings!', 'success');
            $_T->printFooter();
            exit;
        }
    } else {
        // Load current values.
        $_POST = array_merge($_POST, $zData);
    }
    $_T->printHeader();
    $_T->printTitle();
    lovd_errorPrint();
    // Tooltip JS code.
    lovd_includeJS('inc-js-tooltip.php');
    // Allow checking the database URL.
    lovd_includeJS('inc-js-submit-settings.php');
    print '      <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post" onsubmit="return lovd_checkForm();">' . "\n";
    // Array which will make up the form table.
    $aForm = array_merge($_DATA->getForm(), array('skip', array('', '', 'submit', PAGE_TITLE)));
    lovd_viewForm($aForm);
    print '</FORM>' . "\n\n";
    $_T->printFooter();
    exit;
}
Exemple #2
0
    } else {
        // Default values.
        $_SYSSETTING->setDefaultValues();
    }
    if (!isset($_GET['sent'])) {
        print '      Please complete the form below and press \'Continue\' to continue the installation. We\'re almost done!<BR>' . "\n" . '      <BR>' . "\n\n";
    }
    lovd_errorPrint();
    // Tooltip JS code.
    lovd_includeJS('inc-js-tooltip.php');
    // Allow checking the database URL.
    lovd_includeJS('inc-js-submit-settings.php');
    // Table.
    print '      <FORM action="install/?step=' . $_GET['step'] . '&amp;sent=true" method="post">' . "\n";
    // Array which will make up the form table.
    $aForm = array_merge($_SYSSETTING->getForm(), array('skip', array('', '', 'submit', 'Continue &raquo;')));
    lovd_viewForm($aForm);
    print '</FORM>' . "\n\n";
    $_T->printFooter();
    exit;
} elseif ($_GET['step'] == 3) {
    $_GET['step']++;
}
if ($_GET['step'] == 4) {
    // Step 5: Done.
    if (!($_DB->query('SHOW TABLES LIKE "' . TABLE_CONFIG . '"')->fetchColumn() && $_DB->query('SELECT COUNT(*) FROM ' . TABLE_CONFIG)->fetchColumn())) {
        // Didn't finish previous step correctly.
        //header('Location: ' . PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?step=' . ($_GET['step'] - 2));
        header('Location: ' . PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?step=' . ($_GET['step'] - 1));
        exit;
    }