Пример #1
0
		|| is_iphone_with_wptouch()	// When iPhone access & used wptouch plugin (thx uemu)
	){

			echo $wp_output;
	} else {
			require_once( dirname( __FILE__ ).'/xpress_render.php' );
			xpress_render($wp_output);
	}

	//When there is no block cache, and an optional block is different, cache is refreshed. 
	//When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time. 
	// This Function in xpressme plugin
	require_once( dirname( __FILE__ ).'/xpress_block_render.php' );	
	xpress_unnecessary_block_cache_delete($xoops_config->module_name);
	if (is_home()) {
		xpress_block_cache_refresh($xoops_config->module_name);
		require_once( dirname( __FILE__ ).'/xpress_block_header.php' );	
		set_xpress_block_header($xoops_config->module_name);
	}
	if ( ini_get( 'register_globals' ) )
		$_SESSION = $global_session; //restore a session erased by wp_unregister_GLOBALS
	
	exit();		// The return to wp-blog-header.php is stolen here
}
if (is_admin_post_call()) require_once $xoops_config->xoops_mainfile_path;		// for Notification_triggerEvent
if (is_xpress_comments_post_call()) require_once $xoops_config->xoops_mainfile_path;	// for Notification_triggerEvent
xpress_set_memory_limmit(); // Set memory limmit.(Limmit Value from XPressMe modele config.)
require_once(ABSPATH.'wp-settings.php');
if ( ini_get( 'register_globals' ) )
	$_SESSION = $global_session; //restore a session erased by wp_unregister_GLOBALS
?>
Пример #2
0
function xpress_sys_info($is_report = false)
{
    global $xoopsModule;
    include dirname(__FILE__) . '/../wp-includes/version.php';
    require_once dirname(dirname(__FILE__)) . '/include/memory_limit.php';
    if ($is_report) {
        echo "******** " . _AM_XP2_SYSTEM_INFO . "********" . "<br />\n";
        echo "SERVER:  " . $_SERVER['SERVER_SOFTWARE'] . "<br />\n";
        echo "PHP Version:   " . phpversion() . "<br />\n";
        echo 'libxml Version:  ';
        if (defined('LIBXML_DOTTED_VERSION')) {
            echo LIBXML_DOTTED_VERSION;
        } else {
            echo "Can't detect.";
        }
        echo "<br />\n";
        echo "MySQL Version:   " . mysql_get_server_info() . "</text><br />";
        echo "XOOPS Version:   " . XOOPS_VERSION . "</text><br />";
        echo "XPressME Version:   " . $xoopsModule->getInfo('version') . ' ' . $xoopsModule->getInfo('codename') . "<br />\n";
        echo "WordPress Version:   " . $wp_version . "<br />\n";
        echo "WP DB Version:   " . $wp_db_version . "<br />\n";
        echo "<br />\n";
        echo "safemode:   ";
        echo ini_get('safe_mode') ? "ON" : "OFF";
        echo "<br />\n";
        echo "register_globals:   ";
        echo ini_get('register_globals') ? "ON" : "OFF";
        echo "<br />\n";
        echo "allow_url_fopen:   ";
        echo ini_get('allow_url_fopen') ? "ON" : "OFF";
        echo "<br />\n";
        echo "magic_quotes_gpc:   ";
        echo ini_get('magic_quotes_gpc') ? "ON" : "OFF";
        echo "<br />\n";
        echo "XML extension:   ";
        echo extension_loaded('xml') ? "ON" : "OFF";
        echo "<br />\n";
        echo "default memory_limit:   ";
        echo ini_get('memory_limit');
        echo "<br />\n";
        xpress_set_memory_limmit();
        echo "change memory_limit:   ";
        echo ini_get('memory_limit');
        echo "<br />\n";
        echo "post_max_size:   ";
        echo ini_get('post_max_size');
        echo "<br />\n";
        echo "upload_max_filesize:   ";
        echo ini_get('upload_max_filesize');
        echo "<br />\n";
        echo "display_errors:   ";
        echo ini_get('display_errors') ? "ON" : "OFF";
        echo "<br />\n";
        echo "MB extension:   ";
        echo extension_loaded('mbstring') ? "ON" : "OFF";
        echo "<br />\n";
        echo "mbstring.language:   ";
        echo ini_get('mbstring.language');
        echo "<br />\n";
        echo "mbstring.encoding_translation:   ";
        echo ini_get('mbstring.encoding_translation') ? "ON" : "OFF";
        echo "<br />\n";
        echo "mbstring.internal_encoding:   ";
        echo ini_get('mbstring.internal_encoding');
        echo "<br />\n";
        echo "mbstring.http_input:   ";
        echo ini_get('mbstring.http_input');
        echo "<br />\n";
        echo "mbstring.http_output:   ";
        echo ini_get('mbstring.http_output');
        echo "<br />\n";
        echo "mbstring.detect_order:   ";
        echo ini_get('mbstring.detect_order');
        echo "<br />\n";
        echo "mbstring.substitute_character:   ";
        echo ini_get('mbstring.substitute_character');
        echo "<br />\n";
        echo "mbstring.func_overload:   ";
        echo ini_get('mbstring.func_overload') ? "ON" : "OFF";
        echo "<br />\n";
        echo "<br />\n";
    } else {
        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _AM_XP2_SYSTEM_INFO . "</legend>";
        echo "<div style='padding: 8px;'>";
        echo "<label>" . "<strong>SERVER:</strong>" . ":</label><text>" . $_SERVER['SERVER_SOFTWARE'] . "</text><br />";
        echo "<label>" . "<strong>PHP Version:</strong>" . ":</label><text>" . phpversion() . "</text><br />";
        echo "<label>" . "<strong>libxml Version:</strong>" . ":</label><text>";
        if (defined('LIBXML_DOTTED_VERSION')) {
            echo LIBXML_DOTTED_VERSION;
        } else {
            echo "Can't detect.";
        }
        echo "</text><br />";
        echo "<label>" . "<strong>MySQL Version:</strong>" . ":</label><text>" . mysql_get_server_info() . "</text><br />";
        echo "<label>" . "<strong>XOOPS Version:</strong>" . ":</label><text>" . XOOPS_VERSION . "</text><br />";
        echo "<label>" . "<strong>XPressME Version:</strong>" . ":</label><text>" . $xoopsModule->getInfo('version') . ' ' . $xoopsModule->getInfo('codename') . "</text><br />";
        echo "<label>" . "<strong>WordPress Version:</strong>" . ":</label><text>" . $wp_version . "</text><br />";
        echo "<label>" . "<strong>WP DB Version:</strong>" . ":</label><text>" . $wp_db_version . "</text><br />";
        echo "</div>";
        echo "<div style='padding: 8px;'>";
        echo "<label>safemode:</label><text>";
        echo ini_get('safe_mode') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>register_globals:</label><text>";
        echo ini_get('register_globals') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>allow_url_fopen:</label><text>";
        echo ini_get('allow_url_fopen') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>magic_quotes_gpc:</label><text>";
        echo ini_get('magic_quotes_gpc') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>XML extension:</label><text>";
        echo extension_loaded('xml') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>default memory_limit:</label><text>";
        echo ini_get('memory_limit');
        echo "</text><br />";
        xpress_set_memory_limmit();
        echo "<label>change memory_limit:</label><text>";
        echo ini_get('memory_limit');
        echo "</text><br />";
        echo "<label>post_max_size:</label><text>";
        echo ini_get('post_max_size');
        echo "</text><br />";
        echo "<label>upload_max_filesize:</label><text>";
        echo ini_get('upload_max_filesize');
        echo "</text><br />";
        echo "<label>display_errors:</label><text>";
        echo ini_get('display_errors') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>MB extension:</label><text>";
        echo extension_loaded('mbstring') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>mbstring.language:</label><text>";
        echo ini_get('mbstring.language');
        echo "</text><br />";
        echo "<label>mbstring.encoding_translation:</label><text>";
        echo ini_get('mbstring.encoding_translation') ? "ON" : "OFF";
        echo "</text><br />";
        echo "<label>mbstring.internal_encoding:</label><text>";
        echo ini_get('mbstring.internal_encoding');
        echo "</text><br />";
        echo "<label>mbstring.http_input:</label><text>";
        echo ini_get('mbstring.http_input');
        echo "</text><br />";
        echo "<label>mbstring.http_output:</label><text>";
        echo ini_get('mbstring.http_output');
        echo "</text><br />";
        echo "<label>mbstring.detect_order:</label><text>";
        echo ini_get('mbstring.detect_order');
        echo "</text><br />";
        echo "<label>mbstring.substitute_character:</label><text>";
        echo ini_get('mbstring.substitute_character');
        echo "</text><br />";
        echo "<label>mbstring.func_overload:</label><text>";
        echo ini_get('mbstring.func_overload') ? "ON" : "OFF";
        echo "</text><br />";
        echo "</div>";
        echo '</legend>';
        echo "</fieldset><br />";
    }
}
Пример #3
0
    //When adding, and changing and deleting Post & Comment, block cache is refreshed by add_action at any time.
    // This Function in xpressme plugin
    require_once dirname(__FILE__) . '/xpress_block_render.php';
    xpress_unnecessary_block_cache_delete($xoops_config->module_name);
    if (is_home()) {
        xpress_block_cache_refresh($xoops_config->module_name);
        require_once dirname(__FILE__) . '/xpress_block_header.php';
        set_xpress_block_header($xoops_config->module_name);
    }
    if (ini_get('register_globals')) {
        $_SESSION = $global_session;
    }
    //restore a session erased by wp_unregister_GLOBALS
    exit;
    // The return to wp-blog-header.php is stolen here
}
if (is_admin_post_call()) {
    require_once $xoops_config->xoops_mainfile_path;
}
// for Notification_triggerEvent
if (is_xpress_comments_post_call()) {
    require_once $xoops_config->xoops_mainfile_path;
}
// for Notification_triggerEvent
xpress_set_memory_limmit();
// Set memory limmit.(Limmit Value from XPressMe modele config.)
require_once ABSPATH . 'wp-settings.php';
if (ini_get('register_globals')) {
    $_SESSION = $global_session;
}
//restore a session erased by wp_unregister_GLOBALS