diff --git a/config/config.php b/config/config.php index e452d2bd..93e399fe 100644 --- a/config/config.php +++ b/config/config.php @@ -4,20 +4,11 @@ // $c->admin_email = 'andrew@catalyst.net.nz'; // $c->system_name = "Really Simple CalDAV Store"; - if ( ! $dbconn = pg_Connect("port=5433 dbname=caldav user=general") ) { - if ( ! $dbconn = pg_Connect("port=5432 dbname=caldav user=general") ) { - echo "Database Error -

Database Error

-

Could not connect to PGPool or to Postgres

- - "; - exit; - } - } + $c->pg_connect[] = 'dbname=rscds port=5433 user=general'; + $c->pg_connect[] = 'dbname=rscds port=5432 user=general'; $c->dbg['vevent'] = 1; $c->dbg['put'] = 1; $c->dbg['report'] = 1; - ?> \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 25be80b0..b0701598 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rscds (0.1.3) unstable; urgency=low + + * Hopefully now fairly much ready to install. + + -- Andrew McMillan Wed, 13 Sep 2006 14:10:31 +1200 + rscds (0.1.2) unstable; urgency=low * Add alternative depends on postgresql-client so we can install this on a diff --git a/htdocs/client_configuration_help.php b/htdocs/client_configuration_help.php new file mode 100644 index 00000000..35ada2bd --- /dev/null +++ b/htdocs/client_configuration_help.php @@ -0,0 +1,27 @@ +LoginRequired(); + +$c->title = "Really Simple CalDAV Store - Configuration Help"; +include("page-header.php"); + +$username = ( $session->user_no > 0 ? $session->username : "username" ); + +echo <<$c->title +

Evolution

+

+

    +
  1. Type:CalDAV
  2. +
  3. Name:Give the calendar a local name
  4. +
  5. URL:caldav://server.domain.name/caldav.php/$username
  6. +
  7. Use SSL:if your server is using SSL you should check this
  8. +
  9. Username:$username
  10. +
+

+EOBODY; + +include("page-header.php"); + +?> \ No newline at end of file diff --git a/htdocs/index.php b/htdocs/index.php index 1368298f..2b21499d 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -3,16 +3,17 @@ require_once("always.php"); require_once("RSCDSSession.php"); $session->LoginRequired(); -?> - - - -Really Simple CalDAV Store - - +include("page-header.php"); + + echo <<These are the admin pages... -You appear to be logged on as $session->username ($session->fullname)

"; -?> - - \ No newline at end of file +

You appear to be logged on as $session->username ($session->fullname)

+

Useful links: +

+

+EOBODY; + +include("page-footer.php"); +?> \ No newline at end of file diff --git a/htdocs/rscds.css b/htdocs/rscds.css new file mode 100644 index 00000000..4b72a177 --- /dev/null +++ b/htdocs/rscds.css @@ -0,0 +1,8 @@ +/* Basic overridable CSS for Really Simple CalDAV Store */ + +span.prompt { + font-weight: bold; + width: 12em; + padding-right: 1em; + display: block; +} \ No newline at end of file diff --git a/inc/always.php b/inc/always.php index 3b9f3b99..e349420c 100644 --- a/inc/always.php +++ b/inc/always.php @@ -58,9 +58,30 @@ else { exit; } -// In case this was forced in the configuration file +/** +* Attempt to connect to the configured connect strings +*/ +$dbconn = false; +foreach( $c->pg_connect AS $k => $v ) { + if ( !$dbconn ) $dbconn = pg_Connect($v); +} +if ( ! $dbconn ) { + echo <<Database Error +

Database Error

+

Could not connect to PGPool or to Postgres

+ + +EOERRMSG; + exit; +} + +/** +* Force the domain name to what was in the configuration file +*/ $_SERVER['SERVER_NAME'] = $c->domain_name; + if ( !function_exists('apache_request_headers') ) { function apache_request_headers() { return getallheaders(); diff --git a/inc/page-footer.php b/inc/page-footer.php index e69de29b..691287b6 100644 --- a/inc/page-footer.php +++ b/inc/page-footer.php @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/inc/page-header.php b/inc/page-header.php index e69de29b..c7212b91 100644 --- a/inc/page-header.php +++ b/inc/page-header.php @@ -0,0 +1,17 @@ +title) ) { + $c->title = "Really Simple CalDAV Store"; +} + +echo << + + +$c->title + + + +EOHDR; + +?> \ No newline at end of file diff --git a/inc/rscds_configuration_missing.php b/inc/rscds_configuration_missing.php new file mode 100644 index 00000000..c3ea6bef --- /dev/null +++ b/inc/rscds_configuration_missing.php @@ -0,0 +1,34 @@ +WRMS Not Configured +

The Bad News

+

There is no configuration file present in /etc/rscds/$_SERVER[SERVER_NAME]-conf.php so + your installation is not fully set up.

+

The Good News

+

Well, you're seeing this! At least you have RSCDS installed :-) You also have Apache and PHP working + and so really you are well on the road to success!

+

The Dubious News

+

You could try and click here and + see if that enlightens you at all. Odds are it's a fairly broken link, but it might work sooner + or later so keep downloading new versions and trying again. Or make some guesses. Or bug Andrew :-)

+

The Really Basic Help

+

The configuration file should look something like this:

+
+<?php
+//  \$c->domainname  = 'rscds.example.com';
+//  \$c->sysabbr     = 'rscds';
+//  \$c->system_name = 'Really Simple CalDAV Store';
+
+  \$c->admin_email  = 'admin@example.com';
+  \$c->pg_connect[] = 'dbname=rscds port=5432 user=general';
+
+?>
+
+

The only really essential thing there is that connect string for the database, although +configuring someone for the admin e-mail is a really good idea.

+EOBODY; + +include("page-footer.php"); +?> \ No newline at end of file diff --git a/rscds.webprj b/rscds.webprj index 035dd370..be5a119a 100644 --- a/rscds.webprj +++ b/rscds.webprj @@ -28,11 +28,14 @@ - - - - - - + + + + + + + + +