X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=8cb1d62e4db4d149033f1e520d63d5f8ffbf8cfa;hb=61419ce10ec920aae29537f9bc0f8295d94baddf;hp=230b2f0cb8b554560b8ac1d2373421a5f7547dcb;hpb=21c1ef32f4de2626d3c51aefc73b638969853f7f;p=dylansserver.git diff --git a/index.php b/index.php index 230b2f0..8cb1d62 100644 --- a/index.php +++ b/index.php @@ -2,20 +2,21 @@ abstract class cms { - private $config_file = '/etc/dylanstestserver.ini'; + private $config_file = '/etc/dylansserver.ini'; protected $db; protected $recaptcha_publickey; protected $recaptcha_privatekey; + protected $scripts; public $title; public $home_link; public function __construct() { $config = parse_ini_file($this->config_file, true); $this->db = new mysqli( - $config[database]['domain'], - $config[database]['user'], - $config[database]['password'], - $config[database]['database']); + $config['database']['domain'], + $config['database']['user'], + $config['database']['password'], + $config['database']['database']); if (mysqli_connect_errno()) { echo "Problem connecting to database: "; echo mysqli_connect_error(); @@ -39,7 +40,9 @@ abstract class cms { return 'index'; } else if (isset($_GET['project'])) { return 'project'; - } else if (isset($_GET['challenge'])) { + } else if (isset($_GET['rss'])) { + return 'rss'; + } else if (isset($_GET['challenge'])) { return 'captcha'; } } @@ -69,19 +72,11 @@ abstract class cms { return $return; } - public function display_head($title = "dylanstestserver", + public function display_head($title = "dylansserver", $home_link = "/") { - $scripts = ""; + $scripts = $this->scripts; $stylesheets = ""; - if (cms::determine_type() == "index") { - $scripts = ""; - $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylanstestserver.com&ucn_task=conformance#"; - } else if ($this->determine_type() == 'note') { - $scripts = ""; - $scripts .= ""; - $scripts .= ""; - $scripts .= ""; - } + $home_link = "http://validator.w3.org/unicorn/check?ucn_uri=dylansserver.com&ucn_task=conformance#"; echo << @@ -93,16 +88,16 @@ abstract class cms { $this->title - + $stylesheets $scripts - +
@@ -140,11 +135,13 @@ END_OF_CLOSE; class index extends cms { public function display() { + $this->scripts = ""; $this->display_head(); $this->display_exhibits(); - echo "