1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- if (isset($_GET['customer_id'])) {
- $customer_id = $_GET['customer_id'];
- } else {
- die('customer_id fail');
- }
- $conf = parse_ini_file("config/coin.ini");
- $baseUrl = $conf['URL'];
- $serviceName = $conf['SERVICE'];
- $ispName = $conf['ISP_NAME'];
- $ispUrl = $conf['ISP_URL'];
- $ispLogo = $conf['ISP_LOGO'];
- $availableAmounts = $conf['AMOUNTS'];
- $selectLabel = $conf['SELECT_TEXT'];
- $currency = $conf['CURRENCY'];
- function paymentForm($customer_id, $availableAmounts, $currency, $baseUrl) {
- $customer_id = trim($customer_id);
- $availableAmounts = explode(',', $availableAmounts);
- $selector = '';
- if (!empty($availableAmounts)) {
- $i = 0;
- foreach ($availableAmounts as $eachamount) {
- $eachamount = trim($eachamount);
-
- if ($i == 0) {
- $selected = 'CHECKED';
- } else {
- $selected = '';
- }
- $selector.='<input type="radio" name="amount" value="' . $eachamount . '" ' . $selected . ' id="am_' . $i . '">';
- $selector.='<label for="am_' . $i . '">' . $eachamount . ' ' . $currency . '</label> <br>';
- $i++;
- }
- }
- $form = '
- <form action="' . $baseUrl . '" method="GET">
- <input type="hidden" name="account" value="' . $customer_id . '" >
- <br>
- ' . $selector . '
- <br>
- <input type="submit">
- </form>
- ';
- return($form);
- }
- $payment_form = paymentForm($customer_id, $availableAmounts, $currency, $baseUrl);
- include("template.html");
- ?>
|