protected function RenderContent() { $CurrentUser = User::GetCurrent(); $CurrentUser->SetRelativeResourceCount(MarketResource::GetByID(2), $this->Amount); ?> <div class="TicketDispenser" id="TicketDispenser_tgs" style="width: 400px; margin-left: auto; margin-right: auto;"> <div class="Prompt"> Congratulations! You earned </div> <div class="Ticket"> <span id="TicketDispenser_<?php echo $this->Name; ?> _value">0</span> </div> <div class="Prompt"> Arcade Tickets! </div> </div> <script type="text/javascript"> var <?php echo $this->Name; ?> = new TicketDispenser("<?php echo $this->Name; ?> ", <?php echo $this->Amount; ?> ); <?php echo $this->Name; ?> .Dispense(); </script> <?php }
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;"> </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 }