Ejemplo n.º 1
0
$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]);
    } else {
        array_push($zero_people, $people[$i]);
    }
}
usort($non_zero_people, "beliefCmp");
$t->assign('people', $non_zero_people);
$t->assign('absentees', $zero_people);
Ejemplo n.º 2
0
function displayOneIndividualTag($room, $year, $uid, $idperson, $tag)
{
    $c = getBeliefContext($room, $year, $uid, $idperson, $tag['id'], $tag['num'], 120);
    $t = new Smarty();
    $t->assign('tag', $tag['tag']);
    $t->assign('person', $c);
    $t->assign('taglink', "?cid=15&tagid={$tag['id']}&room={$room}");
    $t->assign('description', $tag['description']);
    $t->assign('room', $room);
    $t->assign('year', $year);
    $t->assign('person_id', $idperson);
    $t->assign('tagid', $tag['id']);
    $t->display('parl_person_belief.tpl');
}