-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgwp_table.php
executable file
·49 lines (47 loc) · 1.28 KB
/
gwp_table.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
<!doctype html><html><head>
<?php include'imports.php'?>
<style>
#info td:nth-child(n+2) {
text-align:right;
}
#info td:nth-child(5) {
text-align:left;
}
#info tr.selected {
background:yellow;
}
</style>
</head><body><center>
<?php
include'sidebar.php';
include'navbar.php';
include'linear.php';
?>
<h1><?php write('#gwp_title')?></h1>
<table id=info>
<tr><th colspan=5><?php write('#gwp_title_table')?>
<tr>
<th><?php write('#Report')?>
<th>CO<sub>2</sub> (CO<sub>2</sub> <?php write('#equivalents')?>
<th>CH<sub>4</sub> (CO<sub>2</sub> <?php write('#equivalents')?>
<th>N<sub>2</sub>O (CO<sub>2</sub> <?php write('#equivalents')?>)
<th><?php write('#Comments')?>
</table>
<script>
(function() {
var table=document.querySelector('#info');
GWP_reports.forEach((rep,i)=>{
var newRow=table.insertRow(-1);
if(i==Global.Configuration.Selected.gwp_reports_index)
{
newRow.classList.add('selected');
newRow.title="Current selected IPCC Assessment Report";
}
newRow.insertCell(-1).innerHTML="<b>"+rep.report+"</b>";
newRow.insertCell(-1).innerHTML=1;
newRow.insertCell(-1).innerHTML=rep.ct_ch4_eq;
newRow.insertCell(-1).innerHTML=rep.ct_n2o_eq;
newRow.insertCell(-1).innerHTML="<small>"+rep.comment+"</small>";
});
})();
</script>