summaryrefslogtreecommitdiff
path: root/tpl/general/top.php
diff options
context:
space:
mode:
authorNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 16:48:29 +0200
committerNicolas BERNSTEIN <alexis211@gmail.com>2011-09-17 16:48:29 +0200
commitd0060968b77c39bdf8abffb071c971c166b59edb (patch)
tree0be52e00a25bd298235a0cf916fb07496d3ab95f /tpl/general/top.php
downloadBits-d0060968b77c39bdf8abffb071c971c166b59edb.tar.gz
Bits-d0060968b77c39bdf8abffb071c971c166b59edb.zip
First commit.
Diffstat (limited to 'tpl/general/top.php')
-rw-r--r--tpl/general/top.php43
1 files changed, 43 insertions, 0 deletions
diff --git a/tpl/general/top.php b/tpl/general/top.php
new file mode 100644
index 0000000..e87e466
--- /dev/null
+++ b/tpl/general/top.php
@@ -0,0 +1,43 @@
+<?php
+global $user, $apps; //These might be hidden because this page is called from sql();
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title><?php echo $title; ?></title>
+ <link href="design/style.css" rel="stylesheet" type="text/css" media="screen" />
+ </head>
+
+ <body>
+ <div class="menu">
+ <div class="right">
+ <?php
+if ($user['id'] == 0) {
+ echo '<a href="new-account">Register</a><a href="?login">Login</a>';
+} else {
+ echo '<a href="user-notes-' . $user['id'] . '">My notebook</a><a href="?logout">Logout (' . $user['name'] . ')</a>';
+}
+?>
+ </div>
+ <div class="left">
+ <a href="notes">Notebooks</a>
+ <?php
+if ($user['id'] != 0) {
+ echo '<a href="image">Uploaded images</a>';
+} elseif ($user['priv'] >= $apps['image']['upload']) {
+ echo '<a href="upload-image">Upload image</a>';
+}
+?>
+ </div>
+ <div style="clear: both;"></div>
+ </div>
+
+ <div class="contents-right">
+
+ <h1><?php echo $title; ?></h1>
+
+<?php
+if (isset($message)) echo '<div class="message">' . $message . "</div>\n";
+if (isset($error)) echo '<div class="error">' . $error . "</div>\n";
+