Code Duplication    Length = 18-20 lines in 2 locations

3rdparty/getID3/demos/demo.mysqli.php 2 locations

@@ 1500-1519 (lines=20) @@
1497
1498
		}
1499
1500
	} elseif (!isset($_REQUEST['m3u'])) {
1501
1502
		$SQLquery  = 'SELECT `encoder_options`, COUNT(*) AS `num` FROM `'.mysqli_real_escape_string($con, GETID3_DB_TABLE).'`';
1503
		$SQLquery .= ' WHERE (`fileformat` NOT LIKE "'.implode('") AND (`fileformat` NOT LIKE "', $IgnoreNoTagFormats).'")';
1504
		$SQLquery .= ' GROUP BY `encoder_options`';
1505
		$SQLquery .= ' ORDER BY (`encoder_options` LIKE "LAME%") DESC, (`encoder_options` LIKE "CBR%") DESC, `num` DESC, `encoder_options` ASC';
1506
		$result = mysqli_query_safe($con, $SQLquery);
1507
		echo 'Files with Encoder Options:<br>';
1508
		echo '<table border="1" cellspacing="0" cellpadding="3">';
1509
		echo '<tr><th>Encoder Options</th><th>Count</th><th>M3U</th></tr>';
1510
		while ($row = mysqli_fetch_array($result)) {
1511
			echo '<tr>';
1512
			echo '<td>'.$row['encoder_options'].'</td>';
1513
			echo '<TD ALIGN="RIGHT"><a href="'.htmlentities($_SERVER['PHP_SELF'].'?encoderoptionsdistribution=1&showtagfiles='.($row['encoder_options'] ? urlencode($row['encoder_options']) : '')).'">'.number_format($row['num']).'</a></td>';
1514
			echo '<TD ALIGN="RIGHT"><a href="'.htmlentities($_SERVER['PHP_SELF'].'?encoderoptionsdistribution=1&showtagfiles='.($row['encoder_options'] ? urlencode($row['encoder_options']) : '').'&m3u=.m3u').'">m3u</a></td>';
1515
			echo '</tr>';
1516
		}
1517
		echo '</table><hr>';
1518
1519
	}
1520
1521
} elseif (!empty($_REQUEST['tagtypes'])) {
1522
@@ 1523-1540 (lines=18) @@
1520
1521
} elseif (!empty($_REQUEST['tagtypes'])) {
1522
1523
	if (!isset($_REQUEST['m3u'])) {
1524
		$SQLquery  = 'SELECT `tags`, COUNT(*) AS `num` FROM `'.mysqli_real_escape_string($con, GETID3_DB_TABLE).'`';
1525
		$SQLquery .= ' WHERE (`fileformat` NOT LIKE "'.implode('") AND (`fileformat` NOT LIKE "', $IgnoreNoTagFormats).'")';
1526
		$SQLquery .= ' GROUP BY `tags`';
1527
		$SQLquery .= ' ORDER BY `num` DESC';
1528
		$result = mysqli_query_safe($con, $SQLquery);
1529
		echo 'Files with tags:<br>';
1530
		echo '<table border="1" cellspacing="0" cellpadding="3">';
1531
		echo '<tr><th>Tags</th><th>Count</th><th>M3U</th></tr>';
1532
		while ($row = mysqli_fetch_array($result)) {
1533
			echo '<tr>';
1534
			echo '<td>'.$row['tags'].'</td>';
1535
			echo '<td align="right"><a href="'.htmlentities($_SERVER['PHP_SELF'].'?tagtypes=1&showtagfiles='.($row['tags'] ? urlencode($row['tags']) : '')).'">'.number_format($row['num']).'</a></td>';
1536
			echo '<td align="right"><a href="'.htmlentities($_SERVER['PHP_SELF'].'?tagtypes=1&showtagfiles='.($row['tags'] ? urlencode($row['tags']) : '').'&m3u=.m3u').'">m3u</a></td>';
1537
			echo '</tr>';
1538
		}
1539
		echo '</table><hr>';
1540
	}
1541
1542
	if (isset($_REQUEST['showtagfiles'])) {
1543
		$SQLquery  = 'SELECT `filename`, `tags` FROM `'.mysqli_real_escape_string($con, GETID3_DB_TABLE).'`';