+<?php
+ @define('CONST_ConnectionBucket_PageType', 'Status');
+
+ require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+
+ function statusError($sMsg)
+ {
+ header("HTTP/1.0 500 Internal Server Error");
+ echo "ERROR: ".$sMsg;
+ exit;
+ }
+
+ $oDB =& DB::connect(CONST_Database_DSN, false);
+ if (!$oDB || PEAR::isError($oDB))
+ {
+ statusError("No database");
+ }
+
+ $sLastUpdate = $oDB->getOne("select * from import_status");
+ if (PEAR::isError($sLastUpdate))
+ {
+ statusError("Update status unknown.");
+ }
+ echo $sLastUpdate;
+ exit;
+