Various fixes

Fix command line injection. Make number of hours in top.php a parameter
instead of duplicating file. Add config setting for compatibility with
old (< 1.3) RRDtool versions. Move contributed shell scripts to subdir.
This commit is contained in:
Manuel Kasper 2014-03-12 14:05:29 +01:00
parent 2cb4585ea1
commit c40a7fff28
9 changed files with 74 additions and 283 deletions

View File

@ -18,7 +18,9 @@ $hidelinkusagename = true; # $showtitledetail will need to be true to allow t
$whois = "/usr/bin/whois"; $whois = "/usr/bin/whois";
$assetpath = "asset"; $assetpath = "asset";
$asset_cache_life ="604800"; # 604800 seconds = 7 days $asset_cache_life = "604800"; # 604800 seconds = 7 days
$compat_rrdtool12 = false; # compatibility with RRDtool 1.2 (show95th will not work if this is set)
/* Custom links to be shown for each AS. You can use %as% as a /* Custom links to be shown for each AS. You can use %as% as a
placeholder for the ASN. */ placeholder for the ASN. */

View File

@ -31,12 +31,12 @@ $cmd = "$rrdtool graph - " .
"--color BACK#ffffff00 --color SHADEA#ffffff00 --color SHADEB#ffffff00 "; "--color BACK#ffffff00 --color SHADEA#ffffff00 --color SHADEB#ffffff00 ";
if($outispositive) if($outispositive)
$cmd .= "--vertical-label '<- IN | OUT ->' "; $cmd .= "--vertical-label '<- IN | OUT ->' ";
else else
$cmd .= "--vertical-label '<- OUT | IN ->' "; $cmd .= "--vertical-label '<- OUT | IN ->' ";
if($showtitledetail && $_GET['dname'] != "") if($showtitledetail && $_GET['dname'] != "")
$cmd .= "--title " . str_replace(' ','\ ',rawurldecode($_GET['dname'])) . " "; $cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
else else
if (isset($_GET['v']) && is_numeric($_GET['v'])) if (isset($_GET['v']) && is_numeric($_GET['v']))
$cmd .= "--title IPv" . $_GET['v'] . " "; $cmd .= "--title IPv" . $_GET['v'] . " ";
@ -56,39 +56,52 @@ foreach ($knownlinks as $link) {
$cmd .= "DEF:{$link['tag']}_{$v6_el}out=\"$rrdfile\":{$link['tag']}_{$v6_el}out:AVERAGE "; $cmd .= "DEF:{$link['tag']}_{$v6_el}out=\"$rrdfile\":{$link['tag']}_{$v6_el}out:AVERAGE ";
} }
$tot_in_bits = "CDEF:tot_in_bits=0"; if ($compat_rrdtool12) {
$tot_out_bits = "CDEF:tot_out_bits=0"; /* generate a CDEF for each DEF to multiply by 8 (bytes to bits), and reverse for outbound */
foreach ($knownlinks as $link) {
/* generate a CDEF for each DEF to multiply by 8 (bytes to bits), and reverse for outbound */ if ($outispositive) {
foreach ($knownlinks as $link) { $cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in,-8,* ";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits_pos={$link['tag']}_{$v6_el}in,8,* "; $cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out,8,* ";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits_pos={$link['tag']}_{$v6_el}out,8,* "; } else {
$tot_in_bits .= ",{$link['tag']}_{$v6_el}in_bits_pos,ADDNAN"; $cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in,8,* ";
$tot_out_bits .= ",{$link['tag']}_{$v6_el}out_bits_pos,ADDNAN"; $cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out,-8,* ";
} }
}
$cmd .= "$tot_in_bits ";
$cmd .= "$tot_out_bits ";
$cmd .= "VDEF:tot_in_bits_95th_pos=tot_in_bits,95,PERCENT ";
$cmd .= "VDEF:tot_out_bits_95th_pos=tot_out_bits,95,PERCENT ";
if ($outispositive) {
$cmd .= "CDEF:tot_in_bits_95th=tot_in_bits,POP,tot_in_bits_95th_pos,-1,* ";
$cmd .= "CDEF:tot_out_bits_95th=tot_out_bits,POP,tot_out_bits_95th_pos,1,* ";
} else { } else {
$cmd .= "CDEF:tot_in_bits_95th=tot_in_bits,POP,tot_in_bits_95th_pos,1,* "; $tot_in_bits = "CDEF:tot_in_bits=0";
$cmd .= "CDEF:tot_out_bits_95th=tot_out_bits,POP,tot_out_bits_95th_pos,-1,* "; $tot_out_bits = "CDEF:tot_out_bits=0";
}
foreach ($knownlinks as $link) { /* generate a CDEF for each DEF to multiply by 8 (bytes to bits), and reverse for outbound */
if ($outispositive) { foreach ($knownlinks as $link) {
$cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in_bits_pos,-1,* "; $cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits_pos={$link['tag']}_{$v6_el}in,8,* ";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out_bits_pos,1,* "; $cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits_pos={$link['tag']}_{$v6_el}out,8,* ";
} else { $tot_in_bits .= ",{$link['tag']}_{$v6_el}in_bits_pos,ADDNAN";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out_bits_pos,-1,* "; $tot_out_bits .= ",{$link['tag']}_{$v6_el}out_bits_pos,ADDNAN";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in_bits_pos,1,* "; }
}
$cmd .= "$tot_in_bits ";
$cmd .= "$tot_out_bits ";
$cmd .= "VDEF:tot_in_bits_95th_pos=tot_in_bits,95,PERCENT ";
$cmd .= "VDEF:tot_out_bits_95th_pos=tot_out_bits,95,PERCENT ";
if ($outispositive) {
$cmd .= "CDEF:tot_in_bits_95th=tot_in_bits,POP,tot_in_bits_95th_pos,-1,* ";
$cmd .= "CDEF:tot_out_bits_95th=tot_out_bits,POP,tot_out_bits_95th_pos,1,* ";
} else {
$cmd .= "CDEF:tot_in_bits_95th=tot_in_bits,POP,tot_in_bits_95th_pos,1,* ";
$cmd .= "CDEF:tot_out_bits_95th=tot_out_bits,POP,tot_out_bits_95th_pos,-1,* ";
}
foreach ($knownlinks as $link) {
if ($outispositive) {
$cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in_bits_pos,-1,* ";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out_bits_pos,1,* ";
} else {
$cmd .= "CDEF:{$link['tag']}_{$v6_el}out_bits={$link['tag']}_{$v6_el}out_bits_pos,-1,* ";
$cmd .= "CDEF:{$link['tag']}_{$v6_el}in_bits={$link['tag']}_{$v6_el}in_bits_pos,1,* ";
}
}
} }
/* generate graph area/stack for inbound */ /* generate graph area/stack for inbound */
@ -120,11 +133,11 @@ foreach ($knownlinks as $link) {
$i++; $i++;
} }
if($show95th){ if ($show95th && !$compat_rrdtool12) {
$cmd .= "LINE1:tot_in_bits_95th#FF0000 "; $cmd .= "LINE1:tot_in_bits_95th#FF0000 ";
$cmd .= "LINE1:tot_out_bits_95th#FF0000 "; $cmd .= "LINE1:tot_out_bits_95th#FF0000 ";
$cmd .= "GPRINT:tot_in_bits_95th_pos:'95th in %6.2lf%s' "; $cmd .= "GPRINT:tot_in_bits_95th_pos:'95th in %6.2lf%s' ";
$cmd .= "GPRINT:tot_out_bits_95th_pos:'95th out %6.2lf%s' "; $cmd .= "GPRINT:tot_out_bits_95th_pos:'95th out %6.2lf%s' ";
} }
# zero line # zero line

