{if $BEEZ_UI == 'True' && $BYPASS_BEEZ_UI == false}
    {include 'main_beezui.tpl'}
{else}
<div class="mailbeez_main">
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
        {if ($MAILBEEZ_MAILHIVE_ADMIN_RIGHTS == false)}
            <tr>
                <td width="100%">
                    <div class="mailbeez_main_header">
                        <table border="0" width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="pageHeading">
                                    {$HEADING_TITLE}
                                    {if (mh_cfg('MAILBEEZ_MAILHIVE_MODE'))}
                                        V. {$MAILBEEZ_VERSION}
                                        <br/>
                                        <!--
                                <div class="smallText">Mode: {$MAILBEEZ_MAILHIVE_MODE} (<a
                                        href="{$MAILBEEZ_MAILHIVE_MODE_SWITCH_URL}">{$MAILBEEZ_MAILHIVE_MODE_SWITCH_TEXT}</a>)
                                </div>
                                -->
                                    {/if}
                                    <br>
                                    {$MAILBEEZ_MAILHIVE_ADMIN_RIGHTS_TITLE}
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        {else}
            <tr>
                <td width="100%">
                    <div class="mailbeez_main_header">
                        <table border="0" width="100%" cellspacing="0" cellpadding="0">
                            <tr>
                                <td class="pageHeading">
                                    {if ($MAILBEEZ_MAILHIVE_STATUS == 'False')}
                                        <span style="color: #ff0000">OFFLINE</span>
                                    {/if}
                                    {$HEADING_TITLE}
                                    {if (mh_cfg('MAILBEEZ_MAILHIVE_MODE'))}
                                        V. {$MAILBEEZ_VERSION}

                                        {if $MAILBEEZ_MAILHIVE_CLOUDLOADER_UPDATE_CORE|default:false}
                                            <div class="update_button core">
                                                {$MAILBEEZ_MAILHIVE_CLOUDLOADER_UPDATE_CORE}
                                            </div>
                                        {/if}
                                        {if $MAILBEEZ_CHANGELOG_BOX}
                                        <span style="padding-left: 10px;">{$MAILBEEZ_CHANGELOG_BOX}</span>
                                        {/if}

                                        {if $MAILBEEZ_SWITCH_V5}
                                        <span style="padding-left: 10px;">{$MAILBEEZ_SWITCH_V5}</span>
                                        {/if}

                                        <br/>
                                    {/if}
                                </td>
                                {if mh_saas()}
                                    <td>
                                        {if $MAILBEEZ_SWITCH_V5}
                                            <div style="padding-left: 15px;"><br>{$MAILBEEZ_SWITCH_V5}</div>
                                        {/if}
                                    </td>
                                {/if}
                                <td class="pageHeading"
                                    align="right">{$ADMIN_PAGE_HEADING_SEPARATOR}

                                    {if (mh_cfg('MAILBEEZ_VERSION', 0) > 0)}
                                        <div class="mode_info {$MAILBEEZ_MAILHIVE_MODE}">{*$MAILBEEZ_VERSION_CHECK_BUTTON*}
                                            <a href="{$MAILBEEZ_MAILHIVE_MODE_SWITCH_URL}"><img
                                                        src="{$MH_CATALOG_URL}{$MH_ROOT_PATH}common/images/button_status_{$MAILBEEZ_MAILHIVE_MODE}.png"
                                                        width="24" style="float: left" border="0"></a>

                                            <div style="margin-top: 5px;">{$MAILBEEZ_MAILHIVE_MODE_TEXT|lower}</div>
                                            {if $MAILBEEZ_MAILHIVE_MODE == 'simulate'}
                                                {$MAILBEEZ_MAILHIVE_MODE_SIM_RESTART}
                                            {/if}
                                        </div>
                                    {/if}


                                    {if $MAILBEEZ_MAILHIVE_CLOUDLOADER_PACKAGE_SELECT|default:false}
                                        {$MAILBEEZ_MAILHIVE_CLOUDLOADER_PACKAGE_SELECT}
                                    {/if}
                                    {if $MAILBEEZ_MAILHIVE_CLOUDLOADER_PACKAGE_UPDATE|default:false}
                                        {$MAILBEEZ_MAILHIVE_CLOUDLOADER_PACKAGE_UPDATE}
                                    {/if}


                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="mailbeez_main_content">
                        {$MAILBEEZ_MAIN_CONTENT}
                    </div>
                </td>
            </tr>
        {/if}
    </table>
</div>
{/if}