Пример #1
0
$place = $_SESSION['place'];
$radius = 2000;
$refresh = $_SESSION['refresh'];
if ($cat == 'gigs') {
    if ($refresh == 'true') {
        $places = getlastfm($lat, $long, 3);
        $places = parselastfm($places);
        $_SESSION['refresh'] = 'false';
    } else {
        $places = $_SESSION['places'];
    }
} else {
    //GET YELP DATA
    if ($refresh == 'true') {
        $places = getyelpall($lat, $long, $cat, $radius);
        $places = parseyelp($places);
        $_SESSION['refresh'] = 'false';
    } else {
        $places = $_SESSION['places'];
    }
}
print_r($_SESSION);
//users history
$userevents = getevents($user);
//sanitise data
//yelp
$places = sanitise($places, $userevents);
// get user tags
$usertags = gettags($user);
// weight yelp
for ($i = 0; $i < count($places); $i++) {
Пример #2
0
// $lat = 51.529;
$long = $_SESSION['long'];
// $long = -0.1255;
$cat = $_SESSION['cat'];
// $cat = 'cafe';
$user = $_SESSION['user'];
$radius = $_SESSION['radius'];
// $user = '******';
$refreshdata = $_SESSION['refresh'];
if ($refreshdata) {
    //GET DATA
    $places = getyelpall($lat, $long, $cat, $radius);
    $events = geteventful($lat, $long, $cat, $radius);
    //PARSE Data
    //yelp
    $yelp = parseyelp($places);
    $_SESSION['yelp'] = $yelp;
    //eventful
    $eventful = parseeventful($events);
    $_SESSION['eventful'] = $eventful;
    $_SESSION['refresh'] = false;
}
$yelp = $_SESSION['yelp'];
$eventful = $_SESSION['eventful'];
//users history
$userevents = getevents($user);
//sanitise data
//yelp
$yelp = sanitise($yelp, $userevents);
//eventful
if ($eventful) {