Ejemplo n.º 1
0
<?php

$page_title = 'Public opinion';
$category = 'opinion';
$table_entity = "info";
include 'includes/config.php';
include 'includes/functions.php';
include 'includes/header.php';
include 'includes/nav.php';
echo "\n\n<!-- Announcements -->\n\n<div class='row_clickable' onClick=\"document.location.href='opinion_announcement'\">\n\t<div class='row_icon'></div>\n\t<h3>Announcements</h3>\n\t<p>View public opinion and opposition of each of my announcements</p>\n\n<div class='chart_wrapper'>";
/* These fake variables should actually be a query, totalled from all this entity's votes: */
$id = '1';
$entity_id = '2';
$chart_question = 'Total votes';
$feedback_support = '1,456';
$feedback_oppose = '931';
$feedback_total = '2377';
$feedback_average = '644';
DrawVotesChart($id, $table, $entity_id, $chart_question, $feedback_support, $feedback_oppose, $feedback_total, $feedback_average);
echo "\n</div>\n</div>\n\n\n<!-- Legislation -->\n\n<div class='row_clickable' onClick=\"document.location.href='opinion_legislation'\">\n\t<div class='row_icon'></div>\n\t<h3>Legislation</h3>\n\t<p>View public opinion and opposition of my legislation, by item</p>\n\n<div class='chart_wrapper'>\n\n<!-- opinion/Oppose chart -->\n<img class='chart' src='http://chart.apis.google.com/chart?\n&chtt=opinion+vs.+opposition\n&chts=333333,12\n&chf=bg,s,EEEEEE\n&chxs=0,EAEAEB,11,0,_,EAEAEB\n&chbh=16,7,8\n&chs=260x70\n&chma=5,10,0,0\n&chm=N+Yes+,428120,0,0,12|N+No+,9F3A12,1,1,12\n&chds=0,100\n&cht=bhg\n&chco=80C65A,C54D00\n&chd=t:63|27\n&chdlp=r'>\n\n<!-- Totals chart -->\n<img class='chart' src='http://chart.apis.google.com/chart?\n&chtt=Voting+popularity\n&chts=333333,12\n&chf=bg,s,EEEEEE\n&chxs=0,CACBCB,11,0,_,CACBCB\n&chbh=16,7,8\n&chs=260x70\n&chma=5,10,0,0\n&chm=N+Total+,193C7C,0,0,12|N+Average+,525252,1,1,12\n&chds=0,700\n&cht=bhg\n&chco=5A80C6,8C8C8C\n&chd=t:550|430\n&chdlp=r'>\n\n</div>\n</div>\n\n\n\n\n<!-- Popularity -->\n\n\n<div class='row_clickable' onClick=\"document.location.href='opinion_popularity'\">\n\t<div class='row_icon'></div>\n\t<h3>Popularity of cityofalisoviejo.meocracy.com</h3>\n\t<p>Increase my visibility within my constituency</p>\n\n<div class='chart_wrapper'>\n\n<!-- opinion/Oppose chart -->\n<img class='chart' src='http://chart.apis.google.com/chart?\n&chtt=opinion+vs.+opposition\n&chts=333333,12\n&chf=bg,s,EEEEEE\n&chxs=0,EAEAEB,11,0,_,EAEAEB\n&chbh=16,7,8\n&chs=260x70\n&chma=5,10,0,0\n&chm=N+Yes+,428120,0,0,12|N+No+,9F3A12,1,1,12\n&chds=0,100\n&cht=bhg\n&chco=80C65A,C54D00\n&chd=t:63|27\n&chdlp=r'>\n\n<!-- Totals chart -->\n<img class='chart' src='http://chart.apis.google.com/chart?\n&chtt=Voting+popularity\n&chts=333333,12\n&chf=bg,s,EEEEEE\n&chxs=0,CACBCB,11,0,_,CACBCB\n&chbh=16,7,8\n&chs=260x70\n&chma=5,10,0,0\n&chm=N+Total+,193C7C,0,0,12|N+Average+,525252,1,1,12\n&chds=0,700\n&cht=bhg\n&chco=5A80C6,8C8C8C\n&chd=t:550|430\n&chdlp=r'>\n\n</div>\n</div>\n\n\n";
include 'includes/footer.php';
?>


Ejemplo n.º 2
0
function TotalLegislation($table, $entity_id)
{
    $result = mysql_query("select * from `{$table}` where `entity_id`='{$entity_id}' limit 1") or die(mysql_error());
    while ($row = mysql_fetch_array($result)) {
        $id = $row['id'];
        $feedback_support = "3854";
        $feedback_oppose = "4271";
        $feedback_total = "713";
        $feedback_average = "687";
        echo "<ul data-role='listview' data-inset='true' style='text-align:center'>\n<li><a href='support_legislation'>\n<h3>Our Legislation</h3></li><center>";
        DrawVotesChart($table, $entity_id, $chart_question, $feedback_support, $feedback_oppose, $feedback_total, $feedback_average);
        echo "</center></a></ul>";
    }
}
Ejemplo n.º 3
0
function TotalLegislation($table, $entity_id)
{
    $result = mysql_query("select * from `{$table}` where `entity_id`='{$entity_id}' limit 1") or die(mysql_error());
    while ($row = mysql_fetch_array($result)) {
        $id = $row['id'];
        $feedback_support = "3854";
        $feedback_oppose = "4271";
        $feedback_total = "713";
        $feedback_average = "687";
        echo "<div class='row_clickable' onClick=\"document.location.href='support_legislation'\">\n\t<div class='row_icon'></div>\n\t<h3>Our Legislation</h3></li><center>";
        DrawVotesChart($id, $table, $entity_id, $chart_question, $feedback_support, $feedback_oppose, $feedback_total, $feedback_average);
        echo "</center></div>";
    }
}