<?php
$path="../../";
include("../../map.php");
include("../../scripts.php");
$id=$_GET["id"];
?>
		<div class="">
			<div class="col">
				<section class="card">
					<div class="card-body">
						<script type="text/JavaScript" language="JavaScript">
							jQuery(document).ready(function () {
								Load_Messages();
							<?php if($_GET["id"]<>""){?>
								Load_Message_Form('<?php echo $_GET["id"];?>');
							<?php }?>
								jQuery('#cq').keyup(delay(function(e){
									var q = jQuery('#cq').val();
									show('#messages');
									jQuery('#messages').load('messages_list.php?islem=<?php echo $_GET["islem"]?>&ne=<?php echo $_GET["ne"]?>&q='+q+'');
								}, 1000));
							});
							function Load_Messages(){
								jQuery('#messages').load('messages_list.php?islem=<?php echo $_GET["islem"]?>&ne=<?php echo $_GET["ne"]?>&id=<?php echo $_GET["id"]?>');
							};
							var timeout = setInterval(Load_Messages, 10000);
							function Load_Message_Form(id){
								jQuery('#messages<?php if($mobile==""){echo "_form";}else{echo "_mobile";}?>').load('messages_form.php?islem=<?php echo $_GET["islem"]?>&ne=<?php echo $_GET["ne"]?>&id=<?php if($_GET["id"]==""){?>'+id+'<?php }else{echo $_GET["id"];}?>');
								<?php if($mobile<>""){?>show('#messages_mobile');<?php }?>
							};
						</script>
						<div class="v3-row">
							<div class="v3-col-md-3 v3-col-xs-12" style="padding-right: 0px;">
									<div class="v3-panel" style="padding:0px;">
										<div class="v3-panel-heading bg-warning" style="border-radius:0px !important;">
											<input type="text" class="form-control" style="background: white !important; border-radius: 20px;" id="cq" placeholder="Aratın veya yeni sohbet başlatın">
										</div>
										<div id="messages" style="height: 90vh; overflow: auto;"></div>
									</div>
							</div>
						<div id="messages_mobile" style="display:none; position: fixed; left: 0px; top: 0px; width: 100%; height: 90vh; z-index: 9999999999; background: white;"></div>
							<div class="v3-col-md-9 mdn" style="padding-left: 0px;">
								<div class="v3-panel" style="padding:0px;">
									<div id="messages_form" style="padding:0px; height: 96vh; overflow: hidden; margin-left: auto; margin-right: auto; background: #f8f8f8;">
										<center><i class="fa fa-comments" aria-hidden="true" style="margin-top:10%;font-size:200px; opacity:0.2;"></i>
										<br><p><?php echo translate("#Sohbete başlamak için soldan kullanıcı veya mesaja tıklayınız")?></p></center>
									</div>
								</div>
							</div>
						</div>
					</div>
			</section>
		</div>
	</div>
	<!-- end: page -->
</section>