Exemple #1
0
        ?>
										</span>
										<?php 
    }
    ?>
									</div>
									<?php 
    echo $this->_['tags'][$i];
    ?>
								</td>
								<td>
									<?php 
    if (is_null($question['rating'])) {
        echo "<span style='font-size:0;'>0</span>Keine Bewertung vorhanden";
    } else {
        echo FormatUtility::formatNumber($question['rating'], 1) . " " . createStarsString($question['rating']);
    }
    ?>
								</td>
								<td>
									<?php 
    echo htmlspecialchars(createDifficultyString($question['difficulty'], $question['difficultycount']));
    ?>
								</td>
								<td style="text-align: center">
									<?php 
    echo htmlspecialchars($question['difficultycount']);
    ?>
								</td>
								<?php 
    if ($GLOBALS['loggedin']) {
Exemple #2
0
function createRatingString($rating, $userIsModHere)
{
    $strng = '<a target="_blank" href="index.php?view=user&amp;id=' . $rating['user_id'] . '">';
    $modString = $rating['ismod'] ? '<img alt="Moderator" src="' . htmlspecialchars(APP_PATH) . '/content/img/moderator.png">' : "";
    $suString = $rating['issuperuser'] ? '<img alt="Superuser" src="' . htmlspecialchars(APP_PATH) . '/content/img/superuser.png">' : "";
    $strng2 = $rating['author'] . '</a>' . $modString . $suString . ' am ' . htmlspecialchars($rating['created']);
    if ($userIsModHere) {
        $strng2 = $strng2 . '<button type="button" class="btn btn-link btn-xs" data-toggle="modal" data-target="#removeRatingDialog" onClick="setRemoveRating(' . $rating['id'] . ')"><span class="glyphicon glyphicon-remove"></span></button>';
    }
    if (!$rating['alreadyreported']) {
        $strng2 = $strng2 . '<button id="btnReportRating" type="button" class="btn btn-link btn-xs pull-right" data-toggle="modal" data-target="#newRatingReportDialog" onClick="setReportRating(' . $rating['id'] . ')">Kommentar melden</button>';
    }
    $strng2 = $strng2 . '<br>';
    if ($rating['stars'] != 0) {
        $strng2 = $strng2 . (createStarsString($rating['stars']) . "<br>");
    }
    if ($rating['comment'] != null) {
        $strng2 = $strng2 . htmlspecialchars($rating['comment']) . "<br>";
    }
    return $strng . $strng2 . "<br>";
}