Advertisement
Guest User

Untitled

a guest
Aug 7th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.10 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function exec_rc_script($scriptname) {
  15. global $d_sysrebootreqd_path;
  16.  
  17. if (file_exists( $d_sysrebootreqd_path )) {
  18. return 0;
  19. }
  20.  
  21. exec( $scriptname . ' >/dev/null 2>&1', $execoutput, $retval );
  22. return $retval;
  23. }
  24.  
  25. function exec_rc_script_async($scriptname) {
  26. global $d_sysrebootreqd_path;
  27.  
  28. if (file_exists( $d_sysrebootreqd_path )) {
  29. return 0;
  30. }
  31.  
  32. exec( 'nohup ' . $scriptname . ' >/dev/null 2>&1 &', $execoutput, $retval );
  33. return $retval;
  34. }
  35.  
  36. function verify_gzip_file($fname) {
  37. $returnvar = mwexec( '/usr/bin/gunzip -S "" -t ' . escapeshellarg( $fname ) );
  38.  
  39. if ($returnvar != 0) {
  40. return 0;
  41. }
  42.  
  43. return 1;
  44. }
  45.  
  46. function get_std_save_message($ok) {
  47. global $d_sysrebootreqd_path;
  48.  
  49. if ($ok == 0) {
  50. if (file_exists( $d_sysrebootreqd_path )) {
  51. return gettext( 'The changes have been saved. You must <a href="/system_reboot.php">reboot</a> your pbx for the changes to take effect.' );
  52. }
  53.  
  54. return gettext( 'The changes have been applied successfully.' );
  55. }
  56.  
  57. return sprintf( gettext( 'ERROR: the changes could not be applied (error code %s).' ), $ok );
  58. }
  59.  
  60. function dynamic_tab_menu($tabs) {
  61. global $allowed;
  62. global $config;
  63.  
  64. if ($_SERVER['REMOTE_USER'] == $config['system']['username']) {
  65. $authorized = &$tabs;
  66. } else {
  67. $authorized = &$allowed;
  68. }
  69.  
  70. $linkStyle = '1';
  71.  
  72. if (is_array( $tabs )) {
  73. foreach ($tabs as $desc => $link) {
  74. if (in_array( $link, $authorized )) {
  75. if ($link == basename( $_SERVER['PHP_SELF'] )) {
  76. if (( 0 - 1 < strpos( $link, 'diag_logs' ) && $link != 'diag_logs_settings.php' )) {
  77. if ($desc == 'Firewall') {
  78. $msg = gettext( 'reset filter and reload firewall logs page' );
  79. echo '<li class="tabact"><a href="diag_logs_filter.php" class="link_color_black" title="' . $msg . '">';
  80. echo gettext( 'Firewall' );
  81. echo '</a></li>';
  82. } else {
  83. $msg = gettext( 'reload page' );
  84. echo '<li class="tabact"><a href="' . $link . '" class="link_color_black" title="' . $msg . '">' . $desc . '</a></li>';
  85. }
  86. } else {
  87. echo '<li class="tabact">' . $desc . '</li>';
  88. }
  89.  
  90. $linkStyle = '';
  91. continue;
  92. }
  93.  
  94. echo '<li class="tabinact' . $linkStyle . '"><a href="' . $link . '">' . $desc . '</a></li>';
  95. $linkStyle = '';
  96. continue;
  97. }
  98. }
  99. }
  100.  
  101. }
  102.  
  103. function print_r_html($data, &$return_data = true) {
  104. $data = print_r( $data, true );
  105. $data = str_replace( ' ', '&nbsp;', $data );
  106. $data = str_replace( '
  107. ', '<br>
  108. ', $data );
  109. $data = str_replace( '
  110. ', '<br>
  111. ', $data );
  112. $data = str_replace( '
  113. ', '<br>
  114. ', $data );
  115.  
  116. if (!$return_data) {
  117. echo $data;
  118. return null;
  119. }
  120.  
  121. return $data;
  122. }
  123. ....................................................................
  124. ............................................
  125. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement