diff --git a/Rocksolid_Light/common/header.php b/Rocksolid_Light/common/header.php
index f705e41..1bb9ae0 100644
--- a/Rocksolid_Light/common/header.php
+++ b/Rocksolid_Light/common/header.php
@@ -1,13 +1,13 @@
-
+
@@ -17,173 +17,156 @@ $CONFIG = include $config_file;
';
+if (isset($_SESSION['theme'])) {
+ // if(trim($_SESSION['theme']) !== '') {
+ echo '';
} else {
- echo '';
+ echo '';
}
-if ((isset($_SESSION['theme'])) && file_exists($rootdir.'common/themes/'.$_SESSION['theme'].'/images/rocksolidlight.png')) {
- $header_image=$rootdir.'common/themes/'.$_SESSION['theme'].'/images/rocksolidlight.png';
+if ((isset($_SESSION['theme'])) && file_exists($rootdir . 'common/themes/' . $_SESSION['theme'] . '/images/rocksolidlight.png')) {
+ $header_image = $rootdir . 'common/themes/' . $_SESSION['theme'] . '/images/rocksolidlight.png';
} else {
- $header_image=$rootdir.'common/images/rocksolidlight.png';
+ $header_image = $rootdir . 'common/images/rocksolidlight.png';
}
?>
-
-
';
echo '';
-foreach($menulist as $menu) {
- if($menu[0] == '#') {
- continue;
+foreach ($menulist as $menu) {
+ if ($menu[0] == '#') {
+ continue;
}
- $menuitem=explode(':', $menu);
- if($menuitem[1] == '0') {
- continue;
+ $menuitem = explode(':', $menu);
+ if ($menuitem[1] == '0') {
+ continue;
}
- if(!isset($frame['menu'])) {
+ if (! isset($frame['menu'])) {
$frame['menu'] = null;
}
echo '';
- echo '';
echo ' | ';
}
- echo '
';
+echo '
';
echo '
';
- echo '';
-function check_unread_mail() {
- global $CONFIG, $spooldir;
- if(isset($_COOKIE['mail_name'])) {
- $name = strtolower($_COOKIE['mail_name']);
- $database = $spooldir.'/mail.db3';
- if(is_file($database)) {
+if (strlen($motd) > 0) {
+ echo '' . $motd . '
';
+}
+echo '';
+echo '';
+
+function check_unread_mail()
+{
+ global $CONFIG, $spooldir;
+ if (isset($_COOKIE['mail_name'])) {
+ $name = strtolower($_COOKIE['mail_name']);
+ $database = $spooldir . '/mail.db3';
+ if (is_file($database)) {
$dbh = head_mail_db_open($database);
$query = $dbh->prepare('SELECT * FROM messages where rcpt_to=:rcpt_to');
- $query->execute(['rcpt_to' => $name]);
+ $query->execute([
+ 'rcpt_to' => $name
+ ]);
$newmail = false;
while (($row = $query->fetch()) !== false) {
- if(($row['rcpt_viewed'] != 'true') && ($row['to_hide'] !='true')) {
- $newmail = true;
- }
+ if (($row['rcpt_viewed'] != 'true') && ($row['to_hide'] != 'true')) {
+ $newmail = true;
+ }
}
$dbh = null;
return $newmail;
- } else {
+ } else {
return false;
}
}
}
-function head_mail_db_open($database, $table='messages') {
- try {
- $dbh = new PDO('sqlite:'.$database);
- } catch (PDOExeption $e) {
- echo 'Connection failed: '.$e->getMessage();
- exit;
- }
- $dbh->exec("CREATE TABLE IF NOT EXISTS messages(
+function head_mail_db_open($database, $table = 'messages')
+{
+ try {
+ $dbh = new PDO('sqlite:' . $database);
+ } catch (PDOExeption $e) {
+ echo 'Connection failed: ' . $e->getMessage();
+ exit();
+ }
+ $dbh->exec("CREATE TABLE IF NOT EXISTS messages(
id INTEGER PRIMARY KEY,
msgid TEXT UNIQUE,
mail_from TEXT,
@@ -196,7 +179,8 @@ function head_mail_db_open($database, $table='messages') {
message TEXT,
from_hide TEXT,
to_hide TEXT)");
- return($dbh);
+ return ($dbh);
}
?>
-
+
+
diff --git a/Rocksolid_Light/rslight/fortunes.conf b/Rocksolid_Light/rslight/fortunes.conf
new file mode 100644
index 0000000..f14e323
--- /dev/null
+++ b/Rocksolid_Light/rslight/fortunes.conf
@@ -0,0 +1,30 @@
+