Location: PHPKode > projects > ProNuke. Postnuke To Oracle > postnuke/html/install.php
<?php
// File: $Id: install.php,v 1.79 2001/12/08 23:50:20 niceguyeddie Exp $ $Name:  $
// ----------------------------------------------------------------------
// POST-NUKE Content Management System
// Copyright (C) 2001 by the Post-Nuke Development Team.
// http://www.postnuke.com/
// ----------------------------------------------------------------------
// Based on:
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
// This is the last update to this script before the new version is finished.

/**
 * PostNuke Install Script.
 *
 * This script will set the database up, and do the basic configurations of the script.  
 * Once this script has run, please delete this file from your root directory.  
 * There is a security risk if you keep this file around.
 *
 * This module of the PostNuke project was inspired by the myPHPNuke project.
 *
 * The PostNuke project is free software released under the GNU License.  
 * Please read the credits file for more information on who has made this project possible.
 */

define('ADODB_DIR', 'pnadodb');
require_once ("pnadodb/adodb.inc.php");

// Moved OpenDB block to function dbconnect() - fsala

include_once 'pntables.php';
include_once 'install/modify_config.php';

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title>PostNuke Custom Installation</title>
            <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=">
            <META NAME="AUTHOR" CONTENT="PostNuke Crew">
            <META NAME="GENERATOR" CONTENT="PostNuke -- http://www.postnuke.com">
                <style type="text/css">
                    <!--
                    BODY            { BACKGROUND: #F6F7EB; COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif;TEXT-DECORATION: none }
                    
                    A                {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif; TEXT-DECORATION: none}
                    A:link            {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif; TEXT-DECORATION: none}
                    A:active        {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif; TEXT-DECORATION: none}
                    A:visited        {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif; TEXT-DECORATION: none}
                    A:hover            {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif; TEXT-DECORATION: underline}
                    
                    .postpage-title    {COLOR: #000000; FONT-SIZE: 16px; FONT-WEIGHT: bold; FONT-FAMILY: Tahoma, Verdana, sans-serif; LETTER-SPACING: 3px; TEXT-DECORATION: none}
                    .post-title        {COLOR: #000000; FONT-SIZE: 11px; FONT-WEIGHT: bold; FONT-FAMILY: Tahoma, Verdana, sans-serif;TEXT-DECORATION: none}
                    .post-normal    {COLOR: #000000; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif;TEXT-DECORATION: none}
                    .post-failed    {COLOR: #ff0034; FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, sans-serif;TEXT-DECORATION: none}
                    .post-sub        {COLOR: #000000; FONT-SIZE: 9px; FONT-FAMILY: Tahoma, Verdana, sans-serif;TEXT-DECORATION: none}
                    -->
                </style>
    </head>
<body>
<font class="postpage-title">PostNuke Installation</font><br><br>

<?php

/*** Connect to Database ***/
function dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    $dbtype = 'mysql';  // REMOVE THIS ON FINAL RELEASE!!

    $connectString = "$dbtype://$dbuname:$dbpass@$dbhost/$dbname";

    GLOBAL $ADODB_FETCH_MODE;
    $dbconn = &ADONewConnection($dbtype);
    $dbh = $dbconn->Connect($dbhost, $dbuname, $dbpass, $dbname);
    $ADODB_FETCH_MODE = ADODB_FETCH_NUM;

    // if we get an error, log it and die
    if ($dbh === false) {
        error_log ("connect string: $connectString");
        error_log ("error: " . $dbconn->ErrorMsg());
		// show error and die
        PN_DBMsgError($dbconn, __FILE__ , __LINE__, "Error connecting to db");
    } else {
        return $dbconn;
    }
	
};

/*** This function creates the DB on new installs ***/
function make_db($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $dbmake)
{
    global $dbconn;
    echo "<center><br><br>";
    if ($dbmake) {
        mysql_pconnect($dbhost, $dbuname, $dbpass);
        $result = mysql_query("CREATE DATABASE $dbname") or die ("Unable to make database");
        $message = "<br><br><font class=\"post-failed\">$dbname Has Been Created</font>";
        echo "$message";
    } else {
        echo "<font class=\"post-failed\">No DB Made.</font>";
    }
    include("install/newtables.php");
}

/** Error message due a ADODB SQL error and die (copied from mainfile.php because it is not included */
    function PN_DBMsgError($db='',$prg='',$line=0,$message='Error accesing to the database')
    {
        $lcmessage = $message . "<br>" .
                     "Program: " . $prg . " - " . "Line N.: " . $line . "<br>" .
                     "Database: " . $db->database . "<br> ";

        if($db->ErrorNo()<>0) {
            $lcmessage .= "Error (" . $db->ErrorNo() . ") : " . $db->ErrorMsg() . "<br>";
        }
        die($lcmessage);
    }

/*** This function inserts the default data on new installs ***/
function input_data($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $aid, $name, $pwd, $email, $url)
{
    echo "<font class=\"post-title\">Uploaded Data</font><font class=\"post-normal\"> -- Below is your login and password.  Make sure you write it down.  If you lose it, the password cannot be recovered.</font><br><br>
    <font class=\"post-normal\">$aid / $pwd is the supplied login information</font><br><br>";
    echo "<center>";

    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-sub\">Unable to select database</font>");

    // Put basic information in first
    include("install/newdata.php");

    // new installs will use md5 hashing - compatible on windows and *nix variants.
    $pwd = md5($pwd);

    $result = mysql_query("INSERT INTO $prefix"._users." VALUES ( NULL, '$name', '$aid', '$email', '', '$url', 'blank.gif', '', '', '', '', '', '', '', '', '', '', '', '$pwd', 10, '', 0, 0, 0, '', 0, '', '', 4096, 0, 0)") or die ("<b>Unable to update $prefix"._users."</b>");
    echo "<br><font class=\"post-sub\">$prefix"._users." Updated.</font>";

    // We know that the above user is UID 2 and that the admin group is GID 2 from the install/newdata 
    $result = mysql_query("INSERT INTO $prefix"._group_membership." VALUES (2, 2)") or die ("<b>Unable to update $prefix"._group_membership."</b>");
    echo "<br><font class=\"post-sub\">$prefix"._group_membership." Updated.</font>";

}

/*** This function calls the upgrade from mpn 1.8.7 ***/
function do_upgrade187 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/mpn187.php");
    include("install/mpn188.php");
}

/*** This function calls the upgrade from mpn 1.8.8b2 ***/
function do_upgrade188 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/mpn188.php");
}

/*** This function calls the upgrade from PHP-Nuke 4.4 ***/
function do_upgrade4 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn4.php");
}

/*** This function calls the upgrade from PHP-Nuke 5.2 ***/
function do_upgrade52 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/phpnuke52.php");
}

