Source for file content_archive_section.class.php

Documentation is available at content_archive_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.     * @param database A database connector object
  15.     * @param integer The unique id of the category to edit (0 if new)
  16.     */
  17.     function editSection$uid$menutype$option {
  18.         global $database$my$mainframe;
  19.  
  20.         $menu new mosMenu$database );
  21.         $menu->load$uid );
  22.  
  23.         // fail if checked out not by 'me'
  24.         if ($menu->checked_out && $menu->checked_out <> $my->id{
  25.             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";
  26.             exit(0);
  27.         }
  28.  
  29.         if $uid {
  30.             $menu->checkout$my->id );
  31.         else {
  32.             $menu->type 'content_archive_section';
  33.             $menu->menutype $menutype;
  34.             $menu->ordering 9999;
  35.             $menu->parent intvalmosGetParam$_POST'parent') );
  36.             $menu->published 1;
  37.         }
  38.  
  39.         // build the html select list for section
  40.         $lists['componentid']     mosAdminMenus::Section$menu$uid);
  41.  
  42.         // build the html select list for ordering
  43.         $lists['ordering']         mosAdminMenus::Ordering$menu$uid );
  44.         // build the html select list for the group access
  45.         $lists['access']         mosAdminMenus::Access$menu );
  46.         // build the html select list for paraent item
  47.         $lists['parent']         mosAdminMenus::Parent$menu );
  48.         // build published button option
  49.         $lists['published']     mosAdminMenus::Published$menu );
  50.         // build the url link output
  51.         $lists['link']         mosAdminMenus::Link$menu$uid );
  52.         
  53.         // get params definitions
  54.         $params =new mosAdminParameters$menu->params$mainframe->getPath'menu_xml'$menu->type )'menu' );
  55.  
  56.         content_archive_section_menu_html::editSection$menu$lists$params$option );
  57.     }
  58. }
  59. ?>

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