<?php

ini_set("display_errors", "on");

$THIS_MODULE_NAME = "dashamail";

$DOCUMENT_ROOT = rtrim(getenv("DOCUMENT_ROOT"), "/\\");
include_once $DOCUMENT_ROOT . "/vars.inc.php";

$THIS_MODULE_FOLDER = $MODULE_FOLDER . $THIS_MODULE_NAME . "/";

require_once $ADMIN_FOLDER . "function.inc.php";
require_once $ADMIN_FOLDER . "modules/ui.php";
require_once $THIS_MODULE_FOLDER . "ui_config.php";

$lang = MAIN_LANG;
if (!$lang || !file_exists($THIS_MODULE_FOLDER . $lang . ".lang.php")) {
  $lang = "en";
}

require_once $THIS_MODULE_FOLDER . $lang . ".lang.php";

$perm->ExitIfNotAccess(NC_PERM_MODULE, 0, 0, 0, 1);

global $UI_CONFIG;
$uiconfig_name = "ui_config_module_" . $THIS_MODULE_NAME;

$MODULE_VARS = $nc_core->modules->get_module_vars();
$module_login = $MODULE_VARS['dashamail']['LOGIN'];
$module_password = $MODULE_VARS['dashamail']['PASSWORD'];
