- md5
- 9d40e018b7ffe2d1c5e19aa32148b9c4
- sha1
- 3eb167a40fc7b3b639dbad1b8503882b02d7de3f
- sha256
- f7375551c18d4ae52d8b52b6567636bd253c993f373898b2683edb0e21d928bb
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
<?php
/**
* @version $Id: admin.menumanager.html.php 5028 2006-09-13 18:45:52Z friesengeist $
* @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' );
/**
* HTML class for all menumanager component output
* @package Joomla
* @subpackage Menus
*/
class HTML_menumanager {
/**
* Writes a list of the menumanager items
*/
function show ( $option, $menus, $pageNav ) {
global $mosConfig_live_site;
?>
<script language="javascript" type="text/javascript">
function menu_listItemTask( id, task, option ) {
var f = document.adminForm;
cb = eval( 'f.' + id );
if (cb) {
cb.checked = true;
submitbutton(task);
}
return false;
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="menus">
Menu Manager
</th>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="20">#</th>
<th width="20px">
</th>
<th class="title" nowrap="nowrap">
Menu Name
</th>
<th width="5%" nowrap="nowrap">
Menu Items
</th>
<th width="10%">
# Published
</th>
<th width="15%">
# Unpublished
</th>
<th width="15%">
# Trash
</th>
<th width="15%">
# Modules
</th>
</tr>
<?php
$k = 0;
$i = 0;
$start = 0;
if ($pageNav->limitstart)
$start = $pageNav->limitstart;
$count = count($menus)-$start;
if ($pageNav->limit)
if ($count > $pageNav->limit)
$count = $pageNav->limit;
for ($m = $start; $m < $start+$count; $m++) {
$menu = $menus[$m];
$menu->type = htmlspecialchars( $menu->type );
$link = 'index2.php?option=com_menumanager&task=edit&hidemainmenu=1&menu='. $menu->type;
$linkA = 'index2.php?option=com_menus&menutype='. $menu->type;
?>
<tr class="<?php echo "row". $k; ?>">
<td align="center" width="30px">
<?php echo $i + 1 + $pageNav->limitstart;?>
</td>
<td width="30px" align="center">
<input type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $menu->type; ?>" onclick="isChecked(this.checked);" />
</td>
<td>
<a href="<?php echo $link; ?>" title="Edit Menu Name">
<?php echo $menu->type; ?>
</a>
</td>
<td align="center">
<a href="<?php echo $linkA; ?>" title="Edit Menu Items">
<img src="<?php echo $mosConfig_live_site; ?>/includes/js/ThemeOffice/mainmenu.png" border="0"/>
</a>
</td>
<td align="center">
<?php
echo $menu->published;
?>
</td>
<td align="center">
<?php
echo $menu->unpublished;
?>
</td>
<td align="center">
<?php
echo $menu->trash;
?>
</td>
<td align="center">
<?php
echo $menu->modules;
?>
</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="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php
}
/**
* writes a form to take the name of the menu you would like created
* @param option display options for the form
*/
function edit ( &$row, $option ) {
global $mosConfig_live_site;
$new = $row->menutype ? 0 : 1;
$row->menutype = htmlspecialchars( $row->menutype );
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'savemenu') {
if ( form.menutype.value == '' ) {
alert( 'Please enter a menu name' );
form.menutype.focus();
return;
}
var r = new RegExp("[\']", "i");
if ( r.exec(form.menutype.value) ) {
alert( 'The menu name cannot contain a \'' );
form.menutype.focus();
return;
}
<?php
if ( $new ) {
?>
if ( form.title.value == '' ) {
alert( 'Please enter a module name for your menu' );
form.title.focus();
return;
}
<?php
}
?>
submitform( 'savemenu' );
} else {
submitform( pressbutton );
}
}
</script>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="menus">
Menu Details
</th>
</tr>
</table>
<table class="adminform">
<tr height="45px;">
<td width="100px" align="left">
<strong>Menu Name:</strong>
</td>
<td>
<input class="inputbox" type="text" name="menutype" size="30" maxlength="25" value="<?php echo isset( $row->menutype ) ? $row->menutype : ''; ?>" />
<?php
$tip = 'This is the identification name used by Joomla! to identify this menu within the code - it must be unique. Recommend that you do not have any spaces in your Menu Name';
echo mosToolTip( $tip );
?>
</td>
</tr>
<?php
if ( $new ) {
?>
<tr>
<td width="100px" align="left" valign="top">
<strong>Module Title:</strong>
</td>
<td>
<input class="inputbox" type="text" name="title" size="30" value="<?php echo $row->title ? $row->title : '';?>" />
<?php
$tip = 'Title of the mod_mainmenu module required to show this Menu';
echo mosToolTip( $tip );
?>
<br/><br/><br/>
<strong>
* A new mod_mainmenu module, with the Title you have entered above will automatically be created when you save this menu. *
<br/><br/>
Parameters for the module created are to be edited through the 'Modules Manager [site]': Modules -> Site Modules
</strong>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2">
</td>
</tr>
</table>
<br /><br />
<script language="Javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/overlib_mini.js"></script>
<?php
if ( $new ) {
?>
<input type="hidden" name="id" value="<?php echo $row->id; ?>" />
<input type="hidden" name="iscore" value="<?php echo $row->iscore; ?>" />
<input type="hidden" name="published" value="<?php echo $row->published; ?>" />
<input type="hidden" name="position" value="<?php echo $row->position; ?>" />
<input type="hidden" name="module" value="mod_mainmenu" />
<input type="hidden" name="params" value="<?php echo $row->params; ?>" />
<?php
}
?>
<input type="hidden" name="new" value="<?php echo $new; ?>" />
<input type="hidden" name="old_menutype" value="<?php echo $row->menutype; ?>" />
<input type="hidden" name="option" value="<?php echo $option; ?>" />
<input type="hidden" name="task" value="savemenu" />
<input type="hidden" name="boxchecked" value="0" />
</form>
<?php
}
/**
* A delete confirmation page
* Writes list of the items that have been selected for deletion
*/
function showDelete( $option, $type, $items, $modules ) {
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Delete Menu: <?php echo $type;?>
</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="20%">
<?php
if ( $modules ) {
?>
<strong>Module(s) being Deleted:</strong>
<ol>
<?php
foreach ( $modules as $module ) {
?>
<li>
<font color="#000066">
<strong>
<?php echo $module->title; ?>
</strong>
</font>
</li>
<input type="hidden" name="cid[]" value="<?php echo $module->id; ?>" />
<?php
}
?>
</ol>
<?php
}
?>
</td>
<td align="left" valign="top" width="25%">
<strong>Menu Items being Deleted:</strong>
<br />
<ol>
<?php
foreach ( $items as $item ) {
?>
<li>
<font color="#000066">
<?php echo $item->name; ?>
</font>
</li>
<input type="hidden" name="mids[]" value="<?php echo $item->id; ?>" />
<?php
}
?>
</ol>
</td>
<td>
* This will <strong><font color="#FF0000">Delete</font></strong> this Menu, <br />ALL its Menu Items and the Module(s) associated with it *
<br /><br /><br />
<div style="border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 100px;">
<a class="toolbar" href="javascript:if (confirm('Are you sure you want to Delete this menu? \nThis will Delete the Menu, its Items and the Module(s).')){ submitbutton('deletemenu');}" onmouseout="MM_swapImgRestore();" onmouseover="MM_swapImage('remove','','images/delete_f2.png',1);">
<img name="remove" src="images/delete.png" alt="Delete" border="0" align="middle" />
Delete
</a>
</div>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="type" value="<?php echo $type; ?>" />
<input type="hidden" name="boxchecked" value="1" />
</form>
<?php
}
/**
* A copy confirmation page
* Writes list of the items that have been selected for copy
*/
function showCopy( $option, $type, $items ) {
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
if (pressbutton == 'copymenu') {
if ( document.adminForm.menu_name.value == '' ) {
alert( 'Please enter a name for the copy of the Menu' );
return;
} else if ( document.adminForm.module_name.value == '' ) {
alert( 'Please enter a name for the new Module' );
return;
} else {
submitform( 'copymenu' );
}
} else {
submitform( pressbutton );
}
}
</script>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th>
Copy Menu
</th>
</tr>
</table>
<br />
<table class="adminform">
<tr>
<td width="3%"></td>
<td align="left" valign="top" width="30%">
<strong>New Menu Name:</strong>
<br />
<input class="inputbox" type="text" name="menu_name" size="30" value="" />
<br /><br /><br />
<strong>New Module Name:</strong>
<br />
<input class="inputbox" type="text" name="module_name" size="30" value="" />
<br /><br />
</td>
<td align="left" valign="top" width="25%">
<strong>
Menu being copied:
</strong>
<br />
<font color="#000066">
<strong>
<?php echo $type; ?>
</strong>
</font>
<br /><br />
<strong>
Menu Items being copied:
</strong>
<br />
<ol>
<?php
foreach ( $items as $item ) {
?>
<li>
<font color="#000066">
<?php echo $item->name; ?>
</font>
</li>
<input type="hidden" name="mids[]" value="<?php echo $item->id; ?>" />
<?php
}
?>
</ol>
</td>
<td valign="top">
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<br /><br />
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="type" value="<?php echo $type; ?>" />
</form>
<?php
}
}
?>
No other release has this exact content. See every version of this file.