Ejemplo n.º 1
0
function sixscan_menu_install()
{
    /*	We show the amount of non-fixed vulnerabilities near 6Scan icon. If there are 0 - we do not show anything */
    $vulnerability_count = get_option(SIXSCAN_OPTION_VULNERABITILY_COUNT);
    if ($vulnerability_count == 0) {
        $sixscan_menu_title = "6Scan";
    } else {
        /*	Only way to show number near menu is to use the same class, that is used by Plugins menu (when showing how many plugins are out of date ) */
        $sixscan_menu_title = "6Scan<span class='update-plugins count-" . $vulnerability_count . "'><span class='plugin-count'>" . number_format_i18n($vulnerability_count) . "</span></span>";
    }
    if (isset($_GET['sixscan_activated']) && $_GET['sixscan_activated'] == '1' || isset($_GET['activate']) && $_GET['activate'] == 'true' && sixscan_common_is_account_active() == FALSE) {
        $sixscan_menu_title .= sixscan_installation_error_description('OK', '', 'REGISTER_STARTED', '0');
    }
    add_menu_page('6Scan', $sixscan_menu_title, 'manage_options', SIXSCAN_COMMON_DASHBOARD_URL, '', SIXSCAN_PLUGIN_URL . 'data/img/logo_small.png');
    add_submenu_page(SIXSCAN_COMMON_DASHBOARD_URL, '6Scan Dashboard', 'Dashboard', 'manage_options', SIXSCAN_COMMON_DASHBOARD_URL, 'sixscan_menu_dashboard');
    if (sixscan_common_is_account_operational() == TRUE) {
        add_submenu_page(SIXSCAN_COMMON_DASHBOARD_URL, '6Scan Settings', 'Settings', 'manage_options', SIXSCAN_COMMON_SETTINGS_URL, 'sixscan_menu_settings');
    }
    add_submenu_page(SIXSCAN_COMMON_DASHBOARD_URL, '6Scan Support', 'Support', 'manage_options', SIXSCAN_COMMON_SUPPORT_URL, 'sixscan_menu_support');
}
Ejemplo n.º 2
0
function sixscan_installation_account_setup_required_notice()
{
    /*	Show the notice "Don't forget to register" , only if we are not registered , we are not on the register page 
    		and this is not a partner installed version*/
    if (sixscan_common_is_account_operational() == FALSE && $_GET['page'] != SIXSCAN_COMMON_DASHBOARD_URL && sixscan_common_is_partner_version() == FALSE) {
        echo '<div id="6scan_dashboard_redirect_caption" class="updated" style="text-align: center;"><p><p>6Scan: In order to enable protection, please <a href="admin.php?page=' . SIXSCAN_COMMON_DASHBOARD_URL . '">create your account</a> now.</p></p></div>';
    }
}