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