/**
	 * boolean only display without checkbox
	 *
	 * @param mixed   $content
	 */
	protected function print_boolean($content) {
		display_checked($content);
	}
Example #2
0
	/**
	 * display a list of voting mode votes
	 *
	 * @param resource $result
	 * @param string  $token  (optional) token of the logged in member for highlighting
	 */
	public static function display_votingmode_votes($result, $token="") {
?>
<table class="votes">
<tr><th><?=_("Vote token")?></th><th><?=_("Voting time")?></th><th><?=_("Demands offline voting")?></th></tr>
<?
		// votes
		$previous_token = null;
		while ( $row = DB::fetch_assoc($result) ) {
			DB::to_bool($row['demand']);
?>
<tr class="<?=stripes();
			// highlight votes of the logged in member
			if ($token == $row['token']) { ?> self<? }
			// strike through votes, which have been overridden by a later vote
			if ($row['token'] == $previous_token) { ?> overridden<? } else $previous_token = $row['token'];
			?>"><td><?=$row['token']?></td><?
			?><td class="tdc"><?=date(VOTETIME_FORMAT, strtotime($row['votetime']))?></td><?
			?><td><? display_checked($row['demand']) ?></td><?
			?></tr>
<?
		}
?>
</table>
<?
	}
Example #3
0
<input type="hidden" name="ballot" value="<?=$ballot->id?>">
<input type="hidden" name="action" value="select">
<input type="submit" value="<?=_("select this ballot for voting")?>">
<?
				form_end();
			}
?>
		</td>
<?
		}
?>
		<td class="center"><?
		if (Login::$admin and $period->state=="ballot_application") {
			?><input type="checkbox" name="approved[<?=$ballot->id?>]" value="1"<? if ($ballot->approved) { ?> checked<? } ?>><input type="hidden" name="approved_id[<?=$ballot->id?>]" value="<?=$ballot->id?>"><?
		} else {
			display_checked($ballot->approved);
		}
		?></td>
	</tr>
<?
		$line++;
	}

}

?>
</table>

<?

if (Login::$admin and $period->state=="ballot_application" and $pager->linescount) {