Exemplo n.º 1
0
         $ARCurrent->options["without_data"] = true;
     }
     if ($without_templates = $this->getdata("without_templates", "none")) {
         $ARCurrent->options["without_templates"] = true;
     }
     if ($without_files = $this->getdata("without_files", "none")) {
         $ARCurrent->options["without_files"] = true;
     }
     if ($force = $this->getdata("force", "none")) {
         $ARCurrent->options["force"] = true;
     }
     $source = $this->store->get_config("files") . "temp/" . $file["source_temp"];
     $ax_config["writeable"] = false;
     $ax_config["database"] = $source;
     set_time_limit(0);
     $store = new axstore("", $ax_config);
     if (!$store->error) {
         $ARCurrent->importStore =& $this->store;
         // srcpath and destpath may be empty
         $callArgs = array("srcpath" => $srcpath, "destpath" => $this->path);
         $store->call("system.export.phtml", $callArgs, $store->get("/"));
         $error = $store->error;
         $store->close();
     } else {
         $error = "import error: " . $store->error;
     }
     unlink($source);
 } else {
     $error = "import error: '{$source}' could not find uploaded file. (does the filesize exceed the maximum upload size?)";
 }
 if ($error) {
Exemplo n.º 2
0
    echo "var line = document.createElement('SPAN');";
    echo "line.innerHTML = '" . str_replace("\n", "<br>", AddSlashes(htmlspecialchars($str))) . "';\n";
    echo "document.getElementById('progress_verbose').appendChild(line);\n";
    echo "</script>";
    flush();
}
set_time_limit(0);
$ax_config["database"] = tempnam($this->store->get_config("files") . "temp/", "ax");
@unlink($ax_config["database"]);
$sources = $this->getvar("sources");
if (!$sources) {
    $sources = array($this->path);
}
$ax_config["writeable"] = true;
$ARCurrent->session->put("tempname", $ax_config["database"]);
$importStore = new axstore("", $ax_config);
if (!$importStore->error) {
    set_time_limit(0);
    $ARCurrent->importStore =& $importStore;
}
?>
<script type="text/javascript">
	error=false;
	window.onload=startdownload;

	function startdownload() {
		if (!error) {
			location.href='object.export.ax';
		}
	}