Location: PHPKode > projects > Enigma > Enigma2/Enigma2_Install/Themes/Enigma/portal/MenuManagement.template.php
<?php
// Version: 1.0 RC1; MenuManagement

// debug page
function template_Menu_Test()
{
	global $context, $txt, $scripturl, $settings;

	echo '<pre>';
	print_r ($context);
	echo '</pre>';
}

// Menu Management default page - Menu Groups listing
function template_menu_groups()
{
	global $context, $txt, $scripturl, $settings;

	// If item was selected for delete, print a confirmation form
	if ($context['delgrp'] == '1')
	{
		echo '
		<form name="dmenug" action="', $scripturl, '?op=MenuManagement;sa=dmenuig" method="post">
		<table width="100%" border="0" class="tborder" cellspacing="0">
			<tr>
				<td colspan="2" class="windowbg" align="center"><strong>', $txt['menu_3'], '</strong></td>
			</tr><tr>
				<td colspan="2" class="windowbg2"><br />', $txt['menu_4'], '&nbsp;&nbsp;', $txt['menu_5'], '<br /><br /></td>
			</tr><tr>
				<td class="windowbg2" valign="top" width="12%">', $txt['menu_6'], ':</td>
				<td class="windowbg2">';

		foreach ($context['current'] AS $current)
			echo '<strong>', $current['tagname'], '</strong><br /><input type="hidden" name="mendel[', $current['key'], ']" value="', $current['value'], '">';

		echo '</td>
			</tr><tr>
				<td colspan="2" align="center" class="windowbg2"><br />
					<input type="submit" name="del_delete" value="', $txt['menu_7'], '">&nbsp;&nbsp;&nbsp;<input type="submit" name="del_cancel" value="', $txt['menu_8'], '"><br /><br /></td>
			</tr>
		</table><p>&nbsp;</p>';
	}

	$settings['linktree_inline'] = '0';

	// menu_settinginit_template_set
	echo theme_linktree(), '<br /><br />
	<form name="seldmenug" action="', $scripturl, '?op=MenuManagement;sa=menu2;delgrp=1" method="post">
	<div class="tborder">
		<table width="100%" border="0" cellspacing="1">
			<tr>
				<th class="titlebg" colspan="6" align="left"><a href="', $scripturl,'?action=helpadmin;help=menu_settinginit_template_set" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="Help" border="0" align="top" /></a>&nbsp;', $txt['menu_69'], '</th>
			</tr><tr>
				<td class="catbg" align="center"><b>', $txt['menu_12'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_13'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_14'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_59'], '</b></td>
				<td class="catbg" align="center" colspan="2"><b>', $txt['menu_15'], '</b></td>
			</tr>';

	foreach ($context['menugrp'] AS $menugrp)
	{
		if(!empty($menugrp['curtheme']) && $menugrp['curtheme'] == 1)
		{
			$bgclass = 'windowbg';
			$info = '<a href="' . $scripturl .'?action=helpadmin;help=menu_settinginit_template" onclick="return reqWin(this.href);" class="help"><img src="' . $settings['images_url'] . '/icons/assist.gif" alt="Information" border="0" align="top" /></a> ';
		}
		else
		{
			$bgclass = 'windowbg2';
			$info = '';
		}

		echo '<tr>
				<td class="', $bgclass, '">', $info, $menugrp['tagname'], '</td>
				<td class="', $bgclass, '">', $menugrp['menutype'], '</td>
				<td class="', $bgclass, '">', $menugrp['itemsep'], '</td>
				<td class="', $bgclass, '">', $menugrp['css'], '</td>
				<td class="', $bgclass, '" align="center"><a href="', $scripturl, '?op=MenuManagement;sa=menuitems;curmgrp=', $menugrp['grpID'], '">', $txt['menu_11'], '</a></td>
				<td class="', $bgclass, '" align="center"><input type="checkbox" name="mend[', $menugrp['num'], ']" value="', $menugrp['grpID'], '"></td>
			</tr>';
	}

	// links above - delete to dmenuig() then back to menu2(), edit to menuitems()
	// print form to add a new group - goes to amenug2() then returns to amenug()
	echo '
		</table>
	</div><br />
		<div align="right"><input type="submit" name="submit" value="', $txt['menu_16'], '"></div>
	</form>
		<a name="amig"></a>
	<form name="amenugi" action="', $scripturl, '?op=MenuManagement;sa=amenugi" method="post">
	<div class="tborder">
		<table width="100%" border="0">
			<tr>
				<th class="catbg" colspan="2">', $txt['menu_17'], '</th>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_12'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mtag" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_14'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mitmsep" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_59'], ':<br />', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mcss" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_13'], ':</td>
				<td class="windowbg2">
					<select name="mtyp">
						<option value="0">', $txt['menu_18'], '</option>
						<option value="1">', $txt['menu_19'], '</option>
						<option value="3">', $txt['menu_67'], '</option>
					</select></td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" colspan="2" align="center">
					<input type="submit" name="submit" value="', $txt['menu_17'], '"></td>
			</tr>
		</table>
	</div></form>';
}

