Source for file contact_item_link.menu.html.php

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

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