Guest User

Untitled

a guest
Mar 27th, 2021
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class HYIP_Manager_Pro_Database_Helper
  4. {
  5. private $_logfilepath = './HYIP_Manager_Pro_Database_Helper_php_log.txt';
  6. private $_servername = '';
  7. private $_username = '';
  8. private $_password = '';
  9. private $_dbname = '';
  10. private $PDOConn;
  11. public function __construct($ServerName, $UserName, $Password, $databaseName)
  12. {
  13. $this->_servername = $ServerName;
  14. $this->_username = $UserName;
  15. $this->_password = $Password;
  16. $this->_dbname = $databaseName;
  17. $this->PDOConn = new PDO('mysql:host=' . $ServerName . ';dbname=' . $databaseName, $UserName, $Password);
  18. $this->PDOConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  19. }
  20.  
  21. public function getHm2Processings()
  22. {
  23. $sql = 'select * from hm2_processings;';
  24. $stmt = $this->PDOConn->query($sql);
  25. $hm2_processings_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
  26.  
  27. return $hm2_processings_data;
  28. }
  29.  
  30. public function checkHm2Processings($hm2_processings_data = null)
  31. {
  32. if ($hm2_processings_data == null) {
  33. $hm2_processings_data = $this->getHm2Processings();
  34. }
  35. $Bitcoin_Found = false;
  36. $Ethereum_Found = false;
  37. $Litecoin_Found = false;
  38. $Dash_Found = false;
  39. $BitcoinCash_Found = false;
  40. $Stellar_Found = false;
  41. $Zcash_Found = false;
  42. $TRON_Found = false;
  43. $Dai_Found = false;
  44. $USDCoin_Found = false;
  45. $PerfectMoney_Found = false;
  46. $Payeer_Found = false;
  47.  
  48. foreach ($hm2_processings_data as $key => $value) {
  49. if ($value['name'] == 'Bitcoin') {
  50. $Bitcoin_Found = true;
  51. }
  52.  
  53. if ($value['name'] == 'Ethereum') {
  54. $Ethereum_Found = true;
  55. }
  56.  
  57. if ($value['name'] == 'Litecoin') {
  58. $Litecoin_Found = true;
  59. }
  60. }
  61. $Name = '';
  62. $DefaultInfoFields = '';
  63. $DefaultStatus = '0';
  64. $DefaultDescription = 'Payment Processor';
  65. $DefaultVerify = '0';
  66. $DefaultLang = '';
  67. $stmt = $this->PDOConn->prepare('INSERT INTO `hm2_processings` ( `name`, `infofields`, `status`, `description`, `verify`, `lang` ) VALUES ( :Name, :InfoFields, :Status, :Description, :Verify, :Lang);');
  68. $stmt->bindParam('Name', $Name, PDO::PARAM_STR, 255);
  69. $stmt->bindParam('InfoFields', $DefaultInfoFields, PDO::PARAM_INT, 1);
  70. $stmt->bindParam('Status', $DefaultStatus, PDO::PARAM_STR, 255);
  71. $stmt->bindParam('Description', $DefaultDescription, PDO::PARAM_STR, 255);
  72. $stmt->bindParam('Verify', $DefaultVerify, PDO::PARAM_INT, 1);
  73. $stmt->bindParam('Lang', $DefaultLang, PDO::PARAM_STR, 255);
  74.  
  75. if ($Bitcoin_Found == false) {
  76. $Name = 'Bitcoin';
  77. $DefaultDescription = 'Send your funds to account: <b>Your Bitcoin address</b>';
  78. $stmt->execute();
  79. $BitcoinLastInsertId = $this->PDOConn->lastInsertId();
  80. }
  81.  
  82. if ($Ethereum_Found == false) {
  83. $Name = 'Ethereum';
  84. $DefaultDescription = 'Send your funds to account: <b>Your Ethereum address</b>';
  85. $stmt->execute();
  86. ........................................................
  87. ..............................
  88. ...............
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×