function spa_render_permissions_panel($formid)
{
    ?>
	<div class="clearboth"></div>

	<div class="wrap sfatag">
		<?php 
    spa_render_sidemenu();
    ?>
		<div id='sfmsgspot'></div>
		<div id="sfmaincontainer">
			<?php 
    spa_render_permissions_container($formid);
    ?>
		</div>
			<div class="clearboth"></div>
	</div>
<?php 
}
    die;
}
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/spa-permissions-display.php';
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/support/spa-permissions-prepare.php';
include_once SF_PLUGIN_DIR . '/admin/panel-permissions/support/spa-permissions-save.php';
include_once SF_PLUGIN_DIR . '/admin/library/spa-tab-support.php';
global $adminhelpfile;
$adminhelpfile = 'admin-permissions';
# ----------------------------------
# Check Whether User Can Manage Forums
if (!sp_current_user_can('SPF Manage Permissions')) {
    spa_etext('Access denied - you do not have permission');
    die;
}
if (isset($_GET['loadform'])) {
    spa_render_permissions_container($_GET['loadform']);
    die;
}
if (isset($_GET['saveform'])) {
    if ($_GET['saveform'] == 'addperm') {
        echo spa_save_permissions_new_role();
        die;
    }
    if ($_GET['saveform'] == 'editperm') {
        echo spa_save_permissions_edit_role();
        die;
    }
    if ($_GET['saveform'] == 'delperm') {
        echo spa_save_permissions_delete_role();
        die;
    }