<?php
/*
* Created on Aug 29, 2008
* 2.0
*/
require_once 'include/IPage.php';
class MyStuffPage implements IPage
{
function GetHead(& $title)
{
$title = 'My Stuff';
return '';
}
function ShowBody()
{
global $URLP, $DB;
$url = $URLP->GetExtendedURL('Users'); // to hide "user="
$favCount = $DB->GetCount(FAVORITE_TABLE, "FavoriteUserIdFk='".USER_ID."'");
$itemCount = $DB->GetCount(ITEM_TABLE, "ItemUserIdFk='".USER_ID."'");
$userName = $this->GetUserName();
$email = $this->GetUserEmail();
require 'MyStuffPage.html.php';
}
private function GetUserName()
{
global $DB;
$query = 'SELECT UserTitle FROM '.USER_TABLE.
' WHERE UserId='.USER_ID;
$row = $DB->Query($query)->fetch_array();
return $row[0];
}
private function GetUserEmail()
{
global $DB;
$query = 'SELECT UserEmail FROM '.USER_TABLE.
' WHERE UserId='.USER_ID;
$row = $DB->Query($query)->fetch_array();
return $row[0];
}
}
?>