Beispiel #1
0
$entries = null;
$currentChallenge = null;
foreach ($challenges as $challenge) {
    if ($challenge['id'] == $challengeID) {
        $entries = $challenge['set'];
        $currentChallenge = $challenge;
    }
}
// Find Current Entry
$currentEntry = null;
foreach ($entries as $entry) {
    if ($entry['id'] == $entryID) {
        $currentEntry = $entry;
    }
}
$description = splitDescription($currentEntry['description']);
$details = splitDetails($description);
$heading = splitEntryTitle($currentEntry['title']);
$TITLE = " -> <a href='index.php'>Challenge</a> -> <a href='challenge.php?chalid=" . $challengeID . "'>" . $challenge['title'] . "</a> -> " . $heading['title'];
include "header.php";
?>

<?php 
// Show comic details
echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $details['THUMB'] . "'>" . "<div class='tableUser'>By: " . $heading['user'] . "</div>" . getDescription($description) . "<br/>" . "</div>";
// Show the comic slides
$set = $FLICKR->photosets_getPhotos($entryID, "url_o");
$slides = $set['photoset']['photo'];
echo "<div class='imageBlock'>";
$i = 0;
foreach ($slides as $slide) {
<div class='tableCell'>
<?php 
$description = splitDescription($currentChallenge['description']);
echo getDescription($description);
$details = splitDetails($description);
if (array_key_exists("START", $details)) {
    echo "<br/><br/><div class='smallText'><b>Start:</b> " . $details['START'] . "</div>";
}
if (array_key_exists("END", $details)) {
    echo "<div class='smallText'><b>End:</b> " . $details['END'] . "</div>";
}
if (array_key_exists("LOCATION", $details)) {
    $location = splitLocation($details['LOCATION']);
    echo "<div class='smallText'><b>Location:</b> <a href='http://maps.google.com/maps?q=" . $location["lat"] . "," . $location["lon"] . "'>Latitude: " . $location['lat'] . ", Longitude: " . $location['lon'] . ", Range: " . $location['range'] . "m</div>";
}
?>
</div>
<?php 
// Show the entries
foreach ($entries as $entry) {
    $description = splitDescription($entry['description']);
    $details = splitDetails($description);
    $heading = splitEntryTitle($entry['title']);
    echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $details['THUMB'] . "'>" . "<div class='tableText'><a href='entry.php?chalid=" . $currentChallenge['id'] . "&entryid=" . $entry['id'] . "'>" . $heading['title'] . "</a><br/>" . "<div class='tableUser'>By: " . $heading['user'] . "</div>" . getDescription($description) . "<br/>" . "</div></div>";
}
?>


<?php 
include "footer.php";
Beispiel #3
0
<?php

include "include.php";
$TITLE = " -> Challenges";
?>

<?php 
include "header.php";
?>

<?php 
$result = $FLICKR->collections_getTree(0, $FLICKR_USER);
$collections = $result['collections']['collection'];
// Find the challenges list
$challenges = null;
foreach ($collections as $collection) {
    if ($collection['title'] == 'CHALLENGES') {
        $challenges = $collection['collection'];
    }
}
// Show the challenges list
foreach ($challenges as $challenge) {
    $description = splitDescription($challenge['description']);
    echo "<div class=\"tableCell\">" . "<img class='tableImage' src='" . $challenge['iconsmall'] . "'>" . "<div class='tableText'><a href='challenge.php?chalid=" . $challenge['id'] . "'>" . $challenge['title'] . "</a><br/>" . getDescription($description) . "<br/>" . "</div></div>";
}
?>


<?php 
include "footer.php";