Beispiel #1
0
$database_username = '';
$database_password = '';
if ($_POST['forms'] == 'mysql') {
    //get all vars
    foreach ($_POST as $key => $value) {
        ${$key} = $value;
    }
    //_________check if form filled in________
    $process = new FormProcessor();
    if (!$process->RequiredFields('all')) {
        $notifications = 1;
        $notice = "Error! - Fill in all form fields";
        $proceed = false;
    } else {
        //______check connection_____
        $dbase = new QuickMysql($database_name, $database_username, $database_password, $database_host);
        if ($dbase->obj_status) {
            //_______loadup mysql file_________
            $mysql_file = SETUP_PATH . '/mysql.sql';
            $file_content = file($mysql_file);
            $query = "";
            $error_count = 0;
            foreach ($file_content as $sql_line) {
                if (trim($sql_line) != "" && strpos($sql_line, "--") === false) {
                    $query .= $sql_line;
                    if (preg_match("/;\\s*\$/", $sql_line)) {
                        $dbase->SqlQuery($query);
                        if (!$dbase->obj_status) {
                            $error_count++;
                            $mysql_error .= $dbase->last_error . '<br />';
                        }
Beispiel #2
0
<?php

//-----------------------------------------------------------------//
//
// PHPmotion Installation Wizard - Version 2
//
//-----------------------------------------------------------------//
include_once dirname(__FILE__) . '/includes/config.php';
include_once dirname(__FILE__) . '/includes/view.php';
include_once dirname(__FILE__) . '/includes/mysql.php';
include_once BASE_PATH . '/classes/mysql.inc.php';
$visibility = visibility('details', $_SESSION['prescan_error']);
//connect to database
$dbase = new QuickMysql($config["dbname"], $config["dbusername"], $config["dbpassword"], $config["hostname"]);
//set the ffmpeg as found earlier
$ffmpeg = $_SESSION['ffmpeg'] == '' ? '' : $_SESSION['ffmpeg'];
$flvtool2 = $_SESSION['flvtool2'] == '' ? '' : $_SESSION['flvtool2'];
$mencoder = $_SESSION['mencoder'] == '' ? '' : $_SESSION['mencoder'];
if ($dbase->obj_status) {
    if ($_POST['forms'] == 'details') {
        //get all vars
        foreach ($_POST as $key => $value) {
            ${$key} = $value;
        }
        $result = array($_POST);
        $proceed = true;
        //_________check if form filled in________
        $process = new FormProcessor();
        if (!$process->RequiredFields('all')) {
            $notifications = 1;
            $notice = "Error! - Fill in all form fields";