| 1 |
<?php |
<?php |
| 2 |
/** |
/** |
| 3 |
* @package Mambo Open Source |
* @package Mambo |
| 4 |
* @subpackage Menus |
* @subpackage Menus |
| 5 |
* @copyright (C) 2005 - 2006 Mambo Foundation Inc. |
* @author Mambo Foundation Inc see README.php |
| 6 |
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
* @copyright Mambo Foundation Inc. |
| 7 |
* |
* See COPYRIGHT.php for copyright notices and details. |
| 8 |
* Mambo was originally developed by Miro (www.miro.com.au) in 2000. Miro assigned the copyright in Mambo to The Mambo Foundation in 2005 to ensure |
* @license GNU/GPL Version 2, see LICENSE.php |
| 9 |
* that Mambo remained free Open Source software owned and managed by the community. |
* Mambo is free software; you can redistribute it and/or |
| 10 |
* Mambo is Free Software |
* modify it under the terms of the GNU General Public License |
| 11 |
|
* as published by the Free Software Foundation; version 2 of the License. |
| 12 |
*/ |
*/ |
| 13 |
|
|
| 14 |
/** ensure this file is being included by a parent file */ |
/** ensure this file is being included by a parent file */ |
| 24 |
function show ( $option, $menus, $pageNav ) { |
function show ( $option, $menus, $pageNav ) { |
| 25 |
global $mosConfig_live_site; |
global $mosConfig_live_site; |
| 26 |
?> |
?> |
| 27 |
<script language="javascript" type="text/javascript"> |
<script type="text/javascript"> |
| 28 |
function menu_listItemTask( id, task, option ) { |
function menu_listItemTask( id, task, option ) { |
| 29 |
var f = document.adminForm; |
var f = document.adminForm; |
| 30 |
cb = eval( 'f.' + id ); |
cb = eval( 'f.' + id ); |
| 40 |
<table class="adminheading"> |
<table class="adminheading"> |
| 41 |
<tr> |
<tr> |
| 42 |
<th class="menus"> |
<th class="menus"> |
| 43 |
<?php echo T_('Menu Manager') ?> |
<?php echo T_('Menu Manager'); ?> |
| 44 |
</th> |
</th> |
| 45 |
</tr> |
</tr> |
| 46 |
</table> |
</table> |
| 51 |
<th width="20px"> |
<th width="20px"> |
| 52 |
</th> |
</th> |
| 53 |
<th class="title" nowrap="nowrap"> |
<th class="title" nowrap="nowrap"> |
| 54 |
<?php echo T_('Menu Name') ?> |
<?php echo T_('Menu Name'); ?> |
| 55 |
</th> |
</th> |
| 56 |
<th width="5%" nowrap="nowrap"> |
<th width="5%" nowrap="nowrap"> |
| 57 |
<?php echo T_('Menu Items') ?> |
<?php echo T_('Menu Items'); ?> |
| 58 |
</th> |
</th> |
| 59 |
<th width="10%"> |
<th width="10%"> |
| 60 |
<?php echo T_('# Published') ?> |
<?php echo T_('# Published'); ?> |
| 61 |
</th> |
</th> |
| 62 |
<th width="15%"> |
<th width="15%"> |
| 63 |
<?php echo T_('# Unpublished') ?> |
<?php echo T_('# Unpublished'); ?> |
| 64 |
</th> |
</th> |
| 65 |
<th width="15%"> |
<th width="15%"> |
| 66 |
<?php echo T_('# Trash') ?> |
<?php echo T_('# Trash'); ?> |
| 67 |
</th> |
</th> |
| 68 |
<th width="15%"> |
<th width="15%"> |
| 69 |
<?php echo T_('# Modules') ?> |
<?php echo T_('# Modules'); ?> |
| 70 |
</th> |
</th> |
| 71 |
</tr> |
</tr> |
| 72 |
<?php |
<?php |
| 89 |
<?php echo $i + 1 + $pageNav->limitstart;?> |
<?php echo $i + 1 + $pageNav->limitstart;?> |
| 90 |
</td> |
</td> |
| 91 |
<td width="30px" align="center"> |
<td width="30px" align="center"> |
| 92 |
<input type="radio" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $menu->type; ?>" onclick="isChecked(this.checked);" /> |
<input type="checkbox" id="cb<?php echo $i;?>" name="cid[]" value="<?php echo $menu->type; ?>" onclick="isChecked(this.checked);" /> |
| 93 |
</td> |
</td> |
| 94 |
<td> |
<td> |
| 95 |
<a href="<?php echo $link; ?>" title="<?php echo T_('Edit Menu Name') ?>"> |
<a href="<?php echo $link; ?>" title="<?php echo T_('Edit Menu Name'); ?>"> |
| 96 |
<?php echo $menu->type; ?> |
<?php echo $menu->type; ?> |
| 97 |
</a> |
</a> |
| 98 |
</td> |
</td> |
| 99 |
<td align="center"> |
<td align="center"> |
| 100 |
<a href="<?php echo $linkA; ?>" title="<?php echo T_('Edit Menu Items') ?>"> |
<a href="<?php echo $linkA; ?>" title="<?php echo T_('Edit Menu Items'); ?>"> |
| 101 |
<img src="<?php echo $mosConfig_live_site; ?>/includes/js/ThemeOffice/mainmenu.png" border="0"/> |
<img src="<?php echo $mosConfig_live_site; ?>/includes/js/ThemeOffice/mainmenu.png" border="0"/> |
| 102 |
</a> |
</a> |
| 103 |
</td> |
</td> |
| 148 |
|
|
| 149 |
$new = $row->menutype ? 0 : 1; |
$new = $row->menutype ? 0 : 1; |
| 150 |
?> |
?> |
| 151 |
<script language="javascript" type="text/javascript"> |
<script type="text/javascript"> |
| 152 |
function submitbutton(pressbutton) { |
function submitbutton(pressbutton) { |
| 153 |
var form = document.adminForm; |
var form = document.adminForm; |
| 154 |
|
|
| 155 |
if (pressbutton == 'savemenu') { |
if (pressbutton == 'savemenu') { |
| 156 |
if ( form.menutype.value == '' ) { |
if ( form.menutype.value == '' ) { |
| 157 |
alert( '<?php echo T_('Please enter a menu name') ?>' ); |
alert( '<?php echo T_('Please enter a menu name'); ?>' ); |
| 158 |
form.menutype.focus(); |
form.menutype.focus(); |
| 159 |
return; |
return; |
| 160 |
} |
} |
| 162 |
if ( $new ) { |
if ( $new ) { |
| 163 |
?> |
?> |
| 164 |
if ( form.title.value == '' ) { |
if ( form.title.value == '' ) { |
| 165 |
alert( '<?php echo T_('Please enter a module name for your menu') ?>' ); |
alert( '<?php echo T_('Please enter a module name for your menu'); ?>' ); |
| 166 |
form.title.focus(); |
form.title.focus(); |
| 167 |
return; |
return; |
| 168 |
} |
} |
| 180 |
<table class="adminheading"> |
<table class="adminheading"> |
| 181 |
<tr> |
<tr> |
| 182 |
<th class="menus"> |
<th class="menus"> |
| 183 |
<?php echo T_('Menu Details') ?> |
<?php echo T_('Menu Details'); ?> |
| 184 |
</th> |
</th> |
| 185 |
</tr> |
</tr> |
| 186 |
</table> |
</table> |
| 188 |
<table class="adminform"> |
<table class="adminform"> |
| 189 |
<tr height="45px;"> |
<tr height="45px;"> |
| 190 |
<td width="100px" align="left"> |
<td width="100px" align="left"> |
| 191 |
<strong><?php echo T_('Menu Name:') ?></strong> |
<strong><?php echo T_('Menu Name:'); ?></strong> |
| 192 |
</td> |
</td> |
| 193 |
<td> |
<td> |
| 194 |
<input class="inputbox" type="text" name="menutype" size="30" value="<?php echo isset( $row->menutype ) ? $row->menutype : ''; ?>" /> |
<input class="inputbox" type="text" name="menutype" size="30" value="<?php echo isset( $row->menutype ) ? $row->menutype : ''; ?>" /> |
| 203 |
?> |
?> |
| 204 |
<tr> |
<tr> |
| 205 |
<td width="100px" align="left" valign="top"> |
<td width="100px" align="left" valign="top"> |
| 206 |
<strong>Module Title:</strong> |
<strong><?php echo T_('Module Title:'); ?></strong> |
| 207 |
</td> |
</td> |
| 208 |
<td> |
<td> |
| 209 |
<input class="inputbox" type="text" name="title" size="30" value="<?php echo $row->title ? $row->title : '';?>" /> |
<input class="inputbox" type="text" name="title" size="30" value="<?php echo $row->title ? $row->title : '';?>" /> |
| 214 |
<br/><br/><br/> |
<br/><br/><br/> |
| 215 |
<strong> |
<strong> |
| 216 |
|
|
| 217 |
* <?php echo T_('A new mod_mainmenu module, with the Title you have entered above will automatically be created when you save this menu.') ?> * |
* <?php echo T_('A new mod_mainmenu module, with the Title you have entered above will automatically be created when you save this menu.'); ?> * |
| 218 |
<br/><br/> |
<br/><br/> |
| 219 |
<?php echo T_('Parameters for the module created are to be edited through the "Modules Manager [site]": Modules -> Site Modules') ?> |
<?php echo T_('Parameters for the module created are to be edited through the "Modules Manager [site]": Modules -> Site Modules'); ?> |
| 220 |
</strong> |
</strong> |
| 221 |
</td> |
</td> |
| 222 |
</tr> |
</tr> |
| 230 |
</table> |
</table> |
| 231 |
<br /><br /> |
<br /><br /> |
| 232 |
|
|
| 233 |
<script language="Javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/overlib_mini.js"></script> |
<script src="<?php echo $mosConfig_live_site; ?>/includes/js/overlib_mini.js" type="text/javascript"></script> |
| 234 |
<?php |
<?php |
| 235 |
if ( $new ) { |
if ( $new ) { |
| 236 |
?> |
?> |
| 277 |
<?php |
<?php |
| 278 |
if ( $modules ) { |
if ( $modules ) { |
| 279 |
?> |
?> |
| 280 |
<strong><?php echo T_('Module(s) being Deleted:') ?></strong> |
<strong><?php echo T_('Module(s) being Deleted:'); ?></strong> |
| 281 |
<ol> |
<ol> |
| 282 |
<?php |
<?php |
| 283 |
foreach ( $modules as $module ) { |
foreach ( $modules as $module ) { |
| 299 |
?> |
?> |
| 300 |
</td> |
</td> |
| 301 |
<td align="left" valign="top" width="25%"> |
<td align="left" valign="top" width="25%"> |
| 302 |
<strong><?php echo T_('Menu Items being Deleted:') ?></strong> |
<strong><?php echo T_('Menu Items being Deleted:'); ?></strong> |
| 303 |
<br /> |
<br /> |
| 304 |
<ol> |
<ol> |
| 305 |
<?php |
<?php |
| 319 |
</ol> |
</ol> |
| 320 |
</td> |
</td> |
| 321 |
<td> |
<td> |
| 322 |
* <?php echo T_('This will <span style="font-weight:bold;color:#FF0000">Delete</span> this Menu, <br />ALL its Menu Items and the Module(s) associated with it') ?> * |
* <?php echo T_('This will <span style="font-weight:bold;color:#FF0000">Delete</span> this Menu, <br />ALL its Menu Items and the Module(s) associated with it'); ?> * |
| 323 |
<br /><br /><br /> |
<br /><br /><br /> |
| 324 |
<div style="border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 100px;"> |
<div style="border: 1px dotted gray; width: 70px; padding: 10px; margin-left: 100px;"> |
| 325 |
<a class="toolbar" href="javascript:if (confirm('<?php echo T_('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);"> |
<a class="toolbar" href="javascript:if (confirm('<?php echo T_('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);"> |
| 326 |
<img name="remove" src="images/delete.png" alt="<?php echo T_('Delete') ?>" border="0" align="middle" /> |
<img name="remove" src="images/delete.png" alt="<?php echo T_('Delete'); ?>" border="0" align="middle" /> |
| 327 |
<?php echo T_('Delete') ?> |
<?php echo T_('Delete'); ?> |
| 328 |
</a> |
</a> |
| 329 |
</div> |
</div> |
| 330 |
</td> |
</td> |
| 350 |
*/ |
*/ |
| 351 |
function showCopy( $option, $type, $items ) { |
function showCopy( $option, $type, $items ) { |
| 352 |
?> |
?> |
| 353 |
<script language="javascript" type="text/javascript"> |
<script type="text/javascript"> |
| 354 |
function submitbutton(pressbutton) { |
function submitbutton(pressbutton) { |
| 355 |
if (pressbutton == 'copymenu') { |
if (pressbutton == 'copymenu') { |
| 356 |
if ( document.adminForm.menu_name.value == '' ) { |
if ( document.adminForm.menu_name.value == '' ) { |
| 357 |
alert( '<?php echo T_('Please enter a name for the copy of the Menu') ?>' ); |
alert( '<?php echo T_('Please enter a name for the copy of the Menu'); ?>' ); |
| 358 |
return; |
return; |
| 359 |
} else if ( document.adminForm.module_name.value == '' ) { |
} else if ( document.adminForm.module_name.value == '' ) { |
| 360 |
alert( '<?php echo T_('Please enter a name for the new Module') ?>' ); |
alert( '<?php echo T_('Please enter a name for the new Module'); ?>' ); |
| 361 |
return; |
return; |
| 362 |
} else { |
} else { |
| 363 |
submitform( 'copymenu' ); |
submitform( 'copymenu' ); |
| 371 |
<table class="adminheading"> |
<table class="adminheading"> |
| 372 |
<tr> |
<tr> |
| 373 |
<th> |
<th> |
| 374 |
<?php echo T_('Copy Menu') ?> |
<?php echo T_('Copy Menu'); ?> |
| 375 |
</th> |
</th> |
| 376 |
</tr> |
</tr> |
| 377 |
</table> |
</table> |
| 381 |
<tr> |
<tr> |
| 382 |
<td width="3%"></td> |
<td width="3%"></td> |
| 383 |
<td align="left" valign="top" width="30%"> |
<td align="left" valign="top" width="30%"> |
| 384 |
<strong><?php echo T_('New Menu Name:') ?></strong> |
<strong><?php echo T_('New Menu Name:'); ?></strong> |
| 385 |
<br /> |
<br /> |
| 386 |
<input class="inputbox" type="text" name="menu_name" size="30" value="" /> |
<input class="inputbox" type="text" name="menu_name" size="30" value="" /> |
| 387 |
<br /><br /><br /> |
<br /><br /><br /> |
| 388 |
<strong><?php echo T_('New Module Name:') ?></strong> |
<strong><?php echo T_('New Module Name:'); ?></strong> |
| 389 |
<br /> |
<br /> |
| 390 |
<input class="inputbox" type="text" name="module_name" size="30" value="" /> |
<input class="inputbox" type="text" name="module_name" size="30" value="" /> |
| 391 |
<br /><br /> |
<br /><br /> |
| 392 |
</td> |
</td> |
| 393 |
<td align="left" valign="top" width="25%"> |
<td align="left" valign="top" width="25%"> |
| 394 |
<strong> |
<strong> |
| 395 |
<?php echo T_('Menu being copied:') ?> |
<?php echo T_('Menu being copied:'); ?> |
| 396 |
</strong> |
</strong> |
| 397 |
<br /> |
<br /> |
| 398 |
<font color="#000066"> |
<font color="#000066"> |
| 402 |
</font> |
</font> |
| 403 |
<br /><br /> |
<br /><br /> |
| 404 |
<strong> |
<strong> |
| 405 |
<?php echo T_('Menu Items being copied:') ?> |
<?php echo T_('Menu Items being copied:'); ?> |
| 406 |
</strong> |
</strong> |
| 407 |
<br /> |
<br /> |
| 408 |
<ol> |
<ol> |