2022-05-19 14:59:32 +00:00
|
|
|
<?php
|
|
|
|
|
2022-05-19 22:15:13 +00:00
|
|
|
define("CONF", parse_ini_file(__DIR__ . "/../config.ini", true, INI_SCANNER_TYPED));
|
|
|
|
|
|
|
|
define("SERVICE", substr(dirname($_SERVER['PHP_SELF']), strlen(CONF['common']['prefix']) + 1));
|
2022-05-19 14:59:32 +00:00
|
|
|
define("PAGE", basename($_SERVER['PHP_SELF'], '.php'));
|
2022-05-19 22:15:13 +00:00
|
|
|
define("DB_PATH", CONF['common']['root_path'] . "/db/niver.db"); // Niver's SQLite database
|
2022-05-19 14:59:32 +00:00
|
|
|
|
2022-05-31 17:12:14 +00:00
|
|
|
// Page titles definition
|
|
|
|
require "pages.php";
|
|
|
|
|
|
|
|
require CONF['common']['root_path'] . "/fn/common.php";
|
2022-05-19 14:59:32 +00:00
|
|
|
// Service-specific functions and constants
|
|
|
|
if (SERVICE === "reg" OR SERVICE === "ns")
|
2022-05-31 17:12:14 +00:00
|
|
|
require CONF['common']['root_path'] . "/fn/dns.php";
|
2022-05-19 14:59:32 +00:00
|
|
|
if (SERVICE !== "")
|
2022-05-31 17:12:14 +00:00
|
|
|
require CONF['common']['root_path'] . "/fn/" . SERVICE . ".php";
|
2022-05-20 00:19:45 +00:00
|
|
|
|
2022-05-31 15:31:48 +00:00
|
|
|
function success($msg) {
|
|
|
|
echo "<p><strong>Succès</strong> : <em>" . $msg . "</em></p>";
|
|
|
|
closeHTML();
|
|
|
|
}
|