[ Index ]

PHP Cross Reference of Mambo 4.6.5

[ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/administrator/components/com_menus/component_item_link/ -> component_item_link.menu.html.php (source)

   1  <?php
   2  /**
   3  * @package Mambo
   4  * @subpackage Menus
   5  * @author Mambo Foundation Inc see README.php
   6  * @copyright (C) 2000 - 2009 Mambo Foundation Inc.
   7  * See COPYRIGHT.php for copyright notices and details.
   8  * @license GNU/GPL Version 2, see LICENSE.php
   9  *
  10  * Redistributions of files must retain the above copyright notice.
  11  *
  12  * Mambo is free software; you can redistribute it and/or
  13  * modify it under the terms of the GNU General Public License
  14  * as published by the Free Software Foundation; version 2 of the License.
  15  */
  16  
  17  /** ensure this file is being included by a parent file */
  18  defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
  19  
  20  /**
  21  * Display Component item link
  22  */
  23  class component_item_link_menu_html {
  24  
  25  	function edit( &$menu, &$lists, &$params, $option ) {
  26          global $mosConfig_live_site;
  27          ?>
  28          <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  29          <script type="text/javascript">
  30  		function submitbutton(pressbutton) {
  31              var form = document.adminForm;
  32              if ( pressbutton == 'cancel' ) {
  33                  submitform( pressbutton );
  34                  return;
  35              }
  36  
  37              // do field validation
  38              if ( trim(form.name.value) == "" ){
  39                  alert( "<?php echo T_('Link must have a name'); ?>" );
  40              } else if ( trim( form.link.value ) == "" ){
  41                  alert( "<?php echo T_('You must select a Component to link to'); ?>" );
  42              } else {
  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 - Component 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_('Component to Link:'); ?>
  77                      </td>
  78                      <td width="80%">
  79                      <?php echo $lists['components']; ?>
  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="option" value="<?php echo $option;?>" />
 149          <input type="hidden" name="id" value="<?php echo $menu->id; ?>" />
 150          <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" />
 151          <input type="hidden" name="type" value="<?php echo $menu->type; ?>" />
 152          <input type="hidden" name="task" value="" />
 153          <input type="hidden" name="hidemainmenu" value="0" />
 154          </form>
 155          <script src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js" type="text/javascript"></script>
 156          <?php
 157      }
 158  }
 159  ?>