Ejemplo n.º 1
0
$upload_path = $main_path . $uploaded_path;
include $include_path . 'errors.inc.php';
//error handler functions
include $include_path . 'dates.inc.php';
// classes
include $include_path . 'class_db_handle.php';
include $include_path . 'functions_global.php';
include $include_path . 'class_email_handler.php';
include $include_path . 'class_MPTTcategories.php';
include $include_path . 'class_fees.php';
include $include_path . 'class_user.php';
include $include_path . 'template.php';
// connect to the database
$db = new db_handle();
if (isset($CHARSET)) {
    $db->connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix, $CHARSET);
} else {
    $db->connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix);
}
$system = new global_class();
$template = new template();
$user = new user();
set_error_handler('WeBidErrorHandler', $error_reporting);
include $include_path . 'messages.inc.php';
// add auction types
$system->SETTINGS['auction_types'] = array(1 => $MSG['1021'], 2 => $MSG['1020']);
// Atuomatically login user is necessary "Remember me" option
if (!$user->logged_in && isset($_COOKIE['WEBID_RM_ID'])) {
    $query = "SELECT userid FROM " . $DBPrefix . "rememberme WHERE hashkey = :RM_ID";
    $params = array();
    $params[] = array(':RM_ID', alphanumeric($_COOKIE['WEBID_RM_ID']), 'str');
Ejemplo n.º 2
0
        echo print_header(true);
        echo show_config_table(false);
    } else {
        $check = check_installation();
        $thisversion = this_version();
        $myversion = check_version();
        echo print_header(true);
        if (!$check) {
            echo '<p>It seems you don\'t currently have a version of WeBid installed we recommend you do a <b><a href="install.php">fresh install</a></b></p>';
        } else {
            echo '<p>Now to <b><a href="?step=2">step 1</a></b></p>';
        }
    }
}
if ($step == 1) {
    $db->connect($_POST['DBHost'], $_POST['DBUser'], $_POST['DBPass'], $_POST['DBName'], $_POST['DBPrefix']);
    $toecho = '<p><b>Step 1:</b> Writing the config file...</p>';
    $toecho .= '<p>As you are missing your old random security code all your users will have to reset their passwords after this update</p>';
    $path = !get_magic_quotes_gpc() ? str_replace('\\', '\\\\', $_POST['mainpath']) : $_POST['mainpath'];
    // generate config file
    $content = '<?php' . "\n";
    $content .= '$DbHost	 = "' . $_POST['DBHost'] . '";' . "\n";
    $content .= '$DbDatabase = "' . $_POST['DBName'] . '";' . "\n";
    $content .= '$DbUser	 = "******";' . "\n";
    $content .= '$DbPassword = "******";' . "\n";
    $content .= '$DBPrefix	= "' . $_POST['DBPrefix'] . '";' . "\n";
    $content .= '$main_path	= "' . $path . '";' . "\n";
    $content .= '$MD5_PREFIX = "' . md5(microtime() . rand(0, 50)) . '";' . "\n";
    $content .= '?>';
    $output = makeconfigfile($content, $path);
    if ($output) {
Ejemplo n.º 3
0
include 'functions.php';
include '../includes/class_db_handle.php';
define('InInstaller', 1);
$db = new db_handle();
$main_path = getmainpath();
$thisversion = this_version();
echo print_header(false);
$step = isset($_GET['step']) ? $_GET['step'] : 0;
switch ($step) {
    case 2:
        $siteURL = urldecode($_GET['URL']);
        $siteEmail = $_GET['EMail'];
        include '../includes/config.inc.php';
        include 'sql/dump.inc.php';
        $queries = count($query);
        $db->connect($DbHost, $DbUser, $DbPassword, $DbDatabase, $DBPrefix);
        echo $_GET['n'] * 25 . '% Complete<br>';
        $from = isset($_GET['from']) ? $_GET['from'] : 0;
        $fourth = floor($queries / 4);
        $to = $_GET['n'] == 4 ? $queries : $fourth * $_GET['n'];
        for ($i = $from; $i < $to; $i++) {
            $db->direct_query($query[$i]);
        }
        flush();
        if ($i < $queries) {
            echo '<script type="text/javascript">window.location = "install.php?step=2&URL=' . urlencode($_GET['URL']) . '&EMail=' . $_GET['EMail'] . '&cats=' . $_GET['cats'] . '&n=' . ($_GET['n'] + 1) . '&from=' . $i . '";</script>';
        } else {
            echo '<p>Installation complete.</p>
				<p>What do I do now?</p>
				<ul>
					<li>Your WeBid password salt: <span style="color: #FF0000; font-weight:bold;">' . $_SESSION['hash'] . '</span> You should make note of this random code, it is used to secure your users passwords. It is stored in your config file if you accidently delete this file and don\'t have this code all your users will have to reset their passwords</li>