<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
//v1.5 www.bcoos.net 2006-09 GPL
//v1.4 www.bcoos.net 2006-08 GPL
//v1.3 www.exoops.info 2006/05 GPL
//v1.2 www.exoops.info 2006/03 GPL
// $Id: dlformat.php,v 1.1 2003/08/31 12:16:13 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
// ------------------------------------------------------------------------- //
if ( preg_match("/dlformat\.php/i", $_SERVER['PHP_SELF']) ) {
	exit();
	}
echo "<table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td align='center' valign='top'>";
if ($mydownloadsConfig['useshots']) {
	if ($logourl) {
		$logourl = formatURL(XOOPS_URL.'/modules/mydownloads/cache/shots/', $logourl);
		echo "
		<a href='".XOOPS_URL."/modules/mydownloads/visit.php?lid=$lid'><img src='$logourl' border='0' alt='' width='".$mydownloadsConfig['shotwidth']."' /></a>
		</td><td align='center' valign='top' width='100%'>";
	}
}
$str_path = $mytree->getNicePathFromId($cid, "title", "viewcat.php?");
$str_path = substr($str_path, 0, -2);
$str_path = str_replace(":", "<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."arrow.gif' border='0' alt=''>", $str_path);
echo "
<table width='100%' border='0' cellspacing='1' cellpadding='4' class='bg1'><tr class='bg2'><td>
<b>"._CATEGORY.': '."</b>".$str_path."</td><td style='text-align: right;'>
";
global $xoopsUser, $meta, $xoopsModule,$bcoosConfig;
echo "
<a href='".$homepage."' title='".$homepage."'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."www.gif' border='0' align='absmiddle' alt='"._HOMEPAGE."' /></a>
<a target='_top' href='mailto:?subject=".rawurlencode(sprintf(_INTERESTINGTHINGAT, $meta['title']))."&body=".rawurlencode(sprintf(_INTERESTINGTHINGAT, $meta['title']).":\r\n".XOOPS_URL."/modules/mydownloads/singlefile.php?lid=$lid")."'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."email.gif' alt='"._TELLAFRIEND."' /></a>
<a href='".XOOPS_URL."/modules/mydownloads/brokenfile.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."broken_file.gif' alt='"._REPORTBROKEN."' /></a>";
if ($xoopsUser) { echo " <a href='".XOOPS_URL."/modules/mydownloads/modfile.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif' alt='"._MODIFY."' /></a>"; }
$commentscount = commentsCount($lid);
if ($commentscount == 0) { 
echo "  <a href='".XOOPS_URL."/modules/mydownloads/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/mydownloads/newcomment.php?item_id=$lid'> <img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."pen.gif' alt='"._COMMENTS."' /></a> <a href='".XOOPS_URL."/modules/mydownloads/".$xoopsModule->dirname().".php?id_content=$lid'>".$commentscount." "._COMMENTS.": </a>"; 
}
echo "
</td></tr><tr>
<td class='bg3'>
<a href='".XOOPS_URL."/modules/mydownloads/visit.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."counter.gif' border='0' alt='"._DOWNLOADNOW."'></a>
<a href='".XOOPS_URL."/modules/mydownloads/visit.php?lid=$lid'><b>".$dtitle."</b></a>  v".$version." - ".$datetime."";
newdownloadgraphic($time, $status);
popgraphic($hits);
if ($xoopsUser) {
	if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
		echo "<a href='".XOOPS_URL."/modules/mydownloads/admin/index.php?lid=$lid&fct=mydownloads&op=modDownload'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif' border='0' alt='"._EDIT."' /></a>";
	}
}
echo " </td><td class='bg3' align='right' valign='bottom'>
<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."counter.gif' border='0' align='absmiddle' alt='"._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/mydownloads/ratefile.php?lid=$lid'>$rating ($votestring)</a>";
} else {
echo " <a href='".XOOPS_URL."/modules/mydownloads/ratefile.php?lid=$lid'> "._VOTE."</a>";
}
echo "
<img src='".XOOPS_URL."/modules/mydownloads/images/size.gif' border='0' align='absmiddle' alt='"._FILESIZE."' /> ".PrettySize($size)."
<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."platform.gif' border='0' align='absmiddle' alt='"._MD_SUPPORTEDPLAT."' /> ".$platform."
</td></tr>
<tr><td colspan='2' class='bg1' style='border-top:solid 1px;' >
$description
<br /><br />
</td></tr></table>
</td></tr></table>";
?>
