summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend.php23
-rw-r--r--config.php-dist2
-rw-r--r--prefs.php4
-rw-r--r--tt-rss.css28
-rw-r--r--tt-rss.php2
5 files changed, 52 insertions, 7 deletions
diff --git a/backend.php b/backend.php
index 8e0eeb007..6529c6b39 100644
--- a/backend.php
+++ b/backend.php
@@ -5,8 +5,17 @@
require_once "functions.php";
require_once "magpierss/rss_fetch.inc";
+ error_reporting(0);
+
$link = pg_connect(DB_CONN);
+ error_reporting (E_ERROR | E_WARNING | E_PARSE);
+
+ if (!$link) {
+ print "Could not connect to database. Please check local configuration.";
+ return;
+ }
+
pg_query("set client_encoding = 'utf-8'");
$op = $_GET["op"];
@@ -131,15 +140,23 @@
$line = pg_fetch_assoc($result);
- print "<table class=\"feedOverview\">";
+/* print "<table class=\"feedOverview\">";
print "<tr><td><b>Title:</b></td><td>".$line["title"]."</td></tr>";
print "<tr><td><b>Link:</b></td><td><a href=\"".$line["link"]."\">".$line["link"]."</a></td></tr>";
-
print "</table>";
- print $line["content"];
+ print $line["content"]; */
+ print "<table class=\"postTable\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\">";
+ print "<tr class=\"titleTop\"><td align=\"right\"><b>Title:</b></td>
+ <td width=\"100%\">".$line["title"]."</td></tr>";
+
+ print "<tr class=\"titleBottom\"><td align=\"right\"><b>Link:</b></td>
+ <td><a href=\"".$line["link"]."\">".$line["link"]."</a></td></tr>";
+
+ print "<tr><td class=\"post\" colspan=\"2\">" . $line["content"] . "</td></tr>";
+ print "</table>";
}
}
diff --git a/config.php-dist b/config.php-dist
index fae328172..c7b3a55bd 100644
--- a/config.php-dist
+++ b/config.php-dist
@@ -1,9 +1,9 @@
<?
+ define(VERSION, "0.2-pre");
define(DB_CONN, "host=localhost dbname=fox user=fox password=XXXXXXXXXXX");
define('MAGPIE_CACHE_DIR', '/var/tmp/magpie-ttrss-cache');
define(HEADLINES_PER_PAGE, 15);
define(MIN_UPDATE_TIME, 1800);
define(WEB_DEMO_MODE, false);
-
?>
diff --git a/prefs.php b/prefs.php
index 1d3755a60..1a85bf3c4 100644
--- a/prefs.php
+++ b/prefs.php
@@ -9,6 +9,8 @@
<body onload="init()">
+<? require_once "config.php" ?>
+
<table width="100%" height="100%" cellspacing=0 cellpadding=0 class="main">
<tr>
<td class="header" valign="middle" colspan="2">
@@ -51,7 +53,7 @@
</tr>
<tr>
<td colspan="2" class="notify">
- <a href="">Tiny-Tiny RSS</a> v0.1 &copy; 2005 Andrew Dolgov
+ <a href="">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
</td>
</td>
</table>
diff --git a/tt-rss.css b/tt-rss.css
index ed326aa47..6fcd5537b 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -151,7 +151,7 @@ table.main td.prefContent {
}
table.main td.content {
- padding : 10px;
+ padding : 0px;
border-width : 1px 0px 0px 0px;
border-color : #c0c0c0;
border-style : solid;
@@ -293,4 +293,30 @@ td.headlineUpdateMark {
text-align : center;
}
+div.errorBox {
+ border : 1px solid #c0c0c0;
+ padding : 20px;
+ margin : 20px;
+ background : #f0f0f0;
+}
+
+table.postTable tr.titleTop, table.postTable tr.titleBottom {
+ background : #f0f0f0;
+}
+
+table.postTable tr.titleTop td {
+ padding : 5px 10px 0px 10px;
+}
+
+table.postTable tr.titleBottom td {
+ padding : 3px 10px 5px 10px;
+ border-width : 0px 0px 1px 0px;
+ border-color : #d0d0d0;
+ border-style : solid;
+}
+
+table.postTable td.post {
+ padding : 20px;
+
+}
diff --git a/tt-rss.php b/tt-rss.php
index aa9e95570..3eeadaf5b 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -40,7 +40,7 @@
</tr>
<tr>
<td colspan="2" class="notify">
- <a href="">Tiny-Tiny RSS</a> v0.2-pre &copy; 2005 Andrew Dolgov
+ <a href="">Tiny-Tiny RSS</a> v<?= VERSION ?> &copy; 2005 Andrew Dolgov
<? if (WEB_DEMO_MODE) { ?>
<br>Running in demo mode, some functionality is disabled.
<? } ?>