function page_footer($extra = null) { global $DATA, $this_page; // This makes the tracker appear on all sections, but only actually on openaustralia.org //if ($DATA->page_metadata($this_page, 'track') ) { if (substr(DOMAIN, -18) == "openaustralia.org" && substr(DOMAIN, 0, 7) != "staging") { // We want to track this page. // Kind of fake URLs needed for the tracker. $url = urlencode('http://' . DOMAIN . '/' . $this_page); ?> <script type="text/javascript"><!-- an=navigator.appName;sr='http://x3.extreme-dm.com/';srw="na";srb="na";d=document;r=41;function pr(n) { d.write("<div><img alt=\"\" src=\""+sr+"n\/?tag=fawkes&p=<?php echo $url; ?> &j=y&srw="+srw+"&srb="+srb+"&l="+escape(d.referrer)+"&rs="+r+"\" height=\"1\" width=\"1\"></"+"div>");} s=screen;srw=s.width;an!="Netscape"?srb=s.colorDepth:srb=s.pixelDepth pr()//--> </script><noscript><div><img alt="" src="http://x3.extreme-dm.com/z/?tag=fawkes&p=<?php echo $url; ?> &j=n" height="1" width="1"></div></noscript> <?php if (get_http_var('c4') || get_http_var('c4x')) { ?> <script type="text/javascript" src="http://www.channel4.com/media/scripts/statstag.js"></script> <!--//end WEB STATS --> <noscript><div style="display:none"><img width="1" height="1" src="http://stats.channel4.com/njs.gif?dcsuri=/nojavascript&WT.js=No" alt=""></div></noscript> <?php } // mySociety tracking, not on staging if (defined('OPTION_TRACKING') && OPTION_TRACKING) { track_event($extra); } } // DAMN, this really shouldn't be in PAGE. $db = new ParlDB(); $db->display_total_duration(); $duration = getmicrotime() - STARTTIME; twfy_debug("TIME", "Total time for page: {$duration} seconds."); if (!isset($_SERVER['WINDIR'])) { $rusage = getrusage(); $duration = $rusage['ru_utime.tv_sec'] * 1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU; twfy_debug('TIME', "Total user time: {$duration} microseconds."); $duration = $rusage['ru_stime.tv_sec'] * 1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES; twfy_debug('TIME', "Total system time: {$duration} microseconds."); } ?> </div> <!-- end #container --> </body> </html> <?php ob_end_flush(); }
function page_footer($extra = null) { global $DATA, $this_page; global $DATA, $this_page; $about_links = $this->get_menu_links(array('help', 'about', 'linktous', 'houserules', 'blog', 'news', 'contact')); $assembly_links = $this->get_menu_links(array('hansard', 'sp_home', 'ni_home', 'wales_home', 'boundaries')); $international_links = $this->get_menu_links(array('newzealand', 'australia', 'ireland')); $tech_links = $this->get_menu_links(array('code', 'api', 'data', 'devmailinglist', 'irc')); /* $about_links[] = '<a href="' . WEBPATH . 'api/">API</a> / <a href="http://ukparse.kforge.net/parlparse">XML</a>'; $about_links[] = '<a href="http://github.com/mysociety/theyworkforyou">Source code</a>'; $user_agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : ''; if (stristr($user_agent, 'Firefox/')) $about_links[] = '<a href="http://mycroft.mozdev.org/download.html?name=theyworkforyou">Add search to Firefox</a>'; */ ?> <div id="footer"> <dl> <dt>About: </dt> <dd> <ul> <?php foreach ($about_links as $about_link) { echo '<li>' . $about_link . '</li>'; } ?> </ul> </dd> <dt>Parliaments & assemblies: </dt> <dd> <ul> <?php foreach ($assembly_links as $assembly_link) { echo '<li>' . $assembly_link . '</li>'; } ?> </ul> </dd> <dt>International projects: </dt> <dd> <ul> <?php foreach ($international_links as $international_link) { echo '<li>' . $international_link . '</li>'; } ?> </ul> </dd> <dt>Technical: </dt> <dd> <ul> <?php foreach ($tech_links as $tech_link) { echo '<li>' . $tech_link . '</li>'; } ?> </ul> </dd> </dl> <div> <h5>Donate</h5> <p> This website is run by <a href="http://www.mysociety.org/">mySociety</a>, the project of a a <a href="http://www.ukcod.org.uk/">registered charity</a>. If you find it useful, please <a href="http://www.mysociety.org/donate/">donate</a> to keep it running. </p> <h5>Sign up to our newsletter</h5> <form method="get" action="https://secure.mysociety.org/admin/lists/mailman/subscribe/news"> <input type="text" name="email"> <input type="submit" value="Join"> </form> <p> Approximately once a month, spam free. </p> </div> <?php // This makes the tracker appear on all sections, but only actually on theyworkforyou.com //if ($DATA->page_metadata($this_page, 'track') ) { if (DOMAIN == 'www.theyworkforyou.com') { // We want to track this page. // Kind of fake URLs needed for the tracker. $url = urlencode('http://' . DOMAIN . '/' . $this_page); ?> <script type="text/javascript"><!-- an=navigator.appName;sr='http://x3.extreme-dm.com/';srw="na";srb="na";d=document;r=41;function pr(n) { d.write("<img alt='' src=\""+sr+"n\/?tag=fawkes&p=<?php echo $url; ?> &j=y&srw="+srw+"&srb="+srb+"&l="+escape(d.referrer)+"&rs="+r+"\" height='1' width='1'>");} s=screen;srw=s.width;an!="Netscape"?srb=s.colorDepth:srb=s.pixelDepth pr()//--> </script><noscript><img alt="" src="http://x3.extreme-dm.com/z/?tag=fawkes&p=<?php echo $url; ?> &j=n" height="1" width="1"></noscript> <?php // mySociety tracking, not on staging if (defined('OPTION_TRACKING') && OPTION_TRACKING) { track_event($extra); } } // DAMN, this really shouldn't be in PAGE. $db = new ParlDB(); $db->display_total_duration(); $duration = getmicrotime() - STARTTIME; twfy_debug("TIME", "Total time for page: {$duration} seconds."); if (!isset($_SERVER['WINDIR'])) { $rusage = getrusage(); $duration = $rusage['ru_utime.tv_sec'] * 1000000 + $rusage['ru_utime.tv_usec'] - STARTTIMEU; twfy_debug('TIME', "Total user time: {$duration} microseconds."); $duration = $rusage['ru_stime.tv_sec'] * 1000000 + $rusage['ru_stime.tv_usec'] - STARTTIMES; twfy_debug('TIME', "Total system time: {$duration} microseconds."); } if (DOMAIN == 'www.theyworkforyou.com') { ?> <!-- Piwik --> <script type="text/javascript"> var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.mysociety.org/" : "http://piwik.mysociety.org/"); document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> <!-- piwik_action_name = ''; piwik_idsite = 7; piwik_url = pkBaseURL + "piwik.php"; piwik_log(piwik_action_name, piwik_idsite, piwik_url); //--> </script> <noscript><img src="http://piwik.mysociety.org/piwik.php?idsite=7" width=1 height=1 style="border:0" alt=""></noscript> <!-- /Piwik --> <?php } ?> <br class="clear"> </div> <!-- end #footer --> </div> <!-- end #container --> <script type="text/javascript" charset="utf-8"> barSetup(); </script> </body> </html> <?php ob_end_flush(); }