[ Index ]

PHP Cross Reference of Mambo 4.6.5

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

title

Body

[close]

/administrator/components/com_menus/content_archive_section/ -> content_archive_section.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 content_archive_section_menu_html {
  27  
  28  	function editSection( &$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' ) < 0 ) {
  43                      alert( '<?php echo T_('You must select a Section'); ?>' );
  44                      return;
  45                  }
  46  
  47                  if ( form.name.value == '' ) {
  48                      if ( form.componentid.value == 0 ) {
  49                          form.name.value = "<?php echo T_('All Sections'); ?>";
  50                      } else {
  51                          form.name.value = form.componentid.options[form.componentid.selectedIndex].text;
  52                      }
  53                  }
  54                  form.link.value = "index.php?option=com_content&task=archivesection&id=" + form.componentid.value;
  55                  submitform( pressbutton );
  56                  <?php
  57              } else {
  58                  ?>
  59                  if ( form.name.value == '' ) {
  60                      alert( '<?php echo T_('This Menu item must have a title'); ?>' );
  61                  } else {
  62                      submitform( pressbutton );
  63                  }
  64                  <?php
  65              }
  66              ?>
  67          }
  68          </script>
  69          <form action="index2.php" method="post" name="adminForm">
  70  
  71          <table class="adminheading">
  72          <tr>
  73              <th>
  74              <?php echo $menu->id ? T_('Edit') : T_('Add');?> <?php echo T_('Menu Item :: Blog - Content Section Archive'); ?>
  75              </th>
  76          </tr>
  77          </table>
  78  
  79          <table width="100%">
  80          <tr valign="top">
  81              <td width="60%">
  82                  <table class="adminform">
  83                  <tr>
  84                      <th colspan="3">
  85                      <?php echo T_('Details'); ?>
  86                      </th>
  87                  </tr>
  88                  <tr>
  89                      <td width="10%" align="right" valign="top"><strong><?php echo T_('Name:'); ?></strong></td>
  90                      <td width="200px">
  91                      <input type="text" name="name" size="30" maxlength="100" class="inputbox" value="<?php echo $menu->name; ?>"/>
  92                      </td>
  93                      <td>
  94                      <?php
  95                      if ( !$menu->id ) {
  96                          echo mosToolTip( T_('If you leave this blank the Section name will be automatically used') );
  97                      }
  98                      ?>
  99                      </td>
 100                  </tr>
 101                  <tr>
 102                      <td valign="top" align="right"><?php echo T_('Section:'); ?></td>
 103                      <td colspan="2">
 104                      <?php echo $lists['componentid']; ?>
 105                      </td>
 106                  </tr>
 107                  <tr>
 108                      <td align="right"><?php echo T_('Url:'); ?></td>
 109                      <td colspan="2">
 110                      <?php echo $lists['link']; ?>
 111                      </td>
 112                  </tr>
 113                  <tr>
 114                      <td align="right"><?php echo T_('Parent Item:'); ?></td>
 115                      <td colspan="2">
 116                      <?php echo $lists['parent']; ?>
 117                      </td>
 118                  </tr>
 119                  <tr>
 120                      <td valign="top" align="right"><?php echo T_('Ordering:'); ?></td>
 121                      <td colspan="2">
 122                      <?php echo $lists['ordering']; ?>
 123                      </td>
 124                  </tr>
 125                  <tr>
 126                      <td valign="top" align="right"><?php echo T_('Access Level:'); ?></td>
 127                      <td colspan="2">
 128                      <?php echo $lists['access']; ?>
 129                      </td>
 130                  </tr>
 131                  <tr>
 132                      <td valign="top" align="right"><?php echo T_('Published:'); ?></td>
 133                      <td colspan="2">
 134                      <?php echo $lists['published']; ?>
 135                      </td>
 136                  </tr>
 137                  <tr>
 138                      <td colspan="3">&nbsp;</td>
 139                  </tr>
 140                  </table>
 141              </td>
 142              <td width="40%">
 143                  <table class="adminform">
 144                  <tr>
 145                      <th>
 146                      <?php echo T_('Parameters'); ?>
 147                      </th>
 148                  </tr>
 149                  <tr>
 150                      <td>
 151                      <?php echo $params->render();?>
 152                      </td>
 153                  </tr>
 154                  </table>
 155              </td>
 156          </tr>
 157          </table>
 158  
 159          <input type="hidden" name="option" value="<?php echo $option;?>" />
 160          <input type="hidden" name="id" value="<?php echo $menu->id; ?>" />
 161          <input type="hidden" name="menutype" value="<?php echo $menu->menutype; ?>" />
 162          <input type="hidden" name="type" value="<?php echo $menu->type; ?>" />
 163          <input type="hidden" name="task" value="" />
 164          <input type="hidden" name="hidemainmenu" value="0" />
 165          </form>
 166          <script src="<?php echo $mosConfig_live_site;?>/includes/js/overlib_mini.js" type="text/javascript"></script>
 167          <?php
 168      }
 169  
 170  }
 171  ?>