Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. /**
  15. * Run the license routinoe.
  16. *
  17. * @param mixed $argv
  18. * @return integer
  19. */
  20. function license($argv)
  21. {
  22. global $LICENSE_SYNC;
  23. license_setopts($argv);
  24. $status = 0;
  25.  
  26. if ($LICENSE_SYNC) {
  27. $status += license_sync();
  28. }
  29.  
  30. return $status;
  31. }
  32.  
  33. /**
  34. * Sync the license with our master server.
  35. *
  36. * this function writes a new license file.
  37. *
  38. * @return integer
  39. */
  40. function license_sync()
  41. {
  42. global $CHECK_ONLY;
  43.  
  44. if (Ini::is_empty(Ini::IWORX_LICENSE, 'key') === true) {
  45. $msg = '##LG_LICENSE_NOT_IN_INI##';
  46. IWorxLog::log($msg);
  47. echo IW::tr($msg);
  48. License::writeMessageFile([false, $msg]);
  49. return 1;
  50. }
  51.  
  52. if ($CHECK_ONLY) {
  53. $action = 'validate';
  54. }
  55. else {
  56. $action = 'cron';
  57. }
  58.  
  59. if (IWorxUtil::haveRootPrivs()) {
  60. $gpgbase = Ini::get(Ini::IWORX_DIR, 'base') . '/etc/gpg';
  61. IWorxFileSys::chown('iworx', $gpgbase, 'iworx', true);
  62. }
  63.  
  64. $result = iworx_sync_license(Ini::get(Ini::IWORX_LICENSE, 'key'), $action, $CHECK_ONLY);
  65.  
  66. if ($result[0] !== true) {
  67. if ($CHECK_ONLY) {
  68. IWorxLog::log('error checking license: ' . $result[1], IWorxLog::ALERT);
  69. ....................................................................
  70. .......................................
  71. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement