Example #1
0
 /**
  * Post constructor initaliser. Take care of admin specific stuff
  *
  * @param bool $admin Set to true if we need to setup admin templates
  * @author Geoffrey Dunn <*****@*****.**>
  * @since 1.2
  **/
 function init($admin = true)
 {
     if (@file_exists('../install/index.php') && !@file_exists('../tools')) {
         exit('<h1>' . $this->lang->admin_cp_warning . '</h1>');
     }
     parent::init($admin);
     if (!$this->perms->auth('is_admin') || $this->is_banned()) {
         exit('<h1>' . $this->lang->admin_cp_denied . '</h1>');
     }
 }
Example #2
0
$failed = false;
if (!isset($_GET['mode'])) {
    $mode = null;
} else {
    $mode = $_GET['mode'];
}
if (!isset($_GET['step'])) {
    $step = 1;
} else {
    $step = $_GET['step'];
}
if ($mode) {
    require './' . $mode . '.php';
    $qsf = new $mode();
} else {
    $qsf = new qsfglobal();
}
include 'templates/header.php';
if (substr(PHP_VERSION, 0, 1) == '3') {
    echo 'Your PHP version is ' . PHP_VERSION . '.<br />Currently only PHP4 and PHP5 are supported.';
    $failed = true;
}
if (!extension_loaded('mysql')) {
    if ($failed) {
        // If we have already shown a message, show the next one two lines down
        echo '<br /><br />';
    }
    echo 'Your PHP installation does not support MySQL.<br />Currently only MySQL is supported.';
    $failed = true;
}
if (isset($_SERVER['SERVER_SOFTWARE'])) {
/**
 * Invision Power Board 2.1 Conversion Script
 * Based on work by Yazinin Nick <*****@*****.**>
 *
 * Roger Libiez [Samson] <http://mercuryboard.afkmud.com>
 *
 * Script tested on an unmodified Invision Power Board 2.1 database.
 * Use with any other version has not been validated!
 **/
require_once './convert_db.php';
require_once '../settings.php';
require_once '../func/constants.php';
require_once '../lib/' . $set['dbtype'] . '.php';
require_once '../global.php';
define('CONVERTER_NAME', 'Invision Power Board 2.1 Convertor');
$qsf = new qsfglobal();
$qsf->db = new database($set['db_host'], $set['db_user'], $set['db_pass'], $set['db_name'], $set['db_port'], $set['db_socket']);
if (!$qsf->db->connection) {
    error(QUICKSILVER_ERROR, 'A connection to the Quicksilver Forums database could not be established. Please check your settings and try again.', __FILE__, __LINE__);
}
$oldboard = new qsfglobal();
// Yes, I know this looks goofy, but we want to try and leverage the Mercury code as much as possible
$oldboard->db = new database($oldset['old_db_host'], $oldset['old_db_user'], $oldset['old_db_pass'], $oldset['old_db_name'], $oldset['old_db_port'], $oldset['old_db_socket']);
if (!$oldboard->db->connection) {
    error(QUICKSILVER_ERROR, 'A connection to the Invisionboard database could not be established. Please check your settings and try again.', __FILE__, __LINE__);
}
$qsf->pre = $qsf->db->db . "." . $set['prefix'];
$oldboard->pre = $oldboard->db->db . "." . $oldset['old_prefix'];
function write_olddb_sets($oldset)
{
    $settings = "<?php\n\$oldset = array();\n";
Example #4
0
 * 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.
 *
 **/
/**
 * Quick and (extremely) dirty script to sync and clean up the
 * language files
 *
 */
error_reporting(E_ALL);
require '../global.php';
$qsf = new qsfglobal();
/* Recursive ksort() */
function ksort_rec(&$array)
{
    ksort($array);
    foreach (array_keys($array) as $k) {
        if (is_array($array[$k])) {
            ksort_rec($array[$k]);
        }
    }
}
$words = array();
$result = array();
$langs = array();
$dp = opendir('../languages/');
while (($file = readdir($dp)) !== false) {