Source for file content_section.menu.html.php

Documentation is available at content_section.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.  
  20.     function editSection&$menu&$lists&$params$option {
  21.         global $mosConfig_live_site;
  22.         ?>
  23.         <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  24.         <script language="javascript" type="text/javascript">
  25.         function submitbutton(pressbutton) {
  26.             if (pressbutton == 'cancel') {
  27.                 submitform( pressbutton );
  28.                 return;
  29.             }
  30.             var form = document.adminForm;
  31.             <?php
  32.             if !$menu->id {
  33.                 ?>
  34.                 if ( getSelectedValue( 'adminForm', 'componentid' ) < 1 ) {
  35.                     alert( '<?php echo T_('You must select a Section')?>' );
  36.                     return;
  37.                 }
  38.  
  39.                 form.link.value = "index.php?option=com_content&task=section&id=" + form.componentid.value;
  40.                 if ( form.name.value == '' ) {
  41.                     form.name.value = form.componentid.options[form.componentid.selectedIndex].text;
  42.                 }
  43.                 submitform( pressbutton );
  44.                 <?php
  45.             else {
  46.                 ?>
  47.                 if ( form.name.value == '' ) {
  48.                     alert( '<?php echo T_('This Menu item must have a title')?>' );
  49.                 } else {
  50.                     submitform( pressbutton );
  51.                 }
  52.                 <?php
  53.             }
  54.             ?>
  55.  
  56.  
  57.         }
  58.         </script>
  59.         <form action="index2.php" method="post" name="adminForm">
  60.  
  61.         <table class="adminheading">
  62.         <tr>
  63.             <th>
  64.             <?php echo $menu->id T_('Edit'T_('Add');?> <?php echo T_('Menu Item :: Table - Content Section')?>
  65.             </th>
  66.         </tr>
  67.         </table>
  68.  
  69.         <table width="100%">
  70.         <tr valign="top">
  71.             <td width="60%">
  72.                 <table class="adminform">
  73.                 <tr>
  74.                     <th colspan="3">
  75.                     <?php echo T_('Details')?>
  76.                     </th>
  77.                 </tr>
  78.                 <tr>
  79.                     <td width="10%" align="right" valign="top"><?php echo T_('Name:')?></td>
  80.                     <td width="200px">
  81.                     <input type="text" name="name" size="30" maxlength="100" class="inputbox" value="<?php echo $menu->name?>"/>
  82.                     </td>
  83.                     <td>
  84.                     <?php
  85.                     if !$menu->id {
  86.                         echo mosToolTipT_('If you leave this blank the Section name will be automatically used') );
  87.                     }
  88.                     ?>
  89.                     </td>
  90.                 </tr>
  91.                 <tr>
  92.                     <td align="right" valign="top"><?php echo T_('Section:')?></td>
  93.                     <td colspan="2">
  94.                     <?php echo $lists['componentid']?>
  95.                     </td>
  96.                 </tr>
  97.                 <tr>
  98.                     <td align="right"><?php echo T_('Url:')?></td>
  99.                     <td colspan="2">
  100.                     <?php echo $lists['link']?>
  101.                     </td>
  102.                 </tr>
  103.                 <tr>
  104.                     <td align="right"><?php echo T_('Parent Item:')?></td>
  105.                     <td colspan="2">
  106.                     <?php echo $lists['parent'];?>
  107.                     </td>
  108.                 </tr>
  109.                 <tr>
  110.                     <td valign="top" align="right"><?php echo T_('Ordering:')?></td>
  111.                     <td colspan="2">
  112.                     <?php echo $lists['ordering']?>
  113.                     </td>
  114.                 </tr>
  115.                 <tr>
  116.                     <td valign="top" align="right"><?php echo T_('Access Level:')?></td>
  117.                     <td colspan="2">
  118.                     <?php echo $lists['access']?>
  119.                     </td>
  120.                 </tr>
  121.                 <tr>
  122.                     <td valign="top" align="right"><?php echo T_('Published:')?></td>
  123.                     <td colspan="2">
  124.                     <?php echo $lists['published']?>
  125.                     </td>
  126.                 </tr>
  127.                 <tr>
  128.                     <td colspan="3">&nbsp;</td>
  129.                 </tr>
  130.                 </table>
  131.             </td>
  132.             <td width="40%">
  133.                 <table class="adminform">
  134.                 <tr>
  135.                     <th>
  136.                     <?php echo T_('Parameters')?>
  137.                     </th>
  138.                 </tr>
  139.                 <tr>
  140.                     <td>
  141.                     <?php echo $params->render();?>
  142.                     </td>
  143.                 </tr>
  144.                 </table>
  145.             </td>
  146.         </tr>
  147.         </table>
  148.  
  149.         <input type="hidden" name="option" value="<?php echo $option;?>" />
  150.         <input type="hidden" name="id" value="<?php echo $menu->id?>" />
  151.         <input type="hidden" name="menutype" value="<?php echo $menu->menutype?>" />
  152.         <input type="hidden" name="type" value="<?php echo $menu->type?>" />
  153.         <input type="hidden" name="task" value="" />
  154.         <input type="hidden" name="hidemainmenu" value="0" />
  155.         </form>
  156.         <script language="Javascript" src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js"></script>
  157.         <?php
  158.     }
  159. }
  160. ?>

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