[ Index ]

PHP Cross Reference of Mambo 4.6.5

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

title

Body

[close]

/administrator/components/com_menus/weblink_category_table/ -> weblink_category_table.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  * Writes the edit form for new and existing content item
  22  *
  23  * A new record is defined when <var>$row</var> is passed with the <var>id</var>
  24  * property set to 0.
  25  */
  26  class weblink_category_table_menu_html {
  27  
  28  	function editCategory( &$menu, &$lists, &$params, $option ) {
  29          global $mosConfig_live_site;
  30          ?>
  31          <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
  32          <script type="text/javascript">
  33  		function submitbutton(pressbutton) {
  34              if ( pressbutton == 'cancel' ) {
  35                  submitform( pressbutton );
  36                  return;
  37              }
  38              var form = document.adminForm;
  39              <?php
  40              if ( !$menu->id ) {
  41                  ?>
  42                  if ( getSelectedValue( 'adminForm', 'componentid' ) < 1 ) {
  43                      alert( '<?php echo T_('You must select a category'); ?>' );
  44                      return;
  45                  }
  46                  cat = getSelectedText( 'adminForm', 'componentid' );
  47  
  48                  form.link.value = "index.php?option=com_weblinks&catid=" + form.componentid.value;
  49                  if ( form.name.value == '' ) {
  50                      form.name.value = cat;
  51                  }
  52                  submitform( pressbutton );
  53                  <?php
  54              } else {
  55                  ?>
  56                  if ( form.name.value == '' ) {
  57                      alert( '<?php echo T_('This Menu item must have a title'); ?>' );
  58                  } else {
  59                      submitform( pressbutton );
  60                  }
  61                  <?php
  62              }
  63              ?>
  64          }
  65          </script>
  66          <form action="index2.php" method="post" name="adminForm">
  67          <table class="adminheading">
  68          <tr>
  69              <th>
  70              <?php echo $menu->id ? T_('Edit') : T_('Add');?> <?php echo T_('Menu Item :: Table - Web Link Category'); ?>
  71              </th>
  72          </tr>
  73          </table>
  74  
  75          <table width="100%">
  76          <tr valign="top">
  77              <td width="60%">
  78                  <table class="adminform">
  79                  <tr>
  80                      <th colspan="3">
  81                      <?php echo T_('Details'); ?>
  82                      </th>
  83                  </tr>
  84  
  85                  <tr>
  86                      <td width="10%" align="right" valign="top">
  87                      <?php echo T_('Name:'); ?>
  88                      </td>
  89                      <td width="200px">
  90                      <input type="text" name="name" size="30" maxlength="100" class="inputbox" value="<?php echo $menu->name; ?>"/>
  91                      </td>
  92                      <td>
  93                      <?php
  94                      if ( !$menu->id ) {
  95                          echo mosToolTip( T_('If you leave this blank the Category name will be automatically used') );
  96                      }
  97                      ?>
  98                      </td>
  99                  </tr>
 100                  <tr>
 101                      <td width="10%" align="right" valign="top">
 102                      <?php echo T_('Category:'); ?>
 103                      </td>
 104                      <td colspan="2">
 105                      <?php echo $lists['componentid']; ?>
 106                      </td>
 107                  </tr>
 108                  <tr>
 109                      <td align="right">
 110                      <?php echo T_('Url:'); ?>
 111                      </td>
 112                      <td colspan="2">
 113                      <?php echo $lists['link']; ?>
 114                      </td>
 115                  </tr>
 116                  <tr>
 117                      <td align="right">
 118                      <?php echo T_('Parent Item:'); ?>
 119                      </td>
 120                      <td colspan="2">
 121                      <?php echo $lists['parent'];?>
 122                      </td>
 123                  </tr>
 124                  <tr>
 125                      <td valign="top" align="right">
 126                      <?php echo T_('Ordering:'); ?>
 127                      </td>
 128                      <td colspan="2">
 129                      <?php echo $lists['ordering']; ?>
 130                      </td>
 131                  </tr>
 132                  <tr>
 133                      <td valign="top" align="right">
 134                      <?php echo T_('Access Level:'); ?>
 135                      </td>
 136                      <td colspan="2">
 137                      <?php echo $lists['access']; ?>
 138                      </td>
 139                  </tr>
 140                  <tr>
 141                      <td valign="top" align="right">
 142                      <?php echo T_('Published:'); ?>
 143                      </td>
 144                      <td colspan="2">
 145                      <?php echo $lists['published']; ?>
 146                      </td>
 147                  </tr>
 148                  <tr>
 149                      <td colspan="3">&nbsp;</td>
 150                  </tr>
 151                  </table>
 152              </td>
 153              <td width="40%">
 154                  <table class="adminform">
 155                  <tr>
 156                      <th>
 157                      <?php echo T_('Parameters'); ?>
 158                      </th>
 159                  </tr>
 160                  <tr>
 161                      <td>
 162                      <?php echo $params->render();?>
 163                      </td>
 164                  </tr>
 165                  </table>
 166              </td>
 167          </tr>
 168          </table>
 169  
 170          <input type="hidden" name="option" value="<?php echo $option;?>" />
 171          <input type="hidden" name="id" value="<?php echo $menu->id; ?>" />
 172          <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" />
 173          <input type="hidden" name="type" value="<?php echo $menu->type; ?>" />
 174          <input type="hidden" name="link" value="<?php echo $menu->link; ?>" />
 175          <input type="hidden" name="task" value="" />
 176          <input type="hidden" name="hidemainmenu" value="0" />
 177          </form>
 178          <script src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js" type="text/javascript"></script>
 179          <?php
 180      }
 181  }
 182  ?>