-
Notifications
You must be signed in to change notification settings - Fork 1
/
Export_and_Import_Areas_import.php
53 lines (39 loc) · 1.25 KB
/
Export_and_Import_Areas_import.php
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
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
set_time_limit(600);
require_once("include/Export_and_Import_Areas_variables.php");
require_once("include/import_functions.php");
require_once('classes/importpage.php');
if( !Security::processPageSecurity( $strtablename, 'I' ) )
return;
require_once('include/xtempl.php');
$xt = new Xtempl();
$id = postvalue_number("id");
$id = $id != "" ? $id : 1;
//an array of params for ImportPage constructor
$params = array();
$params["id"] = $id;
$params["xt"] = &$xt;
$params["tName"] = $strTableName;
$params["action"] = postvalue("a");
$params["pageType"] = PAGE_IMPORT;
$params["pageName"] = postvalue("page");
$params["needSearchClauseObj"] = false;
$params["strOriginalTableName"] = $strOriginalTableName;
if( $params["action"] == "importPreview" )
{
$params["importType"] = postvalue("importType");
$params["importText"] = postvalue("importText");
$params["useXHR"] = postvalue("useXHR");
}
elseif( $params["action"] == "importData" )
{
$params["importData"] = my_json_decode( postvalue("importData") );
}
$pageObject = new ImportPage($params);
$pageObject->init();
$pageObject->process();
?>