$xoopsTpl -> assign('letter_sortby' , $list); // Added by Wheeler
$xoopsTpl -> assign('sorted_by' , $list); // Added by Wheeler
include 'header.php';
include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
global $xoopsModuleConfig, $myts, $xoopsModules;
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
$orderby = isset($_GET['orderby']) ? convertorderbyin($_GET['orderby']) : $xoopsModuleConfig['filexorder'];
$cid = (isset($_GET['cid']) && $_GET['cid'] > 0) ? $_GET['cid'] : 0;
$list = isset($_GET['list']) ? $_GET['list'] : 0; // Added by Wheeler
----- Search down page -----
/**
* Breadcrumb
*/
$mytree = new XoopsTree($xoopsDB->prefix('xxxxx_cat'), "cid", "pid");
$pathstring = "" . _MD_XXX_MAIN . " : ";
$pathstring .= $mytree->getNicePathFromId($cid, "title", "viewcat.php?op=");
$xoopsTpl->assign('category_path', $pathstring);
$xoopsTpl->assign('category_id', $cid);
$xoopsTpl -> assign('letter_sortby' , $list); // Added by Wheeler
$arr = $mytree->getFirstChild($cid, "weight");
----- Search down page -----
/**
* Extract Download information from database
*/
$xoopsTpl->assign('show_categort_title', true);
$sql = "SELECT * FROM " . $xoopsDB->prefix('xxxxx_downloads') . " ";
if (isset($_GET['selectdate']))
{
$sql .= "WHERE TO_DAYS(FROM_UNIXTIME(published)) = TO_DAYS(FROM_UNIXTIME(" . $_GET['selectdate'] . "))
AND published > 0 AND published <= " . time() . " AND (expired = 0 OR expired > " . time() . ")
AND offline = 0 ORDER BY published DESC";
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$total_numrows['count'] = $xoopsDB->getRowsNum($xoopsDB->query($sql));
} elseif (isset($_GET['list']))
{
$sql .= "WHERE title LIKE '" . $_GET['list'] . "%' AND published > 0 AND
published <= " . time() . " AND (expired = 0 OR expired > " . time() . ") AND offline = 0
ORDER BY " . $orderby;
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$total_numrows['count'] = $xoopsDB->getRowsNum($xoopsDB->query($sql)); // Added by Wheeler
}
else
{
$sql .= "WHERE cid=" . $cid . " AND published > 0 AND published <= " . time() . "
AND (expired = 0 OR expired > " . time() . ") AND offline = 0
ORDER BY " . $orderby;
$result = $xoopsDB->query($sql, $xoopsModuleConfig['perpage'] , $start);
$xoopsTpl->assign('show_categort_title', false);
$total_numrows = xxx_getTotalItems($cid);
}
----- Search down page -----
/**
* Nav page render
*/
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
if (isset($_GET['selectdate']))
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'list=' . $_GET['selectdate']);
}
else if ($list) // Added by Wheeler
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'list=' . $list); // Added by Wheeler
}
else
{
$pagenav = new XoopsPageNav($total_numrows['count'], $xoopsModuleConfig['perpage'] , $start, 'start', 'cid=' . $cid);
}
$page_nav = $pagenav->renderNav();
$istrue = (isset($page_nav) && !empty($page_nav)) ? true : false;
$xoopsTpl->assign('page_nav', $istrue);
$xoopsTpl->assign('pagenav', $page_nav);
}
<table class="wrapper">
<tr>
<td>td>
<td class="content" rowspan="2">
<table id="spacer"><tr><td>td>tr>table>
centre column
td>
<td>td>
tr>
<tr>
<td class="spine">
left column
td>
<td class="spine">
right column
td>
tr>
table>