Code Duplication    Length = 40-41 lines in 2 locations

Themes/default/Profile.template.php 2 locations

@@ 1170-1209 (lines=40) @@
1167
				<div class="cat_bar">
1168
					<h3 class="catbg">', $txt['showPermissions_general'], '</h3>
1169
				</div>';
1170
		if (!empty($context['member']['permissions']['general']))
1171
		{
1172
			echo '
1173
				<table class="table_grid">
1174
					<thead>
1175
						<tr class="title_bar">
1176
							<th class="lefttext half_table">', $txt['showPermissions_permission'], '</th>
1177
							<th class="lefttext half_table">', $txt['showPermissions_status'], '</th>
1178
						</tr>
1179
					</thead>
1180
					<tbody>';
1181
1182
			foreach ($context['member']['permissions']['general'] as $permission)
1183
			{
1184
				echo '
1185
						<tr class="windowbg">
1186
							<td title="', $permission['id'], '">
1187
								', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
1188
							</td>
1189
							<td class="smalltext">';
1190
1191
				if ($permission['is_denied'])
1192
					echo '
1193
								<span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>';
1194
				else
1195
					echo '
1196
								', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
1197
1198
				echo '
1199
							</td>
1200
						</tr>';
1201
			}
1202
			echo '
1203
					</tbody>
1204
				</table>
1205
			</div><!-- .tborder -->
1206
			<br>';
1207
		}
1208
		else
1209
			echo '
1210
			<p class="windowbg2">', $txt['showPermissions_none_general'], '</p>';
1211
1212
		// Board permission section.
@@ 1236-1276 (lines=41) @@
1233
				</div><!-- .cat_bar -->
1234
			</form>';
1235
1236
		if (!empty($context['member']['permissions']['board']))
1237
		{
1238
			echo '
1239
			<table class="table_grid">
1240
				<thead>
1241
					<tr class="title_bar">
1242
						<th class="lefttext half_table">', $txt['showPermissions_permission'], '</th>
1243
						<th class="lefttext half_table">', $txt['showPermissions_status'], '</th>
1244
					</tr>
1245
				</thead>
1246
				<tbody>';
1247
1248
			foreach ($context['member']['permissions']['board'] as $permission)
1249
			{
1250
				echo '
1251
					<tr class="windowbg">
1252
						<td title="', $permission['id'], '">
1253
							', $permission['is_denied'] ? '<del>' . $permission['name'] . '</del>' : $permission['name'], '
1254
						</td>
1255
						<td class="smalltext">';
1256
1257
				if ($permission['is_denied'])
1258
					echo '
1259
							<span class="alert">', $txt['showPermissions_denied'], ': ', implode(', ', $permission['groups']['denied']), '</span>';
1260
1261
				else
1262
					echo '
1263
							', $txt['showPermissions_given'], ': ', implode(', ', $permission['groups']['allowed']);
1264
1265
				echo '
1266
						</td>
1267
					</tr>';
1268
			}
1269
			echo '
1270
				</tbody>
1271
			</table>';
1272
		}
1273
		else
1274
			echo '
1275
			<p class="windowbg2">', $txt['showPermissions_none_board'], '</p>';
1276
	echo '
1277
		</div><!-- #permissions -->';
1278
	}
1279
}