/**
 * Supported Plugins admin screen
 *
 * @since 1.0
 */
function dpa_supported_plugins()
{
    // See if a cookie has been set to remember which view the user was on last. Defaults to 'grid'.
    if (!empty($_COOKIE['dpa_sp_view']) && in_array($_COOKIE['dpa_sp_view'], array('detail', 'list', 'grid'))) {
        $view = $_COOKIE['dpa_sp_view'];
    } else {
        $view = 'grid';
    }
    ?>

	<div class="wrap">
		<?php 
    screen_icon('options-general');
    ?>
		<h2><?php 
    _e('Supported Plugins', 'dpa');
    ?>
</h2>

		<div id="poststuff">
			<div id="post-body">
				<div id="post-body-content">
					<?php 
    dpa_supported_plugins_header();
    ?>

					<div class="detail <?php 
    if ('detail' == $view) {
        echo 'current';
    }
    ?>
"><?php 
    dpa_supported_plugins_detail();
    ?>
</div>
					<div class="list <?php 
    if ('list' == $view) {
        echo 'current';
    }
    ?>
"><?php 
    dpa_supported_plugins_list();
    ?>
</div>
					<div class="grid <?php 
    if ('grid' == $view) {
        echo 'current';
    }
    ?>
"><?php 
    dpa_supported_plugins_grid();
    ?>
</div>
				</div>
			</div><!-- #post-body -->

		</div><!-- #poststuff -->
	</div><!-- .wrap -->

<?php 
}
/**
 * Supported Plugins admin screen
 *
 * @since Achievements (3.0)
 */
function dpa_supported_plugins()
{
    // Get current view of the Supported Plugins screen
    $view = dpa_supported_plugins_get_view();
    ?>
	<div class="wrap">

		<?php 
    screen_icon('options-general');
    ?>
		<h2><?php 
    _e('Supported Plugins', 'achievements');
    ?>
</h2>

		<div id="poststuff">
			<div id="post-body">
				<div id="post-body-content">
					<?php 
    dpa_supported_plugins_header();
    ?>

					<?php 
    if ('detail' === $view) {
        ?>
						<div class="detail"><?php 
        dpa_supported_plugins_detail();
        ?>
</div>

					<?php 
    } elseif ('grid' === $view) {
        ?>
						<div class="grid"><?php 
        dpa_supported_plugins_grid();
        ?>
</div>

					<?php 
    } elseif ('list' === $view) {
        ?>
						<div class="list"><?php 
        dpa_supported_plugins_list();
        ?>
</div>

					<?php 
    }
    ?>
				</div>
			</div><!-- #post-body -->
		</div><!-- #poststuff -->

	</div><!-- .wrap -->
<?php 
}