$p->set_var('LANG_CURSORTBY', _MD_CURSORTBY); $p->set_var('orderbyTrans', $orderbyTrans = convertorderbytrans($orderby)); $p->parse('sort_menu', 'sortmenu'); } $cssid = 1; for ($x = 1; $x <= $numrows; $x++) { list($lid, $cid, $dtitle, $url, $homepage, $version, $size, $submitter, $logourl, $status, $time, $hits, $rating, $votes, $comments, $description) = DB_fetchArray($result); $rating = number_format($rating, 2); $dtitle = $myts->makeTboxData4Show($dtitle); $url = $myts->makeTboxData4Show($url); $homepage = $myts->makeTboxData4Show($homepage); $version = $myts->makeTboxData4Show($version); $size = $myts->makeTboxData4Show($size); $logourl = $myts->makeTboxData4Show($logourl); $datetime = formatTimestamp($time); $description = PLG_replaceTags($myts->makeTareaData4Show($description, 0)); //no html $result2 = DB_query("SELECT username,fullname,photo FROM {$_TABLES['users']} WHERE uid = {$submitter}"); list($submitter_name, $submitter_fullname, $photo) = DB_fetchARRAY($result2); $submitter_name = COM_getDisplayName($submitter, $submitter_name, $submitter_fullname); include $_CONF['path'] . 'plugins/filemgmt/include/dlformat.php'; $p->set_var('cssid', $cssid); $p->parse('filelisting_records', 'records', true); $cssid = $cssid == 2 ? 1 : 2; // Print Google-like paging navigation $base_url = $_CONF['site_url'] . '/filemgmt/viewcat.php?cid=' . $cid . '&orderby=' . convertorderbyout($orderby); $p->set_var('page_navigation', COM_printPageNavigation($base_url, $page, $numpages)); } $p->parse('output', 'page'); $display .= $p->finish($p->get_var('output')); } else {
$result = DB_query($sql); list($lid, $cid, $dtitle, $url, $homepage, $version, $size, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $description) = DB_fetchArray($result); $pathstring = '<a href="' . $_CONF['site_url'] . '/filemgmt/index.php">' . _MD_MAIN . '</a> : '; $nicepath = $mytree->getNicePathFromId($cid, "title", "{$_CONF['site_url']}/filemgmt/viewcat.php"); $pathstring .= $nicepath; $p->set_var('category_path_link', $pathstring); $rating = number_format($rating, 2); $dtitle = $myts->makeTboxData4Show($dtitle); $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); $description = $myts->makeTareaData4Show($description, 0); //no html $result2 = DB_query("SELECT username,fullname,photo FROM {$_TABLES['users']} WHERE uid = {$submitter}"); list($submitter_name, $submitter_fullname, $photo) = DB_fetchArray($result2); $submitter_name = COM_getDisplayName($submitter, $submitter_name, $submitter_fullname); include $_CONF['path_html'] . '/filemgmt/include/dlformat.php'; $p->set_var('cssid', 1); $p->parse('filelisting_records', 'records'); $delete_option = SEC_hasRights('filemgmt.edit'); $order = ''; if (isset($_POST['order'])) { $order = COM_applyFilter($_POST['order']); } $mode = ''; if (isset($_POST['mode'])) { $mode = COM_applyFilter($_POST['mode']);
list($lid, $cid, $dtitle, $url, $homepage, $version, $size, $logourl, $submitter, $status, $time, $hits, $rating, $votes, $comments, $description) = DB_fetchArray($result); $display = FM_siteHeader($dtitle); $pathstring = "<a href='{$_CONF['site_url']}/filemgmt/index.php'>" . _MD_MAIN . "</a> : "; $nicepath = $mytree->getNicePathFromId($cid, "title", "{$_CONF['site_url']}/filemgmt/viewcat.php"); $pathstring .= $nicepath; $p->set_var('category_path_link', $pathstring); $rating = number_format($rating, 2); $dtitle = $myts->makeTboxData4Show($dtitle); $url = $myts->makeTboxData4Show($url); $homepage = $myts->makeTboxData4Show($homepage); $version = $myts->makeTboxData4Show($version); $size = $myts->makeTboxData4Show($size); $platform = $myts->makeTboxData4Show(isset($platform) ? $platform : ''); $logourl = $myts->makeTboxData4Show($logourl); $datetime = formatTimestamp($time); $description = PLG_replaceTags($myts->makeTareaData4Show($description, 0), 'filemgmt', 'description'); //no html $result2 = DB_query("SELECT username,fullname,photo FROM {$_TABLES['users']} WHERE uid = {$submitter}"); list($submitter_name, $submitter_fullname, $photo) = DB_fetchArray($result2); $submitter_name = COM_getDisplayName($submitter, $submitter_name, $submitter_fullname); include $_CONF['path'] . 'plugins/filemgmt/include/dlformat.php'; $p->set_var('cssid', 1); $p->parse('filelisting_records', 'records'); if (SEC_hasRights('filemgmt.edit')) { $delete_option = true; } else { $delete_option = false; } if (!isset($title)) { $title = ''; }