Location: PHPKode > projects > Php4dvd - movie database > php4dvd/install/files/cleanup.php

    This file is part of php4dvd.

    php4dvd is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    php4dvd is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with php4dvd. If not, see <http://www.gnu.org/licenses/>.

    This page of the installer will display several fields to fill in information
    about your database. Fill them in and click submit and it will create the
    settings.php file in the above directory.

//Rename the index and finish so that when browsing to install/ they get a nice
//install completed page.
function rename_index () {
        rename("index.php", "index.php.BAK");
        rename("finish.php", "index.php");

//This just copies the new version file to the current version file so they are the same.
function create_version () {
    $filename = '../config/version.default.inc.php';
    $setFile = '../config/version.inc.php';

    // If the default config does not exist, stop installation
    if(!file_exists($filename)) {
        echo "Installation cannot continue, because the file <tt>".$filename."</tt> was not found.";

    @copy($filename, $setFile) or die(
        "Cannot read version file. Copy <tt>'.$filename.'</tt> to <tt>'.$setFile.'</tt>");

//Lets the user know that they are finished the install and how to log into thier new system.
function display_finish() {
       echo "<h4>Thanks again for installing php4dvd!</h4>
             <p>After you remove or rename the install directory you can sign in.
                 Your username is <b>'admin'</b> and your password is <b>'admin'</b>.</p>
             <p><a href='../'>Click here to finish.</a></p> ";

Return current item: Php4dvd - movie database