-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_stat.php
161 lines (150 loc) · 2.86 KB
/
list_stat.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!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>Listing Status</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
/* <![CDATA[ */
body {font-family: sans-serif;}
.hdr {font-weight: bold; font-size: 1.1em;}
td {width: 200px;}
h3 {text-align: center;}
.pif {display: none;}
/* ]]> */
</style>
<script language="javascript" type="text/javascript">
/* <![CDATA[ */
function set_view(){
var taxclass = document.getElementById('taxclas').value;
//alert(taxclass);
if(taxclass != 'AVES'){
document.getElementById('pif').style.display = 'none';
}
}
/* ]]> */
</script>
</head>
<body onload="set_view();">
<?php
require("pr_config.php");
pg_connect($pg_connect);
$sppcode = $_POST['sppcode'];
$species = $_POST['species'];
$query = "select grank, usesa, sprot from pr_infospp where sppcode = '{$sppcode}'";
//echo $query;
$result = pg_query($query);
$row = pg_fetch_array($result);
//var_dump($row);
?>
<input type="hidden" id="taxclas" value="<?php echo $row['strtaxclas']; ?>" />
<h3><?php echo $species; ?></h3>
<table>
<tr><td class='hdr' colspan="2" class="hdr">Ranking Information</td></tr>
<tr>
<td>Federal</td>
<td>
<?php
if(strlen($row['usesa']) == 0) {
echo "---";
}else{
echo $row['usesa'];
}
?>
</td>
</tr>
<tr>
<td>Puerto Rico</td>
<td>
<?php //echo $row['strsprot'];
if(strlen($row['sprot']) == 0) {
echo "---";
}else{
echo $row['sprot'];
}
?></td>
</tr>
<tr>
<td>Nserve Global</td>
<td>
<?php //echo $row['strgrank'];
if(strlen($row['grank']) == 0) {
echo "---";
}else{
echo $row['grank'];
}
?></td>
</tr>
</table>
<div id="pif">
<table>
<tr><td class="hdr" colspan="2">Partners-In-Flight Regions</td></tr>
<tr>
<td>So. Atl. Coastal Plain</td>
<td>
<?php //echo $row['intpif_03'];
if(strlen($row['intpif_03']) == 0) {
echo "---";
}else{
echo $row['intpif_03'];
}
?></td>
</tr>
<tr>
<td>Mid Atl. Piedmont</td>
<td>
<?php //echo $row['intpif_10'];
if(strlen($row['intpif_10']) == 0) {
echo "---";
}else{
echo $row['intpif_10'];
}
?></td>
</tr>
<tr>
<td>Southern Piedmont</td>
<td>
<?php //echo $row['intpif_11'];
if(strlen($row['intpif_11']) == 0) {
echo "---";
}else{
echo $row['intpif_11'];
}
?></td>
</tr>
<tr>
<td>Mid Atl Ridge and Valley</td>
<td>
<?php //echo $row['intpif_12'];
if(strlen($row['intpif_12']) == 0) {
echo "---";
}else{
echo $row['intpif_12'];
}
?></td>
</tr>
<tr>
<td>So. Blue Ridge</td>
<td>
<?php //echo $row['intpif_23'];
if(strlen($row['intpif_23']) == 0) {
echo "---";
}else{
echo $row['intpif_23'];
}
?></td>
</tr>
<tr>
<td>Mid Atl. Coastal Plain</td>
<td>
<?php //echo $row['intpif_44'];
if(strlen($row['intpif_44']) == 0) {
echo "---";
}else{
echo $row['intpif_44'];
}
?></td>
</tr>
</table>
</div>
</body>
</html>