// List Menu group Items
function template_Menu_Items()
{
	global $context, $txt, $settings, $scripturl;

	$settings['linktree_inline'] = '0';
	echo theme_linktree();

	// print top links and menu group editing form - edit form goes to emenu2g2() then returns here
	echo '
	<form name="emenuig2" action="', $scripturl, '?op=MenuManagement;sa=emenuig2;mene=', $context['menugrp']['grpID'], ';curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0" cellspacing="1">
			<tr>
				<th class="catbg" colspan="2" align="center">', $txt['menu_24'], '</th>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_12'], ':</td>
				<td class="windowbg2">
			<input type="text" name="mtag" size="40" value="', $context['menugrp']['tagname'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_14'], ':</td>
				<td class="windowbg2">
			<input type="text" name="mitmsep" size="40" value="', $context['menugrp']['itemsep'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_59'], ':</td>
				<td class="windowbg2">
			<input type="text" name="mcss" size="40" value="', $context['menugrp']['css'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_13'], ':</td>
				<td class="windowbg2">
					<select name="mtyp">
					<option value="0"', $context['mgimg'], '>', $txt['menu_18'], '</option>
					<option value="1"', $context['mgtxt'], '>', $txt['menu_19'], '</option>
					<option value="3"', $context['mgcus'], '>', $txt['menu_67'], '</option>
					</select></td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" colspan="2" align="center"><input type="submit" name="submit" value="', $txt['menu_23'], '"></td>
			</tr>
		</table>
	</div></form>';

	if (!empty($context['item']))
	{
		echo '
	<form name="amenucfm" action="', $scripturl, '?op=MenuManagement;sa=amenucfm;curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0" cellspacing="1">
			<tr>
				<td class="catbg" align="center"><b>', $txt['menu_61'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_62'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_25'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_63'], '</b></td>
				<td class="catbg" align="center"><b>', $txt['menu_64'], '</b></td>
				<td class="catbg" align="center" colspan="2"><b>', $txt['menu_15'], '</b></td>
			</tr>';

		foreach ($context['item'] AS $item)
		{
			// finish table depending on menu type
			if ($item['special'] == 'custsep')
			{
				if (strlen($item['alt']) > 30)
					$item['alt'] = (substr($item['alt'], 0, 25) . '.....');

				echo '
				<tr>
					<td colspan="3" class="windowbg2"><strong>', $txt['menu_26'], ':</strong> ', $item['alt'], '</td>';
			}
			else
			{
				echo '
				<tr>
					<td class="windowbg2">', $item['mspc'], $item['alt'], '</td>
					<td class="windowbg2">', $item['url'], '</td>
					<td class="windowbg2">', $item['urltarget'], '</td>';
			}

				echo '
					<td class="windowbg2">', $item['memberGroup'], '</td>
					<td class="windowbg2" align="center">
				<a href="', $scripturl, '?op=MenuManagement;sa=backmu;itm=', $item['id'], ';curmgrp=', $context['menugrp']['grpID'], '"><img src="', $settings['images_url'], '/back_up.gif" border="0" /></a>', $item['position'], '<a href="', $scripturl, '?op=MenuManagement;sa=overmu;itm=', $item['id'], ';curmgrp=', $context['menugrp']['grpID'], '"><img src="', $settings['images_url'], '/over_down.gif" border="0" /></a></td>';

			if (($context['menugrp']['menutype'] != '0') || ($item['special'] == 'custsep'))
			{
				echo '
					<td class="windowbg2" align="center"><a href="', $scripturl, '?op=MenuManagement;sa=emenu;ite=', $item['id'], ';curmgrp=', $context['menugrp']['grpID'], '">', $txt['menu_11'], '</a></td>
					<td class="windowbg2" align="center"><input type="checkbox" name="selitm[]" value="', $item['id'], '"></td>
				</tr>';
			}

			if (($context['menugrp']['menutype'] == '0') && ($item['special'] != 'custsep'))
			{
				echo '
					<td class="windowbg2" align="center" rowspan="2"><a href="', $scripturl, '?op=MenuManagement;sa=emenu;ite=', $item['id'], ';curmgrp=', $context['menugrp']['grpID'], '">', $txt['menu_11'], '</a></td>
					<td class="windowbg2" align="center" rowspan="2"><input type="checkbox" name="selitm[', $item['d'], ']" value="', $item['id'], '"></td>
				</tr><tr>
					<td class="blah">', $txt['menu_18'], ':&nbsp;<img src="', $item['itemimage'], '" align="absmiddle" ', $item['size'], ' />&nbsp;</td>
					<td class="blah">', $txt['menu_27'], ':&nbsp;', $item['imgfolder'], '&nbsp;</td>
					<td class="blah">', $txt['menu_28'], ':&nbsp;', $item['imgborder'], '&nbsp;</td>
					<td class="blah">', $txt['menu_29'], ':&nbsp;', $item['imgwidth'], '&nbsp;</td>
					<td class="blah">', $txt['menu_30'], ':&nbsp;', $item['imgheight'], '&nbsp;</td>
				</tr>';
			}

			echo '<tr>
					<td class="windowbg" colspan="7">&nbsp;</td>
				</tr>';
		}

		// links in table above - edit to emenu() and delete to dmenui() then returns
		echo '
		</table>
	</div><br />
	<div class="tborder">
		<table width="100%" border="0" class="bordercolor" cellspacing="0">
			<tr>
				<td class="windowbg2" colspan="2" valign="top">*&nbsp;-&nbsp;', $txt['menu_58'], '<br />&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" rowspan="2" align="right" valign="top"><strong>', $txt['menu_31'], ':&nbsp;&nbsp;</strong></td>
				<td class="windowbg2" align="right" valign="top"><strong>', $txt['menu_32'], ':&nbsp;</strong>
			<select name="newgrp">
				<option value=""></option>
';

		foreach ($context['grplist'] AS $grplist)
			echo '<option value="', $grplist['grpID'], '">', $grplist['tagname'], '</option>
';

		echo '
			</select><br /><br /></td>
			</tr><tr>
				<td class="windowbg2" width="240" align="right">
				<input type="submit" name="sel_copy" value="', $txt['menu_10'], '">&nbsp;&nbsp;
				<input type="submit" name="sel_move" value="', $txt['menu_9'], '">&nbsp;&nbsp;
				<input type="submit" name="sel_delete" value="', $txt['menu_7'], '"></td>
			</tr>
		</table>
	</div></form>';
	}

	echo '
	<a name="ami"></a>
	<form name="amenu2" action="', $scripturl, '?op=MenuManagement;sa=amenu2;curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border=0>
			<tr>
				<th class="catbg" colspan="2">', $txt['menu_65'], '</th>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_61'], ':</td>
				<td class="windowbg2">
					<input type="text" name="malt" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_50'], '<br />', $txt['menu_51'], '</td>
				<td class="windowbg2">
					<select name="mspec">
						<option value="none"></option>
						<option value="logout">', $txt['menu_54'], '</option>
					</select></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_62'], ':</td>
				<td class="windowbg2">
					<input type="text" name="murl" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_25'], ':<br />&nbsp;&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="murlt" size="20"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_64'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mpos" size="11" value="0"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_66'], '</td>
				<td class="windowbg2">
