unset($_POST['password_1'], $_POST['password_2']); } } else { // Default values. $_USER->setDefaultValues(); } if (!isset($_GET['sent'])) { print ' Please fill in the Administrator\'s account details and press \'Continue\' to continue the installation.<BR>' . "\n" . ' <BR>' . "\n\n"; } lovd_errorPrint(); // Tooltip JS code. lovd_includeJS('inc-js-tooltip.php'); // Table. print ' <FORM action="install/?step=' . $_GET['step'] . '&sent=true" method="post">' . "\n"; // Array which will make up the form table. $aForm = array_merge($_USER->getForm(), array('skip', array('', '', 'submit', 'Continue »'))); lovd_viewForm($aForm); print '</FORM>' . "\n\n"; $_T->printFooter(); exit; } elseif ($_GET['step'] == 1) { $_GET['step']++; } if ($_GET['step'] == 2 && defined('NOT_INSTALLED')) { // Step 2: Install database tables. if ($_DB->query('SHOW TABLES LIKE "' . TABLE_CONFIG . '"')->fetchColumn() && !$_DB->query('SELECT COUNT(*) FROM ' . TABLE_CONFIG)->fetchColumn()) { // Installed, but not configured yet. header('Location: ' . PROTOCOL . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?step=' . ($_GET['step'] + 1)); exit; } elseif (!isset($_POST['username'])) { // Didn't finish previous step correctly.
$_SESSION['auth']['password'] = $_POST['password']; } $_T->printFooter(); exit; } else { // Because we're sending the data back to the form, I need to unset the password fields! unset($_POST['password'], $_POST['password_1'], $_POST['password_2']); } } $_T->printHeader(); $_T->printTitle(); lovd_errorPrint(); // Table. print ' <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n"; // Array which will make up the form table. $aForm = array_merge($_DATA->getForm(), array(array('', '', 'submit', 'Change password'))); lovd_viewForm($aForm); print '</FORM>' . "\n\n"; $_T->printFooter(); exit; } if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'delete') { // URL: /users/00001?delete // Delete a specific user. $nID = sprintf('%05d', $_PE[1]); define('PAGE_TITLE', 'Delete user account #' . $nID); define('LOG_EVENT', 'UserDelete'); lovd_requireAUTH(LEVEL_MANAGER); require ROOT_PATH . 'class/object_users.php'; $_DATA = new LOVD_User(); $zData = $_DATA->loadEntry($nID);