blob: a9e992e2cc6731801a00507d2e558fe0976dd5da [file]
<?php
/*******************************************************************************
* Copyright (c) 2004-2015 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Denis Roy (Eclipse Foundation)- initial API and implementation
*******************************************************************************/
?>
<p>Download requests are recorded two ways: by <a href="http://wiki.eclipse.org/IT_Infrastructure_Doc#Use_the_Find_a_Mirror_script.3F">using the Find A Mirror script</a>, and by <a href="http://wiki.eclipse.org/Equinox_p2_download_stats">configuring your p2 repository</a>. Direct downloads from mirrors and files linked directly to download.eclipse.org are not included here.</p>
<h2>Search Criteria</h2>
<form method="post" action="stats.php" name="form1">
<table width="100%">
<tr>
<td valign="top" width="50%">
<table border="0">
<tr>
<td>Partial&#160;File&#160;Name:</td>
<td>
<select name="forge">
<option value="eclipse" <?php echo($_FORGE == "eclipse" ? "selected" : ""); ?>>download.eclipse.org</option>
<option value="polarsys" <?php echo($_FORGE == "polarsys" ? "selected" : ""); ?>>download.polarsys.org</option>
<option value="locationtech" <?php echo($_FORGE == "locationtech" ? "selected" : ""); ?>>download.locationtech.org</option>
</select>
<input type="text" name="filename" size="25" value="<?= $_FILENAME ?>" maxlength="255" />
<a href="javascript:fnPopup('file');"><img src="../images/ico_help.gif" border="0" /></a></td>
</tr>
<tr>
<td></td>
<td class="micro">TIP: For faster results, use a file name that matches the fewest amount of files as possible to satisfy your query. For instance, query using the core file(s) that make up one user download.</td>
</tr>
<tr><td colspan="2">&#160;</td></tr>
<tr>
<td>Group&#160;files</td>
<td><input type="checkbox" value="1" name="group" <?= $_GROUP == 1 ? "checked" : "" ?> /></td>
</tr>
<tr>
<td>&#160;</td>
<td><input name="gobutton" type="button" value="Run query" onclick="fnValidateForm();" /></td>
</tr>
</table>
</td>
<td valign="top" width="50%" bgcolor="#f0f0f0">
<table border="0">
<tr>
<td colspan="2"><b>Please note: </b> Using the filter options below causes queries to run against <?= $objJSON->totalStats ?> download records, from <?= $objJSON->sinceDate ?> to <?= $objJSON->toDate ?>. Today's downloads will be added at midnight Eastern Time.</td>
</tr>
<tr>
<td>Date</td>
<td>
<select name="view_date" onchange="document.forms[0].datefrom.value=''; document.forms[0].dateto.value='';">
<option value="all">All</option>
<option value="today" <?= $_VIEW_DATE == "today" ? "selected" : "" ?>>Today</option>
<option value="yesterday" <?= $_VIEW_DATE == "yesterday" ? "selected" : "" ?>>Yesterday</option>
<option value="L7" <?= $_VIEW_DATE == "L7" ? "selected" : "" ?>>Last 7 days</option>
<option value="L30" <?= $_VIEW_DATE == "L30" ? "selected" : "" ?>>Last 30 days</option>
<option value="custom" <?= $_VIEW_DATE == "custom" ? "selected" : "" ?>>Custom Dates</option>
</select>
<a href="javascript:fnPopup('date');"><img src="../images/ico_help.gif" border="0" /></a>
</td>
</tr>
<tr>
<td></td><td>OR</td>
</tr>
<tr>
<td>Date&#160;From:</td>
<td><input type="text" name="datefrom" size="20" value="<?= $_DATEFROM ?>" maxlength="10" onchange="document.forms[0].view_date.selectedIndex = 5;" /> <a href="javascript:fnPopup('date');"><img src="../images/ico_help.gif" border="0" /></a></td>
</tr>
<tr>
<td>Date To:</td>
<td><input type="text" name="dateto" size="20" value="<?= $_DATETO ?>" maxlength="10" onchange="document.forms[0].view_date.selectedIndex=5;" /> <a href="javascript:fnPopup('date');"><img src="../images/ico_help.gif" border="0" /></a></td>
</tr>
<tr>
<td></td>
<td class="micro">TIP: date-based queries take much longer to run when files with tens of thousands of downloads are included.</td>
</tr>
<tr>
<td></td><td>&#160;</td>
</tr>
<tr>
<td>View</td>
<td>
<select name="view">
<option value="sum" <?= $_VIEW == "sum" ? "selected" : "" ?>>Total per file</option>
<option value="daily" <?= $_VIEW == "daily" ? "selected" : "" ?>>Daily download stats per file</option>
<option value="ccode" <?= $_VIEW == "ccode" ? "selected" : "" ?>>Grouped by country</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<h2>Results</h2>
<script language="javascript">
function fnPopup(_file){
var filename = 'inc/en_popup_' + _file + '.html';
window.open(filename, 'popup', 'toolbar=no,scrollbar=no,addressbar=no,width=500,height=400');
}
document.forms['form1'].email.className = "";
function fnValidateForm() {
// if(document.forms[0].email.value == "") {
// document.forms[0].email.className = "inputInvalid";
// alert("Please type an e-mail address to send the results to.");
// document.forms[0].email.focus();
// return false;
//}
document.forms['form1'].gobutton.value='Please wait a while...';
document.forms['form1'].gobutton.disabled=true;
document.forms['form1'].submit();
}
</script>
</font>
Query took <?= sprintf("%0.3f", $objJSON->queryTime) ?> sec