Source for file content_section.class.php

Documentation is available at content_section.class.php

  1. <?php
  2. /**
  3. @package Mambo
  4. @subpackage Menus
  5. @copyright  Refer to copyright.php
  6. @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
  7. @author Mambo Foundation Inc see README.php
  8. */ 
  9.  
  10. /** ensure this file is being included by a parent file */
  11. defined'_VALID_MOS' or die'Direct Access to this location is not allowed.' );
  12.  
  13.  
  14.     /**
  15.     * @param database A database connector object
  16.     * @param integer The unique id of the category to edit (0 if new)
  17.     */
  18.     function editSection$uid$menutype$option {
  19.         global $database$my$mainframe;
  20.  
  21.         $menu new mosMenu$database );
  22.         $menu->load$uid );
  23.  
  24.         // fail if checked out not by 'me'
  25.         if ($menu->checked_out && $menu->checked_out <> $my->id{
  26.             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";
  27.             exit(0);
  28.         }
  29.  
  30.         if $uid {
  31.             $menu->checkout$my->id );
  32.         else {
  33.             $menu->type 'content_section';
  34.             $menu->menutype $menutype;
  35.             $menu->ordering 9999;
  36.             $menu->parent intvalmosGetParam$_POST'parent') );
  37.             $menu->published 1;
  38.         }
  39.  
  40.         // build the html select list for section
  41.         $lists['componentid']     mosAdminMenus::Section$menu$uid );
  42.  
  43.         // build the html select list for ordering
  44.         $lists['ordering']         mosAdminMenus::Ordering$menu$uid );
  45.         // build the html select list for the group access
  46.         $lists['access']         mosAdminMenus::Access$menu );
  47.         // build the html select list for paraent item
  48.         $lists['parent']         mosAdminMenus::Parent$menu );
  49.         // build published button option
  50.         $lists['published']     mosAdminMenus::Published$menu );
  51.         // build the url link output
  52.         $lists['link']         mosAdminMenus::Link$menu$uid );
  53.         
  54.         // get params definitions
  55.         $params =new mosAdminParameters$menu->params$mainframe->getPath'menu_xml'$menu->type )'menu' );
  56.  
  57.         content_section_menu_html::editSection$menu$lists$params$option );
  58.     }
  59. }
  60. ?>

Documentation generated on Mon, 05 May 2008 16:18:43 +0400 by phpDocumentor 1.4.0