<?php
			require 'db_conn.php';
			require 'core.php';
			
			if (loggedin()) {
					echo '';
				}else{
					header('Location: login.php');
				}
				
			?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

<!doctype html>
<html class="no-js"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="../favicon.png" rel="icon" type="image/x-icon" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
<!--[if lt IE 9]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
<link href="../css/main.css" rel="stylesheet" />
<link href="../css/home.css" rel="stylesheet" />
<link href="../css/animate.min.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="../css/dataurl.css">
<link rel="stylesheet" type="text/css" href="../css/iziModal.min.css">
<title>E-FOREXMARKET| Your Trusted Bitcoin  Mining and Forex Trade Company</title>
<link rel="manifest" href="../js/manifest.json">
<link href="../images/icon/favicon.png" rel="icon" type="image/x-icon" />
<link rel="icon" sizes="192x192" href="../favicon.png">
<link rel="apple-touch-icon-precomposed" href="../images/icon/favicon.png">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="../images/icon/favicon.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../images/icon/favicon.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../images/icon/favicon.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../images/icon/favicon.png" />
<script src="../js/jquery.min.js"></script>
<script src="../js/jquery.form.js"></script>
<script src="../js/pace.min.js"></script>
<script type="text/javascript" src="../js/sweetalert.min.js"></script>
 <script src="../js/language.js"></script>
    <script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>
<script>
var fade_outthis = function() {
	$(".alert").fadeOut().empty();
}
setTimeout(fade_outthis, 8000);

$(document).ready(function(){
    $(".closebtn").click(function(){
        $(this).parent().fadeOut().empty();
    });
});
</script>
</head>
<body>
<header class="cpanel_header row" id="cpanel_header">
<ul>
<li class="bar"><a id="menu_btn"><i class="fa fa-align-left"></i></a></li>
<li class="brand"><img src="../images/logo.png" title="E-FOREXMARKET| Your Trusted Forex and Investment Company" /></li>
<li class="user"><a href="#" id="open_account"><i class="fa fa-user"></i></a>
</li>
</ul>
</header>
<div id="google_translate_element2"></div>
<div id="account" class="udex-animate-right">
<ul>
<li class="title">Account</li>
<li><a href="info.php"><i class="fa fa-user"></i> <?php
			
			//$_SESSION["id"] = $id;
			$id = $_SESSION['id'];


			$sql = "SELECT `fullname` FROM users WHERE id='$id'";
			$result = mysqli_query($conn, $sql) or die( mysqli_error($conn));

			

			if($row = mysqli_fetch_array($result)) {

			    $bitcoin = $row['fullname'];
			    

			    echo $bitcoin;
			}
			
			?></a></li>
<!-- <li><a href="security"><i class="fa fa-gear"></i> Safety & Security</a></li> -->
<li><a href="change-password.php"><i class="fa fa-lock"></i> Change Password</a></li>
<li><a href="../logout.php"><i class="fa fa-power-off"></i> Sign Out</a></li>
</ul>
</div>
<script>
$('#open_account').click( function(){
	$("#account").toggle();
	$("#main, header, .cpanel_info, .udex_footer").toggleClass("cubic-right");
	$("body").toggleClass("udex_overflow");
});
$("#menu_btn").click( function(){
	$("#mySidebar").toggle();
	$("#main, header, .cpanel_info, .udex_footer").toggleClass("cubic-left");
	$("body").toggleClass("udex_overflow");
});
</script>
<style rel="modal-content">
	@media handheld, only screen and (max-width: 700px) {
		#modal-content{
			width: 90% !important;
			max-width: 90% !important;
			left: 0 !important;
		}
	}
	input, textarea { max-width: 100%; }
</style>

<!-- <script type="text/javascript">
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://embed.tawk.to/5f0565fd223d045fcb7b845e/default';
s1.charset='UTF-8';
s1.setAttribute('crossorigin','*');
s0.parentNode.insertBefore(s1,s0);
})();
</script> -->

