Source for file url.menu.html.php

Documentation is available at url.menu.html.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. * Writes the edit form for new and existing content item
  15. *
  16. * A new record is defined when <var>$row</var> is passed with the <var>id</var>
  17. * property set to 0.
  18. */
  19. class url_menu_html {
  20.  
  21.     function edit$menu$lists$params$option {
  22.         global $mosConfig_live_site;
  23.         ?>
  24.         <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  25.         <script language="javascript" type="text/javascript">
  26.         function submitbutton(pressbutton) {
  27.             var form = document.adminForm;
  28.             if (pressbutton == 'cancel') {
  29.                 submitform( pressbutton );
  30.                 return;
  31.             }
  32.  
  33.             // do field validation
  34.             if (trim(form.name.value) == ""){
  35.                 alert( "<?php echo T_('Link must have a name')?>" );
  36.             } else if (trim(form.link.value) == ""){
  37.                 alert( "<?php echo T_('You must provide a url.')?>" );
  38.             } else {
  39.                 submitform( pressbutton );
  40.             }
  41.         }
  42.         </script>
  43.  
  44.         <form action="index2.php" method="post" name="adminForm">
  45.         <table class="adminheading">
  46.         <tr>
  47.             <th>
  48.             <?php echo $menu->id T_('Edit'T_('Add');?> <?php echo T_('Menu Item :: Link - URL')?>
  49.             </th>
  50.         </tr>
  51.         </table>
  52.  
  53.         <table width="100%">
  54.         <tr valign="top">
  55.             <td width="60%">
  56.                 <table class="adminform">
  57.                 <tr>
  58.                     <th colspan="2">
  59.                     <?php echo T_('Details')?>
  60.                     </th>
  61.                 </tr>
  62.                 <tr>
  63.                     <td width="20%" align="right">
  64.                     <?php echo T_('Name:')?>
  65.                     </td>
  66.                     <td width="80%">
  67.                     <input class="inputbox" type="text" name="name" size="50" maxlength="150" value="<?php echo $menu->name?>" />
  68.                     </td>
  69.                 </tr>
  70.                 <tr>
  71.                     <td width="20%" align="right">
  72.                     <?php echo T_('Link:')?>
  73.                     </td>
  74.                     <td width="80%">
  75.                     <input class="inputbox" type="text" name="link" size="50" maxlength="250" value="<?php echo $menu->link?>" />
  76.                     </td>
  77.                 </tr>
  78.                 <tr>
  79.                     <td valign="top" align="right">
  80.                     <?php echo T_('On Click, Open in:')?>
  81.                     </td>
  82.                     <td>
  83.                     <?php echo $lists['target']?>
  84.                     </td>
  85.                 </tr>
  86.                 <tr>
  87.                     <td align="right">
  88.                     <?php echo T_('Parent Item:')?>
  89.                     </td>
  90.                     <td>
  91.                     <?php echo $lists['parent']?>
  92.                     </td>
  93.                 </tr>
  94.                 <tr>
  95.                     <td valign="top" align="right">
  96.                     <?php echo T_('Ordering:')?>
  97.                     </td>
  98.                     <td>
  99.                     <?php echo $lists['ordering']?>
  100.                     </td>
  101.                 </tr>
  102.                 <tr>
  103.                     <td valign="top" align="right">
  104.                     <?php echo T_('Access Level:')?>
  105.                     </td>
  106.                     <td>
  107.                     <?php echo $lists['access']?>
  108.                     </td>
  109.                 </tr>
  110.                 <tr>
  111.                     <td valign="top" align="right">
  112.                     <?php echo T_('Published:')?>
  113.                     </td>
  114.                     <td>
  115.                     <?php echo $lists['published']?>
  116.                     </td>
  117.                 </tr>
  118.                 </table>
  119.             </td>
  120.             <td width="40%">
  121.                 <table class="adminform">
  122.                 <tr>
  123.                     <th>
  124.                     <?php echo T_('Parameters')?>
  125.                     </th>
  126.                 </tr>
  127.                 <tr>
  128.                     <td>
  129.                     <?php echo $params->render();?>
  130.                     </td>
  131.                 </tr>
  132.                 </table>
  133.             </td>
  134.         </tr>
  135.         </table>
  136.  
  137.         <input type="hidden" name="option" value="<?php echo $option;?>" />
  138.         <input type="hidden" name="id" value="<?php echo $menu->id?>" />
  139.         <input type="hidden" name="menutype" value="<?php echo $menu->menutype?>" />
  140.         <input type="hidden" name="type" value="<?php echo $menu->type?>" />
  141.         <input type="hidden" name="task" value="" />
  142.         <input type="hidden" name="hidemainmenu" value="0" />
  143.         </form>
  144.         <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
  145.         <?php
  146.     }
  147.  
  148.  
  149. }
  150. ?>

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