mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-05 10:49:37 +02:00
101 lines
3.9 KiB
PHP
101 lines
3.9 KiB
PHP
<?php
|
|
/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
|
|
/**
|
|
*
|
|
* LICENSE: GNU General Public License, version 2 (GPLv2)
|
|
* Copyright 2001 - 2015 Ampache.org
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License v2
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
*/
|
|
|
|
$boxtitle = T_('Statistical Graphs');
|
|
if ($blink) {
|
|
$boxtitle .= ' - ' . $blink;
|
|
}
|
|
?>
|
|
<?php UI::show_box_top($boxtitle, 'box box_graph'); ?>
|
|
<div class="stats_graph">
|
|
<?php
|
|
foreach ($gtypes as $gtype) {
|
|
$graph_link = AmpConfig::get('web_path') . "/graph.php?type=" . $gtype . "&start_date=" . $start_date . "&end_date=" . $end_date . "&zoom=" . $zoom . "&user_id=" . $user_id . "&object_type=" . $object_type . "&object_id=" . $object_id;
|
|
?>
|
|
<a href="<?php echo $graph_link; ?>&width=1400&height=690" target="_blank" title="<?php echo T_('Show large'); ?>"><img src="<?php echo $graph_link; ?>" /></a>
|
|
<br /><br />
|
|
<?php } ?>
|
|
</div>
|
|
|
|
<?php
|
|
if (AmpConfig::get('geolocation')) {
|
|
?>
|
|
<div class="stats_graph">
|
|
<?php
|
|
$graph = new Graph();
|
|
$graph->display_map($user_id, $object_type, $object_id, $start_date, $end_date, $zoom);
|
|
?>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
|
|
<form action='<?php echo get_current_path(); ?>' method='post' enctype='multipart/form-data'>
|
|
<dl class="media_details">
|
|
<?php $rowparity = UI::flip_class(); ?>
|
|
<dt class="<?php echo $rowparity; ?>"><?php echo T_('Start Date'); ?></dt>
|
|
<dd class="<?php echo $rowparity; ?>"><input type="text" name="start_date" id="start_date" value="<?php echo $f_start_date; ?>" /></dd>
|
|
<?php $rowparity = UI::flip_class(); ?>
|
|
<dt class="<?php echo $rowparity; ?>"><?php echo T_('End Date'); ?></dt>
|
|
<dd class="<?php echo $rowparity; ?>"><input type="text" name="end_date" id="end_date" value="<?php echo $f_end_date; ?>" /></dd>
|
|
<?php $rowparity = UI::flip_class(); ?>
|
|
<dt class="<?php echo $rowparity; ?>"><?php echo T_('Zoom'); ?></dt>
|
|
<dd class="<?php echo $rowparity; ?>">
|
|
<select name="zoom">
|
|
<?php
|
|
$date_formats = array(
|
|
'year' => T_('Year'),
|
|
'month' => T_('Month'),
|
|
'day' => T_('Day'),
|
|
'hour' => T_('Hour')
|
|
);
|
|
foreach ($date_formats as $dtype => $dname) {
|
|
echo "<option value='" . $dtype . "' ";
|
|
if ($dtype == $zoom) echo "selected";
|
|
echo ">" . $dname . "</option>";
|
|
}
|
|
?>
|
|
</select>
|
|
</dd>
|
|
<?php $rowparity = UI::flip_class(); ?>
|
|
<dt class="<?php echo $rowparity; ?>"></dt>
|
|
<dd class="<?php echo $rowparity; ?>">
|
|
<input type="submit" value="<?php echo T_('View'); ?>" />
|
|
</dd>
|
|
</dl>
|
|
<input type="hidden" name="user_id" value="<?php echo $user_id; ?>" />
|
|
<input type="hidden" name="object_type" value="<?php echo $object_type; ?>" />
|
|
<input type="hidden" name="object_id" value="<?php echo $object_id; ?>" />
|
|
<input type="hidden" name="action" value="<?php echo $_REQUEST['action']; ?>" />
|
|
<input type="hidden" name="type" value="<?php echo $type; ?>" />
|
|
</form>
|
|
<script>
|
|
$('#start_date').datetimepicker({
|
|
format: 'Y-m-d H:i',
|
|
theme: 'dark'
|
|
});
|
|
$('#end_date').datetimepicker({
|
|
format:'Y-m-d H:i',
|
|
theme: 'dark'
|
|
});
|
|
</script>
|
|
<?php UI::show_box_bottom(); ?>
|