<?php include('pw/pw.php');
$title1 = "The Fearing, Feering, Essex";
$title2 = "The Fearing - MP3";
?>
<!DOCTYPE html>
<html>
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><? echo $title2; ?></title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<? 
if (isset($_GET['showmp3']))
{
	//echo "set";
	$showmp3=$_GET['showmp3']; 
}
else
{
	$showmp3="A-M";
}
$dir = "include/mp3/backing_tracks/"; 
$files = scandir($dir);
?>
<div id="wrapper">
	<div id="header">
		<div id="logo">
			<h1><a href="#">The Fearing</a></h1>
			<p> MP3 Backing Tracks</p>
		</div>
	</div>
	<!-- end #header -->
	<div id="menu">
		<?php include('inc_menu.php'); ?>
	</div>
	<!-- end #menu -->
	<div id="page">
	<div id="page-bgtop">
	<div id="page-bgbtm">
		<div id="content">
			<div class="post">
			<div class="post-bgtop">
			<div class="post-bgbtm">
				<h1 class="title"><a href="#">
MP3s <span class="small_title"><? echo " &nbsp; ".$showmp3; ?></span>               </a></h1>
				
				<div class="entrypre">
                <?php
echo"<ul>";

$showmp3=$_GET['showmp3'];


foreach($files as $key => $value)
{
//	if (($value != '.') && ($value != '..') && ($value != '_notes'))
//						if (($person!='') or (isset($person)))
	if (substr($value, -4)=='.mp3')
	{
		if (($showmp3=="A-M") or (!isset($showmp3)))
		{
			if (preg_match('/^[A-Ma-m]/', $value)) 
			{
				$mp3_new = ucwords(str_replace("_"," ",$value));
				echo "<li><a href='".$dir.$value."'>".$mp3_new."</a></li>\r\n";
			}
		}
		else if (preg_match('/^[N-Zn-z]/', $value)) 
		{
			$mp3_new = ucwords(str_replace("_"," ",$value));
			echo "<li><a href='".$dir.$value."'>".$mp3_new."</a></li>\r\n";
		}
	}
}
echo "</ul>";
?>
                
				</div>
			</div>
			</div>
			</div>
		<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<ul>
				<li>
					<h2 class="guitar">MP3 Files</h2>
						<ul>
                            <li><a href="?showmp3=A-M">Artists A-M</a></li>
                            <li><a href="?showmp3=N-Z">Artists N-Z</a></li> 
                            <li><strong><a href="mp3.php">Normal tracks</a></strong></li>                       
						</ul>

				</li>
			</ul>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	</div>
	</div>
	<!-- end #page -->
	<div id="footer">
		<p>.</p>
	</div>
	<!-- end #footer -->
</div>
<?
$pagename = $title2;
$url_page_name = str_replace(" ","%20",$title2);
$kpath = "data/counters/";

$counternum = $kpath.'logs/'.$page_name.'.php'; 
include($kpath.'_counters.inc.php');
?>

</body>
</html>