';
	echo groupselect('', 'mmemg[]',true);

	echo '</td>
			</tr>';

	if($context['menugrp']['menutype'] == '0')
	{
		echo '
			<tr>
				<td class="catbg" colspan="2"><a href="', $scripturl, '?action=helpadmin;help=menu_image_setting" onclick="return reqWin(this.href);" class="help"><img src="', $settings['images_url'], '/helptopics.gif" alt="Help" border="0" align="top" /></a>&nbsp;', $txt['menu_68'], '</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_60'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mimg" size="60"></td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_35'], ':</td>
				<td class="windowbg2">
					<input type="radio" name="mimgl" value="0" checked="checked">', $txt['menu_36'], '&nbsp;&nbsp;
					<input type="radio" name="mimgl" value="1">', $txt['menu_37'], '</td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_27'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgf" size="60"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_28'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mimgb" value="0" size="11"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_29'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgw" size="11"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_30'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgh" size="11"></td>
			</tr><tr>
				<td class="windowbg2">&nbsp;</td>
				<td class="windowbg2">&nbsp;', $txt['menu_38'], '</td>
			</tr>';
	}

	echo '<tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" colspan="2" align="center">
					<input type="submit" name="submit" value="', $txt['menu_21'], '"></td>
			</tr>
		</table>
	</div></form>';

	// form to add custom separators - goes to amenusp()
	echo '
	<a name="acsp"></a>
	<form name="amenusp" action="', $scripturl, '?op=MenuManagement;sa=amenusp;curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border=0>
			<tr>
				<th class="catbg" colspan="2">', $txt['menu_22'], '</th>
			</tr><tr>
				<td valign="top" class="windowbg2">', $txt['menu_39'], ':</td>
				<td class="windowbg2">
					<input type="text" name="malt" size="50"><br />', $txt['menu_40'], '</td>
			</tr><tr>
				<td colspan ="2" class="windowbg2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_64'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mpos" size="11" value="0"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_66'], '</td>
				<td class="windowbg2">
