Example #1
0
            } elseif ($_REQUEST['shim']) {
                print_import();
            } elseif ($_REQUEST['doim']) {
                do_import();
            } elseif ($_REQUEST['dosht']) {
                do_sht();
            } elseif (!$_REQUEST['refresh'] || preg_match('/^select|show|explain/', $SQLq)) {
                do_sql($SQLq);
            }
            #perform non-selet SQL only if not refresh (to avoid dangerous delete/drop)
        } else {
            $err_msg = "Select DB first";
        }
    }
    $time_all = ceil((microtime_float() - $time_start) * 10000) / 10000;
    print_screen();
} else {
    print_cfg();
}
function do_sql($q)
{
    global $dbh, $last_sth, $last_sql, $reccount, $out_message, $SQLq;
    $SQLq = $q;
    if (!do_multi_sql($q, '', 1)) {
        $out_message = "Error: " . mysql_error($dbh);
    } else {
        if ($last_sth && $last_sql) {
            $SQLq = $last_sql;
            if (preg_match("/^select|show|explain/i", $last_sql)) {
                if ($q != $last_sql) {
                    $out_message = "Results of the last select displayed:";
Example #2
0
<?php

defined('IN_MOBIQUO') or exit;
if (function_exists('set_magic_quotes_runtime')) {
    @set_magic_quotes_runtime(0);
}
ini_set('max_execution_time', '120');
error_reporting(0);
@ob_start();
define('CWD1', ($getcwd = getcwd()) ? $getcwd : '.');
require 'config/config.php';
$mobiquo_config = get_mobiquo_config();
$current_plugin_version = $mobiquo_config['version'];
print_screen($current_plugin_version);
$show_screen = @ob_get_contents();
@ob_end_clean();
echo $show_screen;
exit;
function print_screen($current_plugin_version)
{
    $latest_tp_plugin_version = 'sm-2a_' . get_latest_plugin_version();
    $mobiquo_path = get_path();
    $check_upload_status = file_get_contents("http://" . $mobiquo_path . "/upload.php?checkAccess");
    $check_push_status = file_get_contents("http://" . $mobiquo_path . "/push.php?checkAccess");
    require_once dirname(dirname(__FILE__)) . '/SSI.php';
    global $modSettings;
    echo "Forum XMLRPC Interface for Tapatalk Application<br><br>";
    //echo "Forum system version:".$modSettings['smfVersion']."<br>";
    echo "Current Tapatalk plugin version: " . $current_plugin_version . "<br>";
    echo "Latest Tapatalk plugin version: <a href=\"https://tapatalk.com/activate_tapatalk.php?plugin=smf\" target=\"_blank\">" . $latest_tp_plugin_version . "</a><br>";
    echo "Attachment upload interface status: <a href=\"http://" . $mobiquo_path . "/upload.php\" target=\"_blank\">" . ($check_upload_status ? 'OK' : 'Inaccessible') . "</a><br>";