mirror of
https://github.com/manuelkasper/AS-Stats.git
synced 2025-02-20 11:44:12 +08:00
add function to generate images html
This commit is contained in:
parent
f60103604f
commit
a649e2e659
10
www/func.inc
10
www/func.inc
@ -221,20 +221,20 @@ function clearCacheFileASSET($asset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# return the html used in top.php : <a href=blabla><img src=blabla/></url>
|
# return the html used in top.php : <a href=blabla><img src=blabla/></url>
|
||||||
function getHTMLUrl($as, $ipversion, $desc, $start, $end, $peerusage){
|
function getHTMLUrl($as, $ipversion, $desc, $start, $end){
|
||||||
$img = getHTMLImg($as, $ipversion, $desc, $start, $end, $peerusage, '', '', false);
|
$img = getHTMLImg($as, $ipversion, $desc, $start, $end, '', '', false);
|
||||||
$result = "<a href='history.php?as=$as&peerusage=$peerusage&v=$ipversion' target='_blank'>$img</a>";
|
$result = "<a href='history.php?as=$as&v=$ipversion' target='_blank'>$img</a>";
|
||||||
return($result);
|
return($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
# return the html used in history.php (for example) : <img src=blabla/>
|
# return the html used in history.php (for example) : <img src=blabla/>
|
||||||
function getHTMLImg($as, $ipversion, $desc, $start, $end, $peerusage, $alt, $class, $history = false){
|
function getHTMLImg($as, $ipversion, $desc, $start, $end, $alt, $class, $history = false){
|
||||||
global $top_graph_width;
|
global $top_graph_width;
|
||||||
global $top_graph_height;
|
global $top_graph_height;
|
||||||
|
|
||||||
$dname = rawurlencode("AS$as - $desc - IPV$ipversion");
|
$dname = rawurlencode("AS$as - $desc - IPV$ipversion");
|
||||||
|
|
||||||
$result = "<img alt='$alt' class='$class' src='gengraph.php?v=$ipversion&as=$as&peerusage=$peerusage&dname=$dname&start=$start&end=$end";
|
$result = "<img alt='$alt' class='$class' src='gengraph.php?v=$ipversion&as=$as&dname=$dname&start=$start&end=$end";
|
||||||
if(!$history)
|
if(!$history)
|
||||||
$result .= "&width=$top_graph_width&height=$top_graph_height&nolegend=1";
|
$result .= "&width=$top_graph_width&height=$top_graph_height&nolegend=1";
|
||||||
$result .= "'";
|
$result .= "'";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user