<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
//v1.2 www.exoops.info 2006/03 
// $Id: singlefile.php,v 1.1 2003/08/31 12:16:12 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
// ------------------------------------------------------------------------- //
include_once("header.php");
$mytree = new XoopsTree($db->prefix("mydownloads_cat"), "cid", "pid");
$lid    = intval($_GET['lid']);
$sql    = "
		SELECT
		lid,
		cid,
		title,
		url,
		homepage,
		version,
		size,
		platform,
		logourl,
		status,
		date,
		hits,
		rating,
		votes,
		comments,
		description
		FROM
		".$db->prefix("mydownloads_downloads")."
		WHERE
		lid=$lid
		AND
		status>0";
$result = $db->query($sql);
if ($db->getRowsNum($result) != 1) {
	redirect_header('index.php');
	exit();
}
list($lid, $cid, $title, $url, $homepage, $version, $size, $platform, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = $db->fetchRow($result);
$bcoosConfig['title'] .= " - ".$title;
include_once(XOOPS_ROOT_PATH."/header.php");
OpenTable();
mainheader();
echo "<table width='100%' cellspacing='0' cellpadding='3' border='0'><tr><td>";
$pathstring  = "<a href=index.php>"._MODIFYCATEGORY."</a> : ";
$nicepath    = $mytree->getNicePathFromId($cid, "title", "viewcat.php?");
$pathstring .= $nicepath;
echo "<b>".$pathstring."</b></td></tr></table><br />";
$rating      = number_format($rating, 2);
$dtitle      = $myts->makeTboxData4Show($title);
$url         = $myts->makeTboxData4Show($url);
$homepage    = $myts->makeTboxData4Show($homepage);
$version     = $myts->makeTboxData4Show($version);
$size        = $myts->makeTboxData4Show($size);
$platform    = $myts->makeTboxData4Show($platform);
$logourl     = $myts->makeTboxData4Show($logourl);
$datetime    = formatTimestamp($time, "s");
$description = $myts->makeTareaData4Show($description, 1, 1, 1);
include("include/dlformat.php");
CloseTable();
include_once("footer.php");
?>