/*** This function calls the upgrade from PHP-Nuke 5.3 ***/
function do_upgrade53 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/phpnuke53.php");
}

/*** This function calls the upgrade from PHP-Nuke 5 / PostNuke .5 ***/
function do_upgrade5 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn5.php");
}

/*** This function calls the upgrade from PostNuke .60 / .61 ***/
function do_upgrade6 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn6.php");
}

/*** This function calls the upgrade from PostNuke .62 ***/
function do_upgrade62 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn62.php");
}

/*** This function calls the upgrade from PostNuke .63 ***/
function do_upgrade63 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn63.php");
}

/*** This function calls the upgrade from PostNuke .64 ***/
function do_upgrade64 ($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include("install/pn64.php");
    update_config_php(true); // Scott - added
}

/* Removed for Release.  Needs to be updated.

function tables_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include 'install/update_functions.php';
    include 'install/tables_update.php';
}

function sequence_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
        mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include 'install/update_functions.php';
    include 'install/sequence_update.php';
}

function language_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype)
{
    global $dbconn;
    mysql_connect($dbhost, $dbuname, $dbpass);
    mysql_select_db("$dbname") or die ("<br><font class=\"post-failed\">Unable to select database.</font>");
    include 'install/update_functions.php';
    include 'install/language_update.php';
}

*/