<style type="text/css">
#imgArea {
	display: block;
	margin: 0 auto;
	position: relative;
	font-size: 13px;
	overflow:hidden;
}
#imgArea img {
	outline: medium none;
	vertical-align: middle;
	width: 100%;
}
#imgContainer {
	width: 100%;
	text-align: center;
	position: relative;
}
#imgChange input[type="file"] {
	bottom: 0;
	cursor: pointer;
	height: 100%;
	left: 0;
	margin: 0;
	opacity: 0;
	padding: 0;
	position: absolute;
	width: 100%;
}
/* Progressbar */
.progressBar {
	background: none repeat scroll 0 0 #fff;
	left: 0;
	padding: 5px 0;
	position: absolute;
	top: 50%;
	width: 100%;
	display: none;
}
.progressBar .bar {
	background-color: #2196f3;
	width: 0%;
	height: 18px;
}
.progressBar .percent {
	display: inline-block;
	left: 0;
	position: absolute;
	text-align: center;
	top: 5px;
	color: #FFF;
	width: 100%;
}
#imgChange {
	position: relative;
}
</style>
<div class="default cpanel_info">
USER ID: E-FOREXMARKETMining-<?php
			
			//$_SESSION["id"] = $id;
			$id = $_SESSION['id'];


			$sql = "SELECT `custid` FROM users WHERE id='$id'";
			$result = mysqli_query($conn, $sql) or die( mysqli_error($conn));

			

			if($row = mysqli_fetch_array($result)) {

			    $bitcoin = $row['custid'];
			    

			    echo $bitcoin;
			}
			
			?> <br> <br>
  </div>
<div class="udex-sidebar udex-collapse udex-animate-left" id="mySidebar">
<ul class="udex-ul">
<li ><a href="./"><i class="fa fa-home"></i> MY OFFICE</a></li>
<li><a href="transaction-log.php"> <i class="fa fa-history"></i> User Activity Log</a></li>
<li class="header"><a href="deposit.php"> <i class="fa fa-inbox"></i> Deposit Funds</a></li>
<li><a href="withdraw.php"> <i class="fa fa-money"></i> Withdraw Funds</a></li>
<!-- <li><a href="investment-new"> <i class="fa fa-database"></i> New Investment</a></li> -->
<li><a href="change-password.php"> <i class="fa fa-bullhorn"></i> Change Password</a></li>
<li><a href="info.php"> <i class="fa fa-gears"></i> Account Settings</a></li>
<!-- <li><a href="trading-view"> <i class="fa fa-bullseye"></i> Trade View</a></li> -->
<li><a href="../logout.php"> <i class="fa fa-power-off"></i> Logout</a></li>
<li><a href="../contact.php"> <i class="fa fa-exclamation-circle"></i> Help</a></li>
</ul>
</div>
<div class="udex-main" id="main">
<script src="../js/validation.js"></script>
<div class="row kk">
<div class="col-12" style="padding-top: 0">
<div class="title_container">
<ul class="breadcrumb right udex-hidden">
<li><a href="./"><i class="fa fa-home"></i> Home</a></li>
<li class="bold">Deposit Preview</li></ul>
<h4>Deposit Preview</h4>
<span class="decor_default"></span>
</div>
</div>
<div class="col-4 col-m-6 sticky">
		<div class="white section round center" style="padding:0">
		<div class="has-gradient-to-right-bottom padding"><h4 class="text-white">Ethereum</h4></div>
		<ul class="listing padding">
		<!--<li><img src="../images/5b55bb652af1a.png"></li>-->
		<li>
		<a href="index.php" class="btn has-gradient-to-right-bottom round-xxlarge" style="font-size: 14px; padding: 5px 20px"><i class="fa fa-send"></i> GO BACK</a>
		</li>
		</ul>
		</div>
		</div>
        
        <form action="" method="POST" enctype="multipart/form-data" class="col-8 col-m-6 sticky" id="form">
