JHTML::_( 'form.token' ); ?>

.
:


:
"; foreach ( $items as $item ) { echo "
  • ". $item->title ."
  • "; } echo ""; ?>
    :
    "; foreach ( $contents as $content ) { echo "
  • ". $content->title ."
  • "; } echo ""; ?>


    .


    "; } ?>

    .
    :


    :
    "; foreach ( $items as $item ) { echo "
  • ". $item->title ."
  • "; } echo ""; ?>
    :
    "; foreach ( $contents as $content ) { echo "
  • ". $content->title ."
  • "; echo "\n id\" />"; } echo ""; ?>



    .


    "; } ?>
    getUserStateFromRequest( $option.'.filter_order', 'filter_order', 'c.ordering', 'cmd' ); $filter_order_Dir = $mainframe->getUserStateFromRequest( $option.'.filter_order_Dir', 'filter_order_Dir', '', 'word' ); $filter_state = $mainframe->getUserStateFromRequest( $option.'.'.$section.'.filter_state', 'filter_state', '', 'word' ); $sectionid = $mainframe->getUserStateFromRequest( $option.'.'.$section.'.sectionid', 'sectionid', 0, 'int' ); $search = $mainframe->getUserStateFromRequest( $option.'.search', 'search', '', 'string' ); $search = JString::strtolower( $search ); $limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); $limitstart = $mainframe->getUserStateFromRequest( $option.'.limitstart', 'limitstart', 0, 'int' ); $section_name = ''; $content_add = ''; $content_join = ''; $order = ' ORDER BY '. $filter_order .' '. $filter_order_Dir .', c.ordering'; if (intval( $section ) > 0) { $table = 'content'; $query = 'SELECT title' . ' FROM #__sections' . ' WHERE id = '.(int) $section; $db->setQuery( $query ); $section_name = $db->loadResult(); $section_name = JText::sprintf( 'Content:', JText::_( $section_name ) ); $where = ' WHERE c.section = '.$db->Quote($section); $type = 'content'; } else if (strpos( $section, 'com_' ) === 0) { $table = substr( $section, 4 ); $query = 'SELECT name' . ' FROM #__components' . ' WHERE link = '.$db->Quote('option='.$section); ; $db->setQuery( $query ); $section_name = $db->loadResult(); $where = ' WHERE c.section = '.$db->Quote($section); $type = 'other'; // special handling for contact component if ( $section == 'com_contact_details' ) { $section_name = JText::_( 'Contact' ); } $section_name = JText::sprintf( 'Component:', $section_name ); } else { $table = $section; $where = ' WHERE c.section = '.$db->Quote($section); $type = 'other'; } // get the total number of records $query = 'SELECT COUNT(*)' . ' FROM #__categories' ; if ($section == 'com_content') { if($sectionid > 0) { $query .= ' WHERE section = '.(int) $sectionid; } else { $query .= ' WHERE section > 0'; } } else { $query .= ' WHERE section = '.$db->quote($section); } if ( $filter_state ) { if ( $filter_state == 'P' ) { $query .= ' AND published = 1'; } else if ($filter_state == 'U' ) { $query .= ' AND published = 0'; } } $db->setQuery( $query ); $total = $db->loadResult(); // allows for viweing of all content categories if ( $section == 'com_content' ) { $table = 'content'; $content_add = ' , z.title AS section_name'; $content_join = ' LEFT JOIN #__sections AS z ON z.id = c.section'; $where = ' WHERE c.section NOT LIKE "%com_%"'; if ($filter_order == 'c.ordering'){ $order = ' ORDER BY z.title, c.ordering '. $filter_order_Dir; } else { $order = ' ORDER BY '.$filter_order.' '. $filter_order_Dir.', z.title, c.ordering'; } $section_name = JText::_( 'All Content:' ); $type = 'content'; } // used by filter if ( $sectionid > 0 ) { $filter = ' AND c.section = '.$db->Quote($sectionid); } else { $filter = ''; } if ( $filter_state ) { if ( $filter_state == 'P' ) { $filter .= ' AND c.published = 1'; } else if ($filter_state == 'U' ) { $filter .= ' AND c.published = 0'; } } if ($search) { $filter .= ' AND LOWER(c.title) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ); } jimport('joomla.html.pagination'); $pageNav = new JPagination( $total, $limitstart, $limit ); $tablesAllowed = $db->getTableList(); if (!in_array($db->getPrefix().$table, $tablesAllowed)) { $table = 'content'; } $query = 'SELECT c.*, c.checked_out as checked_out_contact_category, g.name AS groupname, u.name AS editor, COUNT( DISTINCT s2.checked_out ) AS checked_out_count' . $content_add . ' FROM #__categories AS c' . ' LEFT JOIN #__users AS u ON u.id = c.checked_out' . ' LEFT JOIN #__groups AS g ON g.id = c.access' . ' LEFT JOIN #__'.$table.' AS s2 ON s2.catid = c.id AND s2.checked_out > 0' . $content_join . $where . $filter . ' AND c.published != -2' . ' GROUP BY c.id' . $order ; $db->setQuery( $query, $pageNav->limitstart, $pageNav->limit ); $rows = $db->loadObjectList(); if ($db->getErrorNum()) { echo $db->stderr(); return; } $count = count( $rows ); // number of Active Items for ( $i = 0; $i < $count; $i++ ) { $query = 'SELECT COUNT( a.id )' . ' FROM #__content AS a' . ' WHERE a.catid = '. (int) $rows[$i]->id . ' AND a.state <> -2' ; $db->setQuery( $query ); $active = $db->loadResult(); $rows[$i]->active = $active; } // number of Trashed Items for ( $i = 0; $i < $count; $i++ ) { $query = 'SELECT COUNT( a.id )' . ' FROM #__content AS a' . ' WHERE a.catid = '. (int) $rows[$i]->id . ' AND a.state = -2' ; $db->setQuery( $query ); $trash = $db->loadResult(); $rows[$i]->trash = $trash; } // get list of sections for dropdown filter $javascript = 'onchange="document.adminForm.submit();"'; $lists['sectionid'] = JHTML::_('list.section', 'sectionid', $sectionid, $javascript, 'ordering', false ); // state filter $lists['state'] = JHTML::_('grid.state', $filter_state ); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search']= $search; categories_html::show( $rows, $section, $section_name, $pageNav, $lists, $type ); } /** * Compiles information to add or edit a category * @param string The name of the category section * @param integer The unique id of the category to edit (0 if new) * @param string The name of the current user */ function editCategory($edit ) { global $mainframe; // Initialize variables $db =& JFactory::getDBO(); $user =& JFactory::getUser(); $uid = $user->get('id'); $type = JRequest::getCmd( 'type' ); $redirect = JRequest::getCmd( 'section', 'com_content' ); $section = JRequest::getCmd( 'section', 'com_content' ); $cid = JRequest::getVar( 'cid', array(0), '', 'array' ); JArrayHelper::toInteger($cid, array(0)); // check for existance of any sections $query = 'SELECT COUNT( id )' . ' FROM #__sections' . ' WHERE scope = "content"' ; $db->setQuery( $query ); $sections = $db->loadResult(); if (!$sections && $type != 'other' && $section != 'com_weblinks' && $section != 'com_newsfeeds' && $section != 'com_contact_details' && $section != 'com_banner') { $mainframe->redirect( 'index.php?option=com_categories§ion='. $section, JText::_( 'WARNSECTION', true ) ); } $row =& JTable::getInstance('category'); // load the row from the db table if ($edit) $row->load( $cid[0] ); // fail if checked out not by 'me' if ( JTable::isCheckedOut($user->get ('id'), $row->checked_out )) { $msg = JText::sprintf( 'DESCBEINGEDITTED', JText::_( 'The category' ), $row->title ); $mainframe->redirect( 'index.php?option=com_categories§ion='. $row->section, $msg ); } if ( $edit ) { $row->checkout( $user->get('id')); } else { $row->published = 1; } // make order list $order = array(); $query = 'SELECT COUNT(*)' . ' FROM #__categories' . ' WHERE section = '.$db->Quote($row->section) ; $db->setQuery( $query ); $max = intval( $db->loadResult() ) + 1; for ($i=1; $i < $max; $i++) { $order[] = JHTML::_('select.option', $i ); } // build the html select list for sections if ( $section == 'com_content' ) { if (!$row->section && JRequest::getInt('sectionid')) { $row->section = JRequest::getInt('sectionid'); } $query = 'SELECT s.id AS value, s.title AS text' . ' FROM #__sections AS s' . ' ORDER BY s.ordering' ; $db->setQuery(