View File

@ -1,24 +1,24 @@
<?php <?php
$dpagename = basename($_SERVER['PHP_SELF'], ".php"); $dpagename = basename($_SERVER['PHP_SELF'], ".php");
if ($dpagename == "top"): if ($dpagename == "top" && !@$_GET['numhours']):
?><a href="top.php" class="selected">Top AS</a> | <?php ?><a href="top.php" class="selected">Top AS</a> | <?php
else: else:
?><a href="top.php">Top AS</a> | <?php ?><a href="top.php">Top AS</a> | <?php
endif; endif;
if ($dpagename == "top4"): if ($dpagename == "top" && @$_GET['numhours'] == 4):
?><a href="top4.php" class="selected">4 Hour</a> | <?php ?><a href="top.php?numhours=4" class="selected">4 Hour</a> | <?php
else: else:
?><a href="top4.php">4 Hour</a> | <?php ?><a href="top.php?numhours=4">4 Hour</a> | <?php
endif; endif;
if ($dpagename == "top12"): if ($dpagename == "top" && @$_GET['numhours'] == 12):
?><a href="top12.php" class="selected">12 Hour</a> | <?php ?><a href="top.php?numhours=12" class="selected">12 Hour</a> | <?php
else: else:
?><a href="top12.php">12 Hour</a> | <?php ?><a href="top.php?numhours=12">12 Hour</a> | <?php
endif; endif;

View File

