20 lines
757 B
PHP
20 lines
757 B
PHP
|
<?php
|
||
|
|
||
|
define("DOMAIN_EXAMPLE", "example"); // From RFC2606: Reserved Top Level DNS Names > 2. TLDs for Testing, & Documentation Examples
|
||
|
define("PREFIX", ""); // Prefix in URL, if any
|
||
|
define("ROOT_PATH", "/srv/php/niver"); // niver-php directory
|
||
|
define("SERVICE", substr(dirname($_SERVER['PHP_SELF']), strlen(PREFIX) + 1));
|
||
|
define("PAGE", basename($_SERVER['PHP_SELF'], '.php'));
|
||
|
define("DB_PATH", ROOT_PATH . "/db/niver.db"); // Niver's SQLite database
|
||
|
define("SUDO_PATH", "/usr/bin/sudo");
|
||
|
define("HT_PATH", "/srv/ht");
|
||
|
|
||
|
// Service-specific functions and constants
|
||
|
if (SERVICE === "reg" OR SERVICE === "ns")
|
||
|
require ROOT_PATH . "/dns.php";
|
||
|
if (SERVICE !== "")
|
||
|
require ROOT_PATH . "/" . SERVICE . ".php";
|
||
|
|
||
|
// Page titles definition
|
||
|
require "pages.php";
|