Esempio n. 1
0
                <!-- Entire Chat box -->
                <div class="message-wrap col-lg-10">

                    <!-- Sent and received messages box -->
                    <div id="msg-box" class="msg-wrap">

                        <!-- Insert chat history -->
                        <?php 
include 'helpers/timestampParser.php';
$timestampParser = new timestampParser();
for ($i = 0; $i < sizeof($messageArray); $i++) {
    $msgSender = $messageArray[$i][0];
    $msgSenderIcon = $messageArray[$i][1];
    $msgContent = $messageArray[$i][2];
    $msgTimestamp = $messageArray[$i][3];
    $formattedTimestamp = $timestampParser->getFormattedTimestampForMessage($msgTimestamp);
    echo '
                            <div class="media msg">
                              <a class="pull-left" href="#">
                                <img class="media-object" data-src="holder.js/64x64" alt="64x64" style="width: 32px; height: 32px;" src="img/display_pic/' . $msgSenderIcon . '">
                              </a>
                              <div class="media-body">
                                <small class="pull-right time">
                                  <i class="fa fa-clock-o"></i>' . $formattedTimestamp . '
                                </small>
                                <h5 class="media-heading">' . $msgSender . '
                                </h5>
                                <small class="col-lg-10">' . $msgContent . '</small>
                              </div>
                            </div>';
}