@ -72,7 +72,7 @@ $cmd = "$rrdtool graph - " .
"--color BACK#ffffff00 --color SHADEA#ffffff00 --color SHADEB#ffffff00 "; "--color BACK#ffffff00 --color SHADEA#ffffff00 --color SHADEB#ffffff00 ";
if($showtitledetail && $_GET['dname'] != "") if($showtitledetail && $_GET['dname'] != "")
$cmd .= "--title " . str_replace(' ','\ ',rawurldecode($_GET['dname'])) . " "; $cmd .= "--title " . escapeshellarg($_GET['dname']) . " ";
else else
if (isset($_GET['v']) && is_numeric($_GET['v'])) if (isset($_GET['v']) && is_numeric($_GET['v']))
$cmd .= "--title IPv" . $_GET['v'] . " "; $cmd .= "--title IPv" . $_GET['v'] . " ";

View File

@ -14,6 +14,14 @@ if ($ntop > 200)
$topas = getasstats_top($ntop); $topas = getasstats_top($ntop);
if (@$_GET['numhours']) {
$start = time() - $_GET['numhours']*3600;
$end = time();
} else {
$start = "";
$end = "";
}
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@ -81,10 +89,10 @@ echo join(" | ", $htmllinks);
</th> </th>
<td> <td>
<?php if ($showv6): ?> <?php if ($showv6): ?>
<a href="history.php?v=4&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=4&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" width="581" height="207" border="0" /></a> <a href="history.php?v=4&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=4&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>&amp;start=<?=$start?>&amp;end=<?=$end?>" width="581" height="207" border="0" /></a>
<a href="history.php?v=6&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=6&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" width="581" height="207" border="0" /></a> <a href="history.php?v=6&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=6&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>&amp;start=<?=$start?>&amp;end=<?=$end?>" width="581" height="207" border="0" /></a>
<?php else: ?> <?php else: ?>
<a href="history.php?as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" width="581" height="189" border="0" /></a> <a href="history.php?as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;nolegend=1&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>&amp;start=<?=$start?>&amp;end=<?=$end?>" width="581" height="189" border="0" /></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>

View File

@ -1,116 +0,0 @@
<?php
/*
* $Id$
*
* (c) 2008 Monzoon Networks AG. All rights reserved.
*/
require_once('func.inc');
if (isset($_GET['n']))
$ntop = (int)$_GET['n'];
if ($ntop > 200)
$ntop = 200;
$topas = getasstats_top($ntop);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Refresh" content="300" />
<title>Top <?php echo $ntop; ?> AS</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="nav">
<form action="" method="get">
Number of AS:
<input type="text" name="n" size="4" value="<?php echo $ntop; ?>" />
<input type="submit" value="Go" style="margin-right: 2em" />
<?php include('headermenu.inc'); ?>
</form>
</div>
<div class="pgtitle">Top <?php echo $ntop; ?> AS</div>
<table class="astable">
<?php $i = 0; foreach ($topas as $as => $nbytes):
$asinfo = getASInfo($as);
$class = (($i % 2) == 0) ? "even" : "odd";
?>
<tr class="<?php echo $class; ?>">
<th>
<div class="title">
<?php
$flagfile = "flags/" . strtolower($asinfo['country']) . ".gif";
if (file_exists($flagfile)):
$is = getimagesize($flagfile);
?>
<img src="<?php echo $flagfile; ?>" <?php echo $is[3]; ?>>
<?php endif; ?>
AS<?php echo $as; ?>: <?php echo $asinfo['descr']; ?>
</div>
<div class="small">IPv4: ~ <?php echo format_bytes($nbytes[0]); ?> in /
<?php echo format_bytes($nbytes[1]); ?> out in the last 24 hours</div>
<?php if ($showv6): ?>
<div class="small">IPv6: ~ <?php echo format_bytes($nbytes[2]); ?> in /
<?php echo format_bytes($nbytes[3]); ?> out in the last 24 hours</div>
<?php endif; ?>
<?php if (!empty($customlinks)): ?>
<div class="customlinks">
<?php
$htmllinks = array();
foreach ($customlinks as $linkname => $url) {
$url = str_replace("%as%", $as, $url);
$htmllinks[] = "<a href=\"$url\" target=\"_blank\">" . htmlspecialchars($linkname) . "</a>\n";
}
echo join(" | ", $htmllinks);
?>
</div>
<?php endif; ?>
<div class="rank">
#<?php echo ($i+1); ?>
</div>
</th>
<td>
<?php if ($showv6): ?>
<a href="history.php?v=4&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=4&amp;nolegend=1&amp;start=<?php echo (time() - 12*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" width="581" height="207" border="0" /></a>
<a href="history.php?v=6&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=6&amp;nolegend=1&amp;start=<?php echo (time() - 12*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" width="581" height="207" border="0" /></a>
<?php else: ?>
<a href="history.php?as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;nolegend=1&amp;start=<?php echo (time() - 12*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" width="581" height="189" border="0" /></a>
<?php endif; ?>
</td>
</tr>
<?php $i++; endforeach; ?>
</table>
<div id="legend">
<table>
<?php
$knownlinks = getknownlinks();
foreach ($knownlinks as $link) {
echo "<tr><td style=\"border: 4px solid #fff;\">";
echo "<table style=\"border-collapse: collapse; margin: 0; padding: 0\"><tr>";
echo "<td width=\"9\" height=\"18\" style=\"background-color: #{$link['color']}\">&nbsp;</td>";
echo "<td width=\"9\" height=\"18\" style=\"opacity: 0.73; background-color: #{$link['color']}\">&nbsp;</td>";
echo "</tr></table>";
echo "</td><td>&nbsp;" . $link['descr'] . "</td></tr>\n";
}
?>
</table>
</div>
<?php include('footer.inc'); ?>
</body>
</html>

