PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.0.1
SiteGuard WP Plugin v1.0.1
1.8.9 1.8.8 1.8.7 1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / classes / siteguard-base.php
siteguard / classes Last commit date
siteguard-admin-filter.php 11 years ago siteguard-base.php 11 years ago siteguard-captcha.php 11 years ago siteguard-config.php 11 years ago siteguard-disable-pingback.php 11 years ago siteguard-htaccess.php 11 years ago siteguard-login-history.php 11 years ago siteguard-login-lock.php 11 years ago siteguard-rename-login.php 11 years ago siteguard-waf-exclude-rule.php 11 years ago
siteguard-base.php
50 lines
1 <?php
2
3 class SiteGuard_Base {
4 function __construct() {
5 }
6 function error_log( $message ) {
7 $logfile = SITEGUARD_PATH . 'error.log';
8 $f = @fopen( $logfile, 'a+' );
9 if ( false != $f ) {
10 fwrite( $f, date_i18n( 'Y/m/d H:i:s:' ) . $message . "\n" );
11 fclose( $f );
12 }
13 }
14 function error_dump( $title, $obj ) {
15 ob_start();
16 var_dump( $obj );
17 $msg = ob_get_contents( );
18 ob_end_clean( );
19 $this->error_log( "$title: $msg" );
20 }
21 function is_switch_value( $value ) {
22 if ( '0' == $value || '1' == $value ) {
23 return true;
24 }
25 return false;
26 }
27 function check_module( $name, $default = false ) {
28 if ( isset( $_SERVER['SERVER_SOFTWARE'] ) ) {
29 return ( strpos( $_SERVER['SERVER_SOFTWARE'], 'Apache' ) !== false || strpos( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== false);
30 } else {
31 return $default;
32 }
33
34 # It does not work in FastCGI well.
35 #$module = 'mod_' . $name;
36 #return apache_mod_loaded( $module, $default );
37 #if ( function_exists('phpinfo') ) {
38 # ob_start( );
39 # phpinfo(8);
40 # $phpinfo = ob_get_clean( );
41 # if ( false !== strpos( $phpinfo, $module ) ) {
42 # return true;
43 # }
44 #}
45 #return $default;
46 }
47 }
48
49 ?>
50