getPath( 'front_html', 'com_content' ) ); $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) ); $sectionid = intval( mosGetParam( $_REQUEST, 'sectionid', 0 ) ); $pop = intval( mosGetParam( $_REQUEST, 'pop', 0 ) ); $task = trim( mosGetParam( $_REQUEST, 'task', '' ) ); $limit = intval( mosGetParam( $_REQUEST, 'limit', '' ) ); $limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) ); $now = date( 'Y-m-d H:i:s', time() + $mosConfig_offset * 60 * 60 ); // Editor usertype check $access = new stdClass(); $access->canEdit = $acl->acl_check( 'action', 'edit', 'users', $my->usertype, 'content', 'all' ); $access->canEditOwn = $acl->acl_check( 'action', 'edit', 'users', $my->usertype, 'content', 'own' ); $access->canPublish = $acl->acl_check( 'action', 'publish', 'users', $my->usertype, 'content', 'all' ); // cache activation $cache =& mosCache::getCache( 'com_content' ); // loads function for frontpage component if ( $option == 'com_frontpage' ) { //frontpage( $option, $gid, $pop, $now ); $cache->call( 'frontpage', $gid, $access, $pop, $now ); return; } switch ( strtolower( $task ) ) { case 'findkey': findKeyItem( $gid, $access, $pop, $option, $now ); break; case 'view': showItem( $id, $gid, $access, $pop, $option, $now ); break; case 'section': $cache->call( 'showSection', $id, $gid, $access, $now ); break; case 'category': $cache->call( 'showCategory', $id, $gid, $access, $sectionid, $limit, $limitstart, $now ); break; case 'blogsection': $cache->call('showBlogSection', $id, $gid, $access, $pop, $now ); break; case 'blogcategorymulti': case 'blogcategory': $cache->call( 'showBlogCategory', $id, $gid, $access, $pop, $now ); break; case 'archivesection': showArchiveSection( $id, $gid, $access, $pop, $option ); break; case 'archivecategory': showArchiveCategory( $id, $gid, $access, $pop, $option, $now ); break; case 'edit': editItem( $id, $gid, $access, 0, $task, $Itemid ); break; case 'new': editItem( 0, $gid, $access, $sectionid, $task, $Itemid ); break; case 'save': mosCache::cleanCache( 'com_content' ); saveContent( $access ); break; case 'cancel': cancelContent( $access ); break; case 'emailform': emailContentForm( $id ); break; case 'emailsend': emailContentSend( $id ); break; case 'vote': recordVote ( $url , $user_rating , $cid , $database); break; default: $cache->call('showBlogSection', 0, $gid, $access, $pop, $now ); break; } /** * Searches for an item by a key parameter * @param int The user access level * @param object Actions this user can perform * @param int * @param string The url option * @param string A timestamp */ function findKeyItem( $gid, $access, $pop, $option, $now ) { global $database; $keyref = mosGetParam( $_REQUEST, 'keyref', '' ); $keyref = $database->getEscaped( $keyref ); $query = 'SELECT id FROM #__content WHERE attribs LIKE \'%keyref=' . $keyref . '%\' '; $database->setQuery( $query ); $id = $database->loadResult(); if ($id > 0) { showItem( $id, $gid, $access, $pop, $option, $now ); } else { echo 'Key not found '. $keyref; } } function frontpage( $gid, &$access, $pop, $now ) { global $database, $mainframe, $my, $Itemid; global $mosConfig_offset; $noauth = !$mainframe->getCfg( 'shownoauth' ); // Parameters $menu =& new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); $orderby_sec = $params->def( 'orderby_sec', '' ); $orderby_pri = $params->def( 'orderby_pri', '' ); // Ordering control $order_sec = _orderby_sec( $orderby_sec ); $order_pri = _orderby_pri( $orderby_pri ); $now = date( "Y-m-d H:i:s", time()+$mosConfig_offset*60*60 ); // query records $query = "SELECT a.*, ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count, u.name AS author, u.usertype, s.name AS section, cc.name AS category, g.name AS groups" . "\n FROM #__content AS a" . "\n INNER JOIN #__content_frontpage AS f ON f.content_id = a.id" . "\n INNER JOIN #__categories AS cc ON cc.id = a.catid" . "\n INNER JOIN #__sections AS s ON s.id = a.sectionid" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . "\n WHERE a.state = '1'" . ( $noauth ? "\n AND a.access <= '". $my->gid ."'" : '' ) . "\n AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '$now' )" . "\n AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '$now' )" . "\n ORDER BY ". $order_pri . $order_sec ; $database->setQuery( $query ); $rows = $database->loadObjectList(); // Dynamic Page Title $mainframe->SetPageTitle( $menu->name ); BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); } function showSection( $id, $gid, &$access, $now ) { global $database, $mainframe, $mosConfig_offset, $Itemid; $noauth = !$mainframe->getCfg( 'shownoauth' ); // Paramters $params = new stdClass(); if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosEmpty(); } $orderby = $params->get( 'orderby', '' ); $params->set( 'type', 'section' ); $params->def( 'page_title', 1 ); $params->def( 'pageclass_sfx', '' ); $params->def( 'other_cat_section', 1 ); $params->def( 'other_cat', 1 ); $params->def( 'empty_cat', 0 ); $params->def( 'cat_items', 1 ); $params->def( 'cat_description', 1 ); $params->def( 'back_button', $mainframe->getCfg( 'back_button' ) ); $params->def( 'pageclass_sfx', '' ); // Ordering control $orderby = _orderby_sec( $orderby ); $section = new mosSection( $database ); $section->load( $id ); if ( $access->canEdit ) { $xwhere = ''; $xwhere2 = "\n AND b.state >= '0'"; } else { $xwhere = "\n AND a.published = '1'"; $xwhere2 = "\n AND b.state = '1'" . "\n AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '". $now ."' )" . "\n AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '". $now ."' )" ; } // show/hide empty categories if ( $params->get( 'empty_cat' ) ) { $empty = ''; } else { $empty = "\n HAVING COUNT( b.id ) > 0"; } // Main Query $query = ' SELECT a.*, COUNT( b.id ) AS numitems FROM #__categories AS a LEFT JOIN #__content AS b ON b.catid = a.id '. $xwhere2 .' WHERE a.section = \'' . $section->id .'\' '. $xwhere; if ($noauth) { $query .= ' AND a.access <= '. $gid; } $query .= ' GROUP BY a.id ' . $empty . ' ORDER BY ' . $orderby; $database->setQuery( $query ); $other_categories = $database->loadObjectList(); // Dynamic Page Title $mainframe->SetPageTitle( $menu->name ); HTML_content::showContentList( $section, NULL, $access, $id, NULL, $gid, $params, NULL, $other_categories, NULL ); } /** * @param int The category id * @param int The group id of the user * @param int The access level of the user * @param int The section id * @param int The number of items to dislpay * @param int The offset for pagination */ function showCategory( $id, $gid, &$access, $sectionid, $limit, $limitstart, $now ) { global $database, $mainframe, $Itemid, $mosConfig_offset, $mosConfig_list_limit; $noauth = !$mainframe->getCfg( 'shownoauth' ); $selected = mosGetParam( $_POST, 'order', '' ); // Paramters $params = new stdClass(); if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosParameters( '' ); } if ( $selected ) { $orderby = $selected; } else { $orderby = $params->get( 'orderby', 'rdate' ); $selected = $orderby; } $params->set( 'type', 'category' ); $params->def( 'page_title', 1 ); $params->def( 'title', 1 ); $params->def( 'hits', $mainframe->getCfg( 'hits' ) ); $params->def( 'author', !$mainframe->getCfg( 'hideAuthor' ) ); $params->def( 'date', !$mainframe->getCfg( 'hideCreateDate' ) ); $params->def( 'date_format', _DATE_FORMAT_LC ); $params->def( 'navigation', 2 ); $params->def( 'display', 1 ); $params->def( 'display_num', $mosConfig_list_limit ); $params->def( 'other_cat', 1 ); $params->def( 'empty_cat', 0 ); $params->def( 'cat_items', 1 ); $params->def( 'cat_description', 0 ); $params->def( 'back_button', $mainframe->getCfg( 'back_button' ) ); $params->def( 'pageclass_sfx', '' ); $params->def( 'headings', 1 ); $params->def( 'order_select', 1 ); $params->def( 'filter', 1 ); $params->def( 'filter_type', 'title' ); // Ordering control $orderby = _orderby_sec( $orderby ); $category = new mosCategory( $database ); $category->load( $id ); if ( $sectionid == 0 ) { $sectionid = $category->section; } if ( $access->canEdit ) { $xwhere = ''; $xwhere2 = "\n AND b.state >= '0'"; } else { $xwhere = "\n AND c.published='1'"; $xwhere2 = "\n AND b.state='1'" . "\n AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '". $now ."' )" . "\n AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '". $now ."' )" ; } $pagetitle = ''; if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $pagetitle = $menu->name; } // if // show/hide empty categories $empty = ''; if ( !$params->get( 'empty_cat' ) ) $empty = "\n HAVING COUNT( b.id ) > 0"; // get the list of other categories $query = "SELECT c.*, COUNT( b.id ) AS numitems" . "\n FROM #__categories AS c" . "\n LEFT JOIN #__content AS b ON b.catid = c.id " . $xwhere2 . ( $noauth ? "\n AND b.access <= '". $gid ."'" : '' ) . "\n WHERE c.section = '". $category->section. "'" . $xwhere . ( $noauth ? "\n AND c.access <= '". $gid ."'" : '' ) . "\n GROUP BY c.id" . $empty . "\n ORDER BY c.ordering" ; $database->setQuery( $query ); $other_categories = $database->loadObjectList(); // get the total number of published items in the category // filter functionality $filter = trim( mosGetParam( $_POST, 'filter', '' ) ); $filter = strtolower( $filter ); $and = ''; if ( $filter ) { if ( $params->get( 'filter' ) ) { switch ( $params->get( 'filter_type' ) ) { case 'title': $and = "\n AND LOWER( a.title ) LIKE '%". $filter ."%'"; break; case 'author': $and = "\n AND ( ( LOWER( u.name ) LIKE '%". $filter ."%' ) OR ( LOWER( a.created_by_alias ) LIKE '%". $filter ."%' ) )"; break; case 'hits': $and = "\n AND a.hits LIKE '%". $filter ."%'"; break; } } } if ( $access->canEdit ) { $xwhere = "\n AND a.state >= '0'"; } else { $xwhere = "\n AND a.state='1'" . "\n AND ( publish_up = '0000-00-00 00:00:00' OR publish_up <= '$now' )" . "\n AND ( publish_down = '0000-00-00 00:00:00' OR publish_down >= '$now' )" ; } $query = "SELECT COUNT(a.id) as numitems" . "\n FROM #__content AS a" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . "\n WHERE a.catid='". $category->id ."' ". $xwhere . ( $noauth ? "\n AND a.access<='". $gid ."'" : '' ) . "\n AND '". $category->access ."'<='". $gid ."'" . $and . "\n ORDER BY ". $orderby ."" ; $database->setQuery( $query ); $counter = $database->loadObjectList(); $total = $counter[0]->numitems; $limit = $limit ? $limit : $params->get( 'display_num' ) ; if ( $total <= $limit ) $limitstart = 0; require_once( $GLOBALS['mosConfig_absolute_path'] . '/includes/pageNavigation.php' ); $pageNav = new mosPageNav( $total, $limitstart, $limit ); // get the list of items for this category $query = "SELECT a.id, a.title, a.hits, a.created_by, a.created_by_alias, a.created AS created, a.access, u.name AS author, a.state, g.name AS groups" . "\n FROM #__content AS a" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . "\n WHERE a.catid='". $category->id ."' ". $xwhere . ( $noauth ? "\n AND a.access<='". $gid ."'" : '' ) . "\n AND '". $category->access ."'<='". $gid ."'" . $and . "\n ORDER BY ". $orderby ."" . "\n LIMIT ". $limitstart .", ". $limit ; $database->setQuery( $query ); $items = $database->loadObjectList(); $check = 0; if ( $params->get( 'date' ) ) { $order[] = mosHTML::makeOption( 'date', _ORDER_DROPDOWN_DA ); $order[] = mosHTML::makeOption( 'rdate', _ORDER_DROPDOWN_DD ); $check .= 1; } if ( $params->get( 'title' ) ) { $order[] = mosHTML::makeOption( 'alpha', _ORDER_DROPDOWN_TA ); $order[] = mosHTML::makeOption( 'ralpha', _ORDER_DROPDOWN_TD ); $check .= 1; } if ( $params->get( 'hits' ) ) { $order[] = mosHTML::makeOption( 'hits', _ORDER_DROPDOWN_HA ); $order[] = mosHTML::makeOption( 'rhits', _ORDER_DROPDOWN_HD ); $check .= 1; } if ( $params->get( 'author' ) ) { $order[] = mosHTML::makeOption( 'author', _ORDER_DROPDOWN_AUA ); $order[] = mosHTML::makeOption( 'rauthor', _ORDER_DROPDOWN_AUD ); $check .= 1; } $order[] = mosHTML::makeOption( 'order', _ORDER_DROPDOWN_O ); $lists['order'] = mosHTML::selectList( $order, 'order', 'class="inputbox" size="1" onchange="document.adminForm.submit();"', 'value', 'text', $selected ); if ( $check < 1 ) { $lists['order'] = ''; $params->set( 'order_select', 0 ); } $lists['task'] = 'category'; $lists['filter'] = $filter; // Dynamic Page Title $mainframe->SetPageTitle( $pagetitle ); HTML_content::showContentList( $category, $items, $access, $id, $sectionid, $gid, $params, $pageNav, $other_categories, $lists ); } // showCategory function showBlogSection( $id=0, $gid, &$access, $pop, $now=NULL ) { global $database, $mainframe, $mosConfig_offset, $Itemid; $noauth = !$mainframe->getCfg( 'shownoauth' ); // Parameters $params = new stdClass(); if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosParameters( '' ); } // new blog multiple section handling if ( !$id ) { $id = $params->def( 'sectionid', 0 ); } $where = _where( 1, $access, $noauth, $gid, $id, $now ); // Ordering control $orderby_sec = $params->def( 'orderby_sec', 'rdate' ); $orderby_pri = $params->def( 'orderby_pri', '' ); $order_sec = _orderby_sec( $orderby_sec ); $order_pri = _orderby_pri( $orderby_pri ); // Main data query $query = "SELECT a.*, ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count, u.name AS author, u.usertype, cc.name AS category, g.name AS groups" . "\n FROM #__content AS a" . "\n INNER JOIN #__categories AS cc ON cc.id = a.catid" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . ( count( $where ) ? "\n WHERE ".implode( "\n AND ", $where ) : '' ) . "\n AND s.access<=$gid" . "\n ORDER BY ". $order_pri . $order_sec ; $database->setQuery( $query ); $rows = $database->loadObjectList(); // Dynamic Page Title if ($menu) { $mainframe->setPageTitle( $menu->name ); } BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); } function showBlogCategory( $id=0, $gid, &$access, $pop, $now ) { global $database, $mainframe, $mosConfig_offset, $Itemid; $noauth = !$mainframe->getCfg( 'shownoauth' ); // Paramters $params = new stdClass(); if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosParameters( '' ); } // new blog multiple section handling if ( !$id ) { $id = $params->def( 'categoryid', 0 ); } $where = _where( 2, $access, $noauth, $gid, $id, $now ); // Ordering control $orderby_sec = $params->def( 'orderby_sec', 'rdate' ); $orderby_pri = $params->def( 'orderby_pri', '' ); $order_sec = _orderby_sec( $orderby_sec ); $order_pri = _orderby_pri( $orderby_pri ); // Main data query $query = "SELECT a.*, ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count, u.name AS author, u.usertype, s.name AS section, g.name AS groups, cc.name AS category" . "\n FROM #__content AS a" . "\n LEFT JOIN #__categories AS cc ON cc.id = a.catid" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . ( count( $where ) ? "\n WHERE ".implode( "\n AND ", $where ) : '' ) . "\n AND s.access <= ". $gid . "\n ORDER BY ". $order_pri . $order_sec; ; $database->setQuery( $query ); $rows = $database->loadObjectList(); // Dynamic Page Title $mainframe->SetPageTitle( $menu->name ); BlogOutput( $rows, $params, $gid, $access, $pop, $menu ); } function showArchiveSection( $id=NULL, $gid, &$access, $pop, $option ) { global $database, $mainframe, $mosConfig_offset; global $Itemid; $noauth = !$mainframe->getCfg( 'shownoauth' ); // Paramters $year = mosGetParam( $_REQUEST, 'year', date( 'Y' ) ); $month = mosGetParam( $_REQUEST, 'month', date( 'm' ) ); $params = new stdClass(); if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosParameters( '' ); } $params->set( 'intro_only', 1 ); $params->set( 'year', $year ); $params->set( 'month', $month ); // Ordering control $orderby_sec = $params->def( 'orderby_sec', 'rdate' ); $orderby_pri = $params->def( 'orderby_pri', '' ); $order_sec = _orderby_sec( $orderby_sec ); $order_pri = _orderby_pri( $orderby_pri ); // used in query $where = _where( -1, $access, $noauth, $gid, $id, NULL, $year, $month ); // checks to see if 'All Sections' options used if ( $id == 0 ) { $check = ''; } else { $check = 'AND a.sectionid = '. $id ; } // query to determine if there are any archived entries for the section $query = "SELECT a.id" . "\n FROM #__content as a" . "\n WHERE a.state = '-1'" . $check ; $database->setQuery( $query ); $items = $database->loadObjectList(); $archives = count( $items ); // Main Query $query = "SELECT a.*, ROUND(v.rating_sum/v.rating_count) AS rating, v.rating_count, u.name AS author, u.usertype, cc.name AS category, g.name AS groups" . "\n FROM #__content AS a" . "\n INNER JOIN #__categories AS cc ON cc.id = a.catid" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . ( count( $where ) ? "\n WHERE ". implode( "\n AND ", $where ) : '') . "\n AND s.access <= ". $gid . "\n ORDER BY ". $order_pri . $order_sec ; $database->setQuery( $query ); $rows = $database->loadObjectList(); // initiate form echo '
'; } function showArchiveCategory( $id=0, $gid, &$access, $pop, $option, $now ) { global $database, $mainframe, $mosConfig_offset; global $Itemid; // Parameters $noauth = !$mainframe->getCfg( 'shownoauth' ); $year = mosGetParam( $_REQUEST, 'year', date( 'Y' ) ); $month = mosGetParam( $_REQUEST, 'month', date( 'm' ) ); $module = trim( mosGetParam( $_REQUEST, 'module', '' ) ); // used by archive module if ( $module ) { $check = ''; } else { $check = 'AND a.catid = '. $id; } if ( $Itemid ) { $menu = new mosMenu( $database ); $menu->load( $Itemid ); $params =& new mosParameters( $menu->params ); } else { $menu = ""; $params =& new mosParameters( '' ); } $params->set( 'year', $year ); $params->set( 'month', $month ); // Ordering control $orderby_sec = $params->def( 'orderby', 'rdate' ); $order_sec = _orderby_sec( $orderby_sec ); // used in query $where = _where( -2, $access, $noauth, $gid, $id, NULL, $year, $month ); // query to determine if there are any archived entries for the category $query = "SELECT a.id" . "\n FROM #__content as a" . "\n WHERE a.state = '-1'" . "\n ". $check ; $database->setQuery( $query ); $items = $database->loadObjectList(); $archives = count( $items ); $query = "SELECT a.*, ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count, u.name AS author, u.usertype, s.name AS section, g.name AS groups" . "\n FROM #__content AS a" . "\n LEFT JOIN #__users AS u ON u.id = a.created_by" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n LEFT JOIN #__sections AS s ON a.sectionid = s.id" . "\n LEFT JOIN #__groups AS g ON a.access = g.id" . ( count( $where ) ? "\n WHERE ". implode( "\n AND ", $where ) : '' ) . "\n AND s.access <= ". $gid . "\n ORDER BY ". $order_sec ; $database->setQuery( $query ); $rows = $database->loadObjectList(); // initiate form echo ''; } function BlogOutput ( &$rows, &$params, $gid, &$access, $pop, &$menu, $archive=NULL ) { global $mainframe, $Itemid, $task, $id, $option, $database, $mosConfig_live_site; // parameters if ( $params->get( 'page_title', 1 ) && $menu) { $header = $params->def( 'header', $menu->name ); } else { $header = ''; } $columns = $params->def( 'columns', 2 ); if ( $columns == 0 ) { $columns = 1; } $intro = $params->def( 'intro', 4 ); $leading = $params->def( 'leading', 1 ); $links = $params->def( 'link', 4 ); $pagination = $params->def( 'pagination', 2 ); $pagination_results = $params->def( 'pagination_results', 1 ); $pagination_results = $params->def( 'pagination_results', 1 ); $descrip = $params->def( 'description', 1 ); $descrip_image = $params->def( 'description_image', 1 ); // needed for back button for page $back = $params->get( 'back_button', $mainframe->getCfg( 'back_button' ) ); // needed to disable back button for item $params->set( 'back_button', 0 ); $params->def( 'pageclass_sfx', '' ); $params->set( 'intro_only', 1 ); $total = count( $rows ); // pagination support $limitstart = intval( mosGetParam( $_REQUEST, 'limitstart', 0 ) ); $limit = $intro + $leading + $links; if ( $total <= $limit ) { $limitstart = 0; } $i = $limitstart; // needed to reduce queries used by getItemid $ItemidCount['bs'] = $mainframe->getBlogSectionCount(); $ItemidCount['bc'] = $mainframe->getBlogCategoryCount(); $ItemidCount['gbs'] = $mainframe->getGlobalBlogSectionCount(); // used to display section/catagory description text and images // currently not supported in Archives if ( $menu && $menu->componentid && ( $descrip || $descrip_image ) ) { switch ( $menu->type ) { case 'content_blog_section': $description = new mosSection( $database ); $description->load( $menu->componentid ); break; case 'content_blog_category': $description = new mosCategory( $database ); $description->load( $menu->componentid ); break; default: $menu->componentid = 0; break; } } // Page Output // page header if ( $header ) { echo '| ';
if ( $descrip_image && $description->image ) {
echo ' '; echo ' | ';
echo '|
| ';
for ( $z = 0; $z < $leading; $z++ ) {
if ( $i >= $total ) {
// stops loop if total number of items is less than the number set to display as leading
break;
}
echo ' ';
show( $rows[$i], $params, $gid, $access, $pop, $option, $ItemidCount );
echo ' ';
$i++;
}
echo ' | ';
echo '|
';
echo '
| ';
echo '|
| ';
echo ' ';
HTML_content::showLinks( $rows, $links, $total, $i, 1, $ItemidCount );
echo ' ';
echo ' | ';
echo '|
| ';
echo $pageNav->writePagesLinks( $link );
echo ' '; echo ' | ';
echo '|
| '; echo $pageNav->writePagesCounter(); echo ' | '; echo '