<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
//v1.4 www.bcoos.net 2006-09 GPL
//v1.3 www.bcoos.net 2006-08 GPL
//v1.2 www.exoops.info 2006/03 
// $Id: linkformat.php,v 1.1 2003/08/31 12:16:29 half-dead Exp $
// ------------------------------------------------------------------------- //
//               E-Xoops: Content Management for the Masses                  //
//                       < http://www.e-xoops.com >                          //
// ------------------------------------------------------------------------- //
// Original Author: James Knickelbein
// Author Website : http://www.journeymilwaukee.com
// License Type   : GPL: See /manual/LICENSES/GPL.txt
// ------------------------------------------------------------------------- //
global $_SERVER;
if ( preg_match("/linkformat\.php/i", $_SERVER['PHP_SELF']) ) {
	exit();
	}
echo "<table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td align='center' valign='top'>";
if ($mylinksConfig['useshots']) {
	if ($logourl) {
		$logourl = formatURL(XOOPS_URL.'/modules/mylinks/cache/shots/', $logourl);
		echo "
		<a href='".XOOPS_URL."/modules/mylinks/visit.php?lid=$lid'><img src='$logourl' border='0' alt='' width='".$mylinksConfig['shotwidth']."' /></a>
		</td><td align='center' valign='top' width='100%'>";
	}
}
$path = $mytree->getNicePathFromId($cid, "title", "viewcat.php?");
$path = substr($path, 0, -2);
$path = str_replace(":", "<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."arrow.gif' board='0' alt=''>", $path);
echo "
<table width='100%' border='0' cellspacing='1' cellpadding='4' class='bg1'><tr class='bg2'><td>
<b>"._CATEGORY.': '."</b>".$path."</td><td align='right' >";
global $xoopsUser, $meta;
echo " <a target='_top' href='mailto:?subject=".rawurlencode(sprintf(_MD_INTRESTLINK, $meta['title']))."&body=".rawurlencode(sprintf(_MD_INTLINKFOUND,$meta['title']).":\r\n".XOOPS_URL."/modules/mylinks/singlelink.php?lid=$lid")."'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."email.gif' alt='"._TELLAFRIEND."' /></a>";
if ($xoopsUser) {
	echo "<a href='".XOOPS_URL."/modules/mylinks/modlink.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif' border='0' alt='"._MODIFY."' /></a>";
}
echo "<a href='".XOOPS_URL."/modules/mylinks/brokenlink.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."broken_file.gif' alt='"._REPORTBROKEN."' /></a>";
$commentscount = commentsCount($lid);
if ($commentscount == 0) {
 echo " <a href='".XOOPS_URL."/modules/mylinks/newcomment.php?item_id=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."pen.gif' alt='"._VIEWSENDCOMMENTS."' /></a>";
} else {
	echo " <a href='".XOOPS_URL."/modules/mylinks/newcomment.php?item_id=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."pen.gif' alt='"._VIEWSENDCOMMENTS."' /></a> <a href='".XOOPS_URL."/modules/mylinks/mylinks.php?id_content=$lid'>".$commentscount." "._COMMENTS.": </a>";
}
echo "</td></tr><tr><td class='bg3'>
<a href='".XOOPS_URL."/modules/mylinks/visit.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."www.gif' border='0' alt='".$url."'></a>
<a href='".XOOPS_URL."/modules/mylinks/visit.php?lid=$lid'><b>$ltitle</b></a> $datetime";
newlinkgraphic($time, $status);
popgraphic($hits);
if ($xoopsUser) {
	if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
		echo "<a href='".XOOPS_URL."/modules/mylinks/admin/index.php?lid=$lid&fct=mylinks&op=modLink'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif' border='0' alt='"._MD_EDITTHISLINK."' /></a>";
	}
}
echo "</td><td class='bg3' align='right' valign='bottom'> $hits "._HITS.":&nbsp;";
if ($rating != "0" || $rating != "0.0") {
	if ($votes == 1) { $votestring = _ONEVOTE; }
	else { $votestring = sprintf(_VOTES, $votes);}
	echo "<a href='".XOOPS_URL."/modules/mylinks/ratelink.php?lid=$lid'>$rating ($votestring)</a>";
}
else {
echo " <a href='".XOOPS_URL."/modules/mylinks/ratelink.php?lid=$lid'>"._VOTE."</a>";
}
echo "
</td></tr><tr>
<td colspan='2' class='bg1' style='border-top:solid 1px;'>
$description
<br /><br />
</td></tr></table>
</td></tr></table>";
?>