コード例 #1
0
ファイル: answer.php プロジェクト: vladvoth/adviceList
	</header>

	<div class="adReq">
		<p>
			<?php 
echo $request['request'];
?>
		</p>
		<strong>
			<?php 
echo "max. Preis: " . $request['preis'];
?>
		</strong></p>
		<h3>
			<?php 
echo restTime($request['modified']);
?>
		</h3>
		<p>
			<?php 
/* Antworten schon angeschaut */
$getOffers = $mysqli->query("SELECT * FROM offers WHERE requestId = '{$requestId}' AND gesehen = '2' ");
if ($getOffers->num_rows != 0) {
    echo "Die Antworten wurden angesehen";
} else {
    echo "Die Antworten wurden noch nicht angesehen";
}
?>
		</p>
	</div>
コード例 #2
0
ファイル: admin.php プロジェクト: vladvoth/adviceList
				<th>Fertig</th>
			</tr>
		</thead>
		<tbody>
			<?php 
if ($anfragen != 0) {
    foreach ($anfragen as $row => $value) {
        $request = $value['request'];
        if (strlen($request) > 30) {
            $request = substr($request, 0, 30) . " ... ";
        }
        $angebote = $mysqli->query("SELECT * FROM offers WHERE requestId = '" . $value['id'] . "' AND geloescht = '1' ");
        echo "<tr id='req" . $value['id'] . "'>";
        echo "<td>" . $request . "</td>";
        echo "<td>" . $value['preis'] . "</td>";
        echo "<td>" . restTime($value['modified']) . "</td>";
        echo "<td><a class='btn btn-danger' href='../Answer/answer.php?request=" . $value['id'] . "'>Antworten</a></td>";
        echo "<td>" . $angebote->num_rows . "</td>";
        /* Antworten schon angeschaut */
        $getOffers = $mysqli->query("SELECT * FROM offers WHERE requestId = '" . $value['id'] . "' AND gesehen = '2' ");
        if ($getOffers->num_rows != 0) {
            echo "<td>gesehen</td>";
        } else {
            echo "<td>Nicht gesehen</td>";
        }
        /* Neue Nachrichten zum Request also allen Angeboten */
        $getNewMessages = $mysqli->query("SELECT * FROM messages WHERE requestId = '" . $value['id'] . "' AND empfaengerId = '" . $_SESSION['userId'] . "' AND gesehen = '1' ");
        if ($getNewMessages->num_rows != 0) {
            echo "<td><strong>" . $getNewMessages->num_rows . " neue Nachrichten</strong></td>";
        } else {
            echo "<td>keine neue Nachrichten</td>";