X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=index.php;h=bf2249bfd14920d5550c47184bd62ba7bcd57499;hb=07e403605030f5634f10582cc61ea3d2c02fa270;hp=f1b2cc1e76b57f2cce5be88fc578e2fcff7745b8;hpb=d2156630c0f3e7aca93cb72c762f713e9c8bdad3;p=dylansserver.git diff --git a/index.php b/index.php index f1b2cc1..bf2249b 100644 --- a/index.php +++ b/index.php @@ -13,10 +13,10 @@ abstract class cms { 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(); @@ -93,7 +93,7 @@ abstract class cms { $scripts - +
END_OF_NAVIGATION; @@ -454,7 +498,7 @@ END_OF_NAVIGATION; $date_posted = $entry['date_posted']; $author = $entry['author']; $text = htmlspecialchars($entry['text']); - $head = "

$author

"; + $head = "

" . htmlspecialchars($author) . "

"; echo << $head @@ -629,15 +673,15 @@ class rss extends cms { echo << - dylanstestserver.com/notes/rss - http://dylanstestserver.com/notes - dylanstestserver.com/notes/rss - + dylansserver.com/notes/rss + http://dylansserver.com/notes + dylansserver.com/notes/rss + END_OF_ENTRY; while ($entry = $result->fetch_object()) { $title = $entry->title; $date_posted = $entry->date_posted; - $url = "http://dylanstestserver.com/note/" . $entry->url; + $url = "http://dylansserver.com/note/" . $entry->url; $text = $entry->text; $text = strip_tags($text); $end_of_first_sentence = strpos($text, '.'); @@ -714,6 +758,7 @@ switch (cms::determine_type()) { case "rss": $rss = new rss(); $rss->display(); + break; case 'archive': $archive = new archive; $archive->display();