return $v1 < $v2; } $tagid = (int) $_GET['tagid']; $room = $_GET['room'] == 'cdep' ? 'cdep' : 'senat'; $csum = $_GET['csum']; $uid = getTagAuthorUid($tagid); // HACK? $year = '2008'; $title = 'Tag "' . getTagNameForId($tagid) . '"'; if (!$_GET['iframe']) { include 'header.php'; } $t = new Smarty(); $t->assign('tag', getTagNameForId($tagid)); $t->assign('description', getTagDescriptionForId($tagid)); $votes = getVotesForTag($room, $year, $tagid, $uid); $possible = sizeof($votes); $t->assign('votes', $votes); $people = getPeopleList($room, $year); $non_zero_people = array(); $zero_people = array(); for ($i = 0; $i < sizeof($people); $i++) { $context = getBeliefContext($room, $year, $uid, $people[$i]['id'], $tagid, $possible, 200); foreach ($context as $key => $value) { $people[$i][$key] = $value; } // Since I'm here, fix a few things. A little hacky. $people[$i]['link'] = "?cid=9&id=" . $people[$i]['id']; $people[$i]['tiny_photo'] = getTinyImgUrl($people[$i]['id']); if ($context['yes_cnt'] + $context['no_cnt'] > 0) { array_push($non_zero_people, $people[$i]);
<?php include '../_top.php'; include_once '../hp-includes/person_class.php'; include_once '../hp-includes/people_util.php'; include_once '../mods/functions_common.php'; include_once '../pages/functions_common.php'; include_once '../smarty/Smarty.class.php'; // Get the variables out of the URL. $tagId = (int) $_GET['tagId']; $room = $_GET['room'] == 'cdep' ? 'cdep' : 'senat'; $personId = (int) $_GET['personId']; $year = (int) $_GET['year']; $t = new Smarty(); $votes = getVotesForTag($room, $year, $tagId, $personId); $t->assign('votes', $votes); $t->display('api_compass_vote_details.tpl');