<?php

include_once 'pages/functions_common.php';
include_once 'pages/cdep_2008/functions.php';
include_once 'pages/senat_2008/functions.php';
include_once 'hp-includes/declarations.php';
include_once 'hp-includes/news.php';
$t = new Smarty();
// Show the guys that show up most in the news.
$list = getMostPresentInNews(10, NULL, NULL, NULL, NULL, NULL);
$list = newsAddPreviousWeekToList($list, NULL, '%');
$t->assign('topPeople', $list);
$t->assign('news', getMostRecentNewsArticles(NULL, NULL, 7, '%'));
$t->assign('blogposts', getMostRecentBlogPosts(7));
// Get the top three senators.
$t->assign('top_senators', getSenatSorted(3, 'DESC', 3));
$t->assign('bottom_senators', array_reverse(getSenatSorted(3, 'ASC', 3)));
// Get the top three senators.
$t->assign('top_cdep', getCdepSorted(3, 'DESC', 3));
$t->assign('bottom_cdep', array_reverse(getCdepSorted(3, 'ASC', 3)));
$parties = array(array("id" => "1", "logo" => "images/parties/1.gif"), array("id" => "2", "logo" => "images/parties/2.png"), array("id" => "7", "logo" => "images/parties/7.jpg"), array("id" => "14", "logo" => "images/parties/14.jpg"));
$t->assign('parties', $parties);
$diff = abs(strtotime("2012-12-09") - time());
$years = floor($diff / (365 * 60 * 60 * 24));
$months = floor(($diff - $years * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24));
$days = floor(($diff - $years * 365 * 60 * 60 * 24 - $months * 30 * 60 * 60 * 24) / (60 * 60 * 24));
$t->assign('days_until_election', $days + 1);
$t->assign('declarations', getMostRecentDeclarations());
$t->display('home_page_summary.tpl');
<?php

include_once 'pages/functions_common.php';
include_once 'pages/cdep_2008/functions.php';
$t = new Smarty();
$sortBy = $_GET['sort'] ? (int) $_GET['sort'] : 3;
$t->assign('mostPresent', getCdepSorted($sortBy, "DESC", 400));
$t->display('cdep_2008_all_deputies.tpl');
Exemple #3
0
<?php

include_once 'pages/functions_common.php';
include_once 'pages/cdep_2008/functions.php';
$t = new Smarty();
// Show the top most present and absent people.
$t->assign('mostPresent', getCdepSorted(3, "DESC", 10));
$t->assign('leastPresent', getCdepSorted(3, "ASC", 10));
// Show the guys that show up most in the news.
$list = getMostPresentInNews(10, 'cdep/2008');
$list = decorateListWithExtraInfo($list, '2008', 'cdep', 'votes_agg', 'percent');
$list = newsAddPreviousWeekToList($list, 'cdep/2008');
$t->assign('newsPeople', $list);
$t->assign('news', getMostRecentNewsArticles('cdep', '2008', 6));
$t->assign('MOST_RECENT_NEWS_ABOUT', 'Cele mai recente stiri cu deputați');
// Show the latest global votes in the parliament.
$t->assign('mostRecentVotes', getCdepVotes("DESC", 6, 0));
// Make sure the hook for the 'more bla bla link' is okay.
// TODO(vivi): Maybe generalize this so the boxes above benefit.
$t->assign('cid', $cid);
$t->assign('sidVotes', getSidFor('all_votes.php'));
$t->display('cdep_2008_summary.tpl');
<?php

include_once 'pages/functions_common.php';
include_once 'pages/cdep_2008/functions.php';
include_once 'mods_parties/functions_common.php';
$t = new Smarty();
$t->assign('party_short_name', $party->name);
$all_votes = getAllFinalVotes('cdep', '2008', $party->id);
$party_votes = getPartyFinalVotes('cdep', '2008', $party->id);
$party_line_votes = getPartyLineFinalVotes('cdep', '2008', $party->id);
$t->assign('not_voted_votes', $all_votes - $party_votes);
$t->assign('non_party_line_votes', $party_votes - $party_line_votes);
$t->assign('party_line_votes', $party_line_votes);
$t->assign('not_voted_votes_percent', 100 * ($all_votes - $party_votes) / $all_votes);
$t->assign('non_party_line_votes_percent', 100 * ($party_votes - $party_line_votes) / $all_votes);
$t->assign('party_line_votes_percent', 100 * $party_line_votes / $all_votes);
// Show the top most present and absent people.
$t->assign('presTop', getCdepSorted(3, "DESC", 3, $party->id));
$t->assign('presBot', array_reverse(getCdepSorted(3, "ASC", 3, $party->id)));
// Show the top mavericks.
$t->assign('maverickTop', getCdepSorted(4, "ASC", 3, $party->id));
$t->assign('maverickBot', array_reverse(getCdepSorted(4, "DESC", 3, $party->id)));
$t->assign('see_all_cid', 11);
$t->display('party_mod_cdep2008_compact.tpl');