Commit 9a5e9606 authored by Dries's avatar Dries
Browse files

* Reorganised a few things and fixed the theme-update bug reported by UCD.

parent e7019c25
<?
include "function.inc";
include "config.inc";
include "theme.inc";
function account_getUser($uname) {
......@@ -87,7 +85,7 @@ function showUser($uname) {
}
}
function newUser($user = "", $error="") {
function newUser($user = "", $error = "") {
global $theme;
$output .= "<FORM ACTION=\"account.php\" METHOD=post>\n";
......@@ -328,6 +326,8 @@ function account_track_comments() {
$data[signature] = $edit[signature];
dbsave("users", $data, $user->id);
user_rehash();
header("account.php");
}
showUser($user->userid);
break;
......
......@@ -24,6 +24,7 @@ function admin_header() {
<LI><A HREF="admin.php?section=bans">bans</A></LI>
<LI><A HREF="admin.php?section=logs">logs</A></LI>
<LI><A HREF="admin.php?section=stories">stories</A></LI>
<LI><A HREF="admin.php?section=info">info</A></LI>
<P>
<LI><A HREF="">home</A></LI>
</TD>
......
......@@ -375,6 +375,10 @@ function story_display($order = "date") {
print $output;
}
function info_display() {
phpinfo();
}
include "function.inc";
include "admin.inc";
......@@ -440,6 +444,8 @@ function story_display($order = "date") {
story_display();
}
break;
case "info":
info_display();
default:
print "Welcome to the adminstration page!";
}
......
<?
include "function.inc";
include "config.inc";
include "theme.inc";
include "theme.inc";
function diary_overview($num = 20) {
global $theme, $user;
......
......@@ -302,8 +302,6 @@ function comment_post($pid, $sid, $subject, $comment) {
}
}
include "function.inc";
include "config.inc";
include "theme.inc";
switch($op) {
......
<?
include "function.inc";
include "theme.inc";
$output = "
......
<?
include "config.inc";
include "database.inc";
include "log.inc";
......@@ -21,6 +20,19 @@ function dbsave($dbase, $data, $id=0) {
else { db_query("INSERT INTO $dbase SET $query") or die(mysql_error()); return mysql_insert_id(); }
}
function load_theme() {
global $user, $themes;
if ($user->theme && file_exists($themes[$user->theme][0])) {
include $themes[$user->theme][0];
}
else {
include $themes[key($themes)][0];
}
return new Theme();
}
function check_input($message) {
return str_replace("\"", "&quot;", stripslashes($message));
}
......
<?
include "function.inc";
include "theme.inc";
### Initialize/pre-process variables:
......
<?
include "function.inc";
include "theme.inc";
$theme->header();
......
<?
include "submission.inc";
include "function.inc";
include "theme.inc";
function submission_displayMain() {
......
......@@ -146,7 +146,6 @@ function submit_submit($subject, $abstract, $article, $category) {
watchdog(1, "added new submission with subject `$subject'.");
}
include "function.inc";
include "theme.inc";
switch($op) {
......
<?
include "config.inc";
include "function.inc";
include "template.inc";
global $user;
if ($user->theme && file_exists($themes[$user->theme][0])) {
include $themes[$user->theme][0];
}
else {
include $themes[key($themes)][0];
}
$theme = new Theme();
$theme = load_theme();
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment