use getHTML* function

This commit is contained in:
jack 2014-06-25 16:52:28 +02:00
parent a649e2e659
commit 0d5a6b0dc7

View File

@ -50,44 +50,40 @@ $rrdfile = getRRDFileForAS($as);
<p>No data found for AS <?php echo $as; ?></p>
<?php else: ?>
<div class="title">4 Hourly</div>
<?php if ($showv6): ?>
<img class="detailgraph" src="gengraph.php?v=4&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" alt="weekly graph" />
<img class="detailgraph2" src="gengraph.php?v=6&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" alt="weekly graph" />
<?php else: ?>
<img class="detailgraph" src="gengraph.php?as=<?php echo $as; ?>&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" alt="weekly graph" />
<?php endif; ?>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 4 * 3600, time(), 'hourly graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 4 * 3600, time(), 'hourly graph', 'detailgraph2', true);
?>
<div class="title">Daily</div>
<?php if ($showv6): ?>
<img class="detailgraph" src="gengraph.php?v=4&amp;as=<?php echo $as; ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" alt="daily graph" />
<img class="detailgraph2" src="gengraph.php?v=6&amp;as=<?php echo $as; ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" alt="daily graph" />
<?php else: ?>
<img class="detailgraph" src="gengraph.php?as=<?php echo $as; ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" alt="daily graph" />
<?php endif; ?>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 24 * 3600, time(), 'daily graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 24 * 3600, time(), 'daily graph', 'detailgraph2', true);
?>
<div class="title">Weekly</div>
<?php if ($showv6): ?>
<img class="detailgraph" src="gengraph.php?v=4&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 7*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" alt="weekly graph" />
<img class="detailgraph2" src="gengraph.php?v=6&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 7*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" alt="weekly graph" />
<?php else: ?>
<img class="detailgraph" src="gengraph.php?as=<?php echo $as; ?>&amp;start=<?php echo (time() - 7*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" alt="weekly graph" />
<?php endif; ?>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 7 * 86400, time(), 'weekly graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 7 * 86400, time(), 'weekly graph', 'detailgraph2', true);
?>
<div class="title">Monthly</div>
<?php if ($showv6): ?>
<img class="detailgraph" src="gengraph.php?v=4&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 30*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" alt="monthly graph" />
<img class="detailgraph2" src="gengraph.php?v=6&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 30*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" alt="monthly graph" />
<?php else: ?>
<img class="detailgraph" src="gengraph.php?as=<?php echo $as; ?>&amp;start=<?php echo (time() - 30*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" alt="monthly graph" />
<?php endif; ?>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 30 * 86400, time(), 'monthly graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 30 * 86400, time(), 'monthly graph', 'detailgraph2', true);
?>
<div class="title">Yearly</div>
<?php if ($showv6): ?>
<img class="detailgraph" src="gengraph.php?v=4&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 365*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" alt="yearly graph" />
<img class="detailgraph2" src="gengraph.php?v=6&amp;as=<?php echo $as; ?>&amp;start=<?php echo (time() - 365*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" alt="yearly graph" />
<?php else: ?>
<img class="detailgraph" src="gengraph.php?as=<?php echo $as; ?>&amp;start=<?php echo (time() - 365*86400);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" alt="yearly graph" />
<?php endif; ?>
<?php
echo getHTMLImg($as, 4, $asinfo['descr'], time() - 365 * 86400, time(), 'yearly graph', 'detailgraph', true);
if ($showv6)
echo getHTMLImg($as, 6, $asinfo['descr'], time() - 365 * 86400, time(), 'yearly graph', 'detailgraph2', true);
?>
<?php endif; ?>
<?php else: ?>