- md5
- cf27383e090604ead905a713f52974fd
- sha1
- 7beb5bf19a3d240c55e85db64b2f309b07e59e31
- sha256
- 944144aa087f1804e357471ac7e9e94537cafee1666bb8ba8b092659df8b500c
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
<?php
/**
* @version $Id: admin.menus.html.php 254 2005-09-29 17:10:05Z stingrey $
* @package Joomla
* @subpackage Menus
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Menus
*/
class HTML_menusections {
function showMenusections( $rows, $pageNav, $search, $levellist, $menutype, $option ) {
global $my;
mosCommonHTML::loadOverlib();
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="menus">
Menu Manager <small><small>[ <?php echo $menutype;?> ]</small></small>
</th>
<td nowrap="true">
Max Levels
</td>
<td>
<?php echo $levellist;?>
</td>
<td>
Filter:
</td>
<td>
<input type="text" name="search" value="<?php echo $search;?>" class="inputbox" />
</td>
</tr>
<?php
if ( $menutype == 'mainmenu' ) {
?>
<tr>
<td align="right" nowrap style="color: red; font-weight: normal;" colspan="5">
<?php echo _MAINMENU_DEL; ?>
<br/>
<span style="color: black;">
<?php echo _MAINMENU_HOME; ?>
</span>
</td>
</tr>
<?php
}
?>
</table>
<table class="adminlist">
<tr>
<th width="20">
#
</th>
<th width="20">
<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" />
</th>
<th class="title" width="40%">
Menu Item
</th>
<th width="5%">
Published
</th>
<th colspan="2" width="5%">
Reorder
</th>
<th width="2%">
Order
</th>
<th width="1%">
<a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a>
</th>
<th width="10%">
Access
</th>
<th>
Itemid
</th>
<th width="35%" align="left">
Type
</th>
<th>
CID
</th>
</tr>
<?php
$k = 0;
$i = 0;
$n = count( $rows );
foreach ($rows as $row) {
$access = mosCommonHTML::AccessProcessing( $row, $i );
$checked = mosCommonHTML::CheckedOutProcessing( $row, $i );
$published = mosCommonHTML::PublishedProcessing( $row, $i );
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php echo $i + 1 + $pageNav->limitstart;?>
</td>
<td>
<?php echo $checked; ?>
</td>
<td nowrap="nowrap">
<?php
if ( $row->checked_out && ( $row->checked_out != $my->id ) ) {
echo $row->treename;
} else {
$link = 'index2.php?option=com_menus&menutype='. $row->menutype .'&task=edit&id='. $row->id . '&hidemainmenu=1';
?>
<a href="<?php echo $link; ?>">
<?php echo $row->treename; ?>
</a>
<?php
}
?>
</td>
<td width="10%" align="center">
<?php echo $published;?>
</td>
<td>
<?php echo $pageNav->orderUpIcon( $i ); ?>
</td>
<td>
<?php echo $pageNav->orderDownIcon( $i, $n ); ?>
</td>
<td align="center" colspan="2">
<input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" />
</td>
<td align="center">
<?php echo $access;?>
</td>
<td align="center">
<?php echo $row->id; ?>
</td>
<td align="left">
<span class="editlinktip">
<?php
echo mosToolTip( $row->descrip, '', 280, 'tooltip.png', $row->type, $row->edit );
?>
</span>
</td>
<td align="center">
<?php echo $row->componentid; ?>
</td>
</tr>
<?php
$k = 1 - $k;
$i++;
}
?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="menutype" value="<?php echo $menutype; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php
}
/**
* Displays a selection list for menu item types
*/
function addMenuItem( &$cid, $menutype, $option, $types_content, $types_component, $types_link, $types_other, $types_submit ) {
mosCommonHTML::loadOverlib();
?>
<style type="text/css">
fieldset {
border: 1px solid #777;
}
legend {
font-weight: bold;
}
</style>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="menus">
New Menu Item
</th>
<td valign="bottom" nowrap style="color: red;">
<?php //echo _MENU_GROUP; ?>
* Note that some menu types appear in more that one grouping, but they are still the same menu type.
</td>
</tr>
</table>
<table class="adminform">
<tr>
<td width="50%" valign="top">
<fieldset>
<legend>Content</legend>
<table class="adminform">
<?php
$k = 0;
$count = count( $types_content );
for ( $i=0; $i < $count; $i++ ) {
$row = &$types_content[$i];
$link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&hidemainmenu=1&type='. $row->type;
HTML_menusections::htmlOptions( $row, $link, $k, $i );
$k = 1 - $k;
}
?>
</table>
</fieldset>
<fieldset>
<legend>Miscellaneous</legend>
<table class="adminform">
<?php
$k = 0;
$count = count( $types_other );
for ( $i=0; $i < $count; $i++ ) {
$row = &$types_other[$i];
$link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type;
HTML_menusections::htmlOptions( $row, $link, $k, $i );
$k = 1 - $k;
}
?>
</table>
</fieldset>
<fieldset>
<legend>Submit</legend>
<table class="adminform">
<?php
$k = 0;
$count = count( $types_submit );
for ( $i=0; $i < $count; $i++ ) {
$row = &$types_submit[$i];
$link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type;
HTML_menusections::htmlOptions( $row, $link, $k, $i );
$k = 1 - $k;
}
?>
</table>
</fieldset>
</td>
<td width="50%" valign="top">
<fieldset>
<legend>Components</legend>
<table class="adminform">
<?php
$k = 0;
$count = count( $types_component );
for ( $i=0; $i < $count; $i++ ) {
$row = &$types_component[$i];
$link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type;
HTML_menusections::htmlOptions( $row, $link, $k, $i );
$k = 1 - $k;
}
?>
</table>
</fieldset>
<fieldset>
<legend>Links</legend>
<table class="adminform">
<?php
$k = 0;
$count = count( $types_link );
for ( $i=0; $i < $count; $i++ ) {
$row = &$types_link[$i];
$link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type;
HTML_menusections::htmlOptions( $row, $link, $k, $i );
$k = 1 - $k;
}
?>
</table>
</fieldset>
</td>
</tr>
</table>
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="menutype" value="<?php echo $menutype; ?>" />
<input type="hidden" name="task" value="edit" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php
}
function htmlOptions( &$row, $link, $k, $i ) {
?>
<tr class="<?php echo "row$k"; ?>">
<td width="20">
</td>
<td style="height: 30px;">
<span class="editlinktip" style="cursor: pointer;">
<?php
echo mosToolTip( $row->descrip, $row->name, 250, '', $row->name, $link, 1 );
?>
</span>
</td>
<td width="20">
<input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" />
</td>
<td width="20">
</td>
</tr>
<?php
}
/**
* Form to select Menu to move menu item(s) to
*/
function moveMenu( $option, $cid, $MenuList, $items, $menutype ) {
?>
<form action="index2.php" method="post" name="adminForm">
<br />
<table class="adminheading">
<tr>
<th>
Move Menu Items
</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="30%">
<strong>Move to Menu:</strong>
<br />
<?php echo $MenuList ?>
<br /><br />
</td>
<td align="left" valign="top">
<strong>
Menu Items being moved:
</strong>
<br />
<ol>
<?php
foreach ( $items as $item ) {
?>
<li>
<?php echo $item->name; ?>
</li>
<?php
}
?>
</ol>
</td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="menutype" value="<?php echo $menutype; ?>" />
<?php
foreach ( $cid as $id ) {
echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />";
}
?>
</form>
<?php
}
/**
* Form to select Menu to copy menu item(s) to
*/
function copyMenu( $option, $cid, $MenuList, $items, $menutype ) {
?>
<form action="index2.php" method="post" name="adminForm">
<br />
<table class="adminheading">
<tr>
<th>
Copy Menu Items
</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="30%">
<strong>
Copy to Menu:
</strong>
<br />
<?php echo $MenuList ?>
<br /><br />
</td>
<td align="left" valign="top">
<strong>
Menu Items being copied:
</strong>
<br />
<ol>
<?php
foreach ( $items as $item ) {
?>
<li>
<?php echo $item->name; ?>
</li>
<?php
}
?>
</ol>
</td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="menutype" value="<?php echo $menutype; ?>" />
<?php
foreach ( $cid as $id ) {
echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />";
}
?>
</form>
<?php
}
}
?>
The same content is in 3 releases, Joomla 1.0.3 to 1.0.7. See them all, or every version of this file.