From 4a6c6de758960a2f98ba58f20a1c17c6ee67111c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 10 Oct 2000 10:52:19 +0000 Subject: [PATCH] Huge update - I don't have time to write everything down but the directory structure changes, some sections are expanded. Take a look at the source code or ask me to elaborate on certain issues/topics. --- admin.inc | 45 ---- includes/admin.inc | 78 +++++++ includes/backend.inc | 241 ++++++++++++++++++++++ ban.inc => includes/ban.inc | 0 includes/calendar.inc | 76 +++++++ config.inc => includes/config.inc | 6 +- database.inc => includes/database.inc | 4 +- function.inc => includes/function.inc | 8 +- log.inc => includes/log.inc | 0 submission.inc => includes/submission.inc | 4 +- template.inc => includes/template.inc | 66 ++---- includes/theme.inc | 11 + includes/user.inc | 83 ++++++++ scripts/php-backup | 3 + scripts/php-clean | 4 + scripts/sql-backup | 7 + theme.inc | 11 - themes/marvin/marvin.theme | 44 ++-- 18 files changed, 545 insertions(+), 146 deletions(-) delete mode 100644 admin.inc create mode 100644 includes/admin.inc create mode 100644 includes/backend.inc rename ban.inc => includes/ban.inc (100%) create mode 100644 includes/calendar.inc rename config.inc => includes/config.inc (97%) rename database.inc => includes/database.inc (92%) rename function.inc => includes/function.inc (95%) rename log.inc => includes/log.inc (100%) rename submission.inc => includes/submission.inc (95%) rename template.inc => includes/template.inc (70%) create mode 100644 includes/theme.inc create mode 100644 includes/user.inc create mode 100644 scripts/php-backup create mode 100644 scripts/php-clean create mode 100644 scripts/sql-backup delete mode 100644 theme.inc diff --git a/admin.inc b/admin.inc deleted file mode 100644 index 2fafaf668cb..00000000000 --- a/admin.inc +++ /dev/null @@ -1,45 +0,0 @@ - - - - <? echo $sitename; ?> - administration - - - - - - - -
-