<input type="hidden" name="method" value="Ethereum" required>
<input type="hidden" name="amount" value="321" required>
<input type="hidden" name="charges" value="6" required>
<input type="hidden" name="add_deposit" value="1" required>
<div class="white section round">
<h4>Deposit Preview</h4><hr>
<div class="row container" style="max-width: 500px">
<div class="col-4 col-m-12 bold udex-right">
Deposit Amount:
</div>
<div class="col-8 col-m-12">
<div class="display-container">
<input type="number" name="amount" value="<?php
			
			//$_SESSION["id"] = $id;
			$id = $_SESSION['id'];


			$sql = "SELECT `amount` FROM users WHERE id='$id'";
			$result = mysqli_query($conn, $sql) or die( mysqli_error($conn));

			

			if($row = mysqli_fetch_array($result)) {

			    $bitcoin = $row['amount'];
			    

			    echo $bitcoin;
			}
			
			?>" required class="bold padding" style="width: 100%; padding-right: 80px !important;" disabled>
<span class="padding border grey display-topright" style="display: inline-block;">USD</span>
</div>
</div>
<div class="col-4 col-m-12 bold udex-right">
Deposit Charge:
</div>
<div class="col-8 col-m-12">
<div class="display-container">
<input type="number" name="charges" value="0" required class="bold padding" style="width: 100%; padding-right: 80px !important;" disabled>
<span class="padding border grey display-topright" style="display: inline-block;">USD</span>
</div>
</div>
<div class="col-4 col-m-12 bold udex-right">
Total Amount:
</div>
<div class="col-8 col-m-12">
<div class="display-container">
<input type="number" name="amount" value="<?php
			
			//$_SESSION["id"] = $id;
			$id = $_SESSION['id'];


			$sql = "SELECT `amount` FROM users WHERE id='$id'";
			$result = mysqli_query($conn, $sql) or die( mysqli_error($conn));

			

			if($row = mysqli_fetch_array($result)) {

			    $bitcoin = $row['amount'];
			    

			    echo $bitcoin;
			}
			
			?>" required class="bold padding" style="width: 100%; padding-right: 80px !important;" disabled>
<span class="padding border grey display-topright" style="display: inline-block;">USD</span>
</div>
</div>
</div><hr>
<div class="center container" style="max-width: 500px">
<h4>SENDING DETAILS</h4>
<h6>Click on "CopyText" To Copy The Official Wallet Address:</h6>

<input type="text"readonly ='readonly' value="WalletID" id="myInput" class="bit-add">

							        	<br />

							        	<br />

											<button type="button" onclick="myFunction()" class="btn btn-primary btn-lg" id="copy-btn" style="color:black !important;">Copy text</button>



											<script>

											function myFunction() {

											  var copyText = document.getElementById("myInput");

											  copyText.select();

											  document.execCommand("copy");

											  

												}

												$(document).ready(function(){

													$('#copy-btn').click(function(){

														swal({

															text: 'Bitcoin Wallet Address Copied',

															icon: 'success'

														});

													});

												});

											</script>
</div><hr>
<div class="row container" style="max-width: 500px">
<!--<div class="col-12 center"><h4>DEPOSIT PROOF</h4><hr>
<div class="col-4 col-m-12 bold udex-right">Select Image:</div>
<div class="col-8 col-m-12">
<div class="display-container">
<input type="file" name="file" required class="bold padding" style="width: 100%; padding-right: 60px !important;">
<span class="padding border grey display-topright" style="display: inline-block;"><i class="fa fa-photo"></i></span>
</div>
</div>
<div class="col-4 col-m-12 bold udex-right">Message:</div>
<div class="col-8 col-m-12">
<div class="display-container">
<textarea name="msg" required class="bold padding" style="width: 100%; height: 100px"></textarea>
<button class="btn has-gradient-to-right-bottom" name="deposit" style="font-size: 14px; padding: 15px 20px; width: 100%"><i class="fa fa-send"></i> SUBMIT NOW</button>
</div>
</div>
</div>-->
</div>
</div>
</div>
</form>
    
      <style> 
	.div-symbol-explanation { display: none; }
	#main {padding: 0 20px !important; } .row.kk [class*="col-"] { padding: 1px 5px;}
	@media (min-width: 992px){
		#main {padding: 0 40px !important; } .row.kk [class*="col-"] { padding: 1px 15px;}
	}
