Guest User

Untitled

a guest
Feb 23rd, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Loader)
  6. *
  7. * @ Version : 2.0.0.4
  8. * @ Author : DeZender
  9. * @ Release on : 21.10.2015
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function FormattedTimeRemaining($seconds, $precision = 1) {
  15.  
  16. global $pwd;
  17. if (86400 < $seconds)
  18. {
  19. return number_format($seconds / 86400, $precision) . " days";
  20. }
  21. if (3600 < $seconds)
  22. {
  23. return number_format($seconds / 3600, $precision) . " hours";
  24. }
  25. if (60 < $seconds)
  26. {
  27. return number_format($seconds / 60, $precision) . " minutes";
  28. }
  29. return number_format($seconds, $precision) . " seconds";
  30. }
  31.  
  32. function FileSizeNiceDisplay($filesize, $precision = 2) {
  33.  
  34. global $pwd;
  35. if ($filesize < 1000)
  36. {
  37. $sizeunit = "bytes";
  38. $precision = 0;
  39. }
  40. else
  41. {
  42. $filesize /= 1024;
  43. $sizeunit = "kB";
  44. }
  45. if (1000 <= $filesize)
  46. {
  47. $filesize /= 1024;
  48. $sizeunit = "MB";
  49. }
  50. if (1000 <= $filesize)
  51. {
  52. $filesize /= 1024;
  53. $sizeunit = "GB";
  54. }
  55. return number_format($filesize, $precision) . " " . $sizeunit;
  56. }
  57.  
  58. function OutputInformation($id, $dhtml, $text = "") {
  59.  
  60. global $DHTMLenabled;
  61. global $pwd;
  62. if ($DHTMLenabled)
  63. {
  64. if (!is_null($dhtml))
  65. {
  66. if ($id)
  67. {
  68. echo "<script>if (document.getElementById(\"" . $id . "\")) document.getElementById(\"" . $id . "\").innerHTML=\"" . $dhtml . "\"</script>";
  69. }
  70. else
  71. {
  72. echo $dhtml;
  73. }
  74. flush();
  75. }
  76. }
  77. else
  78. {
  79. if ($text)
  80. {
  81. echo $text;
  82. flush();
  83. }
  84. }
  85. return true;
  86. }
  87.  
  88. function EmailAttachment($from, $to, $subject, $textbody, &$attachmentdata, $attachmentfilename) {
  89.  
  90. global $pwd;
  91. $boundary = "_NextPart_" . time() . "_" . md5($attachmentdata) . "_";
  92. $textheaders = "--" . $boundary . "\n";
  93. $textheaders .= "Content-Type: text/plain; format=flowed; charset=\"iso-8859-1\"" . "\n";
  94. $textheaders .= "Content-Transfer-Encoding: 7bit" . "\n\n";
  95. $attachmentheaders = "--" . $boundary . "\n";
  96. $attachmentheaders .= "Content-Type: application/octet-stream; name=\"" . $attachmentfilename . "\"" . "\n";
  97. $attachmentheaders .= "Content-Transfer-Encoding: base64" . "\n";
  98. $attachmentheaders .= "Content-Disposition: attachment; filename=\"" . $attachmentfilename . "\"" . "\n\n";
  99. $headers[] = "From: " . $from;
  100. ...............................................................
  101. ..........................
  102. ............
Advertisement
Add Comment
Please, Sign In to add comment