| Server IP : 198.244.165.102 / Your IP : 216.73.216.218 [ Web Server : nginx/1.24.0 System : Linux modovh-ub-01 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : colleary ( 1011) PHP Version : 8.3.23 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/johnhoban/hold_html/modules/ |
Upload File : |
<?php
/**
* @version $Id: mod_sections.php,v 1.5 2005/02/11 14:53:06 kochp Exp $
* @package Mambo
* @copyright (C) 2000 - 2005 Miro International Pty Ltd
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Mambo is Free Software
*/
global $mosConfig_offset;
//** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$count = intval( $params->get( 'count', 20 ) );
$access = !$mainframe->getCfg( 'shownoauth' );
$now = date( 'Y-m-d H:i:s', time() + $mosConfig_offset * 60 * 60 );
$database->setQuery(
"SELECT a.id AS id, a.title AS title, COUNT(b.id) as cnt"
. "\n FROM #__sections as a"
. "\n LEFT JOIN #__content as b"
. "\n ON a.id=b.sectionid"
. ($access ? "\n AND b.access<='$my->gid'" : "" )
. "\n AND (b.publish_up = '0000-00-00 00:00:00' OR b.publish_up <= '". $now ."' )"
. "\n AND (b.publish_down = '0000-00-00 00:00:00' OR b.publish_down >= '". $now ."' )"
. "\n WHERE a.scope='content'"
. "\n AND a.published='1'"
. ($access ? "\n AND a.access<='$my->gid'" : "" )
. "\n GROUP BY a.id"
. "\n HAVING COUNT(b.id)>0"
. "\n ORDER BY a.ordering"
. "\n LIMIT $count"
);
$rows = $database->loadObjectList();
echo "<ul>\n";
if ($rows) {
foreach ($rows as $row) {
echo " <li><a href=\"" . sefRelToAbs("index.php?option=com_content&task=blogsection&id=".$row->id) . "\">" . $row->title . "</a></li>\n";
}
echo "</ul>\n";
}
?>