} else { if (is_file(dirname(__FILE__) . '/plog-config-sample.php')) { require_once dirname(__FILE__) . '/plog-config-sample.php'; } else { die(plog_tr('Could not find a config file!')); } } require_once dirname(__FILE__) . '/plog-globals.php'; require_once PLOGGER_DIR . 'plog-includes/plog-functions.php'; if (defined('PLOGGER_DEBUG') && PLOGGER_DEBUG == '1') { $GLOBALS['query_count'] = 0; $GLOBALS['queries'] = array(); $plog_start_time = plog_timer(); } // Check if Plogger is installed first if (!is_plogger_installed()) { if (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], 'plog-admin')) { $install_url = '_install.php'; $upgrade_url = '_upgrade.php'; $img = '<img src="images/plogger.gif" alt="Plogger" />'; } else { $install_url = 'plog-admin/_install.php'; $upgrade_url = 'plog-admin/_upgrade.php'; $img = '<img src="plog-admin/images/plogger.gif" alt="Plogger" />'; } die($img . "\n" . '<p style="font-family: tahoma, verdana, arial, sans-serif; font-size: 16px; letter-spacing: .25px; margin: 30px;">' . plog_tr('Please run <a href="' . $install_url . '">_install.php</a> to set up Plogger. If you are upgrading from a previous version, please run <a href="' . $upgrade_url . '">_upgrade.php</a>') . '.</p>'); } connect_db(); $query = "SELECT * FROM \"" . PLOGGER_TABLE_PREFIX . "config\""; $result = run_query($query); if ($result->rowCount() == 0) {
<head> <title>Plogger <?php echo plog_tr('Gallery | Install'); ?> </title> <meta http-equiv="Content-Type" content="txt/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="css/admin.css" /> </head> <body> <div><img src="images/plogger.gif" alt="Plogger" /></div> <?php // Check if Plogger is already installed $installed = is_plogger_installed(); // If not installed, do the installation if (!$installed) { // If not told to proceed, do the configuration setup if (empty($_POST['proceed'])) { $configured = do_install($_POST); } // If setup configuration done, do the install if (isset($_POST['proceed']) || $configured) { // If not DB information not defined, prompt the user to download the plog-config.php file if (!defined('PLOGGER_DB_HOST')) { echo "\n\t" . '<h1>' . plog_tr('Plogger Configuration Complete') . '</h1>'; echo "\n\n\t" . '<form action="_install.php" method="post">'; echo "\n\n\t\t" . '<p>' . plog_tr('Configuration setup is now complete.') . '</p>'; echo "\n\n\t\t" . '<p>' . plog_tr('Click <strong>Install</strong> to complete the installation.') . '</p>'; if (!empty($_SESSION['plogger_config'])) {