From: <go...@us...> - 2002-10-11 10:05:49
|
Update of /cvsroot/xoops/xoops-current/html/modules/mydownloads In directory usw-pr-cvs1:/tmp/cvs-serv9405/html/modules/mydownloads Modified Files: index.php Log Message: Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops-current/html/modules/mydownloads/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 11 Oct 2002 06:14:21 -0000 1.3 --- index.php 11 Oct 2002 10:05:16 -0000 1.4 *************** *** 29,33 **** $mytree = new XoopsTree($xoopsDB->prefix("mydownloads_cat"),"cid","pid"); - $q = "SELECT cid, title, imgurl FROM ".$xoopsDB->prefix("mydownloads_cat")." WHERE pid = 0 ORDER BY title"; $result=$xoopsDB->query($q) or die(""); --- 29,32 ---- *************** *** 44,62 **** $mainlink = 0; mainheader($mainlink); ! echo "<center>\n"; ! echo "<table border=\"0\" cellspacing=\"5\" cellpadding=\"0\" width=\"90%\"><tr>\n"; $count = 0; while($myrow = $xoopsDB->fetchArray($result)) { $title = $myts->makeTboxData4Show($myrow['title']); ! echo "<td valign=\"top\" align=\"right\">"; if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); ! echo "<a href=\"".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$myrow['cid']."\"><img src=\"".$imgurl."\" height=\"50\" border=\"0\"></a>"; } else { ! echo ""; } $totaldownload = getTotalItems($myrow['cid'], 1); ! echo "</td><td valign=\"top\" width=\"40%\" align=\"left\"><a href=\"".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$myrow['cid']."\"><b>$title</b></a> ($totaldownload)<br />"; // get child category objects $arr=array(); --- 43,61 ---- $mainlink = 0; mainheader($mainlink); ! ! echo "<table border='0' cellspacing='5' cellpadding='0' width='90%'><tr>\n"; $count = 0; while($myrow = $xoopsDB->fetchArray($result)) { $title = $myts->makeTboxData4Show($myrow['title']); ! echo "<td valign='top' align='right'>"; if ($myrow['imgurl'] && $myrow['imgurl'] != "http://"){ $imgurl = $myts->makeTboxData4Edit($myrow['imgurl']); ! echo "<a href='".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$myrow['cid']."'><img src='$imgurl' height='50' alt='' /></a>"; } else { ! echo ""; } $totaldownload = getTotalItems($myrow['cid'], 1); ! echo "</td><td valign='top' width='40%' align='left'><a href='".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$myrow['cid']."'><b>$title</b></a> ($totaldownload)<br />"; // get child category objects $arr=array(); *************** *** 64,88 **** $space = 0; $chcount = 0; ! foreach($arr as $ele){ $chtitle=$myts->makeTboxData4Show($ele['title']); ! if ($chcount>5){ echo "..."; break; } ! if ($space>0) { ! echo ", "; ! } ! echo "<a href=\"".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$ele['cid']."\">".$chtitle."</a>"; ! $space++; $chcount++; } ! if ($count<1) { ! echo "</td>"; ! } ! $count++; ! if ($count==2) { ! echo "</td></tr><tr>"; ! $count = 0; ! } } echo "</td></tr></table>"; --- 63,87 ---- $space = 0; $chcount = 0; ! foreach($arr as $ele) { $chtitle=$myts->makeTboxData4Show($ele['title']); ! if ( $chcount > 5 ) { echo "..."; break; } ! if ( $space > 0 ) { ! echo ", "; ! } ! echo "<a href='".XOOPS_URL."/modules/mydownloads/viewcat.php?cid=".$ele['cid']."'>$chtitle</a>"; ! $space++; $chcount++; } ! if ( $count < 1 ) { ! echo "</td>"; ! } ! $count++; ! if ( $count == 2 ) { ! echo "</tr><tr>"; ! $count = 0; ! } } echo "</td></tr></table>"; *************** *** 90,100 **** echo "<br /><br />"; printf(_MD_THEREARE,$numrows); ! echo "</center>"; CloseTable(); ! echo "<br>"; OpenTable(); ! echo "<div align=\"center\"><big><b>"._MD_LATESTLIST."</b></big><br /><br />"; showNew($mytree); echo "</div>"; --- 89,99 ---- echo "<br /><br />"; printf(_MD_THEREARE,$numrows); ! CloseTable(); ! echo "<br />"; OpenTable(); ! echo "<div><big><b>"._MD_LATESTLIST."</b></big><br /><br />"; showNew($mytree); echo "</div>"; |