<?php

	include 'header.php';
	include 'navbar.php';

?>
<script type='text/javascript' src='//platform-api.sharethis.com/js/sharethis.js#property=5c57ef865ee7f900110ea412&product='inline-share-buttons' async='async'></script>

			<div class="row">
						<div class="col-12 grid-margin">
						  <div class="card">
							<div class="card-body">
							  <h3 class="card-title">Promotional Referral Link:</h3>
							  <p>Referral marketing is a method of promoting products or services to new customers through referrals, usually word of mouth. Such referrals often happen spontaneously but businesses can influence this through appropriate strategies.</p>
								<p>Referral marketing is a process to encourage and significantly increase referrals from word of mouth, perhaps the oldest and most trusted marketing strategy. This can be accomplished by encouraging and rewarding customers, and a wide variety of other contacts, to recommend products and services from consumer and B2B brands, both online and offline.</p><p>&nbsp;</p>

							  <p class="card-description">
								Copy and share your referral link
							  </p>
							  
							  <div class="row">
								<div class="col-md-6">
								  <h6 class="card-title">Left Referral Link</h6>
								  <div id="dragula-event-left" class="py-2">
									<div class="card rounded border mb-2">
									  <div class="card-body p-3">
										<div class="media">
										  <div class="media-body">
											<h6 class="mb-1" id='copy_left_link'>http://localhost/MyBooster/register.php?refer_id=<?php echo $_SESSION['refer_id'];?>&leg=left</h6>
											<div class="sharethis-inline-share-buttons"></div>

											<p class="mb-0 text-muted">
											 Will add member to your left
											</p>
											<p>&nbsp;</p>
											<p>
												<button type="button" class="btn btn-outline-primary btn-rounded btn-fw" id='btn_left_link'>Copy Left Link</button>
											</p>
										  </div>
										</div>
									  </div>
									</div>
								  </div>
								</div>

								<div class="col-md-6">
								  <h6 class="card-title">Right Referral Link</h6>
								  <div id="dragula-event-left" class="py-2">
									<div class="card rounded border mb-2">
									  <div class="card-body p-3">
										<div class="media">
										  <div class="media-body">
											<h6 class="mb-1" id='copy_right_link'>http://localhost/MyBooster/register.php?refer_id=<?php echo $_SESSION['refer_id'];?>&leg=right</h6>
											<p class="mb-0 text-muted">
											  Will add member to your right
											</p>
											<p>&nbsp;</p>
											<p>
												<button type="button" class="btn btn-outline-primary btn-rounded btn-fw" id='btn_right_link'>Copy Right Link</button>
											</p>
										  </div>
										</div>
									  </div>
									</div>
								  </div>
								</div>
            				  </div>
							  
    						</div>
						 </div>
					 </div>
				   </div>

				  <button type="button" class="btn btn-primary btn-sm" onclick="showToastPosition('bottom-left', 'LEFT')" id="leftClick" hidden></button>
                  <button type="button" class="btn btn-primary btn-sm" onclick="showToastPosition('bottom-right', 'RIGHT')" id="rightClick" hidden></button>

<script>


		$("#btn_left_link").click(function(){
            
            var $temp = $("<input>");
            $("body").append($temp);
            $temp.val($("#copy_left_link").text()).select();
            document.execCommand("copy");
			$("#leftClick").trigger('click');
			$temp.remove();
            $.notify("Link Copied","success");
            
        });

          $("#btn_right_link").click(function(){
            //alert("hi");
            var $temp = $("<input>");
            $("body").append($temp);
            $temp.val($("#copy_right_link").text()).select();
            document.execCommand("copy");
			$("#rightClick").trigger('click');
            $temp.remove();
            $.notify("Link Copied","success");

        });







</script>





<?php
	include 'footer.php';
?>