Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function exec_rc_script($scriptname) {
- global $d_sysrebootreqd_path;
- if (file_exists( $d_sysrebootreqd_path )) {
- return 0;
- }
- exec( $scriptname . ' >/dev/null 2>&1', $execoutput, $retval );
- return $retval;
- }
- function exec_rc_script_async($scriptname) {
- global $d_sysrebootreqd_path;
- if (file_exists( $d_sysrebootreqd_path )) {
- return 0;
- }
- exec( 'nohup ' . $scriptname . ' >/dev/null 2>&1 &', $execoutput, $retval );
- return $retval;
- }
- function verify_gzip_file($fname) {
- $returnvar = mwexec( '/usr/bin/gunzip -S "" -t ' . escapeshellarg( $fname ) );
- if ($returnvar != 0) {
- return 0;
- }
- return 1;
- }
- function get_std_save_message($ok) {
- global $d_sysrebootreqd_path;
- if ($ok == 0) {
- if (file_exists( $d_sysrebootreqd_path )) {
- return gettext( 'The changes have been saved. You must <a href="/system_reboot.php">reboot</a> your pbx for the changes to take effect.' );
- }
- return gettext( 'The changes have been applied successfully.' );
- }
- return sprintf( gettext( 'ERROR: the changes could not be applied (error code %s).' ), $ok );
- }
- function dynamic_tab_menu($tabs) {
- global $allowed;
- global $config;
- if ($_SERVER['REMOTE_USER'] == $config['system']['username']) {
- $authorized = &$tabs;
- } else {
- $authorized = &$allowed;
- }
- $linkStyle = '1';
- if (is_array( $tabs )) {
- foreach ($tabs as $desc => $link) {
- if (in_array( $link, $authorized )) {
- if ($link == basename( $_SERVER['PHP_SELF'] )) {
- if (( 0 - 1 < strpos( $link, 'diag_logs' ) && $link != 'diag_logs_settings.php' )) {
- if ($desc == 'Firewall') {
- $msg = gettext( 'reset filter and reload firewall logs page' );
- echo '<li class="tabact"><a href="diag_logs_filter.php" class="link_color_black" title="' . $msg . '">';
- echo gettext( 'Firewall' );
- echo '</a></li>';
- } else {
- $msg = gettext( 'reload page' );
- echo '<li class="tabact"><a href="' . $link . '" class="link_color_black" title="' . $msg . '">' . $desc . '</a></li>';
- }
- } else {
- echo '<li class="tabact">' . $desc . '</li>';
- }
- $linkStyle = '';
- continue;
- }
- echo '<li class="tabinact' . $linkStyle . '"><a href="' . $link . '">' . $desc . '</a></li>';
- $linkStyle = '';
- continue;
- }
- }
- }
- }
- function print_r_html($data, &$return_data = true) {
- $data = print_r( $data, true );
- $data = str_replace( ' ', ' ', $data );
- $data = str_replace( '
- ', '<br>
- ', $data );
- $data = str_replace( '
- ', '<br>
- ', $data );
- $data = str_replace( '
- ', '<br>
- ', $data );
- if (!$return_data) {
- echo $data;
- return null;
- }
- return $data;
- }
- ....................................................................
- ............................................
- .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement