<?php use WebFX\System; use PhoenixSNS\Objects\Item; use PsychaticaErrorPage; use PsychaticaMessagePage; if (count($path) > 0 && $path[0] != "") { $id = $path[0]; $item = Item::GetByIDOrName($id); if ($item == null) { $errorPage = new PsychaticaErrorPage(); $errorPage->Message = "The item does not exist."; $errorPage->Render(); return; } $entry = $item->GetMarketEntry(); if (count($path) > 1 && $path[1] != "") { switch ($path[1]) { case "equip": if ($CurrentUser != null) { if ($item->Equip($CurrentUser)) { $page = new PsychaticaMessagePage(); $page->Message = "The item has been equipped."; $page->ReturnButtonURL = $_SERVER["HTTP_REFERER"]; $page->ReturnButtonText = "Return to Inventory"; $page->Render(); } else { $page = new PsychaticaErrorPage(); $page->Message = "The item could not be equipped. Perhaps it has already been equipped."; $page->ErrorCode = mysql_errno(); $page->ErrorDescription = mysql_error();