| 5 |
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
| 6 |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 7 |
* |
* |
| 8 |
|
* |
| 9 |
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
| 10 |
* that Mambo remained free Open Source software owned and managed by the community. |
* that Mambo remained free Open Source software owned and managed by the community. |
| 11 |
* Mambo is Free Software |
* Mambo is Free Software |
| 244 |
; |
; |
| 245 |
$authors[] = mosHTML::makeOption( '0', T_('- All Authors -') ); |
$authors[] = mosHTML::makeOption( '0', T_('- All Authors -') ); |
| 246 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 247 |
$authors = array_merge( $authors, (array)$database->loadObjectList() ); |
$authors = array_merge( $authors, $database->loadObjectList() ); |
| 248 |
$lists['authorid'] = mosHTML::selectList( $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $filter_authorid ); |
$lists['authorid'] = mosHTML::selectList( $authors, 'filter_authorid', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $filter_authorid ); |
| 249 |
|
|
| 250 |
HTML_content::showContent( $rows, $section, $lists, $search, $pageNav, $all, $redirect ); |
HTML_content::showContent( $rows, $section, $lists, $search, $pageNav, $all, $redirect ); |
| 469 |
. "\n FROM #__sections AS s" |
. "\n FROM #__sections AS s" |
| 470 |
. "\n ORDER BY s.ordering"; |
. "\n ORDER BY s.ordering"; |
| 471 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 472 |
|
|
| 473 |
|
$sections = $database->loadObjectList(); |
| 474 |
|
|
| 475 |
if ( $sectionid == 0 ) { |
if ( $sectionid == 0 ) { |
| 476 |
if (count($database->loadObjectList()) > 0) { |
if ($sections) { |
| 477 |
$sections[] = mosHTML::makeOption( '-1', T_('Select Section') ); |
array_unshift ($sections, mosHTML::makeOption( '-1', T_('Select Section'))); |
|
$sections = array_merge( $sections, $database->loadObjectList() ); |
|
| 478 |
} else { |
} else { |
| 479 |
$sections[] = mosHTML::makeOption( '-1', T_('Add Section(s) First') ); |
$sections[] = mosHTML::makeOption( '-1', T_('Add Section(s) First') ); |
| 480 |
} |
} |
| 481 |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text' ); |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text' ); |
| 482 |
} else { |
} else { |
| 483 |
$intval = intval( $row->sectionid); |
$lists['sectionid'] = mosHTML::selectList( $sections, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text', intval( $row->sectionid); ); |
|
$dbLoadObjectList = $database->loadObjectList(); |
|
|
$lists['sectionid'] = mosHTML::selectList( $dbLoadObjectList, 'sectionid', 'class="inputbox" size="1" '. $javascript, 'value', 'text', $intval ); |
|
| 484 |
} |
} |
| 485 |
|
|
|
$sections = $database->loadObjectList(); |
|
|
|
|
| 486 |
$sectioncategories = array(); |
$sectioncategories = array(); |
| 487 |
$sectioncategories[-1] = array(); |
$sectioncategories[-1] = array(); |
| 488 |
$sectioncategories[-1][] = mosHTML::makeOption( '-1', T_('Select Category') ); |
$sectioncategories[-1][] = mosHTML::makeOption( '-1', T_('Select Category') ); |
| 489 |
if ($sections) { |
if ($sections) foreach($sections as $section) { |
|
foreach($sections as $section) { |
|
| 490 |
$sectioncategories[$section->value] = array(); |
$sectioncategories[$section->value] = array(); |
| 491 |
$query = "SELECT id AS value, name AS text" |
$query = "SELECT id AS value, name AS text" |
| 492 |
. "\n FROM #__categories" |
. "\n FROM #__categories" |
| 494 |
. "\n ORDER BY ordering"; |
. "\n ORDER BY ordering"; |
| 495 |
$database->setQuery( $query ); |
$database->setQuery( $query ); |
| 496 |
$rows2 = $database->loadObjectList(); |
$rows2 = $database->loadObjectList(); |
| 497 |
if ($rows2) { |
if ($rows2) foreach($rows2 as $row2) $sectioncategories[$section->value][] = mosHTML::makeOption( $row2->value, $row2->text ); |
| 498 |
foreach($rows2 as $row2) { |
else $sectioncategories[$section->value][] = mosHTML::makeOption( "-1", T_('Add Categories First') ); |
|
$sectioncategories[$section->value][] = mosHTML::makeOption( $row2->value, $row2->text ); |
|
|
} |
|
|
} else { |
|
|
$sectioncategories[$section->value][] = mosHTML::makeOption( "-1", T_('Add Categories First') ); |
|
|
} |
|
|
|
|
|
} |
|
| 499 |
} |
} |
| 500 |
|
|
| 501 |
// get list of categories |
// get list of categories |