View File

@ -1,116 +0,0 @@
<?php
/*
* $Id$
*
* (c) 2008 Monzoon Networks AG. All rights reserved.
*/
require_once('func.inc');
if (isset($_GET['n']))
$ntop = (int)$_GET['n'];
if ($ntop > 200)
$ntop = 200;
$topas = getasstats_top($ntop);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Refresh" content="300" />
<title>Top <?php echo $ntop; ?> AS</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div id="nav">
<form action="" method="get">
Number of AS:
<input type="text" name="n" size="4" value="<?php echo $ntop; ?>" />
<input type="submit" value="Go" style="margin-right: 2em" />
<?php include('headermenu.inc'); ?>
</form>
</div>
<div class="pgtitle">Top <?php echo $ntop; ?> AS</div>
<table class="astable">
<?php $i = 0; foreach ($topas as $as => $nbytes):
$asinfo = getASInfo($as);
$class = (($i % 2) == 0) ? "even" : "odd";
?>
<tr class="<?php echo $class; ?>">
<th>
<div class="title">
<?php
$flagfile = "flags/" . strtolower($asinfo['country']) . ".gif";
if (file_exists($flagfile)):
$is = getimagesize($flagfile);
?>
<img src="<?php echo $flagfile; ?>" <?php echo $is[3]; ?>>
<?php endif; ?>
AS<?php echo $as; ?>: <?php echo $asinfo['descr']; ?>
</div>
<div class="small">IPv4: ~ <?php echo format_bytes($nbytes[0]); ?> in /
<?php echo format_bytes($nbytes[1]); ?> out in the last 24 hours</div>
<?php if ($showv6): ?>
<div class="small">IPv6: ~ <?php echo format_bytes($nbytes[2]); ?> in /
<?php echo format_bytes($nbytes[3]); ?> out in the last 24 hours</div>
<?php endif; ?>
<?php if (!empty($customlinks)): ?>
<div class="customlinks">
<?php
$htmllinks = array();
foreach ($customlinks as $linkname => $url) {
$url = str_replace("%as%", $as, $url);
$htmllinks[] = "<a href=\"$url\" target=\"_blank\">" . htmlspecialchars($linkname) . "</a>\n";
}
echo join(" | ", $htmllinks);
?>
</div>
<?php endif; ?>
<div class="rank">
#<?php echo ($i+1); ?>
</div>
</th>
<td>
<?php if ($showv6): ?>
<a href="history.php?v=4&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=4&amp;nolegend=1&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV4"); ?>" width="581" height="207" border="0" /></a>
<a href="history.php?v=6&amp;as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;v=6&amp;nolegend=1&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . " - IPV6"); ?>" width="581" height="207" border="0" /></a>
<?php else: ?>
<a href="history.php?as=<?php echo $as; ?>" target="_blank"><img alt="AS graph" src="gengraph.php?as=<?php echo $as; ?>&amp;width=500&amp;height=150&amp;nolegend=1&amp;start=<?php echo (time() - 4*3600);?>&amp;end=<?php echo time(); ?>&amp;dname=<?php echo rawurlencode("AS" . $as . " - " . $asinfo['descr'] . ""); ?>" width="581" height="189" border="0" /></a>
<?php endif; ?>
</td>
</tr>
<?php $i++; endforeach; ?>
</table>
<div id="legend">
<table>
<?php
$knownlinks = getknownlinks();
foreach ($knownlinks as $link) {
echo "<tr><td style=\"border: 4px solid #fff;\">";
echo "<table style=\"border-collapse: collapse; margin: 0; padding: 0\"><tr>";
echo "<td width=\"9\" height=\"18\" style=\"background-color: #{$link['color']}\">&nbsp;</td>";
echo "<td width=\"9\" height=\"18\" style=\"opacity: 0.73; background-color: #{$link['color']}\">&nbsp;</td>";
echo "</tr></table>";
echo "</td><td>&nbsp;" . $link['descr'] . "</td></tr>\n";
}
?>
</table>
</div>
<?php include('footer.inc'); ?>
</body>
</html>