Exemple #1
0
				<div class="col-md-1 col-xs-12 envelope">
					<span></span>
				</div>
			<?php 
        }
        ?>
			<div class="col-md-2 col-xs-12">
				Чат с <?php 
        if ($v[0]->from_id == $user['id']) {
            $chatwith = $v[0]->to_id;
        } else {
            $chatwith = $v[0]->from_id;
        }
        ?>
				<?php 
        echo getUserIconById($chatwith);
        echo " ";
        echo getUserNameById($chatwith);
        ?>
			</div>
			<div class="col-md-7 col-xs-12"><?php 
        echo preg_replace("/[\n|\r|\r\n|\n\r]+/", "<br><br>", $v[0]->text);
        ?>
</div>
			<div class="col-md-2 col-xs-12 text-right"><small class="text-muted"><?php 
        echo $v[0]->time;
        ?>
</small></div>

		</div>
	</a>
Exemple #2
0
		</form>
	</div>
	
	<?php 
foreach ($chat as $v) {
    ?>
		<div class="row <?php 
    if ($v->is_read == 0) {
        echo 'bg-unread';
    }
    ?>
" style="padding:1em;">

			<div class="col-md-2 col-xs-12">
				<?php 
    echo getUserIconById($v->from_id);
    echo " ";
    echo getUserNameById($v->from_id);
    ?>
			</div>
			<div class="col-md-7 col-xs-12"><?php 
    echo preg_replace("/[\n|\r|\r\n|\n\r]+/", "<br><Br>", $v->text);
    ?>
</div>
			<div class="col-md-2 col-xs-12 text-right"><small class="text-muted"><?php 
    echo $v->time;
    ?>
</small></div>
			
		</div>
	<hr style="margin:0;">