[270489] Need a simple MOTD functionality
diff --git a/html/babel.css b/html/babel.css
index 50c90b3..9bf03c4 100644
--- a/html/babel.css
+++ b/html/babel.css
@@ -1092,6 +1092,16 @@
text-decoration: underline;
}
+#motd {
+ position: relative;
+ width: 700px;
+ margin: 10px auto 10px auto;
+ border: 1px solid darkred;
+ background-color: LightGoldenRodYellow;
+ padding: 3px;
+ }
+
+
#trans-progress-area{
position: absolute;
left: auto;
diff --git a/html/fragments/motd.php b/html/fragments/motd.php
new file mode 100644
index 0000000..e2db98c
--- /dev/null
+++ b/html/fragments/motd.php
@@ -0,0 +1,24 @@
+<?php
+/*******************************************************************************
+ * Copyright (c) 2009 Eclipse Foundation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eclipse Foundation - initial API and implementation
+*******************************************************************************/
+
+require_once("frag_global.php");
+
+$query = "SELECT value FROM sys_values WHERE itemid = 'MOTD' AND value IS NOT NULL AND value <> '' LIMIT 1";
+
+if ($res = mysql_query($query)) {
+ if ($row = mysql_fetch_assoc($res)) {
+ echo "<div id='motd'>";
+ echo $row['value'];
+ echo "</div>";
+ }
+}
+?>
\ No newline at end of file
diff --git a/html/index.php b/html/index.php
index 3ac3c8b..ee57c88 100644
--- a/html/index.php
+++ b/html/index.php
@@ -18,13 +18,13 @@
global $addon;
$addon->callHook("head");
-
?>
<h1 id="page-message">Welcome to the Babel Project</h1>
+<? include("fragments/motd.php");?>
<div id="index-page" style='width: 510px; padding-right: 190px;'>
<div style='float: right;height: 290px; border: 0px solid red;'>
<? include("fragments/language_progress.php");?>
- <? include("fragments/top_translators.php");?>
+ <? include("fragments/top_translators.php");?>
</div>
<div style='float: left;border: 0px solid red;'>
diff --git a/html/translate.php b/html/translate.php
index b6f07f1..f9c7081 100644
--- a/html/translate.php
+++ b/html/translate.php
@@ -51,6 +51,7 @@
?>
<h1 id="page-message">Welcome to the Babel Project</h1>
+<? include("fragments/motd.php");?>
<div id="contentArea">
<h2>Languages / Projects / Versions / Files</h2>