Source for file content_item_link.menu.html.php

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

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