Code Duplication    Length = 40-41 lines in 2 locations

Themes/default/Profile.template.php 2 locations

@@ 1156-1195 (lines=40) @@
1153
				<div class="cat_bar">
1154
					<h3 class="catbg">', $txt['showPermissions_general'], '</h3>
1155
				</div>';
1156
		if (!empty($context['member']['permissions']['general']))
1157
		{
1158
			echo '
1159
				<table class="table_grid">
1160
					<thead>
1161
						<tr class="title_bar">
1162
							<th class="lefttext half_table">', $txt['showPermissions_permission'], '</th>
1163
							<th class="lefttext half_table">', $txt['showPermissions_status'], '</th>
1164
						</tr>
1165
					</thead>
1166
					<tbody>';
1167
1168
			foreach ($context['member']['permissions']['general'] as $permission)
1169
			{
1170
				echo '
1171
						<tr class="windowbg">
1172
							<td title="', $permission['id'], '">
1173
								', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
1174
							</td>
1175
							<td class="smalltext">';
1176
1177
				if ($permission['is_denied'])
1178
					echo '
1179
								<span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>';
1180
				else
1181
					echo '
1182
								', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
1183
1184
				echo '
1185
							</td>
1186
						</tr>';
1187
			}
1188
			echo '
1189
					</tbody>
1190
				</table>
1191
			</div><!-- .tborder -->
1192
			<br>';
1193
		}
1194
		else
1195
			echo '
1196
			<p class="windowbg2">', $txt['showPermissions_none_general'], '</p>';
1197
1198
		// Board permission section.
@@ 1222-1262 (lines=41) @@
1219
				</div><!-- .cat_bar -->
1220
			</form>';
1221
1222
		if (!empty($context['member']['permissions']['board']))
1223
		{
1224
			echo '
1225
			<table class="table_grid">
1226
				<thead>
1227
					<tr class="title_bar">
1228
						<th class="lefttext half_table">', $txt['showPermissions_permission'], '</th>
1229
						<th class="lefttext half_table">', $txt['showPermissions_status'], '</th>
1230
					</tr>
1231
				</thead>
1232
				<tbody>';
1233
1234
			foreach ($context['member']['permissions']['board'] as $permission)
1235
			{
1236
				echo '
1237
					<tr class="windowbg">
1238
						<td title="', $permission['id'], '">
1239
							', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
1240
						</td>
1241
						<td class="smalltext">';
1242
1243
				if ($permission['is_denied'])
1244
					echo '
1245
							<span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>';
1246
1247
				else
1248
					echo '
1249
							', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
1250
1251
				echo '
1252
						</td>
1253
					</tr>';
1254
			}
1255
			echo '
1256
				</tbody>
1257
			</table>';
1258
		}
1259
		else
1260
			echo '
1261
			<p class="windowbg2">', $txt['showPermissions_none_board'], '</p>';
1262
	echo '
1263
		</div><!-- #permissions -->';
1264
	}
1265
}