-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaoi_report_ajax.php
81 lines (63 loc) · 2.13 KB
/
aoi_report_ajax.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
<?php
require('pr_aoi_class.php');
session_start();
$report_type = $_POST['report'];
$sppcode = $_POST['sppcode'];
$species = $_POST['species'];
$species2 = $_POST['species2'];
$aoi_name = $_POST['aoiname'];
$a = $_SESSION[$aoi_name];
ini_set("error_log", "/var/www/html/prgap/logs/php-error.log");
ini_set("log_errors", 1);
error_log("aoi_report_ajax");
error_log($aoi_name);
//echo json_encode(array("time"=>$report_type, "status"=>$aoi_name, "rep"=>"$sppcode"));die();
if ($report_type == 'landcover'){
$report = "<h1>AOI Land Cover Report</h1>";
$report .= "<pre>".$a->aoi_landcover()."</pre>";
}
if ($report_type == 'management') {
$report = "<h1>AOI Management Report</h1>";
$report .= "<pre>".$a->aoi_management()."</pre>";
}
if ($report_type == 'owner') {
$report = "<h1>AOI Ownership Report</h1>";
$report .= "<pre>".$a->aoi_ownership()."</pre>";
}
if ($report_type == 'status') {
$report = "<h1>AOI GAP Status Report</h1>";
$report .= "<pre>".$a->aoi_status()."</pre>";
}
if ($report_type == 'status_sp') {
$report = "<h1>Species GAP Status Report</h1>";
$report .= "<h3>{$species}</h3>";
$report .= "<pre>".$a->species_status($sppcode)."</pre>";
}
if ($report_type == 'landcover_sp') {
$report = "<h1>Species Land Cover Report</h1>";
$report .= "<h3>{$species}</h3>";
$report .= "<pre>".$a->species_landcover($sppcode)."</pre>";
}
if ($report_type == 'management_sp') {
$report = "<h1>Species Management Report</h1>";
$report .= "<h3>{$species}</h3>";
$report .= "<pre>".$a->species_management($sppcode)."</pre>";
}
if ($report_type == 'owner_sp') {
$report = "<h1>Species Ownership Report</h1>";
$report .= "<h3>{$species}</h3>";
$report .= "<pre>".$a->species_ownership($sppcode)."</pre>";
}
if ($report_type == 'predicted') {
$report = "<h1>Predicted Distribution Report</h1>";
$report .= "<h3>{$species}</h3>";
$report .= "<pre>".$a->predicted($sppcode)."</pre>";
}
if ($report_type == 'richness_report') {
$report = "<h1>Richness Report</h1>";
$report .= "<h3>{$species2}</h3>";
$report .= "<pre>".$a->richnessreport($species)."</pre>";
}
// error_log($report);
echo json_encode(array("rep"=>$report));die();
?>