<?php
  //use environmental variables for my path
// Works as of PHP 4.3.0
$home = getenv('WEB');
//error_log($home);
#home=$_ENV['WEB'];
set_include_path("$home/html/include");
// Works in all PHP versions
ini_set('include_path', "$home/html/include");

date_default_timezone_set('UTC');


# DB
$user = "web";
$pass = "webuser";
$host = getenv('PGHOSTADDR');
$port = "5432";
$dbne = "isc";

#Open database connection
$dbh = pg_connect("host=$host port=$port dbname=$dbne user=$user password=$pass") or die("Could not connect") ;
pg_query($dbh, "set search_path to isc");
$cmd = "SELECT MAX(date(last_date))
FROM isc.last_date
WHERE reint_date IS NOT NULL";
#Execute the query
$result = pg_query($dbh, $cmd);
// fetch_row is supposed to be faster than fetch_array
$row = pg_fetch_row($result);
$lastdate  = $row[0];
$lastyr = date("Y",strtotime($lastdate));
?>
    <!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>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <title>Citing the ISC</title>
        <link rel="icon" href="/images/favicon.ico" type="image/ico" />
        <link rel="stylesheet" type="text/css" href="/css/iscschema.css">
    </head>

    <body>
        <div id="container">
            <?php include("$home/html/include/header.php"); ?>
            <div id="maingeneral">
                <div id="content" style="min-height: 450px;">
                <?php include("include/leftmenu.php"); ?>
                    <div id="rightinner">
                        <div id="lefttitle">
                            <h3>Citing the IASPEI Reference Event List (GT) List</h3>
                            <p>Data retrieved from the IASPEI Reference Event List (GT) List should always be cited. This includes use by academic or commercial organisations, as well as by individuals.</p>
                            <p>Please cite both the <u>ISC products</u> and the relevant <u>scientific articles</u> that describe the procedures used to create this product:</p>
                            <p>International Seismological Centre (20XX), IASPEI Reference Event (GT) List, <a href="https://doi.org/10.31905/32NSJF7V">https://doi.org/10.31905/32NSJF7V</a></p>

                            <p>Bondár, I. and K.L. McLaughlin (2009). A New Ground Truth Data Set For Seismic Studies, Seismol. Res. Lett., 80, 465-472, <a href="https://doi.org/10.1785/gssrl.80.3.465">https://doi.org/10.1785/gssrl.80.3.465</a></p>
                            
                            <p>Bondár, E. Engdahl, X. Yang, H. Ghalib, A. Hofstetter, V. Kirichenko, R. Wagner, I. Gupta, G. Ekström, E. Bergman, H. Israelsson, and K. McLaughlin (2004). Collection of a reference event set for regional and teleseismic location calibration, Bull. Seismol. Soc. Am., 94, 1528-1545, <a href="https://dx.doi.org/10.1785/012003128">http://dx.doi.org/10.1785/012003128</a></p>

                            <p>Bondár, E. Bergman, E. Engdahl, B. Kohl, Y.-L. Kung, and K. McLaughlin (2008). A hybrid multiple event location technique to obtain ground truth event locations, Geophys. J. Int., 175, <a href="https://doi.org/10.1111/j.1365-246X.2011.05011.x">https://doi.org/10.1111/j.1365-246X.2011.05011.x</a></p>

                        <br/>
                        <br/>
                    </div>
                </div>
            </div>
        </div>
        <?php include("$home/html/include/footer.php"); ?>
        <?php
//close the container div
?>
        </div>
    </body>

    </html>
