~armanelgtron/armagetron-webcp/armagetron-webcp

« back to all changes in this revision

Viewing changes to www/base.php

  • Committer: Armanelgtron
  • Date: 2021-11-19 16:20:44 UTC
  • Revision ID: armanelgtron@gmail.com-20211119162044-j4e9mlh1d1qj2ev9
move settings.php to settings.sample.php

So I don't inadvertently overwrite it later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
ini_set("short_open_tag",true);
23
23
$id = $_SESSION['logged_in'][0];
24
24
if(isset($_GET["src"])) { header("Content-Type: text/plain"); die(file_get_contents($_SERVER["SCRIPT_FILENAME"])); }
25
 
include("base/settings.php");
 
25
if(!@include("base/settings.php"))
 
26
{
 
27
        die("This control panel does not seem to be configured, yet. Please copy base/settings.sample.php to base/settings.php, and get started editing it using the instructions inside!");
 
28
}
26
29
$svr = $id;
27
30
$var = "var/"; if(isset($logins[$svr]["settingsloc"])) $var = $logins[$svr]["settingsloc"];
28
31
$ip = $_SERVER['REMOTE_ADDR'];