0byt3m1n1
Path:
/
home1
/
aserty
/
www
/
ourhomebedroom.com
/
wp-content
/
plugins
/
serverbuddy-by-pluginb.bakuddy
/
classes
/
[
Home
]
File: view_tools-permissions.php
<?php $tests = array(); $this_test = array( 'title' => '/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-includes/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-includes/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-includes/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-includes/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-admin/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-admin/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-admin/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-admin/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-admin/js/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-admin/js/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-admin/js/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-admin/js/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-content/themes/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/themes/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-content/themes/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/themes/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-content/plugins/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/plugins/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-content/plugins/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/plugins/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-content/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-content/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); $this_test = array( 'title' => '/wp-content/uploads/', 'suggestion' => '= 755', 'value' => substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/uploads/' ) ), -4 ), ); if ( !fileperms( ABSPATH . '/wp-content/uploads/' ) || substr( sprintf( '%o', fileperms( ABSPATH . '/wp-content/uploads/' ) ), -4 ) != 755 ) { $this_test['status'] = 'WARNING'; } else { $this_test['status'] = 'OK'; } array_push( $tests, $this_test ); ?> <table class="widefat"> <thead> <tr class="thead"> <th>Relative Path</th> <th>Suggestion</th> <th>Value</th> <th>Result</th> <th style="width: 60px;">Status</th> </tr> </thead> <tfoot> <tr class="thead"> <th>Relative Path</th> <th>Suggestion</th> <th>Value</th> <th>Result</th> <th style="width: 60px;">Status</th> </tr> </tfoot> <tbody> <?php foreach( $tests as $this_test ) { echo '<tr class="entry-row alternate">'; echo ' <td>' . $this_test['title'] . '</td>'; echo ' <td>' . $this_test['suggestion'] . '</td>'; echo ' <td>' . $this_test['value'] . '</td>'; echo ' <td>' . $this_test['status'] . '</td>'; echo ' <td>'; if ( $this_test['status'] == 'OK' ) { echo '<div style="background-color: #22EE5B; border: 1px solid #E2E2E2;"> </div>'; } elseif ( $this_test['status'] == 'FAIL') { echo '<div style="background-color: #CF3333; border: 1px solid #E2E2E2;"> </div>'; } elseif ( $this_test['status'] == 'WARNING') { echo '<div style="background-color: #FEFF7F; border: 1px solid #E2E2E2;"> </div>'; } echo ' </td>'; echo '</tr>'; } ?> </tbody> </table>