Include page titles in html title
Former-commit-id: a84e9481e0b4d39ba1e6e3776c3376af25f26ed3
--- a/about.php
+++ b/about.php
@@ -1,16 +1,15 @@
<?php
include_once('include/common.inc.php');
-include_header();
+include_header('About');
?>
<div class="foundation-header">
<h1><a href="about.php">About/FAQ</a></h1>
<h4 class="subheader">Lorem ipsum.</h4>
</div>
<h2> What is this? </h2>
-Disclosr is a project to monitor Australian Federal Government agencies
+Disclo.gs is a project to monitor Australian Federal Government agencies
compliance with their <a href="http://www.oaic.gov.au/publications/other_operational/foi_policy_frequently_asked_questions.html#_Toc291837571">"proactive disclosure requirements"</a>.
-OGRE (Open Government Realization Evaluation) is a ranking of compliance with these requirements.
-Prometheus is the agent which polls agency websites to assess compliance.
+
<h2> Open everything </h2>
All documents released CC-BY 3 AU
--- a/charts.php
+++ b/charts.php
@@ -1,6 +1,6 @@
<?php
include_once('include/common.inc.php');
-include_header();
+include_header('Charts');
$db = $server->get_db('disclosr-agencies');
?>
<div class="foundation-header">
--- a/getAgency.php
+++ b/getAgency.php
@@ -1,7 +1,7 @@
<?php
include_once('include/common.inc.php');
-include_header();
+
function displayValue($key, $value, $mode) {
global $db, $schemas;
@@ -108,6 +108,7 @@
// edit?
$obj = $db->get($_REQUEST['id']);
+ include_header($obj->name);
//print_r($row);
if (sizeof($_POST) > 0) {
//print_r($_POST);
@@ -137,7 +138,7 @@
}
}
- $mode = "edit";
+ $mode = "view";
$rowArray = object_to_array($obj);
ksort($rowArray);
if ($mode == "edit") {
@@ -185,7 +186,8 @@
echo '<input id="submitbutton" type="submit"/></form>';
}
} else {
-
+// show all list
+ include_header('Agencies');
try {
/* $rows = $db->get_view("app", "showNamesABNs")->rows;
//print_r($rows);
--- /dev/null
+++ b/google676a414ad086cefb.html
@@ -1,1 +1,2 @@
+google-site-verification: google676a414ad086cefb.html
--- a/include/common.inc.php
+++ b/include/common.inc.php
@@ -51,6 +51,9 @@
function phrase_to_tag ($phrase) {
return str_replace(" ","_",str_replace("'","",str_replace(",","",strtolower($phrase))));
}
+function local_url() {
+ return "http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/";
+}
function GetDomain($url)
{
$nowww = ereg_replace('www\.','',$url);
--- a/include/couchdb.inc.php
+++ b/include/couchdb.inc.php
@@ -161,7 +161,7 @@
} else
if (php_uname('n') == "KYUUBEY") {
- $serverAddr = 'http://127.0.0.1:5984/';
+ $serverAddr = 'http://192.168.1.148:5984/';
} else {
$serverAddr = 'http://127.0.0.1:5984/';
}
--- a/include/template.inc.php
+++ b/include/template.inc.php
@@ -1,6 +1,6 @@
<?php
-function include_header() {
+function include_header($title) {
global $basePath;
?>
<!DOCTYPE html>
@@ -16,7 +16,7 @@
<!-- Set the viewport width to device width for mobile -->
<meta name="viewport" content="width=device-width" />
- <title>Disclosr</title>
+ <title><?php echo $title; ?> - Disclosr</title>
<!-- Included CSS Files -->
<link rel="stylesheet" href="<?php echo $basePath ?>stylesheets/foundation.css">
@@ -71,9 +71,27 @@
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="javascripts/flotr2/flotr2.js"></script>
+ <?php
+ if (strpos($_SERVER['SERVER_NAME'], ".gs")) {
+ ?>
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-12341040-2']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
</body>
</html>
<?php }
+ }
+
--- /dev/null
+++ b/index.php
@@ -1,1 +1,9 @@
+<?php
+/* Redirect to a different page in the current directory that was requested */
+$host = $_SERVER['HTTP_HOST'];
+$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
+$extra = 'getAgency.php';
+header("Location: http://$host$uri/$extra");
+exit;
+?>
--- a/robots.txt
+++ b/robots.txt
@@ -3,3 +3,4 @@
User-agent: *
Disallow: /admin/
+Sitemap: http://orgs.disclosurelo.gs/sitemap.xml.php
--- a/score.php
+++ b/score.php
@@ -1,7 +1,7 @@
<?php
include_once('include/common.inc.php');
-include_header();
+include_header('Scores');
$db = $server->get_db('disclosr-agencies');
--- a/search.php
+++ b/search.php
@@ -1,6 +1,6 @@
<?php
include_once('include/common.inc.php');
-include_header();
+include_header('Search');
?>
<div class="foundation-header">
<h1><a href="search.php">Search</a></h1>
--- /dev/null
+++ b/sitemap.xml.php
@@ -1,1 +1,25 @@
+<?php
+include ('include/common.inc.php');
+$last_updated = date('Y-m-d', @filemtime('cbrfeed.zip'));
+header("Content-Type: text/xml");
+echo "<?xml version='1.0' encoding='UTF-8'?>";
+echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\n";
+echo " <url><loc>" . local_url() . "index.php</loc><priority>1.0</priority></url>\n";
+foreach (scandir("./") as $file) {
+ if (strpos($file, ".php") !== false && $file != "index.php" && $file != "sitemap.xml.php")
+ echo " <url><loc>" . local_url() . "$file</loc><priority>0.3</priority></url>\n";
+}
+
+$db = $server->get_db('disclosr-agencies');
+try {
+ $rows = $db->get_view("app", "byCanonicalName")->rows;
+ foreach ($rows as $row) {
+ echo '<url><loc>' . local_url() . 'getAgency.php?id=' . $row->value->_id . "</loc><priority>0.6</priority></url>\n";
+ }
+} catch (SetteeRestClientException $e) {
+ setteErrorHandler($e);
+}
+echo '</urlset>';
+?>
+
--- a/webserver.php
+++ b/webserver.php
@@ -1,7 +1,7 @@
<?php
include_once('include/common.inc.php');
-include_header();
+include_header('Webserver and Accessiblity');
echo "<table>
<tr><th>name</th><th>webserver</th><th>accessiblity errors</th></tr>";