/**
  * Form for moving item(s) to a different section and category
  */
 function moveSection()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     // Initialize variables
     $db =& JFactory::getDBO();
     $cid = JRequest::getVar('cid', array(), 'post', 'array');
     $sectionid = JRequest::getVar('sectionid', 0, '', 'int');
     JArrayHelper::toInteger($cid);
     if (count($cid) < 1) {
         $msg = JText::_('Select an item to move');
         $mainframe->redirect('index.php?option=com_content', $msg, 'error');
     }
     //seperate contentids
     $cids = implode(',', $cid);
     // Articles query
     $query = 'SELECT a.title' . ' FROM #__content AS a' . ' WHERE ( a.id IN ( ' . $cids . ' ) )' . ' ORDER BY a.title';
     $db->setQuery($query);
     $items = $db->loadObjectList();
     $query = 'SELECT CONCAT_WS( ", ", s.id, c.id ) AS `value`, CONCAT_WS( " / ", s.title, c.title ) AS `text`' . ' FROM #__sections AS s' . ' INNER JOIN #__categories AS c ON c.section = s.id' . ' WHERE s.scope = "content"' . ' ORDER BY s.title, c.title';
     $db->setQuery($query);
     $rows[] = JHTML::_('select.option', "0, 0", JText::_('UNCATEGORIZED'));
     $rows = array_merge($rows, $db->loadObjectList());
     // build the html select list
     $sectCatList = JHTML::_('select.genericlist', $rows, 'sectcat', 'class="inputbox" size="8"', 'value', 'text', null);
     ContentView::moveSection($cid, $sectCatList, 'com_content', $sectionid, $items);
 }