Example #1
0
function post_check_4()
{
    if (!column_exists("maia_users", "last_digest_sent")) {
        return array(false, "Error creating");
    } else {
        return array(true, "");
    }
}
Example #2
0
function post_check_3()
{
    if (!column_exists("bayes_vars", "ham_count")) {
        return array(false, "Error creating");
    } else {
        return array(true, "");
    }
}
Example #3
0
function post_check_11()
{
    global $dbh;
    if (!column_exists("maia_domains", "transport")) {
        return array(false, "Column transport doesn't exist");
    } else {
        return array(true, "");
    }
}
    ?>
</h4>
<br><br>
Aufruf des Scriptes mit <br><b><?php 
    echo $PHP_SELF;
    ?>
?user=<font color="red">ADMIN-EMAIL</font>&password=<font color="red">ADMIN-PASSWORD-IM-KLARTEXT</font>
</b>
</body></html>
<?php 
    exit;
} else {
    require 'cao_xtc_functions.php';
    // security  1.check if admin user with this mailadress exits, and got access to xml-export
    //           2.check if pasword = true
    if (column_exists('admin_access', 'xml_export') == false) {
        xtc_db_query('ALTER TABLE admin_access ADD xml_export INT(1)  DEFAULT "0";');
        xtc_db_query('UPDATE admin_access SET xml_export= 1 WHERE customers_id=\'1\';');
    }
    $check_customer_query = xtc_db_query("select customers_id,\n                                      customers_status,\n                                      customers_password\n                                      from " . TABLE_CUSTOMERS . " where\n                                      customers_email_address = '" . xtc_db_input($user) . "'");
    // 2011-08-21 - h-h-h - SQL Injection FIX
    if (!xtc_db_num_rows($check_customer_query)) {
        SendXMLHeader();
        print_xml_status(105, $_POST['action'], 'WRONG LOGIN', '', '', '');
        exit;
    } else {
        $check_customer = xtc_db_fetch_array($check_customer_query);
        // check if customer is Admin
        if ($check_customer['customers_status'] != '0') {
            SendXMLHeader();
            print_xml_status(106, $_POST['action'], 'WRONG LOGIN', '', '', '');
		<tr>
			<td></td>
			<td><input type="submit" value="Absenden" name="B1"></input> <input type="reset" value="Zurücksetzen" name="B2"></input></td>
		</tr>
	</table>
	<p> </p>
	<p></p>
</form></p>
</body></html>
<?php 
    exit;
} else {
    require 'cao_olc_functions.php';
    // security  1.check if admin user with this mailadress exits, and got access to xml-export
    //           2.check if pasword = true
    if (column_exists("" . TABLE_ADMIN_ACCESS . "", 'xml_export') == false) {
        olc_db_query('ALTER TABLE ' . TABLE_ADMIN_ACCESS . ' ADD xml_export INT(1)  DEFAULT "0";');
        olc_db_query('UPDATE ' . TABLE_ADMIN_ACCESS . ' SET xml_export= 1 WHERE customers_id=\'1\';');
    }
    $check_customer_query = olc_db_query("select customers_id,\n                                      customers_status,\n                                      customers_password\n                                      from " . TABLE_CUSTOMERS . " where\n                                      customers_email_address = '" . $user . "'");
    if (!olc_db_num_rows($check_customer_query)) {
        SendXMLHeader();
        print_xml_status(105, $_POST['action'], 'WRONG LOGIN', '', '', '');
        exit;
    } else {
        $check_customer = olc_db_fetch_array($check_customer_query);
        // check if customer is Admin
        if ($check_customer['customers_status'] != '0') {
            SendXMLHeader();
            print_xml_status(106, $_POST['action'], 'WRONG LOGIN', '', '', '');
            exit;
			foreach ($columns as $column_name => $column_data)
			{
				sql_column_change($map_dbms, $table, $column_name, $column_data);
			}
		}
	}

	// Add columns?
	if (!empty($schema_changes['add_columns']))
	{
		foreach ($schema_changes['add_columns'] as $table => $columns)
		{
			foreach ($columns as $column_name => $column_data)
			{
				// Only add the column if it does not exist yet
				if (!column_exists($map_dbms, $table, $column_name))
				{
					sql_column_add($map_dbms, $table, $column_name, $column_data);
				}
			}
		}
	}

	// Remove keys?
	if (!empty($schema_changes['drop_keys']))
	{
		foreach ($schema_changes['drop_keys'] as $table => $indexes)
		{
			foreach ($indexes as $index_name)
			{
				sql_index_drop($map_dbms, $index_name, $table);
Example #7
0
function post_check_8()
{
    global $dbh;
    if (!column_exists("maia_users", "truncate_email")) {
        return array(false, "Column truncate_email doesn't exist");
    } else {
        return array(true, "");
    }
}
Example #8
0
log
log_phone
menu
message
pages
pushmessages
*/
if (!table_exists("log_phone")) {
    echo sprintf(L("runsetup"), "Could not find the database tables");
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: setup.php");
    exit;
}
/* auto add column if not exists */
column_exists("cats", "collapse", "alter table cats add column collapse varchar(4) not null default 'n'");
column_exists("cats", "Volgorde", "alter table pages add column Volgorde int(4) not null default 0");
//$bootstrap = '	<link href="http://www.glimworm.com/_assets/moock/bootstrap/css/bootstrap.css" rel="stylesheet">';
//$bootstrap = '	<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">';
$bootstrap = '	<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css" rel="stylesheet">';
$angular = '	<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>';
$backbone = '	<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min.js"></script>';
$htoppopup = "";
$htoppopup = $htoppopup . '<!DOCTYPE html>';
$htoppopup = $htoppopup . '<html lang="en">';
$htoppopup = $htoppopup . '  <head>';
$htoppopup = $htoppopup . '    <meta charset="utf-8">';
$htoppopup = $htoppopup . '    <title>Push 2 Press App CMS - ' . getConfiguration("sitename", "") . '</title>';
$htoppopup = $htoppopup . '    <meta name="viewport" content="width=device-width, initial-scale=1.0">';
$htoppopup = $htoppopup . '    <meta name="description" content="">';
$htoppopup = $htoppopup . '    <meta name="author" content="">';
$htoppopup = $htoppopup . '    <!-- Le styles -->';
Example #9
0
function post_check_12()
{
    global $dbh;
    if (!column_exists("awl", "signedby")) {
        return array(false, "Column signedby doesn't exist");
    } else {
        return array(true, "");
    }
}
Example #10
0
function post_check_13()
{
    global $dbh;
    if (!column_exists("maia_mail", "autolearn_status")) {
        return array(false, "Column autolearn_status doesn't exist");
    } else {
        return array(true, "");
    }
}
Example #11
0
			$return = true;
		}
	}
	return $return;
}
if (!isset($_GET['update'])) {
	if (table_exists("history") == false || table_exists("history5") == false || table_exists("history10") == false || column_exists("provider", "servers") == false || column_exists("node", "servers") == false || column_exists("rx", "servers") == false || column_exists("tx", "servers") == false) {
		echo '
			<table id="upgrade">
				<tr><th>Upgrade</th></tr>
				<tr><td>It looks like you\'ve upgraded OpenStatus from a previous version, and your database schema needs to be updated to enable new features.  <a href="index.php?update=true">Click here</a> to run the database update.</td></tr>
			</table>';
	}
} elseif (isset($_GET['update']) && $_GET['update'] == "true") {
	if ($auth == true) {
		if (table_exists("history5") == false || table_exists("history10") == false || column_exists("provider", "servers") == false || column_exists("node", "servers") == false) {
			$db->query('CREATE TABLE "history" ( "uid" INTEGER, "time" INTEGER, "mtotal" TEXT, "mused" TEXT, "mfree" TEXT, "mbuffers" TEXT, "disktotal" TEXT, "diskused" TEXT, "diskfree" TEXT, "load1" TEXT, "load5" TEXT, "load15" TEXT, "tx" TEXT, "rx" TEXT);');
			$db->query('CREATE TABLE "history5" ( "uid" INTEGER, "time" INTEGER, "mtotal" TEXT, "mused" TEXT, "mfree" TEXT, "mbuffers" TEXT, "disktotal" TEXT, "diskused" TEXT, "diskfree" TEXT, "load1" TEXT, "load5" TEXT, "load15" TEXT, "tx" TEXT, "rx" TEXT);');
			$db->query('CREATE TABLE "history10" ( "uid" INTEGER, "time" INTEGER, "mtotal" TEXT, "mused" TEXT, "mfree" TEXT, "mbuffers" TEXT, "disktotal" TEXT, "diskused" TEXT, "diskfree" TEXT, "load1" TEXT, "load5" TEXT, "load15" TEXT, "tx" TEXT, "rx" TEXT);');
			$db->query('ALTER TABLE servers ADD COLUMN "rx" TEXT;');
			$db->query('ALTER TABLE servers ADD COLUMN "tx" TEXT;');
			$db->query('ALTER TABLE servers ADD COLUMN "provider" TEXT;');
			$db->query('ALTER TABLE servers ADD COLUMN "node" TEXT;');
		echo '
				<table id="upgrade">
					<tr><th>Upgrade</th></tr>
					<tr><td>Database upgrade complete!</tr></td>
				</table>';
		}
		rename("/usr/share/openstatus-server/updates.php", "/usr/share/openstatus-server/updates.php.bak");
	} else {
Example #12
0
function post_check_2()
{
    if (!column_exists("maia_users", "theme_id")) {
        return array(false, "Error creating");
    } else {
        return array(true, "");
    }
}
		<tr>
			<td>&nbsp;</td>
			<td><input type="submit" value="Absenden" name="B1">&nbsp; <input type="reset" value="Zurücksetzen" name="B2"></td>
		</tr>
	</table>
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
	<p>&nbsp; </p>
</form></p>
</body></html>
';
        echo $main_content;
        exit;
    } else {
        // security  1.check if admin user with this mailadress exits, and got access to xml-export
        //           2.check if pasword = true
        if (column_exists(TABLE_ADMIN_ACCESS, 'xml_export') == false) {
            olc_db_query('ALTER TABLE ' . TABLE_ADMIN_ACCESS . ' ADD xml_export INT(1)  DEFAULT "0";');
            olc_db_query('SQL_UPDATE ' . TABLE_ADMIN_ACCESS . ' SET xml_export= 1 WHERE customers_id=\'1\';');
        }
        $check_customer_query = olc_db_query("select customers_id,\n                                      customers_status,\n                                      customers_password\n                                      from " . TABLE_CUSTOMERS . " where\n                                      customers_email_address = '" . $user . "'");
        if (!olc_db_num_rows($check_customer_query)) {
            SendXMLHeader();
            print_xml_status(105, $_POST['action'], 'WRONG LOGIN', '', '', '');
            exit;
        } else {
            $check_customer = olc_db_fetch_array($check_customer_query);
            // check if customer is Admin
            if ($check_customer['customers_status'] != '0') {
                SendXMLHeader();
                print_xml_status(106, $_POST['action'], 'WRONG LOGIN', '', '', '');
                exit;