Code Duplication    Length = 3-13 lines in 4 locations

Themes/default/PersonalMessage.template.php 4 locations

@@ 680-685 (lines=6) @@
677
			echo '
678
					<option value="" disabled>', $txt['pm_msg_label_apply'], ':</option>';
679
680
			foreach ($context['labels'] as $label)
681
			{
682
				if ($label['id'] != $context['current_label_id'])
683
					echo '
684
					<option value="add_', $label['id'], '">&nbsp;', $label['name'], '</option>';
685
			}
686
687
			echo '
688
					<option value="" disabled>', $txt['pm_msg_label_remove'], ':</option>';
@@ 1408-1420 (lines=13) @@
1405
			</tr>';
1406
	else
1407
	{
1408
		foreach ($context['labels'] as $label)
1409
		{
1410
			if ($label['id'] == -1)
1411
				continue;
1412
1413
				echo '
1414
			<tr class="windowbg">
1415
				<td>
1416
					<input type="text" name="label_name[', $label['id'], ']" value="', $label['name'], '" size="30" maxlength="30" class="input_text">
1417
				</td>
1418
				<td class="table_icon"><input type="checkbox" class="input_check" name="delete_label[', $label['id'], ']"></td>
1419
			</tr>';
1420
		}
1421
	}
1422
	echo '
1423
		</tbody>
@@ 1620-1623 (lines=4) @@
1617
		echo '
1618
			groups[', $id, '] = "', addslashes($title), '";';
1619
1620
	foreach ($context['labels'] as $label)
1621
		if ($label['id'] != -1)
1622
			echo '
1623
			labels[', ($label['id']), '] = "', addslashes($label['name']), '";';
1624
1625
	echo '
1626
			function addCriteriaOption()
@@ 1656-1658 (lines=3) @@
1653
1654
				setOuterHTML(document.getElementById("actionAddHere"), \'<br><select name="acttype[\' + actionNum + \']" id="acttype\' + actionNum + \'" onchange="updateActionDef(\' + actionNum + \'); rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_action']), ':<\' + \'/option><option value="lab">', addslashes($txt['pm_rule_label']), '<\' + \'/option><option value="del">', addslashes($txt['pm_rule_delete']), '<\' + \'/option><\' + \'/select>&nbsp;<span id="labdiv\' + actionNum + \'" style="display: none;"><select name="labdef[\' + actionNum + \']" id="labdef\' + actionNum + \'" onchange="rebuildRuleDesc();"><option value="">', addslashes($txt['pm_rule_sel_label']), '<\' + \'/option>';
1655
1656
	foreach ($context['labels'] as $label)
1657
		if ($label['id'] != -1)
1658
			echo '<option value="', ($label['id']), '">', addslashes($label['name']), '<\' + \'/option>';
1659
1660
	echo '<\' + \'/select><\' + \'/span><span id="actionAddHere"><\' + \'/span>\');
1661
			}