<?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 International Registry of Seismograph Stations (IR)</h3>
                        <p>Data retrieved from the International Registry of Seismograph Stations (FDSN network code: IR) should always be cited. This includes use by academic or commercial organisations, as well as by individuals.</p>
                        <h3>The product citation:</h3>
                        <p>International Seismological Centre (20XX), International Seismograph Station Registry (IR), <a href="https://doi.org/10.31905/EL3FQQ40">https://doi.org/10.31905/EL3FQQ40</a></p>

<br/>

 <!-- Table with sponsor logo-->
    <h3 align="center">Sponsored by:</h3>
     <table align="center" width="80%">
         <tr>
             <td align="center" style="padding-top:15px;">
                 <a href="http://reftek.com/" target="_blank" rel="noopener noreferrer"><img src="/images/misc/REF-TEK-logo.png" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>

             <td align="center" style="padding-top:15px;">
                 <a href="http://www.geosig.com/" target="_blank" rel="noopener noreferrer"><img src="/images/misc/GS_logo.png" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
             <td align="center" style="padding-top:15px;">
                <a href="http://www.tai-de.com/en/" target="_blank" rel="noopener noreferrer"><img src="/sponsors/images/Taide_logo.jpg" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
<!--             <td align="center" style="padding-top:15px;">
                <a href="http://www.guralp.com"><img src="/images/misc/Guralp.jpg" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>-->
<!---             <td align="center" style="padding-top:15px;">
                <a href="http://src.com.au"><img src="/sponsors/images/SRC_Logo.jpg" width="170"></a>
             </td>-->

         </tr>
     </table>
<!--2ndTable-->
     <table align="center" width="80%">
         <tr>
             <td align="center" style="padding-top:15px;">
                <a href="https://asirseismic.com/" target="_blank" rel="noopener noreferrer"><img src="/sponsors/images/ASIR_logo_black.png" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
             <td align="center" style="padding-top:15px;">
                <a href="https://sara.pg.it/" target="_blank" rel="noopener noreferrer"><img src="/sponsors/images/SARA_logo_screenshot.png" width="170"></a>
             </td>

         </tr>
     </table>

<!--3rdTable-->
     <table align="center" width="80%">
         <tr>
             <td align="center" style="padding-top:15px;">
                <a href="http://www.guralp.com" target="_blank" rel="noopener noreferrer"><img src="/images/misc/Guralp.jpg" width="170"></a>
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
             <td align="center" width="5%">
                 &nbsp;
             </td>
             <td align="center" style="padding-top:15px;">
                <a href="http://src.com.au" target="_blank" rel="noopener noreferrer"><img src="/sponsors/images/SRC_Logo.jpg" width="170"></a>
             </td>

         </tr>
     </table>


<br>

                        <br/>
                        <br/>
                    </div>
                </div>
            </div>

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

    </html>
