header('Content-type: text/xml'); } $cmd = 'wget "' . urldecode($_GET['cmd']) . '" -O -'; $cmd = str_replace("\\'", "'", $cmd); //echo($cmd); $result = shell_exec($cmd); if ($_GET['type'] == 'votable' or $_GET['type'] == 'csv') { $result = substr($result, strpos($result, "\n") + 1, 10000000.0); //skip STILTS sql string $result = substr($result, 0, strpos($result, "Elapsed")); //skip wget elapsed } print_r($result); } else { require "hec_global.php"; echo hec_header("HELIO HEC - Results"); while (!checkdate($mo_from, $d_from, $y_from) and $d_from > 0) { $d_from--; } if (!checkdate($mo_from, $d_from, $y_from)) { msg_error('Start time is invalid, please verify'); exit; } while (!checkdate($mo_to, $d_to, $y_to) and $d_to > 0) { $d_to--; } if (!checkdate($mo_to, $d_to, $y_to)) { msg_error('End time is invalid, please verify'); exit; } if (mktime($h_from, $mi_from, $s_from, $mo_from, $d_from, $y_from) > mktime($h_to, $mi_to, $s_to, $mo_to, $d_to, $y_to)) {
<?php # ============================================= # HELIO 2009,2011 - by A.Santin # INAF - Trieste Astronomical Observatory # --------------------------------------------- # HEC - UI main page # hec_gui.php # last 11-feb-2011, 18-feb-2011 # header field changed by Alex from 'Catalogue' to 'Catalogue Description', 02-Apr-2011 # added cell padding and augmented spacing # ============================================= require "hec_global.php"; echo '<center>'; echo hec_header("HELIO HEC - GUI"); echo '<script type="text/javascript" src="hec_gui.js"></script>'; echo '<script type="text/javascript" src="scrollable.js"></script>'; echo '<form name="catform" action="hec_gui_fetch.php" target="_blank" method="get" onsubmit="return myOnsubmit()">' . "\n"; echo '<tr valign="middle"><td colspan=3 align="center" cellpadding="0"><b>Recent Changes</b> <a href="http://helio-cdaws.blogspot.com/search/label/HEC" target="hio_blog"><img src="blogspot-favicon_sm.jpg" title="CDAW Blog topic on the HEC" border=0></a> </td></tr>'; echo '<table cellpadding="2%">'; echo '<tr><td><b id="timetitleid">Search time interval</b>'; // echo '<tr><img src="info_icon.gif" onmouseover="InfoMouseOver(\'timetitleid\',\'Specify event time span for searching catalogues\')" onmouseout="InfoMouseOut(\'timetitleid\',\'Search time interval\')" </tr>'; echo ' <img src="info_icon.gif" title="Specify event time span for searching catalogues" border=0 style="font-style:italic;">'; echo '</td>'; echo '<td valign="middle" colspan="2">'; sec_date("from", TRUE); echo ' To '; sec_date("to", FALSE); echo ' <a href="hec.png" border=0 target="_blank"><img src="hec.png" align="middle" title="Catalogue time coverage" width=60 height=60></a>'; echo '</td></tr>';
//$cmd = 'wget "'.urldecode($_GET['cmd']).'" -O -'; $cmd = 'wget "' . $_GET['cmd'] . '" -O -'; //$cmd = str_replace("\'","'",$cmd); $cmd = stripslashes($cmd); //echo($cmd); $result = shell_exec($cmd); if ($_GET['type'] == 'votable' or $_GET['type'] == 'csv') { $result = substr($result, strpos($result, "\n") + 1, 10000000.0); //skip STILTS sql string $result = substr($result, 0, strpos($result, "Elapsed")); //skip wget elapsed } print_r($result); } else { require "hec_global_newcss.php"; echo hec_header("HELIO HEC - Free SQL"); $a = 1; // foreach($_GET as $k=>$v) { //print_r($_SERVER); $empty = true; if (true) { //($v=='istable') { $empty = false; //$query = str_replace("\'","'",$query); $query = stripslashes($_GET['sql']); if ($query == '') { $query = 'select * from goes_sxr_flare limit 10'; } echo '<form action="hec_gui_free.php" method="get">'; // echo '<input type="text" name ="sql" size="130" value="'.$query.'"><br>'; echo '<textarea name="sql" cols="80" rows="5">' . $query . '</textarea><br>';