Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.7.0
  8. * @ Author : DeZender
  9. * @ Release on : 22.06.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. include '../app/config/base.php';
  15. include 'mt/mt_pwd.php';
  16. include 'license/request.inc.php';
  17. $mysql = array( );
  18. $mysql['domain'] = '';
  19. $mysql['click_ip'] = '';
  20. $mysql['click_time'] = '';
  21. $error = '';
  22. $html['userName'] = '';
  23. $isValid = 0;
  24. $statusError = 0;
  25. $coreError = '';
  26. $verified = false;
  27. $msgHeader = '';
  28. $msg = '';
  29. $tokenId = 0;
  30. $loginFailed = false;
  31. $responseDataEncryptCipher_W8u2p3urm5 = '+K9)wNU7@{KD8,,}';
  32. $responseApiKey_JqeXTfS3du = 'a)3n_U5NXL,,OfU]';
  33.  
  34. if ($_SERVER['REQUEST_METHOD'] == 'POST') {
  35. $verified = true;
  36. $tokenId = $_POST['tokenId'];
  37. $tokenName_str = ((!(empty( $_SESSION[$tokenId . '_tokenName'] )) ? $_SESSION[$tokenId . '_tokenName'] : ''));
  38. $tokenValue_str = ((!(empty( $_POST[$tokenName_str] )) ? $_POST[$tokenName_str] : ''));
  39. $postAuthorization = new PostAuthorization( $tokenId );
  40. $validPost = $postAuthorization->validated( $tokenName_str, $tokenValue_str );
  41.  
  42. if ($validPost) {
  43. $_POST = array_map( array(
  44. 'HtmlHelper',
  45. 'decodeHtml'
  46. ), $_POST );
  47. $userName = $_POST['userName'];
  48. $userPassword = $_POST['userPassword'];
  49. $loginSql = $db->prepare( 'SELECT *' . "\r\n" . ' FROM mt_account' . "\r\n" . ' WHERE user_name = :user_name' );
  50. $loginSql->bindParam( ':user_name', $userName, PDO::PARAM_STR );
  51. $result = $loginSql->execute( );
  52.  
  53. if ($result) {
  54. if ($data = $loginSql->fetch( PDO::FETCH_ASSOC )) {
  55. $bcrypt = new Bcrypt( );
  56. $isGood = $bcrypt->verify( $userPassword, $data['user_password'] );
  57.  
  58. if (!($isGood)) {
  59. $error = 'Your password is incorrect.';
  60. $log = new Login( 0, $userName, 'Password' );
  61. $log->logger( );
  62. }
  63. else {
  64. $_SESSION['iMobi_sessionTime'] = time( );
  65. $_SESSION['iMobi_userName'] = $userName;
  66. $_SESSION['iMobi_userId'] = $data['user_id'];
  67. $_SESSION['iMobi_timezone'] = $data['user_timezone'];
  68. $_SESSION['iMobi_Login'] = true;
  69.  
  70. if (LOGIN_LOG) {
  71. $log = new Login( 1, $userName );
  72. $log->logger( );
  73. }
  74.  
  75. $location = $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
  76. $location = 'http://' . str_ireplace( 'account/' . LOGIN_PAGE, '', $location );
  77. $stmt = $db->prepare( 'UPDATE mt_account SET mt_location = :location; UPDATE mt_campaigns SET mt_location = :location;' );
  78. $stmt->bindParam( ':location', $location, PDO::PARAM_STR );
  79. $stmt->execute( );
  80. $redirect = 'campaigns.php';
  81.  
  82. if (!(empty( $_SESSION['lastPage'] ))) {
  83. $redirect = $_SESSION['lastPage'];
  84. unset( $_SESSION['lastPage'] );
  85. }
  86.  
  87. header( 'location: ' . $redirect );
  88. exit( );
  89. }
  90. }
  91. else {
  92. $error = 'The username entered is not found.';
  93. $log = new Login( 0, $userName, 'UserName' );
  94. $log->logger( );
  95. }
  96. }
  97. else {
  98. $mysqlError .= '<u>Login Page</u> - ' . $loginSql->errorCode( ) . ' - ' . $loginSql->errorInfo( ) . '<br><br>';
  99.  
  100. ...............................................................................
  101. .........................................
  102. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement