juanchov182

JD, 25, Maschio, Ecuador
fatlicious.tumblr.com/Ultimo accesso: Sabato pomeriggio

  • Aggiungi agli amici
  • Invia un messaggio
  • Invia un messaggio in bacheca

Il tuo grado di compatibilità musicale con juanchov182 è Sconosciuto

Crea il tuo profilo musicale

Bacheca

Aggiungi un commento. Accedi a Last.fm o registrati.

Descrizione

<?php

require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();
require_once 'api.php';

if (isset($_GET) && !empty($_GET)) {
$api = new Lastfm_Api();
$api->set('artist', $_GET['artist']);
$events = $api->artistGetEvents();
}
?>
<!doctype html>
<html>
<head>
<title>Last.fm nearby event notifier</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div id="wrapper">
<h1>Last.fm nearby event notifier</h1>
<form method="get" action="">
<label for="artist">
Artist name:
<input type="text" class="text" name="artist" id="artist" />
</label>
<label for="location">
Your location:
<input type="text" class="text" name="location" id="location" />
</label>
<label for="location">
Range
<select name="range">
<option value="0">< 100 KM</option>
<option value="1">< 200 KM</option>
<option value="2">< 300 KM</option>
<option value="3">< 400 KM</option>
<option value="4">< 500 KM</option>
</select>
</label>
<input type="submit" value="Go!" />
</form>
<?php if (isset($_GET) && !empty($_GET)): ?>
<div id="results">
<?php if (isset($events) && count($events) > 0): ?>

<h2>Nearby events:</h2>

<ul class="events">

<?php foreach ($events as $el): ?>
<?php $distance = $el['distance']; $event = $el['event']; ?>

<li>
<strong><a href="<?php echo $event->url; ?>"><?php echo $event->title; ?></a></strong>
<span class="location"><?php echo sprintf('%s, %s', $event->venue->location->city, $event->venue->location->country); ?></span>
<span class="date"><?php echo $event->startDate; ?></span>
<span class="distance"><?php echo round($distance / 1000, 0); ?> KM</span>
</li>

<?php endforeach; ?>

</ul>

<?php else: ?>

<h2>Too bad</h2>

<p>No nearby events found.</p>

<?php endif; ?>


</div>
<?php endif; ?>
</div>
</body>
</html>

Attività recenti

Gruppi (1)