Welcome to mirror list, hosted at ThFree Co, Russian Federation.

display_import.inc.php « libraries - github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 303cc5f194dc9e70628e7e438500f1c3a66acda3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */

/**
 * include file for display import : server, database, table
 *
 * @package PhpMyAdmin
 */
if (! defined('PHPMYADMIN')) {
    exit;
}

/**
 *
 */
require_once './libraries/file_listing.lib.php';
require_once './libraries/plugin_interface.lib.php';
require_once './libraries/display_import.lib.php';
require_once './libraries/display_import_ajax.lib.php';

/* Scan for plugins */
/* @var $import_list ImportPlugin[] */
$import_list = PMA_getPlugins(
    "import",
    'libraries/plugins/import/',
    $import_type
);

/* Fail if we didn't find any plugin */
if (empty($import_list)) {
    PMA_Message::error(
        __(
            'Could not load import plugins, please check your installation!'
        )
    )->display();
    exit;
}

if (PMA_isValid($_REQUEST['offset'], 'numeric')) {
    $offset = $_REQUEST['offset'];
}
if (isset($_REQUEST['timeout_passed'])) {
    $timeout_passed = $_REQUEST['timeout_passed'];
}
if (isset($_REQUEST['local_import_file'])) {
    $local_import_file = $_REQUEST['local_import_file'];
}

$timeout_passed_str = isset($timeout_passed)? $timeout_passed : null;
$offset_str = isset($offset)? $offset : null;
$html = PMA_getHtmlForImport(
    $upload_id,
    $import_type,
    $db,
    $table,
    $max_upload_size,
    $import_list,
    $timeout_passed_str,
    $offset_str
);

$response = PMA_Response::getInstance();
$response->addHTML($html);