Code Duplication    Length = 40-41 lines in 2 locations

Themes/default/Profile.template.php 2 locations

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