| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
|
* @version $Id: content_blog_section.class.php,v 1.1 2005/07/22 01:52:58 eddieajau Exp $ |
|
| 3 |
* @package Mambo |
* @package Mambo |
| 4 |
* @subpackage Menus |
* @subpackage Menus |
| 5 |
* @copyright (C) 2000 - 2005 Miro International Pty Ltd |
* @author Mambo Foundation Inc see README.php |
| 6 |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
* @copyright Mambo Foundation Inc. |
| 7 |
* Mambo is Free Software |
* See COPYRIGHT.php for copyright notices and details. |
| 8 |
|
* @license GNU/GPL Version 2, see LICENSE.php |
| 9 |
|
* Mambo is free software; you can redistribute it and/or |
| 10 |
|
* modify it under the terms of the GNU General Public License |
| 11 |
|
* as published by the Free Software Foundation; version 2 of the License. |
| 12 |
*/ |
*/ |
| 13 |
|
|
| 14 |
/** ensure this file is being included by a parent file */ |
/** ensure this file is being included by a parent file */ |
| 15 |
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); |
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); |
| 16 |
|
|
|
/** |
|
|
* @package Mambo |
|
|
* @subpackage Menus |
|
|
*/ |
|
| 17 |
class content_blog_section { |
class content_blog_section { |
| 18 |
|
|
| 19 |
/** |
/** |
| 29 |
|
|
| 30 |
// fail if checked out not by 'me' |
// fail if checked out not by 'me' |
| 31 |
if ($menu->checked_out && $menu->checked_out <> $my->id) { |
if ($menu->checked_out && $menu->checked_out <> $my->id) { |
| 32 |
echo "<script>alert('The module $menu->title is currently being edited by another administrator'); document.location.href='index2.php?option=$option'</script>\n"; |
echo "<script>alert('".sprintf(T_('The module % is currently being edited by another administrator'), $menu->title)."'); document.location.href='index2.php?option=$option'</script>\n"; |
| 33 |
exit(0); |
exit(0); |
| 34 |
} |
} |
| 35 |
|
|
| 39 |
$params =& new mosParameters( $menu->params ); |
$params =& new mosParameters( $menu->params ); |
| 40 |
$secids = $params->def( 'sectionid', '' ); |
$secids = $params->def( 'sectionid', '' ); |
| 41 |
if ( $secids ) { |
if ( $secids ) { |
| 42 |
|
// @RawSQLUse, trivial_implementation, SELECT, CONCEPT |
| 43 |
$query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" |
$query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" |
| 44 |
. "\n FROM #__sections AS s" |
. "\n FROM #__sections AS s" |
| 45 |
. "\n WHERE s.scope = 'content'" |
. "\n WHERE s.scope = 'content'" |
| 61 |
} |
} |
| 62 |
|
|
| 63 |
// build the html select list for section |
// build the html select list for section |
| 64 |
$rows[] = mosHTML::makeOption( '', 'All Sections' ); |
$rows[] = mosHTML::makeOption( '', T_('All Sections') ); |
| 65 |
|
// @RawSQLUse, trivial_implementation, SELECT, CONCEPT |
| 66 |
$query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" |
$query = "SELECT s.id AS `value`, s.id AS `id`, s.title AS `text`" |
| 67 |
. "\n FROM #__sections AS s" |
. "\n FROM #__sections AS s" |
| 68 |
. "\n WHERE s.scope = 'content'" |
. "\n WHERE s.scope = 'content'" |
| 85 |
$lists['link'] = mosAdminMenus::Link( $menu, $uid ); |
$lists['link'] = mosAdminMenus::Link( $menu, $uid ); |
| 86 |
|
|
| 87 |
// get params definitions |
// get params definitions |
| 88 |
$params =& new mosParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); |
$params =& new mosAdminParameters( $menu->params, $mainframe->getPath( 'menu_xml', $menu->type ), 'menu' ); |
| 89 |
|
|
| 90 |
content_blog_section_html::edit( $menu, $lists, $params, $option ); |
content_blog_section_html::edit( $menu, $lists, $params, $option ); |
| 91 |
} |
} |