-
Notifications
You must be signed in to change notification settings - Fork 0
/
upload.php
69 lines (63 loc) · 2.4 KB
/
upload.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* HTML form with inputs of type="file", uploads shapefile.
*
* @package ncgap
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>shapefile upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="StyleSheet" href="styles/popups.css" type="text/css" />
<link rel="stylesheet" href="styles/custom-theme/jquery-ui-1.8.6.custom.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" ></script>
<script type="text/javascript" src="javascript/jquery-ui-1.8.6.custom.min.js" ></script>
<style type="text/css">
/* <![CDATA[ */
.ui-widget {font-size: 11px;}
button {width: 130px;
margin: 20px;}
/* ]]> */
</style>
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
$(document).ready(function(evt) {
$("button").button();
$("#btn").click(function(evt) {
evt.preventDefault();
upload();
});
});
function upload(){
document.forms.fm2.win_w.value = opener.parent.map.document.getElementById('win_w').value;
document.forms.fm2.win_h.value = opener.parent.map.document.getElementById('win_h').value;
document.forms.fm2.layers.value = opener.parent.map.document.getElementById('layers').value;
document.forms.fm2.target = opener.parent.map.name;
document.forms.fm2.submit();
//opener.parent.gears = window.open("gears.html","","width=400,height=200, top=200, left=200");
window.close();
}
/* ]]> */
</script>
</head>
<body>
<p>Select *.shp, *.shx, and *.prj files to upload shapfile for your AOI. Program will reproject into proper co-ordinates.</p>
<form id="fm2" enctype="multipart/form-data" action="ncgap/map2.php" method="post" >
<input type="hidden" name="MAX_FILE_SIZE" value="300000" />
<input type="hidden" name="type" value="uploaded" />
<input type="hidden" name="win_w" />
<input type="hidden" name="win_h" />
<input type="hidden" name="layers" />
<input type="hidden" name="mode" value="pan" />
<input id="zoom" type="hidden" name="zoom" value="1" />
<div id="dialog">
select SHP file: <input name="shp" type="file" size="50" id="shpinpt" /><br />
select SHX file: <input name="shx" type="file" size="50"/><br />
select PRJ file: <input name="prj" type="file" size="50"/>
</div>
<button id="btn">Upload shapefile</button>
</form>
</body>
</html>