echo "\n\n\t\t" . '<p>' . sprintf(plog_tr('Before you can proceed, please %s to download configuration file for your gallery, then upload it to your webhost (into the same directory where you installed Plogger itself).'), '<input type="submit" class="submit-inline" name="dlconfig" value="' . plog_tr('click here') . '" />') . '</p>'; } echo "\n\n\t\t" . '<p><input type="submit" class="submit" name="proceed" id="proceed" value="' . plog_tr('Install') . '" /></p>'; echo "\n\n\t" . '</form>' . "\n"; // Otherwise, do the install } else { $errors = array(); $mysql = check_mysql(PLOGGER_DB_HOST, PLOGGER_DB_USER, PLOGGER_DB_PW, PLOGGER_DB_NAME); if (empty($mysql)) { create_tables(); configure_plogger($_SESSION['install_values']); // undefined index install_values include_once PLOGGER_DIR . 'plog-load-config.php'; // If open permissions, have Plogger fix them if (isset($_SESSION['plogger_close_perms'])) { fix_open_perms($_SESSION['plogger_close_perms'], 'delete'); } $col = add_collection(plog_tr('Plogger Test Collection'), plog_tr('Feel free to delete it')); // Only attempt to create an album if the collection was created - sloppy fix for multiple installs if (!empty($col['id'])) { $alb = add_album(plog_tr('Plogger Test Album'), plog_tr('Feel free to delete it'), $col['id']); } } else { echo plog_tr('There was an error with the MySQL connection') . '!'; } // If no errors, tell the user their login and password and link them to the login if (empty($errors)) { echo "\n\t" . '<h1>' . plog_tr('Plogger Install Complete') . '</h1>'; echo "\n\n\t" . '<p class="info width-700">' . plog_tr('You have successfully installed Plogger!') . '<br /><br />'; echo "\n\t" . sprintf(plog_tr('Your username is %s and your password is %s'), '<strong>' . $_SESSION['install_values']['admin_username'] . '</strong>', '<strong>' . $_SESSION['install_values']['admin_password'] . '</strong>'); echo '</p>';
} echo "\n\t\t" . '</ul>'; echo "\n\n\t" . '<h2 class="upgrade">' . plog_tr('Done with database upgrade!') . '</h2>'; echo "\n\n\t" . '<form action="_upgrade.php?step=2" method="post">'; echo "\n\t" . '<p><input class="submit" type="submit" name="next" value="' . plog_tr('Next Step') . ' »" /></p>'; echo "\n\t" . '</form>' . "\n"; break; } // Step 2 - move images, albums, collections, and uploads to new locations // Step 2 - move images, albums, collections, and uploads to new locations case 2: // Load the config file include_once PLOGGER_DIR . 'plog-load-config.php'; // Check if we need to rename the directories due to permissions to force the re-creation of images/ and thumbs/ if (isset($_SESSION['plogger_close_perms'])) { fix_open_perms($_SESSION['plogger_close_perms']); } $upgrade_images = upgrade_image_list(); if ($upgrade_images['total'] > 0 || isset($_POST['upgrade-images'])) { $selects = array('5' => 5, '10' => 10, '25' => 25, '50' => 50, '75' => 75, '100' => 100, '150' => 150, '200' => 200, '250' => 250, '0' => plog_tr('All at once')); echo "\n\n\t" . '<h2 class="upgrade">' . plog_tr('Updating Images') . '</h2>'; if (!isset($_POST['upgrade-images'])) { echo "\n\n\t" . '<p class="actions">' . sprintf(plog_tr('Plogger needs to restructure %s items'), '<strong>' . $upgrade_images['total'] . '</strong>') . '</p>'; echo "\n\n\t" . '<form action="_upgrade.php?step=2" method="post">'; echo "\n\n\t<p>" . plog_tr('Number of images to update per cycle') . ': '; echo "\n\t\t" . '<select name="num-images">'; foreach ($selects as $key => $value) { $selected = $key == 0 ? ' selected="selected"' : ''; echo "\n\t\t\t" . '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } echo "\n\t\t" . '</select>';