prepare("SELECT * FROM badges WHERE id = :i"); $q->bindParam(":i", $id, PDO::PARAM_INT); $q->execute(); if($q->rowCount() > 0) { $i = $q->fetch(PDO::FETCH_OBJ); $creatorid = getUserBadgeOwner($i->id); $badgeimage = getUserBadgeImage($id); $awardingplace = $i->AwardingPlaceID; $awardingplacethumbnail = handleGameThumb($awardingplace); $awardingplacename = getAssetInfo($awardingplace)->Name; $ownerrender = getPlayerRender($creatorid); $description = ''; if (empty($i->Description)) { $description = 'No description available.'; } else { $description = cleanOutput($i->Description); } // ... $body = '
'.$alert.'

'.cleanOutput($i->Name).'

By: '.getUsername($creatorid).'
Description: '.cleanOutput($description).'
Created: '.date("m/d/Y", $i->Created).'

Earn this badge at: '.$awardingplacename.'
'; } else { //item doesnt exist WebContextManager::Redirect("../../404"); } } else { //no url parameter WebContextManager::Redirect("../../404"); } pageHandler(); $ph->pageTitle(cleanOutput($i->Name)); $ph->body = $body; $ph->output();