1
+ <?php header ('Content-type: text/html; charset=utf-8 ' );?>
2
+ <link rel="stylesheet" type="text/css" href="../../../resources/css/signup.css" />
1
3
<?php
2
4
/**
3
5
* Modelo para a tabela "Balance".
19
21
* 04/01/2018
20
22
*/
21
23
22
- if (Yii::app ()->session ['currency ' ] == 'U$S ' || Yii::app ()->session ['currency ' ] == '$ ' ) {
23
- $ currency = 'USD ' ;
24
- } else if (Yii::app ()->session ['currency ' ] == 'R$ ' ) {
25
- $ currency = 'BRL ' ;
26
- } elseif (Yii::app ()->session ['currency ' ] == '€ ' ) {
27
- $ currency = 'EUR ' ;
28
- } elseif (Yii::app ()->session ['currency ' ] == 'AUD$ ' ) {
29
- $ currency = 'AUD ' ;
30
- } else {
31
- $ currency = Yii::app ()->session ['currency ' ];
32
- }
24
+ $ wallets = explode ('| ' , $ modelMethodPay ->username );
25
+
26
+ if (!isset ($ _GET ['network ' ]) || !strlen ($ _GET ['network ' ])) {
33
27
34
- $ bitcoinPrice = file_get_contents ('https://blockchain.info/tobtc?currency= ' . $ currency . '&value= ' . $ _GET ['amount ' ]);
28
+ ?>
29
+
30
+ <br>
31
+ <form id="contactform" align="center" method="get">
32
+ <table width="100%" border="0" align="center">
33
+ <tr>
34
+ <td class="banco">
35
+ <table width="100%" border="0">
36
+ <select style="width: 100%" name="network" id="network">
37
+ <option value="">SELECT THE CURRENCY AND NETWORK</option>
38
+ <?php foreach ($ wallets as $ key => $ wallet ): ?>
39
+ <option value="<?php echo $ key ?> "><?php echo $ wallet ?> </option>
40
+ <?php endforeach ;?>
41
+ </select>
42
+ <input type='hidden' name='amount' value='<?php echo $ _GET ['amount ' ] ?> ' />
43
+ <input type='hidden' name='id_method' value='<?php echo $ _GET ['id_method ' ] ?> ' />
44
+ <br> <br>
45
+ <input type="submit" value="Confirm">
46
+ </table>
47
+ </td>
48
+ </tr>
49
+ </tr>
50
+ </table>
51
+ </form>
52
+ <?php
35
53
36
- $ amountCrypto = number_format ( $ bitcoinPrice , 6 ) . rand ( 11 , 99 );
54
+ } else {
37
55
38
- //avoid some amount in the same day
39
- for (;;) {
40
- $ modelCryptocurrency = Cryptocurrency::model ()->find ('amountCrypto = :key AND date > :key1 ' ,
41
- array (':key ' => $ amountCrypto , ':key1 ' => date ('Y-m-d ' )));
42
- if (isset ($ modelCryptocurrency ->id )) {
43
- $ amountCrypto = number_format ($ bitcoinPrice , 6 ) . rand (11 , 99 );
56
+ $ data = explode ('=> ' , $ wallets [$ _GET ['network ' ]]);
57
+ $ address = $ data [1 ];
58
+ $ crypto = strtoupper (strtok ($ data [0 ], '( ' ));
59
+ $ network = '( ' . strtok ('' );
44
60
61
+ if (Yii::app ()->session ['currency ' ] == 'U$S ' || Yii::app ()->session ['currency ' ] == '$ ' ) {
62
+ $ MB_currency = 'USD ' ;
63
+ } else if (Yii::app ()->session ['currency ' ] == 'R$ ' ) {
64
+ $ MB_currency = 'BRL ' ;
65
+ } elseif (Yii::app ()->session ['currency ' ] == '€ ' ) {
66
+ $ MB_currency = 'EUR ' ;
67
+ } elseif (Yii::app ()->session ['currency ' ] == 'AUD$ ' ) {
68
+ $ MB_currency = 'AUD ' ;
45
69
} else {
46
- break ;
70
+ $ MB_currency = Yii:: app ()-> session [ ' currency ' ] ;
47
71
}
48
- }
49
- $ modelCryptocurrency = new Cryptocurrency ();
50
- $ modelCryptocurrency ->id_user = Yii::app ()->session ['id_user ' ];
51
- $ modelCryptocurrency ->currency = 'BTC ' ;
52
- $ modelCryptocurrency ->amountCrypto = $ amountCrypto ;
53
- $ modelCryptocurrency ->amount = $ _GET ['amount ' ];
54
- $ modelCryptocurrency ->status = 0 ;
55
- $ modelCryptocurrency ->save ();
56
-
57
- ?>
58
- <?php header ('Content-type: text/html; charset=utf-8 ' );?>
59
72
60
- <link rel="stylesheet" type="text/css" href="../../../resources/css/signup.css" />
73
+ $ mb_credit = $ _GET ['amount ' ] + (rand (0 , 10 ) / 10 );
74
+
75
+ $ url = 'https://api.coinconvert.net/convert/ ' . $ MB_currency . '/ ' . $ crypto . '?amount= ' . $ _GET ['amount ' ];
76
+
77
+ $ amountCrypto = file_get_contents ($ url );
78
+ $ amountCrypto = json_decode ($ amountCrypto );
79
+
80
+ $ amountCrypto = $ amountCrypto ->$ crypto ;
81
+
82
+ $ amountCrypto = number_format ($ amountCrypto , 6 ) . rand (11 , 99 );
83
+
84
+ //avoid some amount in the same day
85
+ for (;;) {
86
+ $ modelCryptocurrency = Cryptocurrency::model ()->find ('amountCrypto = :key AND date > :key1 ' ,
87
+ array (':key ' => $ amountCrypto , ':key1 ' => date ('Y-m-d ' )));
88
+ if (isset ($ modelCryptocurrency ->id )) {
89
+ $ amountCrypto = number_format ($ bitcoinPrice , 6 ) . rand (11 , 99 );
90
+
91
+ } else {
92
+ break ;
93
+ }
94
+ }
95
+ $ modelCryptocurrency = new Cryptocurrency ();
96
+ $ modelCryptocurrency ->id_user = Yii::app ()->session ['id_user ' ];
97
+ $ modelCryptocurrency ->currency = $ crypto ;
98
+ $ modelCryptocurrency ->amountCrypto = $ amountCrypto ;
99
+ $ modelCryptocurrency ->amount = $ _GET ['amount ' ];
100
+ $ modelCryptocurrency ->status = 0 ;
101
+ $ modelCryptocurrency ->save ();
102
+
103
+ ?>
104
+
105
+
61
106
<form id="contactform" align="center">
62
107
<table width="100%" border="0" align="center">
63
108
<tr>
64
109
<td class="banco">
65
110
<table width="100%" border="0">
111
+ <tr><td> </td></tr>
66
112
<tr>
67
- <td width="350"><p style="text-align: right;"><b>Account : </b></p></td>
68
- <td><p style="text-align: left;"><?php echo $ modelMethodPay -> username ; ?> </p></td>
113
+ <td width="350"><p style="text-align: right;"><b>Address : </b></p></td>
114
+ <td><p style="text-align: left;"><?php echo $ address ; ?> </p></td>
69
115
</tr>
70
116
<tr>
71
- <td width="350"><p style="text-align: right;"><b><?php echo $ currency ?> Amount : </b></p></td>
72
- <td width="400"><p style="text-align: left;"><?php echo $ currency ?> <?php echo number_format ($ _GET ['amount ' ], 2 ) ?> </p></td>
117
+ <td width="350"><p style="text-align: right;"><b><?php echo strtoupper ( $ MB_currency ) ?> Credit : </b></p></td>
118
+ <td width="400"><p style="text-align: left;"><?php echo $ MB_currency ?> <?php echo number_format ($ _GET ['amount ' ], 2 ) ?> </p></td>
73
119
</tr>
74
120
<tr>
75
- <td width="350"><p style="text-align: right;"><b>BitCoin amount: </b></p></td>
76
- <td width="400"><p style="text-align: left;">BTC <?php echo $ amountCrypto ?> </p></td>
121
+ <td width="350"><p style="text-align: right;"><b>Crypto amount: </b></p></td>
122
+ <td width="400"><p style="text-align: left;"><?php echo $ crypto ?> <?php echo $ amountCrypto ?> </p></td>
77
123
</tr>
124
+ <tr>
125
+ <td width="350"><p style="text-align: right;"><b>Crypto Network: </b></p></td>
126
+ <td width="400"><p style="text-align: left;"><?php echo $ network ?> </p></td>
127
+ </tr>
128
+ <tr><td> </td></tr>
78
129
<tr>
79
130
<td width="350" colspan="2" style="text-align: center; font:bold 13px Arial, Helvetica, sans-serif; color:#0e119b;">
80
131
Send the exact amount above in the next 30 min.
81
132
</td>
82
133
</tr>
134
+
83
135
<tr>
84
136
<td width="350" colspan="2" style="text-align: center; font:bold 13px Arial, Helvetica, sans-serif; color:#fc0404;">
85
- If you send different amount or after 30 min the refill not be automatic .
137
+ If you send different amount or after 30 min the refill not be released .
86
138
</td>
87
139
</tr>
88
-
140
+ <tr><td> </td></tr>
89
141
90
142
<td style="text-align: center;" colspan="2" class="banco" style="top: 100px;font:bold 13px Arial, Helvetica, sans-serif; color:#333;">
91
- HOW BUY BITCOIN <br> https://www.bitcoin.com/buy-bitcoin <br> https://localbitcoins.com<br> https://binance.com
143
+ HOW BUY BITCOIN <br> https://www.bitcoin.com/buy-bitcoin <br> https://localbitcoins.com<br> https://poloniex.com<br> https:// binance.com
92
144
</td>
93
145
94
146
</table>
95
147
</td>
96
148
</tr>
97
149
</tr>
98
150
</table>
99
- </form>
151
+ </form>
152
+
153
+ <?php }?>
0 commit comments