Exemplo n.º 1
0
                foreach ($resources as $resource) {
                    $resource->Count *= $quantity;
                    ?>
										<div><?php 
                    echo $resource->ToHTML();
                    ?>
</div>
								<?php 
                }
            }
            ?>
							</p>
							<?php 
            $broke = false;
            foreach ($resources as $resource) {
                $myResources = MarketResource::GetByUser($CurrentUser, $resource->Type);
                $myResource = $myResources[0];
                if ($myResource->Count < $resource->Count) {
                    $broke = true;
                    break;
                }
            }
            if ($broke) {
                ?>
							<p>
								You do not have enough resources to purchase this item.
							</p>
							<?php 
            }
            if ($entry != null && !$broke) {
                if ($CurrentUser != null) {
Exemplo n.º 2
0
    public function Render()
    {
        $CurrentUser = User::GetCurrent();
        ?>
<div class="Chance" id="Chance_<?php 
        echo $this->Name;
        ?>
" style="background-image: url('<?php 
        echo System::ExpandRelativePath("~/images/chance/" . $this->Chance->ID . "/kiosk_background.png");
        ?>
');">
	<div class="ChanceGlobe" id="Chance_<?php 
        echo $this->Name;
        ?>
_globe">
		<div class="ChanceGlobeEggs" id="Chance_<?php 
        echo $this->Name;
        ?>
_globe_eggs"></div>
		<div class="ChanceGlobeStrip"></div>
		<div class="ChanceGlobeOverlay"></div>
	</div>
	<div class="ChanceControls">
		<a style="background-image: url('<?php 
        echo System::ExpandRelativePath("~/images/chance/" . $this->Chance->ID . "/kiosk_button.png");
        ?>
');" id="Chance_<?php 
        echo $this->Name;
        ?>
_spinbutton" class="ChanceButton" href="<?php 
        echo System::ExpandRelativePath("~/chance/" . $this->Chance->ID . "/spin");
        ?>
" onclick="Chance_<?php 
        echo $this->Name;
        ?>
.spin(); return false;">&nbsp;</a>
		<span class="ChancePrompt">CLICK THE KNOB</span>
	</div>
	<div class="ChanceDisabled" style="display: none;"></div>
	<?php 
        if ($CurrentUser == null) {
            ?>
	<div class="ChanceNotification" id="Chance_<?php 
            echo $this->Name;
            ?>
_bankrupt">
		You must be logged in<br />to spin
	</div>
	<?php 
        } else {
            if (MarketResource::GetByUser($CurrentUser, 1)->Count < 180) {
                ?>
	<div class="ChanceNotification" id="Chance_<?php 
                echo $this->Name;
                ?>
_bankrupt">
		You do not have<br />enough money (<?php 
                echo MarketResource::GetByID(1)->Name;
                ?>
)
	</div>
	<?php 
            }
        }
        ?>
	<script type="text/javascript">
	var Chance_<?php 
        echo $this->Name;
        ?>
 = new Gacha("<?php 
        echo $this->Name;
        ?>
");
	Chance_<?php 
        echo $this->Name;
        ?>
.completed = function()
	{
		window.location.href = "<?php 
        echo System::ExpandRelativePath("~/chance/" . $this->Name . "/spin");
        ?>
";
	};
	</script>
</div>
<?php 
    }