Source for file url.class.php

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

Documentation generated on Mon, 05 May 2008 16:23:56 +0400 by phpDocumentor 1.4.0