<?php if (!defined('FLUX_ROOT')) exit; ?>
	<?php if (Flux::config('AcceptDonations')): ?>
		<?php if (!empty($errorMessage)): ?>
			<p class="red"><?php echo htmlspecialchars($errorMessage) ?></p>
		<?php endif ?>
		<p><h1>CRO: TopUp info and policy</h1><br>
				Thank you for considering donating to ClassicRO.<br> 
				Playing at ClassicRO is 100% free; however, making a donation helps to cover the costs of running a server.<br> 
				Donations are used to help pay server and hosting fees as well as going towards any server upgrades, advertising and other server expenses.
				<br><br>
				1. All donations are voluntary.<br>
				2. All donations and benefits of donations are non-refundable. In case of opening the dispute on PayPal, all account link to your machineID will be blocked.<br>
				3. All information provided will be kept confidential.<br>
				4. Making a donation does not exempt you from abiding by the server rules. By donating you agree to the above policy.<br>
		 </p>


	<?php
	$currency         = Flux::config('DonationCurrency');
	$dollarAmount     = (float)+Flux::config('CreditExchangeRate');
	$creditAmount     = 1;
	$rateMultiplier   = 10;
	$hoursHeld        = +(int)Flux::config('HoldUntrustedAccount');
	
	while ($dollarAmount < 1) {
		$dollarAmount  *= $rateMultiplier;
		$creditAmount  *= $rateMultiplier;
	}
	?>
	
	<?php if ($hoursHeld): ?>
		<p>To prevent fraudulent payments, our server currently locks the crediting process for
			<span class="hold-hours"><?php echo number_format($hoursHeld) ?> hours</span>
			after the donation has been made to ensure legitimate gameplay and a healthy PayPal reputation.</p>
		<p>This hold is applied only once for the associated PayPal e-mail and RO account.</p>
	<?php endif ?>
	<div class="generic-form-div" style="margin-bottom: 10px">
		<table  class="vertical-table">
                                    <thead>
                                        <tr>
                                                <th>Credits (Non Tradable)</th>
                                                <th>USD</th>
                                                <th>PHP</th>
                                                <th>IDR</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr>
                                                <td><img src="<?php echo $this->themePath('img/7720.gif'); ?>"/>&nbsp;&nbsp;&nbsp;<strong>250 Credits</strong></td>
                                                <td align="right">5</td>
                                                <td align="right">250</td>
                                                <td align="right">71.57</td>
                                         </tr>
                                        <tr>
                                                <td><img src="<?php echo $this->themePath('img/7720.gif'); ?>"/>&nbsp;&nbsp;&nbsp;<strong>525 Credits</strong></td>
                                                <td align="right">10</td>
                                                <td align="right">500</td>
                                                <td align="right">143.14</td>
                                        </tr>
                                        <tr>
                                                <td><img src="<?php echo $this->themePath('img/7720.gif'); ?>"/>&nbsp;&nbsp;&nbsp;<strong>1200 Credits</strong></td>
                                                <td align="right">20</td>
                                                <td align="right">1000</td>
                                                <td align="right">286.28</td>
                                        </tr>
                                       </tbody>
		
		</table>
	</div>


		<table  class="vertical-table">
				<tr>
				<td align="center">
					<img src="<?php echo $this->themePath('img/paypal.png'); ?>" height="150" width="200"/><br>
					<?php if (!$donationAmount): ?>
						<form action="<?php echo $this->url ?>" method="post">
							<?php echo $this->moduleActionFormInputs($params->get('module')) ?>
							<input type="hidden" name="setamount" value="1" />
							<p class="enter-donation-amount">
								<label>
									<select name="amount">
										<option value="5">250 Credit Points - 5 <?php echo htmlspecialchars($currency) ?></option>
										<option value="10">525 Credit Points - 10 <?php echo htmlspecialchars($currency) ?></option>
										<option value="20">1200 Credit Points - 20 <?php echo htmlspecialchars($currency) ?></option>
									</select>
							</p>
							<input type="submit" value="Confirm Donation Amount" class="submit_button" />
						</form>
					<?php else: ?>
					<p>When you're ready to donate, click the big Donate button to proceed with your transaction.
						(You can choose to donate from your existing PayPal balance or use your credit card if you don't have an account).</p>
						
					<p class="donation-amount-text">Amount:
						<span class="donation-amount">
						<?php echo $this->formatCurrency($donationAmount) ?>
						<?php echo htmlspecialchars(Flux::config('DonationCurrency')) ?>
						</span>
					</p>
					<p class="reset-amount-text">
						<a href="<?php echo $this->url('donate', 'index', array('resetamount' => true)) ?>">(Reset Amount)</a>
					</p>
					<p><?php echo $this->donateButton($donationAmount) ?></p>

					<?php endif ?>
		
						<a href="https://www.paymaya.com/app/sendmoney?p=eyJyIjoiKzYzOTM5Mzg5NjMyNiIsInQiOiJQQVlNQVlBIiwiYyI6IlBIUCIsImEiOiIyNTAuMCIsIm0iOiIyNTAgQ3JlZGl0cyJ9"><img src="<?php echo $this->themePath('img/paymaya250.png'); ?>" height="150" width="150"/>
						<a href="https://www.paymaya.com/app/sendmoney?p=eyJyIjoiKzYzOTM5Mzg5NjMyNiIsInQiOiJQQVlNQVlBIiwiYyI6IlBIUCIsImEiOiI1MDAuMCIsIm0iOiI1MjUgQ3JlZGl0cyJ9"><img src="<?php echo $this->themePath('img/paymaya525.png'); ?>" height="150" width="150"/>
						<a href="https://www.paymaya.com/app/sendmoney?p=eyJyIjoiKzYzOTM5Mzg5NjMyNiIsInQiOiJQQVlNQVlBIiwiYyI6IlBIUCIsImEiOiIxMDAwLjAiLCJtIjoiMTIwMCBDcmVkaXRzIn0%3D"><img src="<?php echo $this->themePath('img/paymaya1200.png'); ?>" height="150" width="150"/>
						<br><p>Claim Codes will be sent via your Paymaya mobile number</p>
					</td>

				</tr>
			</table>



			<table  class="vertical-table">
				<tr><td align="center"><img src="<?php echo $this->themePath('img/7eleven.png'); ?>" height="150" width="200"/></td></tr>
				<tr>
					<td text-align="left">
						<ul>
                					<li>Find the Cliqq Kiosk inside the store.</li>
                          		        	<li>Select "<strong>e-Money</strong>", then <font color=red><strong>Coins.ph</strong></font></li>
							<li>Enter mobile number</li>
						</ul>
						<p><font size=2><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Coins.ph Recepient Mobile Number: <br>
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color=red>0939 389 6326</strong></font><br></b>
						</p>
						<ul>
                                			<li>Enter the desired load amount.</li>
                                      			<li>Get your receipt from the kios. The kiosk will print out a bar code.</li>
                                      		 	<li>Present the barcode to cashier together with your payment.</li>
							<li>After payment, fill-up <a href="?module=mail&action=submit" target="_blank"><strong>Web Form</a></strong>
								select <font color=red>7Eleven</font> as donation option and wait for mobile text message for your @claim code (usually 
								it will take 5mins to 30mins as soon as we receive the email.)
							</li>
						</ul>
					</td>
				</tr>
		
			</table>

<?php else: ?>
	<p><?php echo Flux::message('NotAcceptingDonations') ?></p>
<?php endif ?>