<?php
if (basename($GLOBALS['PHP_SELF'] == "linkformat.php")) {
	exit();
}
echo "<tr>";
if ( $mylinks_useshots ) {
	$tablewidth=$mylinks_shotwidth+10;
	echo "<td width='$tablewidth' align='center'";
	if ( $logourl ) {
		echo "><a href='".XOOPS_URL."/modules/mylinks/visit.php?lid=$lid' target='_blank'><img src='".XOOPS_URL."/modules/mylinks/images/shots/$logourl' width='$mylinks_shotwidth' alt='' /></a></td><td>";
	} else {
		echo " style='display: none;'><b>"._MD_NOSHOTS."</b></td><td colspan='2'>";
	}
//	echo "</td>";
} else {
echo "<td>";
}

global $xoopsUser;
if ( $xoopsUser ) {
	if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
		echo "<a href=\"".XOOPS_URL."/modules/mylinks/admin/?op=modLink&lid=$lid\"><img src=\"".XOOPS_URL."/modules/mylinks/images/editicon.gif\" border=\"0\" alt=\""._MD_EDITTHISLINK."\" /></a>  ";		}
}
echo "<a name=\"$lid\"></a><a href=\"".XOOPS_URL."/modules/mylinks/visit.php?lid=".$lid."\" target=\"_blank\"><b>$ltitle</b></a>";
newlinkgraphic($time, $status);
popgraphic($hits);
echo "<br>";
echo "<b>"._MD_DESCRIPTIONC."</b>$description<br><b> "._MD_EMAILC."</b>$email ";
echo "<br><b>"._MD_LASTUPDATEC."</b>$datetime<b> "._MD_HITSC."</b>$hits ";
//voting & comments stats
        
if ($rating!="0" || $rating!="0.0") {
	if ($votes == 1) {
		$votestring = _MD_ONEVOTE;
	} else {
		$votestring = sprintf(_MD_NUMVOTES,$votes);
	}
	echo "<b>"._MD_RATINGC."</b>$rating ($votestring)";
}
if ($comments != 0) {
	if ($comments == 1) {
		$poststring = _MD_ONEPOST;
	} else {
		$poststring = sprintf(_MD_NUMPOSTS,$comments);
	}
	echo "<b>"._MD_COMMENTSC."</b>$poststring";
}
echo "<br><a href=\"".XOOPS_URL."/modules/mylinks/ratelink.php?lid=".$lid."\">"._MD_RATETHISSITE."</a>";
echo " | <a href=\"".XOOPS_URL."/modules/mylinks/modlink.php?lid=".$lid."\">"._MD_MODIFY."</a>";
echo " | <a href=\"".XOOPS_URL."/modules/mylinks/brokenlink.php?lid=".$lid."\">"._MD_REPORTBROKEN."</a>";
echo " | <a target='_top' href='mailto:?subject=".sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])."&body=".sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).":  ".XOOPS_URL."/modules/mylinks/singlelink.php?lid=".$lid."'>"._MD_TELLAFRIEND."</a>";
//echo " | <a href>"._MD_VSCOMMENTS."</a>";
echo "</td></tr>";
?>