Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.41 KB | None | 0 0
  1. <?php
  2.  
  3. ob_start();
  4.  
  5. session_start();
  6.  
  7. error_reporting(0);
  8.  
  9. include "includes/config.php";
  10.  
  11. include "header.php";
  12.  
  13. if(!isset($_SESSION['sname']) and !isset($_SESSION['spass'])){
  14.  
  15. header("location: login.php");
  16.  
  17. exit();
  18.  
  19. }
  20.  
  21. ?>
  22.  
  23. <?php
  24.  
  25.  
  26.  
  27.  
  28.  
  29. // auto rate
  30.  
  31. $url_btc = 'https://blockchain.info/ticker';
  32.  
  33.  
  34.  
  35. $response_btc = file_get_contents($url_btc);
  36.  
  37. $object_btc = json_decode($response_btc);
  38.  
  39. //print_r($object_btc);
  40.  
  41.  
  42.  
  43. $usdprice = $object_btc->{"USD"}->{"last"};
  44.  
  45. $rate['rate'] = $object_btc->{"USD"}->{"last"};
  46.  
  47. // config Blockchain account
  48.  
  49. $btc = $rate['rate'];
  50.  
  51. $guid = ''; // Blockchain account
  52.  
  53. $main_password = ''; // Blockchain pass
  54.  
  55. $second_password = ''; // Blockchain pass
  56.  
  57. $rate = $rate['rate'];
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. $uid = mysql_real_escape_string($_SESSION['sname']); //
  66.  
  67. $result = mysql_query("SELECT balance FROM users WHERE username='$uid'") or die("ERROR! CONTACT SUPPORT!");
  68.  
  69. $row = mysql_fetch_row($result);
  70.  
  71. $balance = $row[0];
  72.  
  73. $uid = mysql_real_escape_string($_SESSION['sname']);
  74.  
  75. $ip = mysql_real_escape_string(VisitorIP());
  76.  
  77. $url = "https://blockchain.info/merchant/$guid/new_address?password=$main_password&second_password=$second_password&label=$uid";
  78.  
  79. if (isset($_POST['amount'])){
  80.  
  81. $_SESSION['USD_amount'] = $_POST['amount'];
  82.  
  83. $_SESSION['BTC_amount'] = number_format($_SESSION['USD_amount']/$rate, 8, '.', '');
  84.  
  85. $temp = _curl($url, '', '');
  86.  
  87. $_SESSION['BTC_Address'] = get_string_between($temp, 'address":"', '"');
  88.  
  89. }
  90.  
  91. if (!isset($_SESSION['USD_amount']) || $_SESSION['USD_amount'] < 1)
  92.  
  93. die("WRONG AMOUNT");
  94.  
  95.  
  96.  
  97. if (isset($_POST['bitcoin']))
  98.  
  99. {
  100.  
  101.  
  102.  
  103. $a = $_SESSION['BTC_Address'];
  104.  
  105. $url = "https://blockchain.info/q/addressbalance/$a?confirmations=0";
  106.  
  107. $page = _curl($url, '', '');
  108.  
  109. if ($page > 0) {
  110.  
  111. $amount = $page/10000000;
  112.  
  113.  
  114.  
  115. if($amount>= $_SESSION['BTC_amount']){
  116.  
  117. $y = $_SESSION['USD_amount'];
  118.  
  119. $x = $balance+$y;
  120.  
  121. $sql = "UPDATE users SET balance=$x WHERE username='$uid'";
  122.  
  123. mysql_query($sql);
  124.  
  125.  
  126.  
  127. $sql2 = "INSERT INTO orders(amount,username,lrpaidby,lrtrans,ip,state,date) VALUES('$y','$uid','$a','$a','$ip','Bitcoin',now())";
  128.  
  129. mysql_query($sql2);
  130.  
  131. $messages = '<meta http-equiv="refresh" content="0; url=success.php" />';
  132.  
  133. unset($_SESSION['USD_amount']);
  134.  
  135. }else $messages = "<font color=red>Payment not yet completed ... </font>";
  136.  
  137. }else $messages = "<font color=red>Payment not yet completed ...</font>";
  138.  
  139. }
  140.  
  141.  
  142.  
  143. ?>
  144.  
  145.  
  146.  
  147. <!doctype html>
  148.  
  149. <html lang="en" class="high">
  150.  
  151. <head>
  152.  
  153.  
  154.  
  155.  
  156.  
  157. <title>Hello!</title>
  158.  
  159. <!-- Latest compiled and minified CSS -->
  160.  
  161. <link rel="stylesheet" href="../bootstrap/styles/bootstrap.min.css">
  162.  
  163. <link rel="stylesheet" href="styles/style.css">
  164.  
  165. <!-- Optional theme -->
  166.  
  167. <link rel="stylesheet" href="../bootstrap/styles/bootstrap-theme.min.css">
  168.  
  169. <!-- Latest compiled and minified JavaScript -->
  170.  
  171. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
  172.  
  173.  
  174.  
  175.  
  176.  
  177. <meta charset="utf-8">
  178.  
  179.  
  180.  
  181. <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
  182.  
  183. <meta name="viewport" content="width=device-width, minimal-ui, initial-scale=1, maximum-scale=1.0, user-scalable=no">
  184.  
  185.  
  186.  
  187. <link rel="apple-touch-icon-precomposed" sizes="144x144" href=".//images/coinbuckslogo_144.png">
  188.  
  189. <link rel="apple-touch-icon-precomposed" sizes="114x114" href=".//images/coinbuckslogo_114.png">
  190.  
  191. <link rel="apple-touch-icon-precomposed" sizes="72x72" href=".//images/coinbuckslogo_72.png">
  192.  
  193. <link rel="apple-touch-icon-precomposed" sizes="57x57" href=".//images/coinbuckslogo_57.png">
  194.  
  195.  
  196.  
  197. <link rel="shortcut icon" href=".//images/coinbuckslogo_57.png">
  198.  
  199.  
  200.  
  201. <title><?php echo $sitename; ?></title>
  202.  
  203. <script type="text/javascript">
  204.  
  205. var polyfilter_scriptpath = "//polyfills/filters/";
  206.  
  207. window.polyfilter_skip_stylesheets = true
  208.  
  209. </script>
  210.  
  211. <link href=".//stylesheets/application.css" media="screen" rel="stylesheet" type="text/css"/>
  212.  
  213. <!--[if lte IE 9]>
  214.  
  215. <link href=".//stylesheets/application_split2.css" media="screen" rel="stylesheet" type="text/css" />
  216.  
  217. <link href=".//stylesheets/application_split3.css" media="screen" rel="stylesheet" type="text/css" />
  218.  
  219. <![endif]-->
  220.  
  221. <script src=".//javascripts/application.js" type="text/javascript"></script>
  222.  
  223. <style>.navbar-nav.navbar-right:last-child{margin-right:0px;}</style>
  224.  
  225. <meta name="google-translate-customization" content="a70276956aa8b324-78d213ddd97958c5-g0e9821184229e6d0-c"></meta>
  226.  
  227. </head>
  228.  
  229. <body class="high emerald-default htmls htmls_ htmls_elements htmls_elements_modal">
  230.  
  231. <div class="modal modal-light fade in" id="generate-code">
  232.  
  233. <div class="modal-dialog ">
  234.  
  235. <div class="modal-content">
  236.  
  237. <div class="modal-header ">
  238.  
  239. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  240.  
  241. <h4 class="modal-title">Generate Code</h4>
  242.  
  243. </div>
  244.  
  245. <div class="modal-body">
  246.  
  247. <form>
  248.  
  249. <div class="form-group">
  250.  
  251. <label for="theme_select">Select A Theme</label>
  252.  
  253. <select class="form-control" id="theme_select" name="theme_select">
  254.  
  255. <option value="default">Default</option>
  256.  
  257. <option value="cerulean">Cerulean</option>
  258.  
  259. <option value="cosmo">Cosmo</option>
  260.  
  261. <option value="cyborg">Cyborg</option>
  262.  
  263. <option value="darkly">Darkly</option>
  264.  
  265. <option value="flatly">Flatly</option>
  266.  
  267. <option value="journal">Journal</option>
  268.  
  269. <option value="lumen">Lumen</option>
  270.  
  271. <option value="paper">Paper</option>
  272.  
  273. <option value="readable">Readable</option>
  274.  
  275. <option value="sandstone">Sandstone</option>
  276.  
  277. <option value="simplex">Simplex</option>
  278.  
  279. <option value="slate">Slate</option>
  280.  
  281. <option value="spacelab">Spacelab</option>
  282.  
  283. <option value="superhero">Superhero</option>
  284.  
  285. <option value="united">United</option>
  286.  
  287. <option value="yeti">Yeti</option>
  288.  
  289. </select>
  290.  
  291. </div>
  292.  
  293. <div class="form-group">
  294.  
  295. <label for="generate-code-box">Embed Code</label>
  296.  
  297. <textarea class="form-control" rows="3" id="generate-code-box"></textarea>
  298.  
  299. <p class="help-block">This is your iframe embed code, you may place this code on any page where you want your Coin Wall to appear.</p>
  300.  
  301. </div>
  302.  
  303. <input type="hidden" id="current-wall-id" value="">
  304.  
  305. </form>
  306.  
  307. </div>
  308.  
  309. <div class="modal-footer">
  310.  
  311. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  312.  
  313. <button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button>
  314.  
  315. </div>
  316.  
  317. </div>
  318.  
  319. </div>
  320.  
  321. </div>
  322.  
  323. <div class="modal modal-light slide-to-top" id="offer_info">
  324.  
  325. <div class="modal-dialog ">
  326.  
  327. <div class="modal-content">
  328.  
  329. <div class="modal-header ">
  330.  
  331. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  332.  
  333. <h4 class="modal-title">Offer Information</h4>
  334.  
  335. </div>
  336.  
  337. <div class="modal-body" id="modal_contents">
  338.  
  339. <p></p>
  340.  
  341. </div>
  342.  
  343. <div class="modal-footer">
  344.  
  345. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  346.  
  347. </div>
  348.  
  349. </div>
  350.  
  351. </div>
  352.  
  353. </div>
  354.  
  355. <div class="modal blur jump-to-modal" id="jump-to-menu">
  356.  
  357. <div class="modal-dialog modal-lg">
  358.  
  359. <div class="clearfix">
  360.  
  361. <button type="button" class="close pull-right text-white-dk" data-dismiss="modal" aria-hidden="true">&times;</button>
  362.  
  363. </div>
  364.  
  365. <div class="container-fluid">
  366.  
  367. <div class="row text-center vpadded-row">
  368.  
  369. <div class="col-sm-4">
  370.  
  371. <a href=".//">
  372.  
  373. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  374.  
  375. <i class="icm icm-screen4 icm-4x"></i>
  376.  
  377. <h5></h5>
  378.  
  379. </div>
  380.  
  381. </a>
  382.  
  383. </div>
  384.  
  385. <div class="col-sm-4">
  386.  
  387. <a href=".//offers.php">
  388.  
  389. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  390.  
  391. <i class="icm icm-pencil2 icm-4x"></i>
  392.  
  393. <h5>Offers</h5>
  394.  
  395. </div>
  396.  
  397. </a>
  398.  
  399. </div>
  400.  
  401. <div class="col-sm-4">
  402.  
  403. <a href=".//referrals.php">
  404.  
  405. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  406.  
  407. <i class="icm icm-users icm-4x"></i>
  408.  
  409. <h5>Referrals</h5>
  410.  
  411. </div>
  412.  
  413. </a>
  414.  
  415. </div>
  416.  
  417. <div class="col-sm-4">
  418.  
  419. <a href=".//payouts.php">
  420.  
  421. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  422.  
  423. <i class="icm icm-coin icm-4x"></i>
  424.  
  425. <h5>Payouts</h5>
  426.  
  427. </div>
  428.  
  429. </a>
  430.  
  431. </div>
  432.  
  433. <div class="col-sm-4">
  434.  
  435. <a href=".//account.php">
  436.  
  437. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  438.  
  439. <i class="icm icm-cogs icm-4x"></i>
  440.  
  441. <h5>Account</h5>
  442.  
  443. </div>
  444.  
  445. </a>
  446.  
  447. </div>
  448.  
  449. <div class="col-sm-4">
  450.  
  451. <a href=".//support.php">
  452.  
  453. <div class="jump-to-element padded text-gradient-white text-component-shadow">
  454.  
  455. <i class="icm icm-bubble-notification2 icm-4x"></i>
  456.  
  457. <h5>Support</h5>
  458.  
  459. </div>
  460.  
  461. </a>
  462.  
  463. </div>
  464.  
  465. </div></div>
  466.  
  467. </div>
  468.  
  469. </div>
  470.  
  471. </div>
  472.  
  473. <div class="oc-xs-push-push oc-sm-squeeze-push oc-md-squeeze-push oc-lg-squeeze-push
  474.  
  475. modal-blur-content">
  476.  
  477. <div id="oc-wrapper" class="oc-wrapper
  478.  
  479. oc-lg-open-left oc-md-partial-left oc-sm-partial-left
  480.  
  481. oc-lg-left-squeeze oc-md-left-squeeze oc-sm-left-squeeze oc-xs-left-push
  482.  
  483. oc-lg-right-push oc-md-right-push oc-sm-right-push oc-xs-right-push
  484.  
  485. ">
  486.  
  487. <div class="oc-push oc-scroll">
  488.  
  489. <aside id="main-oc-sidebar-left" class="oc-sidebar oc-sidebar-left oc-sidebar-fixed nano">
  490.  
  491. <div class="nano-content">
  492.  
  493.  
  494.  
  495. <div class="container-fluid">
  496.  
  497.  
  498.  
  499. <center>
  500.  
  501.  
  502.  
  503. <form action="" id="fcaptcha" name="fcaptcha" method="post">
  504.  
  505.  
  506.  
  507. <p>Please transfer <font color="lime"><i>exactly : </i></font><input type="text" name="sometext" size="10" value="<?=($_SESSION['BTC_amount']+0.0005)?>" onClick='selectText(this);'> <font color="orange">BTC</font> to the following address:</p>
  508.  
  509. <h3>
  510.  
  511.  
  512.  
  513. <script language="JavaScript">
  514.  
  515. function selectText(textField)
  516.  
  517. {
  518.  
  519. textField.focus();
  520.  
  521. textField.select();
  522.  
  523. }
  524.  
  525. </script>
  526.  
  527.  
  528.  
  529. <center><input type="text" name="sometext" size="37" value="<?=$_SESSION['BTC_Address'] ?>" onClick='selectText(this);'></center>
  530.  
  531.  
  532.  
  533. </h3>
  534.  
  535. <center><font color="black">Rate: 1BTC = <?=$btc?> USD</font></center>
  536.  
  537. <center><font color="grey">Please use this BTC Address once , for the other transactions new BTC Addresses will be generated.</font></center>
  538.  
  539. <input type="hidden" id="bitcoin" name="bitcoin">
  540.  
  541. </form>
  542.  
  543. <center>&nbsp;</center>
  544.  
  545. <center><font color="black"><b>Status of the payment : </b></font></center>
  546.  
  547. <p><input type="hidden" id="pmconfirm" name="pmconfirm" src="http://www.mvixusa.com/newsletter/2010/11/newsletter-membership-confirmation/images/confirm-button.png" alt="Submit Form" onclick="document.getElementById('fcaptcha').submit()"/></p>
  548.  
  549. <h3><?=
  550.  
  551.  
  552.  
  553. $messages
  554.  
  555.  
  556.  
  557. ?></h3>
  558.  
  559. </center>
  560.  
  561. <script type="text/javascript">
  562.  
  563. $('#pmconfirm').click(function(){
  564.  
  565. $('#fcaptcha').submit();
  566.  
  567. });
  568.  
  569.  
  570.  
  571. </script>
  572.  
  573.  
  574.  
  575. <script language="JavaScript"><!--
  576.  
  577.  
  578.  
  579. setTimeout('document.fcaptcha.submit()',20000);
  580.  
  581. //--></script>
  582.  
  583. <center><img src="/imgs/loading.gif"></center>
  584.  
  585.  
  586.  
  587. <center><h4><font color="black">Do not close this Page if the status of Your payment is not yet completed !</font></h4></center>
  588.  
  589. </div>
  590.  
  591.  
  592.  
  593. <div style="display:none">
  594.  
  595. <script id="_wauhxg">var _wau = _wau || []; _wau.push(["classic", "vvemicmwyv1q", "hxg"]);
  596.  
  597. (function() {var s=document.createElement("script"); s.async=true;
  598.  
  599. s.src="http://widgets.amung.us/classic.js";
  600.  
  601. document.getElementsByTagName("head")[0].appendChild(s);
  602.  
  603. })();</script>
  604.  
  605. </div>
  606.  
  607. </div>
  608.  
  609. </div>
  610.  
  611. </div>
  612.  
  613. </div>
  614.  
  615.  
  616.  
  617. <div id="mq"></div>
  618.  
  619.  
  620.  
  621. <div id="emvars"></div>
  622.  
  623. </body>
  624.  
  625. </html>
  626.  
  627. <?php
  628.  
  629.  
  630.  
  631.  
  632.  
  633. function _curl($url, $post = "", $sock, $usecookie = false)
  634.  
  635. {
  636.  
  637. $ch = curl_init();
  638.  
  639. if ($post) {
  640.  
  641. curl_setopt($ch, CURLOPT_POST, 1);
  642.  
  643. curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  644.  
  645. }
  646.  
  647. if (!empty($sock)) {
  648.  
  649. curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);
  650.  
  651. curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
  652.  
  653. curl_setopt($ch, CURLOPT_PROXY, $sock);
  654.  
  655. }
  656.  
  657. curl_setopt($ch, CURLOPT_HEADER, 0);
  658.  
  659. curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  660.  
  661. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
  662.  
  663. curl_setopt($ch, CURLOPT_URL, $url);
  664.  
  665. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  666.  
  667. curl_setopt($ch, CURLOPT_USERAGENT,
  668.  
  669. "Mozilla/6.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3");
  670.  
  671. if ($usecookie) {
  672.  
  673. curl_setopt($ch, CURLOPT_COOKIEJAR, $usecookie);
  674.  
  675. curl_setopt($ch, CURLOPT_COOKIEFILE, $usecookie);
  676.  
  677. }
  678.  
  679. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  680.  
  681. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
  682.  
  683. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  684.  
  685. $result = curl_exec($ch);
  686.  
  687. curl_close($ch);
  688.  
  689. return $result;
  690.  
  691. }
  692.  
  693. function get_string_between($string, $start, $end)
  694.  
  695. {
  696.  
  697. $string = " " . $string;
  698.  
  699. $ini = strpos($string, $start);
  700.  
  701. if ($ini == 0)
  702.  
  703. return "";
  704.  
  705. $ini += strlen($start);
  706.  
  707. $len = strpos($string, $end, $ini) - $ini;
  708.  
  709. return substr($string, $ini, $len);
  710.  
  711. }
  712.  
  713. function VisitorIP()
  714.  
  715. {
  716.  
  717. if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))
  718.  
  719. $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
  720.  
  721. else $ip = $_SERVER['REMOTE_ADDR'];
  722.  
  723.  
  724.  
  725. return trim($ip);
  726.  
  727. }
  728.  
  729. ?>
  730.  
  731.  
  732.  
  733.  
  734.  
  735. </div>
  736.  
  737. </div>
  738.  
  739. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement