Пример #1
0
require dirname(__FILE__) . '/utils/class.utils.debug.diff.php';
require dirname(__FILE__) . '/utils/class.utils.debug.handler.php';
require dirname(__FILE__) . '/utils/class.utils.network.php';
require dirname(__FILE__) . '/utils/class.utils.math.php';
require dirname(__FILE__) . '/utils/class.utils.trie.php';
require dirname(__FILE__) . '/utils/class.utils.trie.flatten.php';
require dirname(__FILE__) . '/utils/class.utils.trie.flatten.iterator.php';
require dirname(__FILE__) . '/utils/class.utils.trie.clip.php';
require dirname(__FILE__) . '/utils/class.utils.trie.clip.iterator.php';
require dirname(__FILE__) . '/utils/class.utils.hash.table.php';
require dirname(__FILE__) . '/utils/class.utils.system.php';
require dirname(__FILE__) . '/utils/class.utils.xml.php';
require dirname(__FILE__) . '/utils/class.utils.unit.test.php';
require dirname(__FILE__) . '/utils/class.version.check.php';
if (FOX_WP_ACTIVE) {
    $cls = new FOX_version();
    $libs_ok = $cls->allOK();
} else {
    $libs_ok = true;
}
if (!$libs_ok) {
    require dirname(__FILE__) . '/admin/class.recovery.core.php';
    /**
     * Adds the FoxFire admin menu to the WordPress "Site" admin menu
     *
     * @version 1.0
     * @since 1.0
     */
    function fox_add_recovery_admin_menu()
    {
        if (!is_super_admin()) {
Пример #2
0
    /**
     * Renders the "System Recovery" tab
     *
     * This tab rendering function creates a single tab within the admin page that its parent class generates. The tab's form
     * contains a hidden field called 'page_options'. The class's "processor" function parses the variable names in this field
     * to determine which POST data fields to load and which objects in the $bp->bpa->options[] global to update.
     *
     * @version 1.0
     * @since 1.0
     */
    function render()
    {
        $versions = new FOX_version();
        ?>

            <table class="form-table bpa-options">



	<?php 
        if (!$versions->phpOK()) {
            ?>

	    <div class="bpa-trouble-wrap">
		<div class="bpa-trouble">

		    <div class="title_block">
			<div class="bpa-graphserver-large"></div>
			<div class="Lheadline"><?php 
            _e('Your PHP Installation is Out Of Date', "foxfire");
            ?>
			</div>
			<div class="Rheadline"><?php 
            _e('Installed: ', "foxfire");
            ?>
 <?php 
            echo $versions->getPHPVersion();
            ?>
				<?php 
            _e(' | Required: ', "foxfire");
            ?>
 <?php 
            echo $versions->min_php_ver;
            ?>
			</div>
		    </div>

		    <div class="text">

			<?php 
            _e('FoxFire requires at least <b>PHP', "foxfire");
            ?>
			<?php 
            echo $versions->min_php_ver;
            ?>
			<?php 
            _e('</b>. Activating FoxFire on older versions of
			    PHP can white-screen the admin page and cause errors throughout your website.', "foxfire");
            ?>

			<?php 
            _e('Also, the current version of WordPress
			    <a href=http://wordpress.org/about/requirements/>requires PHP 5.2.4</a> or higher.
			    ...so contact your web host and tell them its time to upgrade. You can get the latest
			    distro from the official PHP <a href="http://www.php.net/downloads.php">download page</a>.', "foxfire");
            ?>
		    </div>

		</div>
	    </div>

	<?php 
        }
        ?>


	<?php 
        if (!$versions->sqlOK()) {
            ?>

	    <div class="bpa-trouble-wrap">
		<div class="bpa-trouble">

		    <div class="title_block">
			<div class="bpa-dbserver-large"></div>
			<div class="Lheadline"><?php 
            _e('Your Database Server is Out Of Date', "foxfire");
            ?>
			</div>
			<div class="Rheadline"><?php 
            _e('Installed: ', "foxfire");
            ?>
 <?php 
            echo $versions->getSQLVersion();
            ?>
				<?php 
            _e(' | Required: ', "foxfire");
            ?>
 <?php 
            echo $versions->min_sql_ver;
            ?>
			</div>
		    </div>

		    <div class="text">

			<?php 
            _e('FoxFire requires at least <b>MySQL', "foxfire");
            ?>
			<?php 
            echo $versions->min_sql_ver;
            ?>
			<?php 
            _e('</b>. Activating FoxFire on older versions
			    of MySQL could cause data corruption and errors
			    throughout your website.', "foxfire");
            ?>

			<?php 
            _e('Also, the current version of WordPress
			    <a href=http://wordpress.org/about/requirements/>requires MySQL 5.0</a> or higher.
			    ...so contact your web host and tell them its time to upgrade. You can get the latest distro
			    from the official MySQL <a href="http://www.mysql.com/downloads/mysql/">download page</a>.', "foxfire");
            ?>
		    </div>

		</div>
	    </div>
	<?php 
        }
        ?>


	<?php 
        if (!$versions->wpOK()) {
            ?>

	    <div class="bpa-trouble-wrap">
		<div class="bpa-trouble">

		    <div class="title_block">
			<div class="bpa-wp-logo-large"></div>
			<div class="Lheadline"><?php 
            _e('Your WordPress Installation is Out Of Date', "foxfire");
            ?>
			</div>
			<div class="Rheadline"><?php 
            _e('Installed: ', "foxfire");
            ?>
 <?php 
            echo $versions->getWPVersion();
            ?>
				<?php 
            _e(' | Required: ', "foxfire");
            ?>
 <?php 
            echo $versions->min_wp_ver;
            ?>
			</div>
		    </div>

		    <div class="text">

			<?php 
            _e('FoxFire requires at least <b>WP ', "foxfire");
            ?>
			<?php 
            echo $versions->min_wp_ver;
            ?>
			<?php 
            _e('</b> installed on your web server. Activating FoxFire on older versions
			    of WordPress could cause completely unpredictable results.', "foxfire");
            ?>

			<?php 
            _e('Upgrading to the latest WordPress version is fast and easy ...just use the', "foxfire");
            ?>
			<?php 
            echo '<a href="' . site_url() . '/wp-admin/update-core.php">';
            ?>
			<?php 
            _e('built-in updater</a>. You can also manually upgrade an installation, using a ZIP archive
			    from their <a href="http://wordpress.org/download/">download page</a>.', "foxfire");
            ?>
		    </div>

		</div>
	    </div>
	<?php 
        }
        ?>


	    <div class="bpa-trouble-wrap">
		<div class="bpa-trouble-outro">
		    <?php 
        _e("<b>Need Help? ...there's almost always a solution on our <a href='http://code.google.com/p/buddypress-media'>Google Code</a>\r\n\t\t\tsite, or the FoxFire <a href='http://buddypress.org/community/groups/bp-album/forum/'>support forum</a>!</b>", "foxfire");
        ?>
		</div>
	    </div>



            </table>


	    <!-- End Trouble Tab -->
	<?php 
    }
Пример #3
0
    /**
     * Renders the "Server" tab
     *
     * This tab rendering function creates a single tab within the admin page that its parent class generates. The tab's form
     * contains a hidden field called 'page_options'. The class's "processor" function parses the variable names in this field
     * to determine which POST data fields to load and which objects in the $bp->bpa->options[] global to update.
     *
     * @version 1.0
     * @since 1.0
     */
    function render()
    {
        global $fox;
        $version = new FOX_version();
        ?>

		<form name="pathsform" method="POST" action="<?php 
        echo $this->filepath . '#paths';
        ?>
" >

		    <?php 
        wp_nonce_field('fox_admin_settings');
        ?>

		    <?php 
        $fox->config->initNodesArray();
        ?>


		    <?php 
        if (FOX_EXPERT_MODE == 1) {
            $locked = '';
            $lock_status = '<div class="bpa-unlocked-small"></div>';
        } else {
            $locked = 'disabled="true"';
            $lock_status = '<div class="bpa-locked-small"></div>';
        }
        ?>

		    <div class="panel_section w25">

			<div class="title"><?php 
        _e('Server Environment', "foxfire");
        ?>
 </div>

			<div class="fox_section_advice">
			    <?php 
        _e("Your server is reporting the file paths listed below. You can override these values by defining them in your wp-config.php file,<br>\n\t\t\t\texample... <i>define( 'WP_CONTENT_URL', 'http://mysite.com/test/installs/wp-content');</i>", "foxfire");
        ?>
			</div>

			<table class="form-table">

			    <?php 
        $constants = array('PHP_OS', 'PHP_VERSION', 'WP_CONTENT_URL', 'WP_CONTENT_DIR', 'WP_PLUGIN_DIR', 'WP_PLUGIN_URL', 'FOX_FOLDER', 'FOX_URL_BASE', 'FOX_PATH_BASE');
        foreach ($constants as $const) {
            ?>
					<tr valign="top">
					    <th align="left"><?php 
            echo $const;
            ?>
</th>
					    <td>
						<input type="text" size="80"  maxlength="200" name="<?php 
            echo $const;
            ?>
" disabled="disabled"
						       value="<?php 
            echo constant($const);
            ?>
" />
					    </td>
					</tr>
				  <?php 
        }
        ?>

					<tr valign="top">
					    <th align="left"><?php 
        _e('SQL_VERSION', "foxfire");
        ?>
</th>
					    <td>
					    <input type="text" size="80" maxlength="200" name="SQL_VERSION" disabled="disabled"
					       value="<?php 
        echo $version->getSQLVersion();
        ?>
" />
					    </td>
					</tr>

					<tr valign="top">
					    <th align="left"><?php 
        _e('APACHE_VERSION', "foxfire");
        ?>
</th>
					    <td>
					    <input type="text" size="80" maxlength="200" name="APACHE_VERSION" disabled="disabled"
					       value="<?php 
        echo $version->getApacheVersion();
        ?>
" />
					    </td>
					</tr>

			</table>
		    </div>

		    <div class="panel_section w25">

			<div class="title"><?php 
        _e("PHP INFO", "foxfire");
        ?>
 </div>

			<table class="form-table">
				<tr valign="top">
				    <td>
					<?php 
        FOX_debug::php_info_dump();
        ?>
				    </td>
				</tr>
			</table>
		    </div>

		    <?php 
        $fox->config->printNodesArray();
        ?>

	    </form>

	    <!-- End Path settings -->

	<?php 
    }