<?php 
require("common_begin.php");

$itemID = $_GET['id'];
if (!isset($itemID))
  die("no item ID set");
  
// clip off the 'e_' of the span ID
$itemID = substr($itemID, 2);

$lst = Listopia::getInstance();

if ($lst->isLoggedIn())
{
  $query = $lst->Database()->select(array(
                      'fields' => 't_items.item_blurb',
                      'table' => 't_items',
                      'condition' => 't_items.item_id = ' . ((int)$itemID),
                      'limit' => 1
                      ));
  if (!empty($query[0]))
  {
    echo stripslashes(htmlspecialchars_decode($query[0]['t_items']['item_blurb']));
  }
  else
  {
    echo "[unknown entry]";
  }
}
else
{
  echo "[not logged in]";
}
  
require("common_end.php");

