Exemple #1
0
 ******************************************************************************/
include_once 'utils.php';
/**
 * Clean all the current data. 
 * 
 * @author Richard Friedman
 */
writeDatabaseInformation();
writeLine("<b>Cleaning up all the data.</b>");
$database = RingsideApiDbDatabase::getDatabaseConnection();
if ($database === false) {
    writeLine("No such database is currently available");
    RingsideApiDbDatabase::closeConnection($database);
} else {
    $schema = readSqlFile('RingsideDbCleanData.sql');
    if ($schema === false) {
        writeError(' The SQL could not be loade from the application ');
        exit;
    }
    $result = RingsideApiDbDatabase::queryMultiLine($schema, $database);
    if ($result === false) {
        writeError('The database was not cleaned properly, check the error log.');
    } else {
        writeLine("Database " . RingsideApiConfig::$db_name . " cleaned successfully ");
    }
}
writeLine();
writeLine("<b>Other options</b>");
writeLink("index.php", "Main Page");
writeLink("clean.php", "Clean Database");
Exemple #2
0
writeLine("<h1>Step 5: Setting up initial data.</h1>");
$adminPassword = createRandomPassword();
$result = loadBasicData('ringside', $adminPassword, $database);
if ($result == true) {
    writeLine(" Basic setup information and some sample data was written to the database.");
    //   writeLine( " Admin user name is <b>admin</b> and password is <b>$adminPassword</b>" );
    writeLine(" The following example users were created as well, all with password <b>ringside</b>");
    echo "<table cellpadding='4' width='80%'> ";
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 1);
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 2);
    writeRow('*****@*****.**', '*****@*****.**', '*****@*****.**', 3);
    echo "</table>";
} else {
    writeError(" While everything seems to be setup we could not add the data to the database. <br />" . "<b>Maybe do some clean up of an old install/version first?</b>");
    writeLink("drop.php", "Drop Schema, Start Again");
    return;
}
$href = "";
if (isset($_SERVER['PATH_INFO'])) {
    $href = "../" . $href;
}
echo "<hr />";
$successMessage = "You are configured <br />";
$successMessage .= "Login as administrator: <b>username</b> : admin <b>password</b>: {$adminPassword} <br />";
$successMessage .= "OR<br />";
$successMessage .= "Login with user <b>username</b> : joe@goringside.net <b>password</b>: ringside <br />";
$successMessage .= '<a href="' . $href . 'login.php">Go to Login Page </a> ';
$successMessage .= ' or <a href="' . $href . 'register.php">Register a new user!</a>';
writeSuccess($successMessage);
writeLink("drop.php", "Or Start again and Drop Schema");
Exemple #3
0
<div class="adminMenu">

<?php 
/**************************************************************************************************
 * nullBB - Light CMS forum                                                                       *
 * Copyright (C) 2009, BlackLight                                                                 *
 *                                                                                                *
 * This program 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. 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. You should have received a copy of the GNU General Public License along with     *
 * this program. If not, see <http://www.gnu.org/licenses/>.                                      *
 **************************************************************************************************/
function writeLink($url, $text)
{
    print '<a class="adminmenu" href="' . BASEDIR . $url . '">' . $text . '</a><br>' . "\n";
}
writeLink('', $_LANG['forum_index']);
writeLink('admin/', $_LANG['admin_index']);
writeLink('admin/_user', $_LANG['user_management']);
writeLink('admin/_forum', $_LANG['forum_management']);
writeLink('admin/_group', $_LANG['group_management']);
writeLink('admin/_dump', $_LANG['db_backup']);
?>

</div>

Exemple #4
0
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 * 
 * This software 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
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 ******************************************************************************/
include_once 'utils.php';
include_once 'ringside/social/dsl/TagRegistry.php';
/**
 * Drop the SCHEMA from the database server. 
 * 
 * @author Richard Friedman
 */
writeDatabaseInformation();
writeLine("<b>Is your schema ready to be dropped!</b>");
dropSchema();
Social_Dsl_TagRegistry::removeCacheFile();
writeLine();
writeLine("<u>Other options</u>");
writeLink("index.php", "Start setup process.");
writeLink("drop.php", "Drop Schema, Start Again");