/*** This function prints the "This is your setting" area ***/
function print_form_text($border=0)
{
    global $dbhost,$dbuname,$dbpass,$dbname,$prefix,$dbtype;
?>
    <table border=<?php echo $border?>>
            <tr><td align="left"><font class="post-normal">DB Host</font></td>
            <td><font class="post-normal"><?php echo $dbhost;?></font></td></tr>
            <tr><td align="left"><font class="post-normal">DB User Name</font></td>
            <td><font class="post-normal"><?php echo $dbuname;?></font></td></tr>
            <tr><td align="left"><font class="post-normal">DB Password</font></td>
            <td><font class="post-normal"><?php echo $dbpass;?></font></td></tr>
            <tr><td align="left"><font class="post-normal">DB Name</font></td>
            <td><font class="post-normal"><?php echo $dbname;?></font></td></tr>
            <tr><td align="left"><font class="post-normal">Table Prefix</font></td>
            <td><font class="post-normal"><?php echo $prefix;?></font></td></tr>
            <tr><td align="left"><font class="post-normal">DB Type</font></td>
            <td><font class="post-normal"><?php echo $dbtype;?></font></td></tr>
    </table>
<?php
};

function print_form_editabletext($border=0)
{
    global $dbhost,$dbuname,$dbpass,$dbname,$prefix,$dbtype;

   if (!isset($dbhost)) {
    include('config.php');
    echo "Reading data from config.php";
   };

?>
    <table border=<?php echo $border?>>
            <tr><td align="left"><font class="post-normal">DB Host</font></td>
            <td><input type="text" NAME="dbhost" SIZE=30 maxlength=80 value="<?php echo $dbhost;?>"></td></tr>
            <tr><td align="left"><font class="post-normal">DB User Name</font></td>
            <td><input type="text" NAME="dbuname" SIZE=30 maxlength=80 value=""></td></tr>
            <tr><td align="left"><font class="post-normal">DB Password</font></td>
            <td><input type="text" NAME="dbpass" SIZE=30 maxlength=80 value=""></td></tr>
            <tr><td align="left"><font class="post-normal">DB Name</font></td>
            <td><input type="text" NAME="dbname" SIZE=30 maxlength=80 value="<?php echo $dbname;?>"></td></tr>
            <tr><td align="left"><font class="post-normal">Table Prefix</font></td>
            <td><input type="text" NAME="prefix" SIZE=30 maxlength=80 value="<?php echo $prefix;?>"></td></tr>
            <tr><td align="left"><font class="post-normal">DB Type</font></td>
            <td><select name="dbtype">
                    <option value="mysql">&nbsp;MySQL&nbsp;</option>
                </select>
            </td></tr>
    </table>
<?php
}

/*** This function prints the <input type=hidden> area ***/
function print_form_hidden()
{
    global $dbhost,$dbuname,$dbpass,$dbname,$prefix,$dbtype;
?>
        <INPUT type="hidden" NAME="dbhost" value="<?php echo $dbhost;?>">
        <INPUT type="hidden" NAME="dbuname" value="<?php echo $dbuname;?>">
        <INPUT type="hidden" NAME="dbpass" value="<?php echo $dbpass;?>">
        <INPUT type="hidden" NAME="dbname" value="<?php echo $dbname;?>">
        <INPUT type="hidden" NAME="prefix" value="<?php echo $prefix;?>">
    <INPUT type="hidden" NAME="dbtype" value="<?php echo $dbtype;?>">
<?php
}


