'; } else { echo ''; } if (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'; } ?>
Rocksolid Light

'; echo ''.trim(strtoupper($linkitem[0])).'  '; echo ''; } else { echo ''.trim($linkitem[0]).'  '; } } echo ''; if(isset($_COOKIE['mail_name'])) { echo '('.$_COOKIE['mail_name'].')'; } else { echo 'login'; } echo ''; ?>
'; echo ''; foreach($menulist as $menu) { if($menu[0] == '#') { continue; } $menuitem=explode(':', $menu); if($menuitem[1] == '0') { continue; } echo ''; } echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo ''; foreach($menulist as $menu) { if($menu[0] == '#') { continue; } $menuitem=explode(':', $menu); if($menuitem[1] == '0') { continue; } echo ''; } if(strlen($motd) > 0) { echo '

'.$motd.'

'; } 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'; $dbh = head_mail_db_open($database); $query = $dbh->prepare('SELECT * FROM messages where rcpt_to=:rcpt_to'); $query->execute(['rcpt_to' => $name]); $newmail = false; while (($row = $query->fetch()) !== false) { if(($row['rcpt_viewed'] != 'true') && ($row['to_hide'] !='true')) { $newmail = true; } } $dbh = null; return $newmail; } } 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, mail_viewed TEXT, rcpt_to TEXT, rcpt_viewed TEXT, rcpt_target TEXT, date TEXT, subject TEXT, message TEXT, from_hide TEXT, to_hide TEXT)"); return($dbh); } ?>