コード例 #1
0
ファイル: question.php プロジェクト: JoaoBGusmao/qualdosdois
    ?>
									<img class="image-a" src="<?php 
    echo WEB_PATH;
    ?>
upload/<?php 
    echo $question->getImageA();
    ?>
">
								<?php 
}
?>
							</div>
							<div class="votes_box">
								<?php 
$votesA = $question->getVotesA();
$votesB = $question->getVotesB();
$total = $votesA + $votesB;
if ($total != 0) {
    $percentA = round($votesA / $total * 100);
} else {
    $percentA = 0;
}
?>
								<span class="percent-a"><?php 
echo $percentA;
?>
</span>%
								<div class="votes_right"><span class="votes-a-count"><?php 
echo $votesA;
?>
</span> <?php