<?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/senat_2008/functions.php'; $t = new Smarty(); // Here do some magical stuff to actually show statistics. :-) // We don't know how to do that yet. :-S // For starters, let's select the top present people and top absent people, // in some SQL queries. $t->assign('mostPresent', getSenatSorted(3, "DESC", 10)); $t->assign('leastPresent', getSenatSorted(3, "ASC", 10)); $list = getMostPresentInNews(10, 'senat/2008'); $list = decorateListWithExtraInfo($list, '2008', 'senat', 'votes_agg', 'percent'); $list = newsAddPreviousWeekToList($list, 'senat/2008'); $t->assign('newsPeople', $list); // votes_agg, percent $t->assign('news', getMostRecentNewsArticles('senat', '2008', 6)); $t->assign('MOST_RECENT_NEWS_ABOUT', 'Cele mai recente știri cu senatori'); $t->assign('mostRecentVotes', getSenatVotes("DESC", 6, 0)); $t->assign('cid', $cid); $t->assign('sidVotes', getSidFor('all_votes.php')); $t->display('senat_2008_summary.tpl');
<?php include_once 'pages/functions_common.php'; include_once 'pages/senat_2008/functions.php'; include_once 'mods_parties/functions_common.php'; $t = new Smarty(); $t->assign('party_short_name', $party->name); $all_votes = getAllFinalVotes('senat', '2008', $party->id); $party_votes = getPartyFinalVotes('senat', '2008', $party->id); $party_line_votes = getPartyLineFinalVotes('senat', '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', getSenatSorted(3, "DESC", 3, $party->id)); $t->assign('presBot', array_reverse(getSenatSorted(3, "ASC", 3, $party->id))); // Show the top mavericks. $t->assign('maverickTop', getSenatSorted(4, "ASC", 3, $party->id)); $t->assign('maverickBot', array_reverse(getSenatSorted(4, "DESC", 3, $party->id))); $t->assign('see_all_cid', 12); $t->display('party_mod_cdep2008_compact.tpl');
<?php include_once 'pages/functions_common.php'; include_once 'pages/senat_2008/functions.php'; $t = new Smarty(); $t->assign('cid', $cid); $sortBy = $_GET['sort'] ? (int) $_GET['sort'] : 3; $t->assign('mostPresent', getSenatSorted($sortBy, "DESC", 400)); $t->display('senat_2008_all_senators.tpl');