Code Duplication    Length = 34-38 lines in 2 locations

phpsecinfo/PhpSecInfo/View/Html/Result.php 1 location

@@ 8-41 (lines=34) @@
5
			<th>Test</th>
6
			<th>Result</th>
7
		</tr>
8
		<?php foreach ($group_results as $test_name=>$test_results): ?>
9
10
		<tr>
11
			<td class="label"><?php echo htmlspecialchars($test_name, ENT_QUOTES) ?></td>
12
			<td class="value <?php echo $this->_outputGetCssClassFromResult($test_results['result']) ?>">
13
				<?php if ($group_name != 'Test Results Summary'): ?>
14
					<div class="result"><?php echo $this->_outputGetResultTypeFromCode($test_results['result']) ?></div>
15
				<?php endif; ?>
16
				<div class="message"><?php echo $test_results['message'] ?></div>
17
18
				<?php if ( isset($test_results['value_current'] ) || isset($test_results['value_recommended']) ): ?>
19
					<table class="values">
20
					<?php if (isset($test_results['value_current'])): ?>
21
						<tr>
22
							<td class="label">Current Value:</td>
23
							<td><?php echo $test_results['value_current'] ?></td>
24
						</tr>
25
					<?php endif;?>
26
					<?php if (isset($test_results['value_recommended'])): ?>
27
						<tr>
28
							<td class="label">Recommended Value:</td>
29
							<td><?php echo $test_results['value_recommended'] ?></td>
30
						</tr>
31
					<?php endif; ?>
32
					</table>
33
				<?php endif; ?>
34
35
				<?php if (isset($test_results['moreinfo_url']) && $test_results['moreinfo_url']): ?>
36
					<div class="moreinfo"><a href="<?php echo $test_results['moreinfo_url']; ?>">More information &raquo;</a></div>
37
				<?php endif; ?>
38
			</td>
39
		</tr>
40
41
		<?php endforeach; ?>
42
		</table><br />
43

phpsecinfo/PhpSecInfo/View/Rss/Result.php 1 location

@@ 1-38 (lines=38) @@
1
<?php foreach ($group_results as $test_name=>$test_results): ?>
2
<item>
3
	
4
	<title><?php echo htmlspecialchars($test_name, ENT_QUOTES) ?></title>
5
	<!-- <link>http://liftoff.msfc.nasa.gov/news/2003/news-starcity.asp</link> -->
6
	<description>
7
		<![CDATA[
8
		<?php if ($group_name != 'Test Results Summary'): ?>
9
			<div class="result"><?php echo $this->_outputGetResultTypeFromCode($test_results['result']) ?></div>
10
		<?php endif; ?>
11
		<div class="message"><?php echo $test_results['message'] ?></div>
12
13
		<?php if ( isset($test_results['value_current'] ) || isset($test_results['value_recommended']) ): ?>
14
			<table class="values">
15
			<?php if (isset($test_results['value_current'])): ?>
16
				<tr>
17
					<td class="label">Current Value:</td>
18
					<td><?php echo $test_results['value_current'] ?></td>
19
				</tr>
20
			<?php endif;?>
21
			<?php if (isset($test_results['value_recommended'])): ?>
22
				<tr>
23
					<td class="label">Recommended Value:</td>
24
					<td><?php echo $test_results['value_recommended'] ?></td>
25
				</tr>
26
			<?php endif; ?>
27
			</table>
28
		<?php endif; ?>
29
30
		<?php if (isset($test_results['moreinfo_url']) && $test_results['moreinfo_url']): ?>
31
			<div class="moreinfo"><a href="<?php echo $test_results['moreinfo_url']; ?>">More information &raquo;</a></div>
32
		<?php endif; ?>
33
		]]>
34
	</description>
35
	<!--<pubDate>Tue, 03 Jun 2003 09:39:21 GMT</pubDate>-->
36
	<!--<guid>http://liftoff.msfc.nasa.gov/2003/06/03.html#item573</guid>-->
37
</item>
38
<?php endforeach; ?>
39