1+ <?php header ('Content-type: text/html; charset=utf-8 ' );?>
2+ <link rel="stylesheet" type="text/css" href="../../../resources/css/signup.css" />
13<?php
24/**
35 * Modelo para a tabela "Balance".
1921 * 04/01/2018
2022 */
2123
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 ' ])) {
3327
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
3553
36- $ amountCrypto = number_format ( $ bitcoinPrice , 6 ) . rand ( 11 , 99 );
54+ } else {
3755
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 ('' );
4460
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 ' ;
4569 } else {
46- break ;
70+ $ MB_currency = Yii:: app ()-> session [ ' currency ' ] ;
4771 }
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 ' );?>
5972
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+
61106<form id="contactform" align="center">
62107<table width="100%" border="0" align="center">
63108 <tr>
64109 <td class="banco">
65110 <table width="100%" border="0">
111+ <tr><td> </td></tr>
66112 <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>
69115 </tr>
70116 <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>
73119 </tr>
74120 <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>
77123 </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>
78129 <tr>
79130 <td width="350" colspan="2" style="text-align: center; font:bold 13px Arial, Helvetica, sans-serif; color:#0e119b;">
80131 Send the exact amount above in the next 30 min.
81132 </td>
82133 </tr>
134+
83135 <tr>
84136 <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 .
86138 </td>
87139 </tr>
88-
140+ <tr><td> </td></tr>
89141
90142 <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
92144 </td>
93145
94146 </table>
95147 </td>
96148 </tr>
97149 </tr>
98150</table>
99- </form>
151+ </form>
152+
153+ <?php }?>
0 commit comments