-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaoi_report2.php
128 lines (106 loc) · 3.33 KB
/
aoi_report2.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
require('sw_aoi_class.php');
require("sw_config.php");
session_start();
//ob_implicit_flush();
?>
<!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>AOI GRASS Report</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
/* <![CDATA[ */
@media print{
.prn {display: none; }
}
body {font-family: sans-serif;}
/* ]]> */
</style>
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
function spreadsheet(){
//window.open("aoi_report_ss.php","ssrept","height=100,width=300")
var pretag = document.getElementsByTagName("pre");
var content = pretag[0].innerHTML;
document.forms[0].content.value = content;
document.forms[0].submit();
}
/* ]]> */
</script>
</head>
<body>
<?php
$aoi_name = $_POST['aoi_name'];
$a = $_SESSION[$aoi_name];
$report = $_POST['report'];
$itiscode = $_POST['itiscode'];
$species = stripslashes($_POST['species']);
pg_connect($pg_connect);
$query = "select aoi_data from aoi where name = '$aoi_name'";
//echo $query;
$result = pg_query($query);
$row = pg_fetch_all($result);
$aoi_data = unserialize($row['aoi_data']);
if ($report == 'landcover'){
echo "<h1>AOI Land Cover Report</h1>";
$a->aoi_landcover();
}
if ($report == 'management') {
echo "<h1>AOI Management Report</h1>";
$a->aoi_management();
}
if ($report == 'owner') {
echo "<h1>AOI Ownership Report</h1>";
$a->aoi_ownership();
}
if ($report == 'status') {
echo "<h1>AOI GAP Status Report</h1>";
$a->aoi_status();
}
if ($report == 'status_sp') {
echo "<h1>Species GAP Status Report</h1>";
echo "<h3>{$species}</h3>";
$a->species_status($itiscode);
}
if ($report == 'landcover_sp') {
echo "<h1>Species Land Cover Report</h1>";
echo "<h3>{$species}</h3>";
$a->species_landcover($itiscode);
}
if ($report == 'management_sp') {
echo "<h1>Species Management Report</h1>";
echo "<h3>{$species}</h3>";
$a->species_management($itiscode);
}
if ($report == 'owner_sp') {
echo "<h1>Species Ownership Report</h1>";
echo "<h3>{$species}</h3>";
$a->species_ownership($itiscode);
}
if ($report == 'predicted') {
echo "<h1>Predicted Distribution Report</h1>";
echo "<h3>{$species}</h3>";
$a->predicted($itiscode);
}
if ($report == 'richness_report') {
echo "<h1>Richness Report</h1>";
//echo "<h3>{$species}</h3>";
$a->richnessreport($species);
}
?>
<img src="/graphics/swgap/b21_up.png" alt="b21" id="b21" class="prn" onclick="window.print();"
onmousedown="document.getElementById('b21').src='/graphics/swgap/b21_dn.png';"
onmouseup="document.getElementById('b21').src='/graphics/swgap/b21_up.png';"/>
<img src="/graphics/swgap/b22_up.png" alt="b22" id="b22" class="prn" onclick="spreadsheet();"
onmousedown="document.getElementById('b22').src='/graphics/swgap/b22_dn.png';"
onmouseup="document.getElementById('b22').src='/graphics/swgap/b22_up.png';"/>
<form action="aoi_report_ss.php" target="_self" method="post">
<input type="hidden" name="aoi_name" value="<?php echo $aoi_name; ?>" />
<input type="hidden" name="report" value="<?php echo $report; ?>" />
<input type="hidden" name="species" value="<?php echo $species ?>" />
<input type="hidden" name="itiscode" value="<?php echo $itiscode ?>" />
<input type="hidden" name="content" />
</form>
</body>
</html>