<?php
/**
* @version 2.1.1
* @package kwalbum
* @since 2.0 created on Aug 6, 2008
*/
require_once 'include/IPage.php';
require_once 'include/funcGetImageCode.php';
class ItemPage implements IPage
{
private $IPI;
function ItemPage()
{
global $URLP, $DB;
session_start();
$count_it = true;
$id = $URLP->GetId();
if (isset($_SESSION['itemids']))
{
$temp = explode(',', $_SESSION['itemids']);
foreach($temp as $temp_id)
if ($temp_id == $id)
{
$count_it = false;
break;
}
}
else
$_SESSION['itemids'] = '';
if ($count_it)
{
$DB->UpdateSingle(ITEM_TABLE, 'ItemCount', 'ItemCount+1', "ItemId=$id");
$_SESSION['itemids'] .= ','.$id;
}
session_write_close();
}
function GetHead(& $title)
{
global $URLP, $DB;
require 'include/ItemPageInfo.php';
if (!$this->IPI = new ItemPageInfo($title, $URLP))
return null;
//$DB->Close();
return $this->IPI->GetHeader();
}
function ShowBody()
{
global $URLP;
$IPI = $this->IPI;
$id = $IPI->id;
$currentURL = $extendedURL = $URLP->GetExtendedURL();
$favSpan = "<span id='addFavorite'><a href='' onClick='return AddFavorite($id);'?>Add to Favorites</a></span>";
require 'ItemPage.html.php';
}
}
?>