function genForm($curLabel = "", $curSlice = "") { global $gArchive; $selectRun = selectArchiveLabel($gArchive, $curLabel, true, false); $selectSlice = selectSlice($curSlice); $sForm = <<<OUTPUT <table cellpadding=0 cellspacing=0 border=0> <tr> <td> <label>Choose a run:</label> </td> \t<td> {$selectRun} </td> <td></td> </tr> <tr> \t<td> <label>Choose URLs:</label> </td> \t<td> {$selectSlice} </td> <td> <input type=submit value="Get Charts"> </td> </tr> </table> OUTPUT; return $sForm; }
<form> <div> <label>Choose URLs:</label> <?php echo selectSlice($gSlice, "", "s"); ?> <label style="margin-left: 1em;">Start:</label> <?php echo selectArchiveLabel($gArchive, minLabel(), false, false, "minlabel"); ?> <label style="margin-left: 1em;">End:</label> <?php echo selectArchiveLabel($gArchive, maxLabel(), false, false, "maxlabel"); ?> <input style="margin-left: 1em;" class=button type=submit value="Submit"> </div> </form> <?php $gUrl = NULL; // TODO - get rid of this require_once 'trends.inc'; ?> <?php echo uiFooter();
<a href="about.php#bigquery">Write your own custom queries!</a> </div> <h1>Interesting stats</h1> <p> Got a stat you'd like to see? <a href="https://github.com/HTTPArchive/httparchive/issues" target="_blank">Suggest it!</a> <span style="margin-left: 20px;">New feature: <a href="compare.php">Compare two runs</a></span> </p> <div style="float: left; margin-right: 20px;"> <form> <label>Choose a run:</label> <?php echo selectArchiveLabel($gArchive, $gLabel); ?> </form> </div> <form> <label>Choose URLs:</label> <?php echo selectSlice($gSlice, "onchange='document.location=\"?a={$gArchive}&l={$gLabel}&s=\"+escape(this.options[this.selectedIndex].value)'"); ?> </form> <div id=interesting style="margin-top: 40px;"> <?php require_once "stats.inc"; require_once "charts.inc";
<div style="margin-left: 3em;"> <?php echo selectArchiveLabel($gArchive, $gLabel1, true, false, 'label1'); ?> <span id=allthumbs1started style="color: #DDD; vertical-align: super; margin-left: 1em;"></span> </div> <div id=allthumbs1> <?php echo $imgs1; ?> </div> </td> <td style="width: 50%; padding: 0; padding-left: 2em;"> <div style="margin-left: 3em;"> <?php echo selectArchiveLabel($gArchive, $gLabel2, true, false, 'label2'); ?> <span id=allthumbs2started style="color: #DDD; vertical-align: super; margin-left: 1em;"></span> </div> <div id=allthumbs2> <?php echo $imgs2; ?> </div> </td> </tr> </table> <script> var sellabel1 = document.getElementById('label1'); var sellabel2 = document.getElementById('label2');