';

	echo groupselect('', 'mmemg[]',true);

	echo '</td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" colspan="2" align="center">
					<input type="submit" name="submit" value="', $txt['menu_22'], '"></td>
			</tr>
		</table>
	</div></form>';
}

// Edit Link/Item page
function template_Edit_Menu()
{
	global $context, $txt, $settings, $scripturl;

	$settings['linktree_inline'] = '0';
	echo theme_linktree();

	// form for editing item - goes to emenui() then returns to menuitems()
	// display correct cells if current item is a custom separator
	if ($context['itesel']['special'] == 'custsep')
	{
		echo '
	<form name="emenui" action="', $scripturl, '?op=MenuManagement;sa=emenui;ite=', $context['itesel']['id'], ';curmgrp=', $context['itesel']['grpID'], ';sprtr=1" method="post">
	<div class="tborder">
		<table width="100%" border="0">
			<tr>
				<td class="windowbg2" valign="top">', $txt['menu_39'], ':</td>
				<td class="windowbg2">
					<input type="text" name="malt" size="60" value="', $context['itesel']['alt'], '"><br />', $txt['menu_40'], '
					<input type="hidden" name="sprtr" value="1" /></td>
			</tr><tr>
				<td colspan="2" class="windowbg2">&nbsp;</td>
			</tr>';
	}
	else
	{
		echo '
	<form name="emenui" action="', $scripturl, '?op=MenuManagement;sa=emenui;ite=', $context['itesel']['id'], ';curmgrp=', $context['itesel']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0">
			<tr>
				<td class="windowbg2">', $txt['menu_61'], ':</td>
				<td class="windowbg2">
					<input type="text" name="malt" size="60" value="', $context['itesel']['alt'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_50'], '<br / >', $txt['menu_51'], '</td>
				<td class="windowbg2">
					<select name="mslnk">
						<option value="none"', $context['itesel']['msnone'], '></option>
						<option value="logout"', $context['itesel']['mslgt'], '>', $txt['menu_54'], '</option>
					</select></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_62'], ':</td>
				<td class="windowbg2">
					<input type="text" name="murl" size="60" value="', $context['itesel']['url'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_25'], ':<br />&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="murlt" size="20" value="', $context['itesel']['urltarget'], '"></td>
			</tr>';
	}

	echo '<tr>
				<td class="windowbg2">' . $txt['menu_64'] . ':</td>
				<td class="windowbg2">
					<input type="text" name="mpos" size="11" value="' . $context['itesel']['position'] . '"></td>
			</tr><tr>
				<td class="windowbg2">' . $txt['menu_66'] . '</td>
				<td class="windowbg2">
';
		echo groupselect($context['itesel']['memberGroup'], 'mmemg[]');

	echo '</td>
			</tr>';

	if ($context['curgrp']['menutype'] == '0')
	{
		if ($context['itesel']['imgloc'] == '0')
		{
			$check0 = ' checked="checked"';
			$check1 = '';
		}
		if ($context['itesel']['imgloc'] == '1')
		{
			$check0 = '';
			$check1 = ' checked="checked"';
		}

		echo '
			<tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_60'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mimg" size="60" value="', $context['itesel']['img'], '"></td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_35'], ':</td>
				<td class="windowbg2">
					<input type="radio" name="mimgl" value="0"', $check0, '>', $txt['menu_36'], '&nbsp;&nbsp;
					<input type="radio" name="mimgl" value="1"', $check1, '>', $txt['menu_37'], '</td>
			</tr><tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_27'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgf" size="60" value="', $context['itesel']['imgfolder'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_28'], ':</td>
				<td class="windowbg2">
					<input type="text" name="mimgb" size="11" value="', $context['itesel']['imgborder'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_29'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgw" size="11" value="', $context['itesel']['imgwidth'], '"></td>
			</tr><tr>
				<td class="windowbg2">', $txt['menu_30'], ':&nbsp;', $txt['menu_33'], '</td>
				<td class="windowbg2">
					<input type="text" name="mimgh" size="11" value="', $context['itesel']['imgheight'], '"></td>
			</tr><tr>
				<td class="windowbg2">&nbsp;</td>
				<td class="windowbg2">&nbsp;', $txt['menu_38'], '</td>
			</tr>';
	}

	echo '<tr>
				<td class="windowbg2" colspan="2">&nbsp;</td>
			</tr><tr>
				<td class="windowbg2" colspan="2" align="center">
					<input type="submit" name="submit" value="' . $txt['menu_48'] . '"></td>
			</tr>
		</table>
	</div></form>';
}

