<?php include('db.php');

if($SettingsSql = $mysqli->query("SELECT * FROM settings WHERE id='1'")){

    $settings = mysqli_fetch_array($SettingsSql);
	
	$FbPage = $settings['fbpage'];

    $SettingsSql->close();
	
}else{
    
	 printf("Error: %s\n", $mysqli->error);
}

//Ads

if($AdsSql = $mysqli->query("SELECT * FROM ads WHERE id='1'")){

    $AdsRow = mysqli_fetch_array($AdsSql);
	
	$Ad1 = $AdsRow['ad1'];
	$Ad2 = $AdsRow['ad2'];
	$Ad3 = $AdsRow['ad3'];
	$Ad4 = $AdsRow['ad4'];

    $AdsSql->close();

}else{
	
     printf("Error: %s\n", $mysqli->error);
}

$search = $_GET['search'];
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo stripslashes($search);?> - <?php echo $settings['name']; ?></title>
<meta name="description" content="<?php echo $settings['descrp']; ?>" />
<meta name="keywords" content="<?php echo $settings['keywords']; ?>" />

<link href="templates/<?php echo $settings['template'];?>/css/style.css" rel="stylesheet" type="text/css">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon"/> 
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/easypaginate.js"></script>
<script type="text/javascript" src="js/jquery.qtip.js"></script>
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "ur-23fd6a50-1c28-5100-df72-d60cd8d57fce"});</script>
<script type="text/javascript">
// Create the tooltips only on document load
$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('.inner-box a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: 'dark' // Give it some style
   });
   
   // NOTE: You can even omit all options and simply replace the regular title tooltips like so:
   // $('#content a[href]').qtip();
});
</script>
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<header>
<div class="head-container">
<div class="logo"><a href="index.html"><img src="images/logo.png" alt="<?php echo $settings['name']; ?>" width="250" height="90"></a></div>
<div class="search-box">
<form action="music.php" method="get" class="form-wrapper cf">
        <input type="text" name="search"  placeholder="Search for your favorite song or artist" required>
        <button type="submit">Search</button>
    </form>
    </div>   
</div><!--search-box-->
</header>