コード例 #1
0
ファイル: summary.php プロジェクト: nightsh/hartapoliticii
<?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');
コード例 #2
0
ファイル: all_votes.php プロジェクト: nightsh/hartapoliticii
<?php

include_once 'pages/senat_2008/functions.php';
include_once 'pages/functions_common.php';
$t = new Smarty();
$PAGE_SIZE = 50;
$from = (int) $_GET['from'];
$q = (int) $_GET['q'];
$uid = is_user_logged_in() ? $current_user->ID : 0;
$t->assign('votes', getSenatVotes("DESC", 50, $from, $uid, $q));
$t->assign('cid', $cid);
$t->assign('sid', $sid);
$t->assign('is_user_logged_in', is_user_logged_in());
$t->assign('from', $from);
$t->assign('fromPrev', max(0, $from - $PAGE_SIZE));
$t->assign('fromNext', $from + $PAGE_SIZE);
$t->display('senat_2008_all_votes.tpl');