</style> <div class="dash_footer">
<p>Copyright © E-FOREXMARKETInvestment offers a simple and transparent mechanism for attracting investments and making profits.</p><br>
<p>Version 2.0</p>
</div>
</div>
<script>
$(document).on('change', '#image_upload_file', function () {
var progressBar = $('.progressBar'), bar = $('.progressBar .bar'), percent = $('.progressBar .percent');

document.getElementById('myModal').style.display = "none";
$('#image_upload_form').ajaxForm({
    beforeSend: function() {
		progressBar.fadeIn();
        var percentVal = '0%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    uploadProgress: function(event, position, total, percentComplete) {
        var percentVal = percentComplete + '%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    success: function(html, statusText, xhr, $form) {		
		obj = $.parseJSON(html);	
		if(obj.status){		
			var percentVal = '100%';
			bar.width(percentVal)
			percent.html(percentVal);
			$("#imgArea>img").prop('src','https://E-FOREXMARKETMining.uk/'+obj.image_small);		
		} else {
			alert(obj.error);
		}
    },
	complete: function(xhr) {
		progressBar.fadeOut();			
	}	
}).submit();		

});
</script>


<div id="myModal" class="modal padding">

<div class="modal-content-small">
<div class="modal-body center">
<span class="close text-grey">&times;</span><br>
<h3>Your profile photo</h3>
<h6>It is not allowed to publish:</h6><br>
<div class="danger">
<ul class="bullet">
<li>photos of an explicitly sexual or pornographic nature</li>
<li>images aimed at inciting ethnic or racial hatred or aggression</li>
<li>photos involving persons under 18 years of age</li>
<li>third-party copyright protected photos</li>
<li>images larger than 5 MB and in a format other than JPG, GIF or PNG</li>
</ul></div><br>
Your face must be clearly visible on the photo.<br>
All photos and videos uploaded by you must comply with these requirements, otherwise they can be removed.
</div>
<form enctype="multipart/form-data" action="" method="post" name="image_upload_form" id="image_upload_form">
<div class="modal-footer center lightgrey padding">
<a class="btn default border2 round" id="imgChange" style="width:200px">
<input type="hidden" name="user" value="99">
<input type="file" accept="image/*" name="image_upload_file" id="image_upload_file">Select a Photo</a>
</div>
</form>
</div>
</div>
<div class="udex-overlay" id="myOverlay"></div>
<ul class="udex_footer">
<div class="bodycontainer2" style="max-width: 500px">
<li><a href="./"><i class="fa fa-home"></i><span>Office</span></a></li>
<li><a href="https://www.tradingview.com/chart/"><i class="fa fa-line-chart"></i><span>Signal</span></a></li>
<li><a href="info.php"><i class="fa fa-gears"></i><span>Settings</span></a></li>
<li><a href="../logout.php"><i class="fa fa-power-off"></i><span>Logout</span></a></li>
</div>
<div id="modal-content" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Add Fund via Bitcoin</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="deposit" class="row">
<div class="col-12">
<div class="danger margintb">Deposit Charge : (1 + 1%) - USD</div>
<div class="display-container">
<input type="number" required name="bit_amount_fund" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> CONTINUE</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="modal-content2" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Add Fund via Ethereum</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="" class="row">
<div class="col-12">
<div class="danger margintb">Deposit Charge : (1 + 1%) - USD</div>
<div class="display-container">
<input type="number" required name="eth_amount_fund" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> CONTINUE</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="modal-content3" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Add Fund via Skrill</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="" class="row">
<div class="col-12">
<div class="danger margintb">Deposit Charge : (1 + 1%) - USD</div>
<div class="display-container">
<input type="number" required name="skr_amount_fund" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> CONTINUE</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="modal-content4" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Withdraw via Bitcoin</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="" class="row">
<div class="col-12">
<div class="danger margintb">Withdraw Charge : (25 + 2.25%) - USD</div>
<div class="display-container">
<input type="number" required name="btc_amount_withdraw" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> WITHDRAW NOW</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="modal-content5" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Withdraw via Ethereum</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="" class="row">
<div class="col-12">
<div class="danger margintb">Withdraw Charge : (25 + 2.30%) - USD</div>
<div class="display-container">
<input type="number" required name="eth_amount_withdraw" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> WITHDRAW NOW</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="modal-content6" class="iziModal card" style="border-bottom: 3px solid #FF6600; overflow: hidden; display: none; max-width:90% !important;">
<div class="iziModal-header" style="background: #333;">
<i class="iziModal-header-icon icon-stack fa fa-inbox"></i>
<h2 class="iziModal-header-title" style="color: #fff !important">Withdraw via Skrill</h2>
<a href="javascript:void(0)" class="iziModal-button-close" data-izimodal-close=""></a>
</div>
<div class="iziModal-wrap">
<div class="iziModal-content">
<form method="POST" action="" class="row">
<div class="col-12">
<div class="danger margintb">Withdraw Charge : (25 + 2.75%) - USD</div>
<div class="display-container">
<input type="number" required name="skr_amount_withdraw" placeholder="Amount" class="padding bold" style="width: 100%; padding-right: 70px !important">
<span class="display-topright grey padding border" style="display: inline-block">USD</span>
</div>
<button class="btn default padding center" style="margin-top: 10px; width: 100%"><i class="fa fa-send"></i> WITHDRAW NOW</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="../js/iziModal.min.js"></script>
<!-- <div class="alert green hang card" id="notihide"><span class="closebtn">&times;</span><i class="fa fa-check"></i> Login successful!
</div> -->
<script>
if ($(window).width() > 992) {
	boxPosition = $(".udex-sidebar").offset().top;
	$(window).scroll(function(){
	   var isFixed = $(".udex-sidebar").css("position") === "fixed";
	   if($(window).scrollTop() > boxPosition && !isFixed){
				$(".udex-sidebar").css({position:"fixed", top: "0px"});
	   }else if($(window).scrollTop() < boxPosition){
			$(".udex-sidebar").css({position:"absolute", top: "auto"});
	   }
	});
}
</script>
<script>
$("#modal-content, #modal-content2, #modal-content3, #modal-content4, #modal-content5, #modal-content6").iziModal({
        overlayColor: 'rgba(0, 0, 0, 0.8)',
		iconClass: 'icon-stack',
        width: 360,
        padding: 5
    });
    $(document).on('click', '.trigger-btc', function (event) {
        event.preventDefault();
        $('#modal-content').iziModal('open');
    });
    $(document).on('click', '.trigger-eth', function (event) {
        event.preventDefault();
        $('#modal-content2').iziModal('open');
    });
    $(document).on('click', '.trigger-skr', function (event) {
        event.preventDefault();
        $('#modal-content3').iziModal('open');
    });
    $(document).on('click', '.trigger-withdraw-btc', function (event) {
        event.preventDefault();
        $('#modal-content4').iziModal('open');
    });
    $(document).on('click', '.trigger-withdraw-eth', function (event) {
        event.preventDefault();
        $('#modal-content5').iziModal('open');
    });
    $(document).on('click', '.trigger-withdraw-skr', function (event) {
        event.preventDefault();
        $('#modal-content6').iziModal('open');
    });
</script>
<script>
// Get the modal
var modal = document.getElementById('myModal');

// Get the button that opens the modal
var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];

// When the user clicks on the button, open the modal
btn.onclick = function() {
    modal.style.display = "block";
}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
    modal.style.display = "none";
}

// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}
</script>


<script src="//code.jivosite.com/widget/5Cyj4bRMEN" async></script>


</body>
</html
