Example #1
0
 public static function GetByAssoc($values)
 {
     $entry = new ItemMarketEntry();
     $entry->Item = Item::GetByID($values["marketitem_ItemID"]);
     $entry->BeginTimestamp = $values["marketitem_BeginTimestamp"];
     $entry->EndTimestamp = $values["marketitem_EndTimestamp"];
     return $entry;
 }
Example #2
0
<?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();
Example #3
0
     $time1 = strtotime($thisuser->OutfitCacheTimestamp);
     $time2 = strtotime($headers["If-Modified-Since"]);
     if ($time1 <= $time2) {
         header("HTTP/1.1 304 Not Modified");
         return;
     }
 }
 header("Cache-Control: public");
 // header("Last-Modified: " . gmdate(DATE_RFC1123, $thisuser->OutfitCacheTimestamp));
 $base = 2;
 // new base
 $view = 1;
 // side view
 $bundle = "TinierWorld";
 $filenames = array("Resources/" . $bundle . "/Images/Avatar/Bases/" . $base . "/" . $view . "/Preview.png");
 $items = Item::GetEquippedByUser($thisuser);
 foreach ($items as $item) {
     foreach ($item->Images as $image) {
         $filenames[] = "Resources/" . $bundle . "/Images/Avatar/Items/" . $item->ID . "/" . $base . "/" . $view . "/" . $image->ID . ".png";
     }
 }
 global $RootPath;
 foreach ($filenames as $filename) {
     if (!file_exists($RootPath . "/" . $filename)) {
         return false;
     }
 }
 switch ($size) {
     case "thumbnail.png":
         $image = imagelayerfiles($filenames);
         $thumb = imagecreatetruecolor(112, 112);