<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
// www.bcoos.net 2006-09 1.0.2 GPL
//v1.3 www.exoops.info 2006/03 
// $Id: viewformat.php,v 1.2 2004/03/20 18:35:12 greyhead 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
// ------------------------------------------------------------------------- //
// Passed on      : My Downloads
// New module name: My Sections
// Version        : 1.1
// Modified by    : Faisal
// Website        : < http://www.a-xoops.com >
// Email          : info@a-xoops.com
// ------------------------------------------------------------------------- //
global $_SERVER,$bcoosConfig;
if ( preg_match("/viewformat\.php/i", $_SERVER['PHP_SELF']) ) {
        exit();
        }
echo "<table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td align='center' valign='top'>";
$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='0' class='bg2'><tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class='bg1'><tr>
<td class='bg3'>
<b>".$dtitle."</b>";
newdownloadgraphic($time, $status);
popgraphic($hits);
echo "
<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."time.gif' border='0' alt='"._SUBMITTEDDATE."'>
".$datetime."
</td><td width='1%' class='bg3' align='center' valign='bottom' nowrap>
<a href='".XOOPS_URL."/modules/mysections/print.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."print.gif' border='0' alt='"._MD_PRINT."'></a>
</td>
</tr><tr>
<td colspan='2' class='bg1' style='border-bottom:solid 1px;border-top:solid 1px;'>";
if ($url) {
echo "
<table width='100%' cellspacing='0' cellpadding='5' border='0'><tr><td align='center' valign='top'>
<table width='100%' border='0' cellspacing='1' cellpadding='0' class='bg2'><tr>
<td>
<table width='100%' border='0' cellspacing='1' cellpadding='4' class='bg1'><tr>
<td class='bg3' align='center'>";
    if ($mysectionsConfig['useshots']) {
        if ($logourl) {
        $logourl = formatURL(XOOPS_URL.'/modules/mysections/cache/shots/', $logourl);
        echo "<a href='$logourl'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."editor_image.gif' border='0' alt='"._SHOTIMAGE." ".$dtitle."' /></a>&nbsp;&nbsp;";
        }
    }
echo "
<a href='".XOOPS_URL."/modules/mysections/visit.php?lid=$lid'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."counter.gif' border='0' align='absmiddle' alt='"._HITS."' /></a>
".$hits."
&nbsp;&nbsp;
"._VERSION.":&nbsp;".$version."
&nbsp;&nbsp;
<img src='".XOOPS_URL."/modules/mysections/images/size.gif' border='0' align='absmiddle' alt='"._FILESIZE."' />
".PrettySize($size)."
&nbsp;&nbsp;
<img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."platform.gif' border='0' align='absmiddle' alt='"._MD_SUPPORTEDPLAT."' />
".$platform."
&nbsp;&nbsp;
<img src='".XOOPS_URL."/modules/mysections/images/home.gif' border='0' align='absmiddle' alt='"._HOMEPAGE."' />
<a href='".$homepage."' title='".$homepage."'>"._HOMEPAGE."</a>
";
echo "</td></tr></table></td></tr></table></td></tr></table><br>";
}
echo "
".trim($contentpages[$page])."
<P align='center'>".$nav->renderNav()."</p>
</td>
</tr><tr><td colspan='2' class='bg3' align='center'>";
if ( $rating != "0" || $rating != "0.0" ) {
        if ($votes == 1) {
                $votestring = _ONEVOTE;
                } else {
                        $votestring = sprintf(_VOTES, $votes);
                }
        echo "<b>"._RATING.':'."</b>$rating ($votestring)";
}
global $xoopsUser, $bcoosConfig;
echo " <a href='".XOOPS_URL."/modules/mysections/ratefile.php?lid=$lid'>"._RATEIT."</a>";
if ($xoopsUser) {
        echo " | <a href='".XOOPS_URL."/modules/mysections/modfile.php?lid=$lid'>"._MODIFY."</a>";
}
echo " | <a href='".XOOPS_URL."/modules/mysections/brokenfile.php?lid=$lid'>"._REPORTBROKEN."</a>";
echo " | <a target='_top' href='mailto:?subject=".rawurlencode(sprintf(_INTERESTINGTHINGAT, $bcoosConfig['title']))."&body=".rawurlencode(sprintf(_INTERESTINGTHINGAT, $bcoosConfig['title']).":\r\n".XOOPS_URL."/modules/mysections/singlefile.php?lid=$lid")."'>"._TELLAFRIEND."</a>";
if ($xoopsUser) {
        if ( $xoopsUser->isAdmin($xoopsModule->mid()) ) {
                echo "&nbsp; &nbsp; <a href='".XOOPS_URL."/modules/mysections/admin/index.php?lid=$lid&fct=mysections&op=modDownload'><img src='".XOOPS_URL."/images/icons/".$bcoosConfig['iconset']."edit.gif' border='0' alt='"._EDIT."' /></a>";
        }
}
echo "</td></tr></table></td></tr></table></td></tr></table>";
?>