// required classes require_once 'spoon/spoon.php'; require_once 'publicApp/publicApp.php'; $tpl = new SpoonTemplate(); $tpl->setForceCompile(true); $tpl->setCompileDirectory('./compiled_templates'); //Content layout if (SpoonSession::exists('public_uid')) { //show logout $tpl->assign('oLogout', true); } $drink = new Drink(SpoonFilter::getGetValue('id', null, '')); if ($drink->drink_id === null) { SpoonHTTP::redirect('index.php'); } $recent = $drink->getRecent(); for ($i = 0; $i < sizeof($recent); $i++) { $recent[$i]['timestamp'] = SpoonDate::getTimeAgo(strtotime($recent[$i]['timestamp'])); //check if the user has a fb account authenticated if (!$recent[$i]['fb_uid']) { //else, use standard fb icon $recent[$i]['fb_uid'] = 1; } } if ($recent !== null) { $tpl->assign('oRecent', true); $tpl->assign('iRecent', $recent); } else { $tpl->assign('oNoRecent', true); } if ($drink->getTop() !== null) {