function nss_init_admin() { global $nss; $permissionError = testFilePermissions(); if ($nss->get('plugin_mode') != 'wordpress') { activatePluginMode('wordpress'); } $dynpw = NSS_WP_URL . LOGGED_IN_KEY . date('d') . AUTH_KEY; $_SESSION['nss_admin_password'] = $dynpw; if (!is_logged_in($nss)) { updatePassword($dynpw, false); } add_menu_page('neosmart-stream-admin', 'neosmart STREAM', 'manage_options', 'neosmart-stream', 'nss_dashboard', NSS_WP_URL . '/nss-core/nss-icon-16x16.png', 100.3); }
<?php if (!isset($_SESSION)) { session_start(); } /**************************************************************************** * Includes *****************************************************************************/ include 'define.php'; include NSS_ABSPATH . "nss-core/NeosmartStream.php"; include NSS_ABSPATH . "nss-admin/functions.php"; $nss = new NeosmartStream(); $permissionError = testFilePermissions(); $serverError = testServerSettings(); @(include NSS_CONFIG_BASE_URL); @(include NSS_CONFIG_LICENSE); @(include NSS_CONFIG_PASSWORD); @(include NSS_CONFIG_PLUGIN); @(include NSS_CONFIG_ERROR); $nss_root = $nss->get('nss_root'); /**************************************************************************** * Auto-Fill Base URL *****************************************************************************/ if (!$nss_root && !$permissionError) { $statusSaveBaseURL = saveBaseURL(); } /**************************************************************************** * Globals *****************************************************************************/ //Password $admin_password = $nss->get('admin_password');