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 }
?> /gift">gifting system</a>. Please do NOT use the gifting system if you are expecting something in return! </p> </div> </div> </td> </tr> <tr> <td style="width: 50%"> <div class="Panel"> <h3 class="PanelTitle">Trade Resources</h3> <div class="PanelContent"> <table style="width: 100%;"> <?php $resource_types = MarketResource::Enumerate(); foreach ($resource_types as $resource_type) { ?> <tr> <td style="width: 200px;"><?php echo $resource_type->ToString(); ?> </td> <td style="width: 100px;"><input type="number" value="0" name="resource_amount_<?php echo $resource_type->ID; ?> " style="width: 100px" /></td> <td>out of 200 (200 remaining)</td> </tr> <?php }
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) {
<?php $resources = MarketResource::Get(); ?> <table style="width: 100%"> <tr> <td style="width: 200px">Interest rate:</td> <td> <?php foreach ($resources as $resource) { if ($resource->BankInfo->Enabled) { ?> <span class="ResourceDisplay"> <img alt="<?php echo $resource->Title; ?> :" title="<?php echo $resource->Title; ?> " src="/images/resources/24x24/<?php echo $resource->Name; ?> .png" class="ResourceIcon"> <span class="ResourceValue"><?php echo $resource->BankInfo->InterestRate; ?> %</span> </span> <?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 }