-

  • accounts
  • -
  • bans
  • -
  • logs
  • -
  • stories
  • -
  • info
  • -

    -

  • home
  • -
    - -
    - - - \ No newline at end of file diff --git a/includes/admin.inc b/includes/admin.inc new file mode 100644 index 00000000000..4d0ed0ddabf --- /dev/null +++ b/includes/admin.inc @@ -0,0 +1,78 @@ +
    $name\n"; + else print "
    $name\n"; +} + +function admin_header() { + global $sitename, $section, $status; + + ?> + + + <? echo $sitename; ?> administration center + + + + + + + + + + + + + + + + \n"; + print " \n"; + print " \n"; + print " \n"; + print "

    administration center

     
    status:
     
    + \n"; + print "
    $title
    \"\"
     
    $body
    \n"; + print "

    \n"; +} + +function admin_footer() { + ?> + + + + + + \ No newline at end of file diff --git a/includes/backend.inc b/includes/backend.inc new file mode 100644 index 00000000000..30f39c942d0 --- /dev/null +++ b/includes/backend.inc @@ -0,0 +1,241 @@ +id = $channel->id; + $this->site = $channel->site; + $this->file = $channel->file; + $this->url = $channel->url; + $this->contact = $channel->contact; + $this->timestamp = $channel->timestamp; + + ### Check to see whether we have to update our headlines first: + if (time() - $this->timestamp > $timout) $this->url2sql(); + + ### Read headlines: + $result = db_query("SELECT * FROM headlines WHERE id = $this->id ORDER BY number"); + while ($headline = db_fetch_object($result)) { + array_push($this->headlines, "link\">$headline->title"); + } + + } + else { + $this->site = $site; + $this->url = $url; + $this->file = $file; + $this->contact = $contact; + } + } + + ##### + # Syntax.......: rdf2sql(optional timout value in seconds); + # Description..: Reads a RDF file from a server, parses it and inserts + # the fresh data in a MySQL table. + # + function rdf2sql($timout = 10) { + if ($this->file) { + ### Decode URL: + $url = parse_url($this->file); + $host = $url[host]; + $port = $url[port] ? $url[port] : 80; + $path = $url[path]; + + // print "
    Debug: $url - $host - $port - $path
    "; + + ### Retrieve data from website: + $fp = fsockopen($host, $port, &$errno, &$errstr, $timout); + + if ($fp) { + ### Get data from URL: + fputs($fp, "GET $path HTTP/1.0\n"); + fputs($fp, "User-Agent: headline grabber\n"); + fputs($fp, "Host: ". $host ."\n"); + fputs($fp, "Accept: */*\n\n"); + + while(!feof($fp)) $data .= fgets($fp, 128); + + // print "
    $data

    "; + + if (strstr($data, "200 OK")) { + + ### Remove existing entries: + $result = db_query("DELETE FROM headlines WHERE id = $this->id"); + + ### Strip all 'junk': + $data = ereg_replace("", "", $data); + $data = ereg_replace("", $data); + $number = 0; + + for (reset($items); $item = current($items); next($items)) { + ### Extract data: + $link = ereg_replace(".*", "", $item); + $link = ereg_replace(".*", "", $link); + $title = ereg_replace(".*", "", $item); + $title = ereg_replace(".*", "", $title); + + ### Clean headlines: + $title = stripslashes(fixquotes($title)); + + ### Count the number of stories: + $number += 1; + + ### Insert item in database: + $result = db_query("INSERT INTO headlines (id, title, link, number) VALUES('$this->id', '$title', '$link', '$number')"); + } + + ### Mark channels as being updated: + $result = db_query("UPDATE channel SET timestamp = '". time() ."' WHERE id = $this->id"); + $this->timestamp = time(); + } + else print "
    RDF parser: 404 error?

    $data

    "; + } + } + } + + + ##### + # Syntax.......: rss2sql(optional timout value in seconds); + # Description..: Reads a RSS file from a server, parses it and inserts + # the fresh data in a MySQL table. + # + function rss2sql($timout = 10) { + print "backend->rss2sql : TODO
    "; + } + + + ##### + # Syntax.......: xml2sql(optional timout value in seconds); + # Description..: Reads a XML file from a server, parses it and inserts + # the fresh data in a MySQL table. + # + function xml2sql($timout = 10) { + print "backend->xml2sql : TODO
    "; + } + + + ##### + # Syntax.......: url2sql(optional timout value in seconds); + # Description..: Generic function to fetch fresh headlines. It checks whether + # we are dealing with a remote RDF, RSS or XML file and calls + # the appropriate function to fetch the headline. The function + # is an abstraction towards the programmer as he doesn't need + # to know with what file extension we are dealing. + # + function url2sql($timout = 10) { + if (strstr($this->file, ".rdf")) $this->rdf2sql($timout); + if (strstr($this->file, ".rss")) $this->rss2sql($timout); + if (strstr($this->file, ".xml")) $this->xml2sql($timout); + } + + + ##### + # Syntax.......: + # Description..: + # + function displayHeadlines($timout = 1800) { + global $theme; + + ### Get channel info: + $result = db_query("SELECT * FROM channel WHERE site = '$this->site'"); + + if ($this->id) { + + ### Check to see whether we have to update our headlines first: + if (time() - $this->timestamp > $timout) $this->url2sql(); + + ### Grab headlines from database: + $result = db_query("SELECT * FROM headlines WHERE id = $this->id ORDER BY number"); + while ($headline = db_fetch_object($result)) { + $content .= "
  • link\">$headline->title
  • "; + } + ### Add timestamp: + $update = round((time() - $this->timestamp) / 60); + $content .= "

    [ site\">hlcolor2\">reset | updated $update min. ago ]

    "; + + ### Display box: + $theme->box("$this->site", $content); + } + else print "

    Warning: something whiched happened: specified channel could not be found in database.

    "; + } + + + ##### + # Syntax.......: add() + # Description..: Adds this backend to the database. + # + function add() { + ### Add channel: + $result = db_query("INSERT INTO channel (site, file, url, contact, timestamp) VALUES ('$this->site', '$this->file', '$this->url', '$this->contact', 42)"); + } + + + ##### + # Syntax.......: delete() + # Description..: Deletes this backend + # + function delete() { + ### Delete channel: + $result = db_query("DELETE FROM channel WHERE id = $this->id"); + + ### Delete headlines: + $result = db_query("DELETE FROM headlines WHERE id = $this->id"); + } + + ##### + # Syntax.......: refresh() + # Description..: Deletes all headlines associated with this backend. + # + function refresh() { + ### Delete headlines: + $result = db_query("DELETE FROM headlines WHERE id = $this->id"); + + ### Mark channel as invalid to enforce an update: + $result = db_query("UPDATE channel SET timestamp = 42 WHERE id = $this->id"); + } + + ##### + # Syntax.......: dump() + # Description..: Dumps the content of this class to screen. + # + function dump() { + print "Dump backend:
    "; + print "Id: $this->id
    "; + print "Site: $this->site
    "; + print "URL: $this->url
    "; + print "File: $this->file
    "; + print "Contact: $this->contact
    "; + } +} + +?> diff --git a/ban.inc b/includes/ban.inc similarity index 100% rename from ban.inc rename to includes/ban.inc diff --git a/includes/calendar.inc b/includes/calendar.inc new file mode 100644 index 00000000000..561363c3343 --- /dev/null +++ b/includes/calendar.inc @@ -0,0 +1,76 @@ +date = $date; + } + + function display() { + global $PHP_SELF; + + ### Extract information from the given date: + $month = date("n", $this->date); + $year = date("Y", $this->date); + $day = date("d", $this->date); + + ### Extract first day of the month: + $first = date("w", mktime(0, 0, 0, $month, 1, $year)); + + ### Extract last day of the month: + $last = date("t", mktime(0, 0, 0, $month, 1, $year)); + + ### Calculate previous and next months dates: + $prev = mktime(0, 0, 0, $month - 1, $day, $year); + $next = mktime(0, 0, 0, $month + 1, $day, $year); + + ### Generate calendar header: + $output .= "\n\n"; + $output .= "\n"; + $output .= " \n"; + $output .= " \n"; + + ### Initialize temporary variables: + $nday = 1; + $sday = $first; + + ### Loop through all the days of the month: + while ($nday <= $last) { + ### Set up blank days for first week of the month: + if ($first) { + $output .= " \n"; + $first = 0; + } + + ### Start every week on a new line: + if ($sday == 0) $output .= " \n"; + + ### Print one cell: + $date = mktime(24, 0, 0, $month, $nday, $year); + if ($nday == $day) $output .= " \n"; + else if ($date > time()) $output .= " \n"; + else $output .= " \n"; + + ### Start every week on a new line: + if ($sday == 6) $output .= " \n"; + + ### Update temporary variables: + $sday++; + $sday = $sday % 7; + $nday++; + } + + ### Complete the calendar: + if ($sday) { + $end = 7 - $sday; + $output .= " \n \n"; + } + $output .= "
    <   ". date("F Y", $this->date) ."   >
    SMTWTFS
     
    $nday$nday$nday
     
    \n\n"; + + ### Return calendar: + return $output; + } +} + +?> diff --git a/config.inc b/includes/config.inc similarity index 97% rename from config.inc rename to includes/config.inc index 270c993f2d3..4d54bca985b 100644 --- a/config.inc +++ b/includes/config.inc @@ -9,7 +9,7 @@ $dbuname = "dries"; $dbpass = "Abc123"; $dbname = "dries"; -#$dbhost = ""; +#$dbhost = "localhost"; #$dbuname = "dries"; #$dbpass = "oakley"; #$dbname = "dries"; @@ -85,7 +85,7 @@ $themes = array("Marvin" => array( "themes/zaphod/zaphod.theme", "yellow, simple"), "UnConeD" => array( - "themes/UnConeD/theme.class.php", + "themes/unconed/unconed.theme", "gray, flashy")); # @@ -110,6 +110,6 @@ $submission_dump_threshold = "-2"; # Set to '1' if you are using Windows so the engine won't try # to send out mails and such. When using Unix or Linux, set # to '0' -$system = 0; +$mail = 0; ?> \ No newline at end of file diff --git a/database.inc b/includes/database.inc similarity index 92% rename from database.inc rename to includes/database.inc index 3a7769f656f..3721fbd6516 100644 --- a/database.inc +++ b/includes/database.inc @@ -8,9 +8,9 @@ */ function db_connect() { - include "config.inc"; + global $dbhost, $dbuname, $dbpass, $dbname; mysql_pconnect($dbhost, $dbuname, $dbpass) or die(mysql_Error()); - mysql_select_db("$dbname") or die ("Unable to select database"); + mysql_select_db($dbname) or die ("Unable to select database"); // NOTE: we are using a persistent connection! } diff --git a/function.inc b/includes/function.inc similarity index 95% rename from function.inc rename to includes/function.inc index a3fb0111a6b..de2dbaac0e6 100644 --- a/function.inc +++ b/includes/function.inc @@ -1,7 +1,7 @@ n/a") { function format_username($username, $admin = 0) { if ($username) return ($admin) ? "$username" : "$username"; - else { include "config.inc"; return $anonymous; } + else { global $anonymous; return $anonymous; } } function format_email_address($address) { diff --git a/log.inc b/includes/log.inc similarity index 100% rename from log.inc rename to includes/log.inc diff --git a/submission.inc b/includes/submission.inc similarity index 95% rename from submission.inc rename to includes/submission.inc index 11c6e61a3a9..376c8405967 100644 --- a/submission.inc +++ b/includes/submission.inc @@ -11,9 +11,7 @@ function submission_score($id) { } function submission_vote($id, $vote, $comment) { - global $user; - - include "config.inc"; + global $user, $submission_post_threshold, $submission_dump_threshold; if (!user_getHistory($user->history, "s$id")) { ### Update submission's score- and votes-field: diff --git a/template.inc b/includes/template.inc similarity index 70% rename from template.inc rename to includes/template.inc index 2b9618e96de..08d469d942e 100644 --- a/template.inc +++ b/includes/template.inc @@ -1,11 +1,11 @@ article) ? "[ id\">hlcolor2\">read more | ". strlen($story->article) ." bytes | id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]" : "[ id\">hlcolor2\">". format_plural($story->comments, "comment", "comments") ." ]"; } -function displayModerationResults($theme, $story) { +function display_moderation_results($theme, $story) { global $user; if ($user->id && $story->id && $vote = user_getHistory($user->history, "s$story->id")) { @@ -22,7 +22,7 @@ function displayModerationResults($theme, $story) { } } -function displayRelatedLinks($theme, $story) { +function display_related_links($theme, $story) { ### Parse story for -tags: $text = stripslashes("$story->abstract $story->updates $story->article"); while ($text = stristr($text, "storynum) $result = db_query("SELECT id, subject, timestamp FROM stories WHERE status = 2 ORDER BY timestamp DESC LIMIT $user->storynum, $num"); @@ -58,19 +58,22 @@ function displayOldHeadlines($theme, $num = 10) { $theme->box("Older headlines", $content); } -function displayCommentModeration($id) { +function display_comment_moderation($id, $author, $score, $votes) { global $user, $comment_votes; - if ($user && !user_getHistory($user->history, "c$id")) { + if ($user && $user->userid != $author && !user_getHistory($user->history, "c$id")) { $output .= "\n"; } + else { + $output .= "
    score:$score
    votes:$votes
    "; + } print $output; } -function displayNewDiaries($theme, $num = 20) { +function display_new_diaries($theme, $num = 20) { $result = db_query("SELECT u.userid, d.timestamp FROM diaries d LEFT JOIN users u ON d.author = u.id ORDER BY timestamp DESC LIMIT $num"); while ($diary = db_fetch_object($result)) { @@ -84,7 +87,7 @@ function displayNewDiaries($theme, $num = 20) { $theme->box("Recent diary entries", $content); } -function displayNewHeadlines($theme, $num = 10) { +function display_new_headlines($theme, $num = 10) { global $user; $content = ""; @@ -94,51 +97,16 @@ function displayNewHeadlines($theme, $num = 10) { $theme->box("Latest headlines", $content); } -function displayAdminblock($theme) { - $result = db_query("SELECT title, content FROM blocks"); - while (list($title, $content) = mysql_fetch_array($result)) { - $theme->box($title, nl2br($content)); - } -} - -function displayUserblock($theme) { - global $user; - - if ($user && $user->ublockon) { - $content .= "

    [ hlcolor2\">edit | hlcolor2\">Track comments | hlcolor2\">logout]

    "; - $theme->box("$user->userid's box", $user->content); - } -} - -function displayLogin($theme) { - global $user; - - if ($user && $user->userid) { - ### Display userblock if any: - displayUserblock(); - } - else { - $content = "
    \n"; - $content .= "

    Username:

    \n"; - $content .= "

    Password:

    \n"; - $content .= "\n"; - $content .= "
    \n"; - $content .= "

    Register as new user.
    Forgot your password?

    "; - $theme->box("Login", $content); - } -} - -function displayCalendar($theme, $date) { - include "calendar.class.php"; +function display_calendar($theme, $date) { + include "includes/calendar.inc"; $calendar = new calendar($date); $theme->box("Browse archives", $calendar->display()); } -function displayAccount($theme) { +function display_account($theme) { global $user; if ($user && $user->userid) { - function submission_number() { $result = db_query("SELECT COUNT(id) FROM stories WHERE status = 1"); return ($result) ? mysql_result($result, 0) : 0; @@ -157,10 +125,4 @@ function displayAccount($theme) { } } -function displayPoll($theme) { - global $answer, $answer1, $answer2, $answer3, $answer4, $answer5, $answer6, $id, $method, $section, $poll, $question; - // Pass the URI and FORM parameters along to poll.php. - $box = 1; - include "poll.php"; -} ?> diff --git a/includes/theme.inc b/includes/theme.inc new file mode 100644 index 00000000000..93c6b62ffe5 --- /dev/null +++ b/includes/theme.inc @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/includes/user.inc b/includes/user.inc new file mode 100644 index 00000000000..115c940c0bc --- /dev/null +++ b/includes/user.inc @@ -0,0 +1,83 @@ + 0x00000001, + "User manager" => 0x00000002, + "News manager" => 0x00000004); + +class User { + function User($userid, $passwd="") { + $result = db_query("SELECT * FROM users WHERE LOWER(userid) = LOWER('$userid') && passwd = PASSWORD('$passwd') && STATUS = 0"); + if (db_num_rows($result) == 1) { + foreach (db_fetch_row($result) as $key=>$value) { $field = mysql_field_name($result, $key); $this->$field = stripslashes($value); $this->field[] = $field; } + } + } +} + +function user_save() { + global $user; + ### Compose query to update user record: +} + +function user_rehash() { + global $user; + $result = db_query("SELECT * FROM users WHERE id=$user->id"); + if (db_num_rows($result) == 1) { + foreach (db_fetch_array($result) as $key=>$value) { $user->$key = stripslashes($value); } + } +} + +function user_valid($access = 0) { + global $user; + if ($user->userid) { + user_rehash(); // synchronisation purpose + $user->last_access = time(); + $user->last_host = ($GLOBALS[REMOTE_HOST]) ? $GLOBALS[REMOTE_HOST] : $GLOBALS[REMOTE_ADDR]; + db_query("UPDATE users SET last_access = '$user->last_access', last_host = '$user->last_host' WHERE id = $user->id"); + if ($user->access & $access || $access == 0) return 1; + } + return 0; +} + +function user_getHistory($history, $field) { + $data = explode(";", $history); + for (reset($data); current($data); next($data)) { + $entry = explode(":", current($data)); + if (reset($entry) == $field) $rval = end($entry); + } + return $rval; +} + +function user_setHistory(&$user, $field, $value) { + + $history = $user->history; + if (!$value) { + ### remove entry: + $data = explode(";", $history); + for (reset($data); current($data); next($data)) { + $entry = explode(":", current($data)); + if ($entry[0] != $field) $rval .= "$entry[0]:$entry[1];"; + } + } + else if (strstr($history, "$field:")) { + ### found: update exsisting entry: + $data = explode(";", $history); + for (reset($data); current($data); next($data)) { + $entry = explode(":", current($data)); + if ($entry[0] == $field) $entry[1] = $value; + $rval .= "$entry[0]:$entry[1];"; + } + } + else { + ### not found: add new entry: + $rval = "$history$field:$value;"; + } + $user->history = $rval; + + ### save new history: + $query .= "UPDATE users SET "; + foreach ($user->field as $key=>$field) { $value = $user->$field; $query .= "$field = '". addslashes($value) ."', "; } + $query .= " id = $user->id WHERE id = $user->id"; + db_query($query); +} + +?> diff --git a/scripts/php-backup b/scripts/php-backup new file mode 100644 index 00000000000..a1848162851 --- /dev/null +++ b/scripts/php-backup @@ -0,0 +1,3 @@ +#!/bin/sh + +tar -zcf drop.tgz * diff --git a/scripts/php-clean b/scripts/php-clean new file mode 100644 index 00000000000..998f0f08dcb --- /dev/null +++ b/scripts/php-clean @@ -0,0 +1,4 @@ +#!/bin/sh + +find . -name "*~" | xargs rm -f +find . -name "DEADJOE" | xargs rm -f diff --git a/scripts/sql-backup b/scripts/sql-backup new file mode 100644 index 00000000000..edca9b00652 --- /dev/null +++ b/scripts/sql-backup @@ -0,0 +1,7 @@ +#!/bin/sh + +username="dries" +database="dries" +hostname="dione" + +mysqldump -h $hostname -u $username -p $database > mysql-backup diff --git a/theme.inc b/theme.inc deleted file mode 100644 index 9d0b5a0a66c..00000000000 --- a/theme.inc +++ /dev/null @@ -1,11 +0,0 @@ - \ No newline at end of file diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme index bbceb6f9ac6..c36830f3863 100644 --- a/themes/marvin/marvin.theme +++ b/themes/marvin/marvin.theme @@ -20,10 +20,11 @@ # Syntax.......: header($title); # Description..: a function to draw the page header. function header($title) { + global $sitename; ?> - <? include "config.inc"; print $sitename; ?> + <? print $sitename; ?> @@ -52,8 +53,6 @@ # Description..: a function to draw an abstract story box, that is the # boxes displayed on the main page. function abstract($story) { - include "config.inc"; - $story->timestamp = date("l, F d, Y - h:i:s A", $story->timestamp); print "\n\n"; @@ -84,8 +83,6 @@ # comments). It's what you get when you followed for # instance one of read-more links on the main page. function article($story, $reply) { - include "config.inc"; - $story->timestamp = date("l, F d, Y - h:i:s A", $story->timestamp); print "\n\n"; @@ -179,9 +176,7 @@ ###### # Syntax.......: comment(...); # Description..: this function is used to theme user comments. - function comment($poster, $subject, $comment, $timestamp, $url, $email, $score, $cid, $link, $thread = "") { - include "config.inc"; - + function comment($poster, $subject, $comment, $timestamp, $url, $email, $score, $votes, $cid, $link, $thread = "") { print "\n\n"; print "\n"; @@ -201,7 +196,7 @@ ### Moderation: print " \n"; - displayCommentModeration($cid); + display_comment_moderation($cid, $poster, $score, $votes); print " \n"; print " \n"; @@ -241,8 +236,6 @@ # news, when an editor wants to post news, when people # check the entries in the sumbission queue, etc. function preview($author, $subject, $abstract, $updates, $article, $timestamp, $category, $department) { - include "config.inc"; - print ""; print " "; print " "; @@ -269,7 +262,6 @@ # Syntax.......: box($subject, $body); # Description..: a function to draw a box/block. function box($subject, $content) { - include "config.inc"; print "\n\n"; print "
    $subject
    \"\"
    \n"; print " \n"; @@ -298,35 +290,35 @@ global $user, $date; ### Display account: - displayAccount($this); + display_account($this); ### Display calendar: - displayOldHeadlines($this); + display_old_headlines($this); ### Display calendar: - displayCalendar($this, $date); + display_calendar($this, $date); ### Display new diary entries: - displayNewDiaries($this); + display_new_diaries($this); } elseif (strstr($PHP_SELF, "account.php")) { ### Display account: - displayAccount($this); + display_account($this); } elseif (strstr($PHP_SELF, "diary.php")) { ### Display account: - displayAccount($this); + display_account($this); ### Display new diary entries: - displayNewDiaries($this); + display_new_diaries($this); } elseif (strstr($PHP_SELF, "submission.php")) { ### Display account: - displayAccount($this); + display_account($this); } elseif (strstr($PHP_SELF, "submit.php")) { ### Display new headlines: - displayNewHeadlines($this); + display_new_headlines($this); } elseif (strstr($PHP_SELF, "discussion.php")) { global $id; @@ -334,24 +326,24 @@ if ($id && $story = id2story($id)) { if ($story->status == 2) { ### Display new headlines: - displayNewHeadlines($this); + display_new_headlines($this); } else { ### Display results of moderation: - displayModerationResults($this, $story); + display_moderation_results($this, $story); } } else { ### Display account: - displayAccount($this); + display_account($this); ### Display new headlines: - displayNewHeadlines($this); + display_new_headlines($this); } } else { ### Display new headlines: - displayNewHeadlines($this); + display_new_headlines($this); } ?>