function template_actions_confirmation ()
{
	global $context, $txt, $settings, $scripturl;

	// If items were selected for Move, Copy or delete, print a confirmation before action
	if (!empty($context['sel_delete']))
	{
		echo '
	<form name="cfmdel" action="', $scripturl, '?op=MenuManagement;sa=dmenui;curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0" class="bordercolor" cellspacing="0">
			<tr>
				<td colspan="2" class="windowbg" align="center"><strong>', $txt['menu_41'], '</strong></td>
			</tr><tr>
				<td colspan="2" class="windowbg2"><br />', $txt['menu_42'], '&nbsp;<strong>', $context['menugrp']['tagname'], '</strong>?<br /><br /></td>
			</tr><tr>
				<td class="windowbg2" valign="top" width="12%">', $txt['menu_6'], ':</td>
				<td class="windowbg2">';

		foreach ($context['current'] AS $current)
		{
			if ($current['special'] == 'custsep')
			{
				echo '
					<strong>', $txt['menu_26'], ':&nbsp;&nbsp;', $current['alt'], '</strong><br /><input type="hidden" name="itmdel[', $current['key'], ']" value="', $current['value'], '">';
			}
			else
			{
				echo '
					<strong>', $current['alt'], '</strong><br /><input type="hidden" name="itmdel[', $current['key'], ']" value="', $current['value'], '">';
			}
		}

		echo '</td>
			</tr><tr>
				<td colspan="2" align="center" class="windowbg2"><br />
					<input type="submit" name="itm_delete" value="', $txt['menu_7'], '">&nbsp;&nbsp;&nbsp;<input type="submit" name="itm_cancel" value="', $txt['menu_8'], '"><br /><br /></td>
			</tr>
		</table>
	</div></form>';
	}

	if (!empty($context['sel_copy']) || !empty($context['sel_move']))
	{
		if ($context['newgrp'] == '')
		{
			echo '
	<form name="cfmact" action="', $scripturl, '?op=MenuManagement;sa=menuitems;curmgrp=', $context['menugrp']['grpID'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0" class="bordercolor" cellspacing="0">
			<tr>
				<td colspan="2" class="windowbg" align="center"><strong>', $txt['menu_41'], '</strong></td>
			</tr><tr>
				<td colspan="2" class="windowbg2"><br />
					<strong>', $txt['menu_43'], '</strong><br /><br /></td>
			</tr><tr>
				<td colspan="2" align="center" class="windowbg2"><br />
					<input type="submit" name="submit" value="', $txt['menu_44'], '"><br /><br /></td>
			</tr>
		</table>
	</div></form>';
		}
		else
		{
			// set up confirmation button name and displayed action based on current selection
			$actionButtonName = !empty($context['sel_move']) ? 'act_move' : 'act_copy';
			$displayAction = !empty($context['sel_move']) ? $context['sel_move'] : $context['sel_copy'];

			echo '
	<form name="cfmact" action="', $scripturl, '?op=MenuManagement;sa=mcmenuitm;curmgrp=', $context['menugrp']['grpID'], ';nloc=', $context['newgrp'], '" method="post">
	<div class="tborder">
		<table width="100%" border="0" class="bordercolor" cellspacing="0">
			<tr>
				<td colspan="2" class="windowbg" align="center"><strong>', $txt['menu_41'], '</strong></td>
			</tr><tr>
				<td colspan="2" class="windowbg2"><br />', $txt['menu_45'], '&nbsp;', $displayAction, '&nbsp;', $txt['menu_46'], '&nbsp;<strong>', $context['menugrp']['tagname'], '</strong>&nbsp;', $txt['menu_70'], ',&nbsp;<strong>', $context['new_grp']['tagname'], '</strong>?<br /><br /></td>
			</tr><tr>
				<td class="windowbg2" valign="top" width="12%">', $txt['menu_6'], ':</td>
				<td class="windowbg2">';

			foreach ($context['current'] AS $current)
			{
				if ($current['special'] == 'custsep')
				{
					echo '
					<strong>', $txt['menu_26'], ':&nbsp;&nbsp;', $current['alt'], '</strong><br /><input type="hidden" name="itmcfm[', $current['key'], ']" value="', $current['value'], '">';
				}
				else
				{
					echo '
					<strong>', $current['alt'], '</strong><br /><input type="hidden" name="itmcfm[', $current['key'], ']" value="', $current['value'], '">';
				}
			}

			echo '</td>
			</tr><tr>
				<td colspan="2" align="center" class="windowbg2"><br />
					<input type="submit" name="', $actionButtonName, '" value="', $displayAction, '">&nbsp;&nbsp;
					<input type="submit" name="act_cancel" value="', $txt['menu_8'], '"><br /><br /></td>
			</tr>
		</table>
	</div></form>';
		}
	}
}

?>
Return current item: Enigma