Пример #1
0
    ?>
</a></li>
                                            <?php 
}
?>
                                        </ul>
                                    </dd>
                                </dl>
                            </div>
                        </div>
                  </div>
            </div>
        <?php 
// 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 #footer -->
</div> <!-- end #container -->

<script src="/js/foundation/foundation.js"></script>
Пример #2
0
    public 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', 'topic', 'privacy'));
        $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'));
        $landing_links = $this->get_menu_links(array('parliament_landing', 'hansard_landing'));
        /*
                        $about_links[] = '<a href="' . WEBPATH . 'api/">API</a> / <a href="http://parser.theyworkforyou.com/">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 &amp; 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>
                        <dt>Explanatory Pages: </dt>
                        <dd>
                            <ul>
                                <?php 
        foreach ($landing_links as $landing_link) {
            echo '<li>' . $landing_link . '</li>';
        }
        ?>
                            </ul>
                        </dd>
                  </dl>
                  <div class="right">

                      <div class="fb-like" data-href="https://www.facebook.com/TheyWorkForYou" data-colorscheme="light" data-layout="button_count" data-action="like" data-show-faces="false" data-send="false"></div>

                      <br>

                      <a href="https://twitter.com/theyworkforyou" class="twitter-follow-button" data-show-count="false">Follow @theyworkforyou</a>

                    <script>

                        window.twttr = (function (d,s,id) {
                            var t, js, fjs = d.getElementsByTagName(s)[0];
                            if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
                            js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);

                            return window.twttr || (t = { _e: [], ready: function (f) { t._e.push(f) } });
                        }(document, "script", "twitter-wjs"));

                        // Used with the Google Analytics Tweet tracking
                        function extractParamFromUri(uri, paramName) {
                            if (!uri) {
                                return;
                            }
                            var uri = uri.split('#')[0];  // Remove anchor.
                            var parts = uri.split('?');  // Check for query params.
                            if (parts.length == 1) {
                                return;
                            }
                            var query = decodeURI(parts[1]);

                            // Find url param.
                            paramName += '=';
                            var params = query.split('&');
                            for (var i = 0, param; param = params[i]; ++i) {
                                if (param.indexOf(paramName) === 0) {
                                    return unescape(param.split('=')[1]);
                                }
                            }
                        }

                        function trackTwitter(intent_event) {
                            if (intent_event) {
                                var opt_pagePath;
                                if (intent_event.target && intent_event.target.nodeName == 'IFRAME') {
                                    opt_target = extractParamFromUri(intent_event.target.src, 'url');
                                }
                                ga('send', 'social', 'twitter', 'follow', opt_pagePath);
                            }
                        }

                        twttr.ready(function (twttr) {
                            twttr.events.bind('follow', trackTwitter);
                        });

                    </script>

                      <h5>Donate</h5>
                      <p>
                          This website is run by <a href="http://www.mysociety.org/">mySociety</a>, the project of
                          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="post" action="//mysociety.us9.list-manage.com/subscribe/post?u=53d0d2026dea615ed488a8834&id=287dc28511">
                          <input type="email" placeholder="Your email address" name="EMAIL"/>
                          <label style="position: absolute; left: -5000px;">
                              Leave this box empty: <input type="text" name="b_53d0d2026dea615ed488a8834_287dc28511" tabindex="-1" value="" />
                          </label>
                          <input type="submit" value="Subscribe" name="subscribe"/>
                      </form>
                      <p>
                          Approximately once a month, spam free.
                      </p>
                  </div>
        <?php 
        // 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 #footer -->
</div> <!-- end #container -->

<script src="/js/riveted.min.js"></script>
<script src="/js/jquery.scrolldepth.min.js"></script>

<script type="text/javascript" charset="utf-8">
    barSetup();
    riveted.init();
    $(function() {
    $.scrollDepth();
    setTimeout(function() {
      try {
        ga('send', 'event', 'engagement', 'timer', '7');
      } catch(err){}
    }, 7000);
  });
</script>

</body>
</html>
<?php 
        ob_end_flush();
    }
Пример #3
0
    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&amp;p=<?php 
            echo $url;
            ?>
&amp;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&amp;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();
    }
Пример #4
0
    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 &amp; 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&amp;p=<?php 
            echo $url;
            ?>
&amp;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();
    }