Exemplo n.º 1
0
 protected function getStateSelect($state)
 {
     $select = '<select id="suggestion-state" name="suggestion-state">';
     $words = $this->getWords();
     $states = SuggestionsModel::getStatesAsArray();
     foreach ($states as $key => $wordCode) {
         $select .= '<option value="' . $key . '"';
         if ($key == $state) {
             $select .= ' selected="selected"';
         }
         $select .= '>' . $words->getSilent($wordCode) . '</option>';
     }
     $select .= '</select>';
     $select .= $words->flushBuffer();
     return $select;
 }
<?php

$ranks = SuggestionsModel::getRanksAsArray($_SESSION['lang']);
$states = SuggestionsModel::getStatesAsArray();
$optionStates = SuggestionOption::getStatesAsArray($_SESSION['lang']);
?>
<table id="results">
    <tr>
        <td><h2><?php 
echo htmlspecialchars($this->suggestion->summary, ENT_COMPAT, 'utf-8');
?>
</h2></td>
        <td colspan="2" class="rank"><strong><?php 
if ($this->suggestion->voteCount) {
    echo $words->get('SuggestionsVotesGiven', $this->suggestion->voteCount);
}
?>
</strong></td>
        <td class="rank"><strong><?php 
echo $words->get($states[$this->suggestion->state]);
?>
</strong></td>
    </tr>
    <tr><td colspan="4"><?php 
echo $this->purifier->purify($this->suggestion->description);
?>
</td></tr>
    <tr><td colspan="4"><hr class="suggestion" /></td></tr>
    <?php 
if ($this->suggestion->optionsVisibleCount == 0) {
    ?>