/*** 

*  This starts the switch statement that filters through the form options.

* the @ is in front of $op to suppress error messages if $op is unset and E_ALL

* is on

*/
switch(@$op) {

     case "CHM_check":
    ?>

    <font class="post-title">Preliminary Info</font><font class="post-normal"> -- Please enter your DB info.  If you do not have root access to your DB (virtual hosting, etc), you will need to make your database before your proceed on.  A good rule of thumb, if you cannot create databases through phpMyAdmin because of virtual hosting, or security on mySQL, then this script will not be able to create the db for you.  This script will still be able to fill the database, and will still need to be ran.<br><br>
    <form action="install.php" method="post">
        <center>
    <?php print_form_editabletext(0) ?>
        <INPUT type="submit" name="op" value="Submit">
        </center>
    </form>
    </font>

<?php
    break;

    case "Submit":
?>

    <font class="post-title">DB Info</font><font class="post-normal"> -- Please, look over the information and make sure that it is correct.</font><br><br>
    <center>
    <font class="post-normal">You have entered the following information:</font><br>

<?php print_form_text() ?>

    </font>
    <form action="install.php" method="post">
        <INPUT type="submit" name="op" value="Change Info"><br>

    <font class="post-normal">Select <b>New Install</b> or <b>Upgrade</b> to continue.</font><br><br>
        <table width="50%">
            <tr align="center">
            <td>
            <?php print_form_hidden() ?>

                <INPUT type="submit" name="op" value="New Install">
            </td>
            <td>
                <INPUT type="submit" name="op" value="Upgrade">
            </td>
            </tr>
        </table>
        </form>
    </center>
        
<?php
    break;

    case "Change Info":
    ?>

    <font class="post-title">Change Info</font><font class="post-normal"> -- Please correct your DB info.<br><br>
    <form action="install.php" method="post">
        <center>
    <?php print_form_editabletext(0)?>
        <INPUT type="submit" name="op" value="Submit">
        </center>
    </form>
    </font>

<?php
    break;

    case "New Install":
    ?>

    <font class="post-title">New Install</font><font class="post-normal"> -- You have choosen to do a new install.  Below is the information that you have entered.</font><br><br>
    <center>
    <?php print_form_text(0) ?>
    <br><br>
    <font class="post-normal">
    If you have root access, check the Make DB box, to create the DB - Other wise, just click on start.<br>
    If you do not have root access you need to create the db manually and this script will then add the tables for you.
    <form action="install.php" method="post">
        <table width="50%">
            <tr>
            <td align=center>
                Make the DB<br>
                <input type=checkbox name="dbmake"><br>
            </td>
            <td>
            <?php print_form_hidden() ?>
                <INPUT type="submit" name="op" value="Start">
            </td>
            </tr>
        </table>
    </form>
    </font>
    </center>

<?php
    break;
    
    case "Start":
    make_db($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $dbmake);
    ?>

     <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
            <tr>
            <td align=center>
<?php print_form_hidden() ?>
                <INPUT type="submit" name="op" value="Continue">
            </td>
            </tr>
        </table>
        </center>
    </form>

<?php
    break;

    case "Continue":
?>
    
    <font class="post-title">Setting Your DB Preferences</font>
    <font class="post-normal"> -- We will now set up some of the data that is stored in the database.  You can do this now or wait untill later.  If you pass on this set up, your login for the admin will be God / Password (case sensitive).  I would advise you to set it up now, and not wait untill later.</font><br><br>
    <center>
    <form action="install.php" method="post">
        <table width="50%" border=1>
            <tr><td align="left"><font class="post-normal">Admin Login</font></td>
            <td><input type="text" NAME="aid" SIZE=30 maxlength=80 value="God"></td></tr>
            <tr><td align="left"><font class="post-normal">Your Name</font></td>
            <td><input type="text" NAME="name" SIZE=30 maxlength=80 value="God"></td></tr>
            <tr><td align="left"><font class="post-normal">Admin Password</font></td>
            <td><input type="text" NAME="pwd" SIZE=30 maxlength=80 value="Password"></td></tr>
            <tr><td align="left"><font class="post-normal">Your Email</font></td>
            <td><input type="text" NAME="email" SIZE=30 maxlength=80 value="hide@address.com"></td></tr>
            <tr><td align="left"><font class="post-normal">Your Url</font></td>
            <td>
                <input type="text" NAME="url" SIZE=30 maxlength=80 value="http://www.postnuke.com"></td></tr>
<?php   print_form_hidden() ?>
            </td>
            </tr>
        </table>
        <br><br>
        <INPUT type="submit" name="op" value="Set Login">
    </form>
    </font>
    </center>
    
<?php
    break;

    Case "Set Login":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    input_data($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype, $aid, $name, $pwd, $email, $url);
    update_config_php(true); // Scott - added
?>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
            <td align=center>
                <INPUT type="submit" name="op" value="Finish">
            </td>
            </tr>
        </table>
        </center>
    </form>

<?php
    break;

    Case "Finish":
?>

    <font class="post-title">The Credits</font>
    <font class="post-normal"> -- These are the scripts and people that make Post - Nuke go.  Take some time and let these people know how much you appreciate their work.  If you would like to be listed here, contact us about being a part of the developement team.  We are always looking for some help.<br><br>
    <form action="install.php" method="post">
         <center>
        <textarea name="license" cols=50 rows=8><?php include("docs/CREDITS.txt"); ?></textarea><br><br>
        You are now done with the PostNuke installation.  If you run into any problems, let us know.  Make sure that you delete this script.  You will not need it again.
        </center>
    </form>
    </font>
    <br><br>
    <center>
        <B><A HREF="index.php">Go to your PostNuke site</A></B>
    </center>
    <br><br>

<?php
    break;

    Case "Upgrade":
?>
    <font class="post-title">Upgrades</font>
    <font class="post-normal"> -- Here is where you can select which CMS your are upgrading from.<br><br>
    <center>
    Select <b>PHP-Nuke</b> to upgrade an existing PHP-Nuke install.<br>
    Select <b>PostNuke</b> to upgrade an existing PostNuke install.<br>
    Select <b>MyPHPNuke</b> to upgrade an exisitng MyPHPNuke install.<br><br>
    <form action="install.php" method="post">
        <table width="50%">
            <tr align="center">
            <td>
        <?php print_form_hidden() ?>
                <INPUT type="submit" name="op" value="PHP-Nuke">
            </td>
            <td>
                <INPUT type="submit" name="op" value="Post-Nuke">
            </td>
            <td>
                <INPUT type="submit" name="op" value="MyPHPNuke"?
            </td>
            </tr>
        </table>
        </form>
    </center>
    </font>
    
<?php
    break;

    Case "PHP-Nuke":
?>

    <font class="post-title">Upgrading from PHP-Nuke 4.4?</font>
    <font class="post-normal">Please read the following note, and press the <b>Upgrade 4</b> button when ready.<br><br>
    This script will leave intact your forums DB but this version will not manage the data. <i>There is an upgrade script for this forum data that is being tested.  It is currently held in the pn-modules CVS</i><br><br>

    We do not have PHPBB included into the release, but the upgrade script is the same.  It will not destroy any of your data.<br><br>

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 4">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Upgrading from PHP-Nuke 5?</font> 
    <font class="post-normal">Just press the <b>Upgrade 5</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 5">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Upgrading from PHP-Nuke 5.2?</font> 
    <font class="post-normal">Just press the <b>Upgrade 52</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 52">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Upgrading from PHP-Nuke 5.3?</font> 
    <font class="post-normal">Just press the <b>Upgrade 53</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 53">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>
    
<?php
    break;

    Case "Post-Nuke":
?>

    <font class="post-title">Upgrading from PostNuke .5x?</font> 
    <font class="post-normal">Just press the <b>Upgrade 5</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 5">
        </td>
        </tr>
        </table>
        </center>
        </form>
        
    </font>

    <font class="post-title">Upgrading from PostNuke .6 / .61?</font> 
    <font class="post-normal">Just press the <b>Upgrade 6</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="submit" name="op" value="Upgrade 6">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>
        
    <font class="post-title">Upgrading from PostNuke .62?</font> 
    <font class="post-normal">Just press the <b>Upgrade 62</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden(); ?>
        <INPUT type="submit" name="op" value="Upgrade 62">
        </td>
        </tr>
        </table>
        </center>
        </form>
        
    </font>
    
    <font class="post-title">Upgrading from PostNuke .63?</font> 
    <font class="post-normal">Just press the <b>Upgrade 63</b> button<br>
    

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden(); ?>
        <INPUT type="submit" name="op" value="Upgrade 63">
        </td>
        </tr>
        </table>
        </center>
        </form>

    </font>
    <font class="post-title">Upgrading from PostNuke .64?</font> 
    <font class="post-normal">Just press the <b>Upgrade 64</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden(); ?>
        <INPUT type="submit" name="op" value="Upgrade 64">
        </td>
        </tr>
        </table>
        </center>
        </form>
<!-- Removed for release.  Needs to be updated. 
    <br><br>
    <font class="post-title">Validate Tables</font>
     <font class="post-normal">This script will double check the table structure of your PostNuke Database.  Just run all portions of the script to ensure that your DB is installed correctly.  This is mainly used to keep CVS installs up to date.  <b>WARNING</b> -- This is experimental in nature, and should only be used in either debugging situations or for developers working on CVS.</font><br><br>
    
    <font class="post-title">Validate your language system?</font> 
    <font class="post-normal">Just press the <b>Validate</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden(); ?>
    <INPUT type="hidden" name="op" value="Validate Language">
        <INPUT type="submit" value="Validate">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Validate your table structure?</font> 
    <font class="post-normal">Just press the <b>Validate</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="hidden" name="op" value="Validate Tables">
        <INPUT type="submit" value="Validate">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Validate your Sequence Tables?</font> 
    <font class="post-normal">Just press the <b>Validate</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
    <?php print_form_hidden() ?>
        <INPUT type="hidden" NAME="op" value="Validate Sequence Tables">
        <INPUT type="submit" value="Validate">
        </td>
        </tr>
        </table>
        </center>
        </form>
-->        
    </font>

<?php
    break;

    Case "MyPHPNuke":
?>

    <font class="post-title">Upgrading from MyPHPNuke 1.8.7?</font> 
    <font class="post-normal">Just press the <b>Upgrade 187</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
        <INPUT type="hidden" NAME="dbhost" value="<?php echo $dbhost;?>">
        <INPUT type="hidden" NAME="dbuname" value="<?php echo $dbuname;?>">
        <INPUT type="hidden" NAME="dbpass" value="<?php echo $dbpass;?>">
        <INPUT type="hidden" NAME="dbname" value="<?php echo $dbname;?>">
        <INPUT type="hidden" NAME="prefix" value="<?php echo $prefix;?>">
        <INPUT type="submit" name="op" value="Upgrade 187">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>

    <font class="post-title">Upgrading from MyPHPNuke 1.8.8b2?</font> 
    <font class="post-normal">Just press the <b>Upgrade 188</b> button

        <form action="install.php" method="post">
        <center>
        <table width="50%" align=center>
        <tr>
        <td align=center>
        <INPUT type="hidden" NAME="dbhost" value="<?php echo $dbhost;?>">
        <INPUT type="hidden" NAME="dbuname" value="<?php echo $dbuname;?>">
        <INPUT type="hidden" NAME="dbpass" value="<?php echo $dbpass;?>">
        <INPUT type="hidden" NAME="dbname" value="<?php echo $dbname;?>">
        <INPUT type="hidden" NAME="prefix" value="<?php echo $prefix;?>">
        <INPUT type="submit" name="op" value="Upgrade 188">
        </td>
        </tr>
        </table>
        </center>
        </form>
    
    </font>
    
<?php
    break;
/* Removed for release.  Needs to be updated 

    Case "Validate Language":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    language_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    break;

    Case "Validate Tables":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    tables_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    break;

    Case "Validate Sequence Tables":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    sequence_update($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    break;

*/

    Case "Upgrade 187":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade187($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>

<?php

    Case "Upgrade 188":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade188($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>


<?php


    Case "Upgrade 4":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade4($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade5($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade6($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    Your forum tables are untouched.<br><br>
    FYI, Those tables are:<br><br>
    <ul>
    <strong><big>·</big></strong>access<br>
    <strong><big>·</big></strong>catagories<br>
    <strong><big>·</big></strong>config<br>
    <strong><big>·</big></strong>forums<br>
    <strong><big>·</big></strong>forumstopics<br>
    <strong><big>·</big></strong>posts<br>
    <strong><big>·</big></strong>ranks<br>
    <strong><big>·</big></strong>user_status
    </ul>
    So, you can delete those tables if you don't want to use forums.<br>
    phpBB should be available as a module from http://mods.postnuke.com<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>
    
<?php
    break;

    Case "Upgrade 5":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade5($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade6($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>

<?php
    break;

    Case "Upgrade 52":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade52($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade5($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade6($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>    

<?php
    break;

    Case "Upgrade 53":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade53($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade52($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade5($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade6($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>    

<?php
    break;

    Case "Upgrade 6":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade6($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>
    
<?php
    break;

    Case "Upgrade 62":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade62($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>
    
<?php
    break;

    Case "Upgrade 63":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade63($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>
    
<?php
    break;

    Case "Upgrade 64":
    $dbconn = dbconnect($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    do_upgrade64($dbhost, $dbuname, $dbpass, $dbname, $prefix, $dbtype);
    
?>

    <font class="post-title">Finished</font>
    <font class="post-normal"> -- Your upgrade to the latest version of PostNuke is finished.<br>
    Remember to change your config.php settings before using for the first time.<br><br>
    <form action="install.php" method="post">
        <center>
        <table width="50%">
            <tr>
                <td align=center><INPUT type="submit" name="op" value="Finish"></td>
            </tr>
        </table>
        </center>
    </form>
    </font>
    <br><br>
<?php    
    break;

    default:
?>
    <font class="post-normal">This script will install the PostNuke database and help you set up the variables that you need to start.  You will be taken through a variety of pages.  Each page sets a different portion of the script.  We estimate that this entire process will take about ten minutes.  At any time that you get stuck, please visit our support forums for help.</font><br><br>
    <font class="post-title">Our License</font>
    <font class="post-normal"> -- Please read through the GNU General Public License.  PostNuke is developed as free software, but there are certain requirements for distributing and editing.<br><br>
    <form action="install.php" method="post">
         <center>
           <textarea name="license" cols=50 rows=8><?php include("docs/COPYING.txt"); ?></textarea><br><br>
           <INPUT type="submit" name="op" value="Next">
           </center>
    </form>
    </font>
    <br><br>

<?php
    break;

    case "Next":

    $file='config.php';

    $mode = fileperms($file);
    $mode &= 0x1ff; # Remove the bits we don't need

    $chmod = sprintf("%o", $mode);

    echo "<font class=\"post-title\">CHMOD Check</font><BR><BR>";

    echo "<font class=\"post-normal\">We will first check to see that your CHMOD settings are correct in order for the script to write to the file.  If your settings are not correct, this script will not be able to encrypt your data in your config file.  Encrypting the SQL data is added security, and is set by this script.  You will also not be able to update your preferences from your admin once your site is up and running.</font>"; 

    if ($chmod == '666'){
      echo "<P><font class=\"post-title\">CHMOD setting for config.php is 666 -- correct, this script can write to the file</font><BR>";
    } else {
            echo "<font class=\"post-title\">Please set your CHMOD on config.php to 666 so this script can write and encrypt the DB data</font><BR>";
    }

$file='config-old.php';

    $mode = fileperms($file);
    $mode &= 0x1ff; # Remove the bits we don't need

    $chmod = sprintf("%o", $mode);

    if ($chmod == '666'){
      echo "<P><font class=\"post-title\">CHMOD setting for config-old.php is 666 -- correct, this script can write to the file</font></P>"
              ."<P><form action=\"install.php\" method=\"post\">"
                ."<center>";
                    echo "<INPUT type=\"hidden\" name=\"op\" value=\"CHM_check\">"    
                    ."<INPUT type=\"submit\" value=\"Continue\">"
                ."</center>"
            ."</form></P>";
    } else {
            echo "<font class=\"post-title\">Please set your CHMOD on config-old.php to 666 so this script can write and encrypt the DB data</font>"
                ."<P><form action=\"install.php\" method=\"post\">"
                ."<center>";
                    echo "<INPUT type=\"hidden\" name=\"op\" value=\"Next\">"    
                    ."<INPUT type=\"submit\" value=\"ReCheck\">"
                ."</center>"
            ."</form></P>";
    }
        break;
}
?>

    <center><font class="post-sub">Thank you for trying PostNuke and welcome to our community.</font></center>
</body>
</html>
Return current item: ProNuke. Postnuke To Oracle