<?php

include('views/_header.tpl.php');

if (isset($_GET['reg_ok'])) {
	$msg = 'Registration Successful';
}

$showalertbar = false;

if (isset($_GET['follow'])) {
	$showalertbar = true;
} else {
	$showalertbar = false;
}

$showalertbaralready = false;
if (isset($_GET['alreadyfollowing'])) {
	$showalertbaralready = true;
} else {
	$showalertbaralready = false;
}

if (isset($msg)) {
	echo "<b>$msg</b><br /><br />";
}

?>

<script type="text/javascript" src="/static/js/jQuery/js/jquery.lightbox.js" defer> </script>
<link rel="stylesheet" type="text/css" href="/static/js/jQuery/css/jquery.lightbox.css" media="screen" defer />

<style type="text/css">
.spacer { padding-top: 53px; }
button { height:32px; margin-top:-3px; }
.btn {
	padding: 11px 16px;
}
.btn-blue {
	border-radius: 50px;
	-webkit-border-radius: 50px;
	-moz-border-radius: 50px;
}
.btn-blue {
	border-color: #000 !important;
	color: #FFF;
	background: #000 !important;
}
.btn-blue:hover {
	background:#f11303 !important;
}
#footer {
    border-top: 0px solid #d4d4d4;
    background: #FFF;
    padding: 0px 0 0 0;
}
.main-footer { display:none; }

img.bgprofile {
	height: 290px;
	width: 100% !important;
	position: absolute;
	left: 0;
	top: 0;
	right:0;
	/*max-width: 560px;*/
	-webkit-filter: blur(75px); /* Safari 6.0 - 9.0 */
	filter: blur(75px);
}

.fancybox-next span {
	right: 5px;
	position: fixed;
}
.fancybox-prev span {
	left: 5px;
	position: fixed;
}
.fancybox-nav span {
	visibility: visible;
}
a.fancybox-nav.fancybox-next {
	position: fixed;
	right: 0px;
	width: 25px;
}
a.fancybox-nav.fancybox-prev {
	position: fixed;
	left: 0px;
	width: 25px;
}

.makeintro a {
	background:#eee; 
	padding:5px 15px;
	font-size:15px;
	border-radius:4px;
}

/* ####################################### */
/* ########## INSTAGRAM STYLING ########## */
/* ####################################### */

/*ul, menu, dir {
    display: block;
    list-style-type: disc;
    -webkit-margin-before: 1em;
    -webkit-margin-after: 1em;
    -webkit-margin-start: 0px;
    -webkit-margin-end: 0px;
    -webkit-padding-start: 0px;
}

img.il-photo_img { width:100px; height:auto; }*/

h1 { font-family: Montserrat, sans-serif; }

#map-canvas { width:100%; }

h2 { border-bottom:1px solid #ccc; padding-bottom:5px; text-shadow:0px 1px 0px #fff; margin-bottom:0px; }

ul.average-rating-stars {
	float: right;
	margin: 0;
	padding: 0;
	list-style: none;
}
ul.average-rating-stars li {
	float: left;
	width: 21px;
	height: 21px;
}
ul.average-rating-stars li.on { background: transparent url(/static/images/star-on.png) no-repeat center center; }
ul.average-rating-stars li.off { background: transparent url(/static/images/star-off.png) no-repeat center center; }

#profile-gallery-wrapper {
	position:relative;
    height:auto;
    min-height: 375px;
	max-height: 375px;
	max-width:50%;
	float:left;
	padding:0px !important; 
}

/* ##### IMAGE PORTFOLIO STUFF ##### */

	.half { float:left; width:50%; overflow:hidden; max-width:50%; }
	.rsDefaultInv .rsBullets { bottom:35px !important; z-index:999 !important; }
	.thumbcon { padding-bottom:15px; }
    .thumb-wrapper {
        margin-top: 25px;
        width: 100%;
        height: auto;
        margin:auto;
    }
    .thumb-wrapper .thumb {
        float: left;
        margin-left: 1px;
		margin-bottom:1px;
    }
    .thumb-wrapper .thumb img {
        width: 112px;
        height: 93px;
    }
	.fancybox-lock .fancybox-overlay { }
	.fancybox-overlay-fixed {
		z-index: 9999;
	}	
	.fancybox-skin { padding:0px !important; top:3px !important; }
	
	h3 {
		font-family: Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;
		font-size:48px;
		text-shadow:0px 1px 0px #fff;
	}
	
	.alertbar a, .alertbar a:active, .alertbar a:link, .alertbar a:visited {
		background: rgba(255,255,255,.7);
		padding:3px 10px;
		border-radius: 50px;
		-webkit-border-radius: 50px;
		-moz-border-radius: 50px;
	}
	.alertbar a:hover {
		background: #00A1FE;
		color:#fff;
	}
	
	.fa-chevron-down{
		transform: rotate(0deg);
		transition: transform .3s linear;
	}

	.fa-chevron-down.open{
		transform: rotate(180deg);
		transition: transform .3s linear;
	}	

/* ############################################################################## */
/* ##############################  MOBILE STYLING  ############################## */
/* ############################################################################## */

@media screen and (max-device-width:  1024px), screen and (max-width:  1024px) {
	#profile-gallery-wrapper {
		position:relative;
		height:auto;
		min-height: 327px;
		max-height: 327px;
		max-width:50%;
		float:left;
		padding:0px !important; 
	}	
}

@media screen and (max-device-width:  979px), screen and (max-width:  979px) {
	
}	

/******************************************************************************/ 
@media screen and (max-device-width:  767px), screen and (max-width:  767px) {
	#profile-gallery-wrapper {
		position:relative;
		height:auto;
		min-height: 240px;
		max-height: 240px;
		max-width:50%;
		float:left;
		padding:0px !important; 
	}		
}	

/* Landscape phones and down */
@media (max-width: 586px) {
	.half { max-width:100%; width:100%; }
	#profile-gallery-wrapper { width:100%; display:block; min-height: 240px; max-height: 240px; 
	max-width:100%; border:0px; margin:0 0 10px 0; }
	.thumb-wrapper .thumb img {
        width: 119px;
        height: 90px; /* was 88x70 */
    }
	ul.instagram-gallery img { width:49.7%; height:auto; margin-right:1px; margin-bottom:1px; }
    ul.profile-gallery img { width:49.7%; height:auto; margin-right:1px; margin-bottom:1px; }
	.fancybox-overlay-fixed {
		z-index: 999 !important;
	}		
}

/* Landscape phones and down */
@media (max-width: 480px) {
	.half { max-width:100%; width:100%; }
	#profile-gallery-wrapper { width:100%; display:block; min-height: 240px; max-height: 240px; 
	max-width:100%; border:0px; margin:0 0 10px 0; }
	.thumb-wrapper .thumb img {
        width: 119px;
        height: 90px; /* was 88x70 */
    }
	ul.instagram-gallery img { width:49.7%; height:auto; margin-right:1px; margin-bottom:1px; }
    ul.profile-gallery img { width:49.7%; height:auto; margin-right:1px; margin-bottom:1px; }
	.fancybox-overlay-fixed {
		z-index: 999 !important;
	}		
}

/* Landscape phones and down */
@media (max-width: 375px) {
	.thumb-wrapper .thumb img {
        width: 100px;
        height: 80px;

    }
    .qrfixedbottom { 
		padding-bottom:5px;
	}
/*	.scrollup {
		bottom: 120px;
	}*/
}

</style>

<!-- FULL WIDTH CONTAINER -->
<div class="home-feature-category" style="background:#fff; padding:0px; border:none; margin-bottom:0px;">
    <input type='hidden' name='location_lat' value="<?= $user['location_lat']; ?>"/>
    <input type='hidden' name='location_lng' value="<?= $user['location_lng']; ?>" />
    <input type='hidden' name='location_last_lat' value="<?= $user['location_last_lat']; ?>"/>
    <input type='hidden' name='location_last_lng' value="<?= $user['location_last_lng']; ?>"/>
    <script src='/static/js/googlemaps/GoogleMapsProfileView.js'></script>
    <!--<div id="map-canvas"></div>-->

<?php if($showalertbar == true){ ?>
<div class="alertbar" style="display:nonex; background:#dd1000; color:#fff; height:40px; text-align: center; 
	font-weight:300; font-size:15px; line-height:40px; margin-bottom:0px; 
	font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;">
	<a href="#login" class="loginpop" style="color:#fff; font-weight:500">Login</a> or 
	<a href="/auth/join?ref=<?= $user['refcode'] ?>" class="" style="color:#fff; 
	font-weight:500">Sign up</a> to follow this account.
</div>
<?php } ?>

<?php if($showalertbaralready == true){ ?>
<div class="alertbar" style="display:nonex; background:#dd1000; color:#fff; height:50px; text-align: center; 
	font-weight:300; font-size:15px; line-height:50px; margin-bottom:0px; 
	font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;">
	You are following this account. &nbsp; <a href="/profile/<?= $user['user_slug']; ?>" style="font-weight:700;">Ok</a><!--are now following this account.-->
</div>
<?php } ?>

<?php if(isset($_GET['intro'])){ ?>
<div class="alertbar" style="display:nonex; background:#dd1000; color:#fff; height:50px; text-align: center; 
	font-weight:300; font-size:15px; line-height:50px; margin-bottom:0px; 
	font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;">
	Your intros have been sent... &nbsp; <a href="/profile/<?= $user['user_slug']; ?>" style="font-weight:700;">Ok</a><!--are now following this account.-->
</div>
<?php } ?>

<!--<div style="height:35px; width:35px; background:none; position:absolute; top: 170px; left:10px;">
	<a href="/members" style="float:left; z-index:-9999999999999999999999">
		<img src="/static/images/icons/back_arrow_button.png" alt="<" style="height:25px; width:25px; 
		margin-top:-5px; margin-right:7px;" align="middle"></a>
</div>-->


<div class="floatingqr" style="position:absolute; width:40px; height:40px;; position:absolute; top:70px; right:10px;
	z-index:1;">
	<a href="#shareqrcode" class="loginpop" title="Join this Account's Mob"
	style="max-width:100px; width:100px;"><img
	src="/static/images/icons/qr_code_mini_white.png" alt="QR"
	style="width:40px;" /></a>
</div>

<!-- ////////////////////////////////////// -->
<!-- ////////     QR CODE IMAGE    //////// -->
<!-- ////////////////////////////////////// -->

<div class="qrfixedbottom" style="display:nonex; width:200px; height:auto; padding:15px 0; background:rgba(0,0,0,.8); position:fixed; left:0; bottom:0; z-index:9999999999999999999999999999; color:#fff; font-size:16px; line-height:24px;
	border-top-right-radius:8px;">
	
	<!-- background:rgba(241,19,3,.7); -->
	<div style="padding-left:10px;">
		<a href="javascript:;" id="openGASettings" style="color:#ccc; 
		font-size:15px;"><i class="fa fa-chevron-up"></i> Share or Join this Mob</a>
	</div>
</div>

	<div style="">
		<?php if ($user['image']) {
			echo "<div style='width:auto; height:290px; padding:0px; border:0px solid #ccc; overflow:hidden;
					margin-bottom:0px;'>
						<div style='position:relative; background-color:#eee; width:auto; height:290px; margin:0;
						overflow:hidden; background-size:cover;'>
						<div style='display:nonex; position:relative; z-index:99 !important;
						border:2px solid #fff; overflow:hidden; height:250px; width:250px; margin: 19px auto 0;
							border-radius:50%; -moz-border-radius: 50%; -webkit-border-radius: 50%;'>
								<img style='height:250px; width:auto !important; max-width:250px;
								position:relative; z-index:0 !important; background-position:center center;' 
								src='{$user['image']}' />
							</div>
							<img class='bgprofile' src='{$user['image']}' alt='BG'
							style='background-position:center center; background-size:cover; width:100%;' />
						</div>
					</div>";
		}

		// create average rating stars list
		$avg_rating_stars = "<ul class='average-rating-stars'>";
		for ($i = 0, $m = 0; $m < 5; ++$i, $m++) {
			$on_or_off = $i < (int) $user['proposals_avg_rating_received'] ? "on" : "off";
			$avg_rating_stars .= "<li class='" . $on_or_off . "'>&nbsp;</li>";
		}
		$avg_rating_stars .= "</ul><div class='clear'></div>";
		?>	
	</div>


<!-- PAGE CONTAINER WITH MARGINS -->
    <div class="container_12 clearfix" style="background:#fff;">
		<div class="grid_4 marked-category" style="padding-top:0px;">
        		<!-- image was here -->
			<div style="padding:0 10px">
				<div style="font-size:36px; font-family:'Open Sans',Montserrat-Light,sans-serif; font-weight:300; 
					margin-top:25px; margin-bottom:15px">
					<?= $user['name'] ?> <?php if ($user['is_approved'] == 1) { ?><img 
					src="/static/client/verified_badge.png" alt="Verified!" 
					style="display:inline; height:30px; margin-top:-10px;" /><?php } ?>
				</div>
				
				<div style="font-size:17px; font-family:'Open Sans',Montserrat-Light,sans-serif; font-weight:300;
				margin-bottom:15px">
					@<?= strtolower($user['user_slug']) ?>
				</div>
				<div class="clear"></div>
				
<!--				<?php if ($user['is_activated']) : ?>
				<span style="color:#00C416;"><i class="fa fa-check"></i> <b>Verified!</b></span><br />
				<?php endif; ?>-->
				
				<span style="display:none;"><?= $user['is_activated'] ? "Yes" : "No" ?></span>
				
				<?php if (!empty($user['biography'])) : ?>
				<!--<i class="fa fa-user"></i> <b>Bio:</b> -->
				<div style="font-size:15px; line-height:24px; font-weight:300; margin-bottom:10px">
					<?= nl2br(strip_tags($user['biography'])) ?><br />
				</div>
				<?php endif; ?>
				
				<div style="width:100%; font-weight:300; margin-bottom:10px; font-size:15px">
	               	<?php if (!empty($user['city'])) : ?>
					   <i class="fa fa-map-marker"></i> <?= $user['city'] ?>, <?= $user['state'] ?>
					<?php endif; ?>
					
					<span style="float:right;"> 
					<?php
						//date("Y-m-d", strtotime("+30 minutes"))
						$tenminago = date("Y-m-d H:i:s",strtotime("-10 minutes"));
						//echo $tenminago; 
						if(strtotime($user['last_active']) > $tenminago) { ?>
						<span style="font-weight: 600; color: #00c531;">&#x25cf;</span>
					<?php } else { ?>
						<span style="font-weight: 600; color: #bbb;">&#x25cf;</span>
					<?php } ?>
					 Last Active: <?= date('m/d/y',strtotime($user['last_active'])); ?></span>
				</div>
				<div class="clear"></div>
				
				<!-- ////////////////////////////////////// -->
				<!-- ////////    PROFILE EXPAND    //////// -->
				<!-- ////////////////////////////////////// -->
				
				<div id="pp_inputs" class="expandprofile" style="display:none;">
				<div style="margin:5px 0; border-top:1px dashed #ccc; border-bottom:1px dashed #ccc; 
					line-height:20px; padding:7px 0; font-size:15px; line-height:25px; height:48px;
					overflow:hidden;">
					<?php
						$skills = explode (",", $user['temperaments']);
						$count = 0;
						if (!empty($user['temperaments'])) {
							echo "SKILLS: ";
						}
						foreach ($skills as $skill) {
							$count++;
							if ($count !=1) {
								echo " &bull; ";
							}
							if (!empty($skill)) {
								echo "<a class='hashtags' href='/members?search=" . trim($skill) . "' style='background:none; font-size:15px;'>" . trim($skill) . "</a>";
							}
						}
					?>
				</div>
				<div class="clear"></div>
				
				<!-- ############# OCCUPATION AND TITLE ############# -->
				<div style="margin-top:10px; font-family:'Open Sans',Montserrat-Light,sans-serif; font-weight:300;
					font-size:15px;">
					<i class="fa fa-building"></i> <?= $user['occupation_title'] ?> at <?= $user['occupation_at'] ?>
				</div>
				
				<!-- ############# WEBSITE AND OTHER LINKS ############# -->
				<div style="font-size:15px; line-height:25px; font-weight:300; margin-top:10px">

                <!--<i class="fa fa-map-marker"></i> <?= $user['location'] ?><br />-->
				<?php if (!empty($user['website'])) { ?>
					<img src="/static/images/icons/paperclip_icon.png" alt="link:" style="height:20px;" />
					<a href="<?= $user['website'] ?>"><?= $user['website'] ?></a><br />
				<?php } ?>

				<?php if (!empty($user['www'])) { ?>
					<img src="/static/images/icons/paperclip_icon.png" alt="link:" style="height:20px;" />
					<a href="<?= $user['www'] ?>"><?= $user['www'] ?></a><br />
				<?php } ?>				
				
				<?php if (!empty($user['social_link'])) { ?>
					<img src="/static/images/icons/paperclip_icon.png" alt="link:" style="height:20px;" />
					<a href="<?= $user['social_link'] ?>"><?= $user['social_link'] ?></a><br />
				<?php } ?>
				<!--<i class="fa fa-user"></i> <b>Bio:</b> -->
				
                </div>
			</div>
            <br />
            </div>
            
            <!-- //////////// EXPAND PROFILE ENDS HERE //////////// -->
            <!-- ////////////////////////////////////////////////// -->
            
			<div style="position:relative; border-top:1px solid #ccc; height:20px; background:none;
				padding:3px 0 10px; margin:0 auto; max-width:100px;">
				<div style="width:60px; height:20px; background:none; color:#aaa; text-align:center; margin:0 auto;">
					<span id="chevron_ppp" style=""><strong>More</strong></span> <i id="chevron_pp" 
					class="fa fa-chevron-down"></i>
				</div>
			</div>
			<div class="clear"></div>
            
			<!-- START OF ACTION BUTTONS -->
			<div class="actions" style="text-align:center; position:relative; overflow:hidden;">
			
				<?php if (!$_SESSION['user']['id']) { ?>
					<!-- ###########   UNLOGGED    ########### -->				
					<a href="javascript:;" class="btn btn-blue pleaselogin"><i 
						class="fa fa-paper-plane"></i> Message</a>&nbsp;&nbsp;&nbsp;

					<a href="javascript:;" class="btn btn-blue pleaselogin" style="width:70px;">
						<i class="fa fa-plus"></i> Follow</a>
						
				<?php } else { ?>
				
					<?php if ($_SESSION['user']['id'] == $user['id']) { ?>
						<a href="/messages" class="btn btn-blue" style="margin-right:10px;">
						<i class="fa fa-envelope"></i></a>
					<?php } else { ?>

					<?php } ?>
				
					<a href="#" class="btn btn-blue sendmsg"><i 
						class="fa fa-paper-plane"></i> Message</a>&nbsp;&nbsp;&nbsp;

					<?php if ($isFollowed) { ?>
						<a href="?unfollow" class="btn btn-blue">Unfollow</a>
					<?php } else { ?>
						<a href="?follow" class="btn btn-blue">
						<i class="fa fa-plus"></i> Follow</a>
						<!--&nbsp;&nbsp;Get updates <?= $user['name'] ?>&rsquo;s activity-->
					<?php } ?>	
					
					<?php if ($_SESSION['user']['id'] == $user['id']) { ?>
						<a href="/news" class="btn btn-blue" style="margin-left:10px;">
						<i class="fa fa-flag"></i></a>
					<?php } else { ?>

					<?php } ?>
				<?php } ?>			

				<?php if ($_SESSION['user']['is_admin'] == 2): ?>
					<br><br>
					<form method="POST" action="/auth/loginas">
						<input type="hidden" name="log_as" value="<?= $user['id'] ?>">
						<button class="btn btn-red">Login as this user</button>
					</form>
					
				<?php endif ?>
				
			</div>

			<div id="sendMsg" style="display:none; padding-top:10px;">
				<form id="pm_form">
					Send private message to <?= $user['name'] ?>:<br />
					<input type="hidden" name="to" value="<?= $user['id'] ?>" />
					<textarea name="message" id="msgText" 
					style="border-radius:0; border:1px solid #ddd; width:98%; height:90px; margin-bottom:5px;"></textarea>
					<br />
					<input type="submit" class="btn btn-blue" value="Send" />
				</form>
			</div>

			<script>
			$('.sendmsg').click(function () {
				$('#sendMsg').slideToggle(1000);
				//$('.actions').slideUp(700, function () {
					//$('#sendMsg').slideDown();
					//$('#sendMsg').slideToggle();
				//});

				$('#pm_form').submit(function () {
					//alert('Works...');
					$.ajax({
						url: '/messages/send',
						type: 'post',
						data: $(this).serialize(),
						success: function (data) {
							var data = $.parseJSON(data);
							//var json = JSON.stringify(result);
							//alert(result);
							//alert(data.status);
							//{"status":1,"message":"Message submitted successfully! MID: 1151","id":1151}
							//if (d == 'ok') {
							if (data.status == 1) {
								$('#sendMsg').html("Message Sent!");
							}
						}
					});
					return false;
				});
				 //sendmsg.preventDefault();
				 return false;
			});
			</script>
			<br />
			<!-- END OF ACTION BUTTONS -->
			
			<!-- ////////////////////////////////////// -->
			<!-- ////////     QR CODES START   //////// -->
			<!-- ////////////////////////////////////// -->
		
			<div style="width:100%; height:50px; padding:5px; background:#eee; line-height:40px;
			-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
			text-align:center; -webkit-border-radius: 8px;
			-moz-border-radius: 8px; border-radius: 8px;">
				<div class="showqrcodeleft" style="width:50%; display:inline-block; float:left; 
				background-color:#ffffff; 
				height:40px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;">
					FOLLOW
				</div>
				<div class="showqrcoderight" style="width:50%; display:inline-block; float:left; background:none; 
				color:#aaa; height:40px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; 
				box-sizing: border-box;">
					JOIN MOB
				</div>
			</div>
			<br />
			
			<div class="qrcodeleft" style="">
			<div style="text-align: center; font-size:15px; font-weight:300; line-height: 25px">
				<a href="#login" class="loginpop" style="font-weight:500;">Login</a> + Scan to 
				follow this Account
			</div>
			
			<?php require_once '3rdparty/phpqrcode/qrlib.php';

			//$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'members'.DIRECTORY_SEPARATOR;
			$PNG_TEMP_DIR_REF = '/home/flipmob/public_html/3rdparty/phpqrcode/follow/';
			$PNG_WEB_DIR_REF = '3rdparty/phpqrcode/follow/';
			$rfname = $user['user_slug'] . '.png';
			$rfilename2 = '3rdparty/phpqrcode/follow/' . $rfname;
			$rfilename = $PNG_TEMP_DIR_REF.$rfname;
			$refurl = 'https://flipmob.com/profile/'.$user['user_slug'].'?follow';

			//$qr_string = array(
			//    'website' => 'https://preorder.sqdash.co/'.$page['slug'],
			//);
			//echo "<br />";
			//$qrString = json_encode($qr_string);
			$rqrString = "Open 'flipmob.com/profile/".$user['user_slug']."?follow' to follow this Member/Account.";
			//$qrString = "Open to verify the Vax or Clearance Pass.";
			//echo $qrString;
			QRcode::png($rqrString, $rfilename2);
			//QRcode::png('https://preorder.sqdash.co/pinipico', $filename2);

			echo '<div style="background: url(/static/system/qr_code_reverse_scan_border.png) no-repeat; background-size:contain; margin:0 auto; margin-top:10px; padding:0px; height:150px; width:150px;"><img src="/'.$PNG_WEB_DIR_REF.basename($rfilename).'"alt="Follow this Member/Account" style="border:0px solid #ddd; width:150px; height:auto; box-shadow: 0 3px 10px rgb(0 0 0 / 20%);" /></div>';
			//echo "<br /><br /><br />";
			?> 
			
			</div>
			<!-- //////////// QR CODE LEFT PANEL ENDS HERE //////////// -->
			<!-- ////////////////////////////////////////////////////// -->		
			
			<?php //require_once '3rdparty/phpqrcode/qrlib.php';

			//$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'members'.DIRECTORY_SEPARATOR;
			$PNG_TEMP_DIR_REF3 = '/home/flipmob/public_html/3rdparty/phpqrcode/referrals/';
			$PNG_WEB_DIR_REF3 = '3rdparty/phpqrcode/referrals/';
			$rfname3 = 'user_' . $user['id'] . '.png';
			$rfilename3 = '3rdparty/phpqrcode/referrals/' . $rfname3;
			$rfilename4 = $PNG_TEMP_DIR_REF3.$rfname3;
			$refurl3 = 'https://flipmob.com/r/'.$user['refcode'];

			//$qr_string = array(
			//    'website' => 'https://preorder.sqdash.co/'.$page['slug'],
			//);
			//echo "<br />";
			//$qrString = json_encode($qr_string);
			$rqrString3 = "Open 'flipmob.com/r/".$user['refcode']."' to sign up as a Referral of this Member/Account
			and join their FlipMob.";
			//$qrString = "Open to verify the Vax or Clearance Pass.";
			//echo $qrString;
			QRcode::png($rqrString3, $rfilename4);
			//QRcode::png('https://preorder.sqdash.co/pinipico', $filename2);

			//		echo '<div style="background: url(/static/system/qr_code_reverse_scan_border.png) no-repeat; background-size:contain; margin:0 auto; margin-top:10px; padding:0px; height:150px; width:150px;"><img src="/'.$PNG_WEB_DIR_REF.basename($rfilename).'"alt="My Unique Referral QR Code"
			//					//style="border:1px solid #ddd; width:150px; height:auto;" /></div>';
			//		echo "<br /><br /><br />";
			?> 						
			
			<!-- ////////////////////////////////////// -->
			<!-- ////////     QR CODE IMAGE    //////// -->
			<!-- ////////////////////////////////////// -->
			
			<div class="qrcoderight" style="display:none;">
				<div style="text-align: center; font-size:15px; font-weight:300; line-height: 25px">
					<a href="#login" class="loginpop" style="font-weight:500;">Scan</a> + signup to
						join this Account/User&rsquo;s FlipMob...
				</div>
				<br />

				<center><img src="/3rdparty/phpqrcode/referrals/user_<?= $user['id'] ?>.png"
				style="height:150px; margin-top:0px; border:0px solid #ddd;
				box-shadow: 0 3px 10px rgb(0 0 0 / 20%);"></center>
			</div>
			
			<!-- ////////////////////////////////////// -->
			<!-- ////////      COMING SOON     //////// -->
			<!-- ////////////////////////////////////// -->
			
			<div class="expandcomingsoon" style="display:none;">			
				<br /><br />
				<h3 style="margin-bottom:20px;">
					COMING SOON
				</h3>
				<div style="font-family: Montserrat, 'Open Sans', Raleway, Helvetica, Verdana, sans-serif;
					font-size:15px; line-height:24px;">
					- <span style="font-weight:600;">Send Push Notifications (and SMS Text Messages)
					to your Mob totally free of charge</span>- from our official FlipMob Mobile App 
					(soon to launch).
					<br /><br />
					- <span style="font-weight:600;">Grow your Mob with Loyalty + exclusive daily giveaways</span> 
					- Load your Profile/Account with Loyalty Points, which give members of your Mob chances 
					to win daily giveaways + prizes. Plus, you earn a commission percentage on all the revenue
					your Mob generates.	
				</div>
			</div>
			
			<!--<br /><br />
			<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>-->

<?php if ($user['account_type'] == 'Model') : ?>
Member Type 1 (ie. User)
<?php endif; ?>
<!--
				<b>Height:</b> <?= $user['height']; ?><br />
				<b>Weight:</b> <?= $user['weight']; ?> lbs<br />
				<b>Eye Color:</b> <?= $user['eye_color']; ?><br />
				<b>Other Skills:</b> <?= $user['willing_to_do']; ?><br />

                <b>Proposals:</b> <?= $user['proposals_count'] ?><br />
                <b>Ave Rating:</b> <?= $user['proposals_avg_rating_received'] ?> / 5<br />
				<span style="float:left;"><?= $avg_rating_stars ?></span>
				<br /><br />
                <b>Projects:</b> <a class="load-popin" href="/project/summary?uid=<?= $user['id'] ?>">View Project History</a><br />
-->
<?php if ($user['account_type'] == 'Company') : ?>
<?php else : ?>
<?php endif; ?>
<!--
                <i class="fa fa-map-marker"></i> <?= $user['location'] ?><br />

                <?php if (!empty($user['mailing_address'])) : ?>
                <b>Mailing:</b> <?= $user['mailing_address'] ?><br />
                <?php endif; ?>

                <?php if (!empty($user['category_name'])) : ?>
                <b>Category:</b> <?= $user['category_name'] ?><br />
                <?php endif; ?>

                <b>Name:</b> <?= $user['contact_name'] ?><br />
                <b>E-Mail:</b> <?= $user['contact_email'] ?><br />
                <b>Phone:</b> <?= $user['contact_phone'] ?><br />
                <b>BTTBR:</b> <?= $user['contact_best_time'] ?>
-->
			<div class="clear"></div>
			</div><!-- END OF 4 COLUMNS GRID  -->

        <div class="grid_4 marked-category" style="padding-top:0px;">
			<h2 style="font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif; 
			font-weight:300; border-bottom:1px solid #eee; padding-bottom:7px">
			My <a href="/category/all" title="View all FlipMobs" 
					style="font-weight:600;">FlipMobs</a> (<?= count($user['projects']) ?>):
			</h2>
			<?php

			foreach ($user['projects'] as $project) {
				//print_r($project);
//				if (!$project['main_img']) {
//					continue; // skip features without main image
//				}
				echo "<div style='height:auto; width:auto; padding:10px 0; border-bottom:1px solid #eee;'>
				<div style='float:left; display:inline-block; width:102px; height:102px;
				overflow:hidden; background:none; margin:0 10px 0 0'>
				<a href='/listing/{$project['id']}'><img
				style='height:100px; width:auto; max-width:100px; min-width:100px; border-radius:50%;
				object-fit:cover;
				-moz-border-radius: 50%; -webkit-border-radius: 50%; border:1px solid #ddd;' onerror=\"this.src='/static/images/square_wishlist_icon.png'\"
				src='" . getThumb($project['main_img']) . "' /></a></div>
				<div style='overflow:hidden; height:100px; width:auto; line-height:100px; font-family:Montserrat,Raleway,Helvetica,Verdana,sans-serif'>{$project['title']}</div>
				<div class='clear'></div></div>";
			}
			?>

		</div>
        <div class="grid_4 marked-category" style="padding-top:0px;">
			<form method="POST" action="">
			<h2 style="font-family:Montserrat,'Open Sans',Raleway,Helvetica,Verdana,sans-serif;
			font-weight:300; border-bottom:1px solid #eee; padding-bottom:7px">
				<a href="/members"><img src="/static/images/icons/directory_icon_cool.png" alt="All" 
					style="height:30px; margin-top:-3px" /></a> My FlipMob (<?= count($user['followers']) ?>):
				
				<div class="makeintrox" style="float:right; font-size:14px">
					<a href="/news" style="color:#000;" title="Click to view sent intros">Make Intros</a>
					<a href="#intros" class="loginpop" title="Making Intros"><img 
					src="/static/client/info_icon_black.png" alt="i" 
					style="height:22px; margin-top:-3px; margin-left:3px"></a>
				</div>
			</h2>
			<?php
			foreach ($user['followers'] as $fuser) {
				echo "<div style='height:auto; width:auto; padding:10px 0; border-bottom:1px solid #eee;
				position:relative; background:none;'>
					<div style='float:left; display:inline-block; width:102px; height:102px;
					overflow:hidden; background:none; margin:0 10px 0 0'>
						<a href='/profile/{$fuser['user_slug']}'>
						<img src='" . getThumb($fuser['image']) . "'
						style='object-fit:cover; height:100px; width:auto; max-width:100px; 
						min-width:100px; border-radius:50%;
						-moz-border-radius: 50%; -webkit-border-radius: 50%; border:1px solid #ddd; 
						clear:both' /></a>
					</div>
					<div style='height:102px; line-height:102px; position:relative; 
					float:left; font-family:Montserrat,Open Sans,Raleway,Helvetica,Verdana,sans-serif;'>
						<a href='/profile/{$fuser['user_slug']}'><b>{$fuser['name']}</b></a> 
						<span style='color:#ccc'>({$fuser['id']})</span> 					
					</div>
					<div style='position:absolute; right:10px; width:20px; background:none; line-height:102px;
					height:102px;'>
					<input class='txt' type='checkbox' name='invited_users[]' value='{$fuser['id']}' 
					style='width:20px;'>
					</div>
					<div style='float:left; display:none;'><br />{$fuser['project_count']} projects<br />
						{$fuser['avg_rating_received']} average rating
					</div>
					<div class='clear'></div>
					</div>";
			}
			?>
			<br />
			<div>
				<input type="hidden" name="user_id" value="<?= $user['id'] ?>" />
				<?php if($_SESSION['user']['id']===$user['id']) { ?>
				<input type="submit" class="btn btn-blue btn-buck-group" value="Send Intros" />
				<?php } ?>
			</div>
			</form>
		</div>
		<!-- END OF FOLLOWERS COLUMN/BLOCK -->
		<!--<div class="grid_6 marked-category" style="background:red; padding-top:10px;">
				Content for Col 2
		</div>-->
		<!-- END OF 12 COLUMNS GRID -->
</div><!-- END OF 12 COLUMN CONTAINER -->

</div><!-- FULL WIDTH CONTAINER -->

<div style="background:#eee; width:100%; padding-top:15px; display:none;">

	<h3 style="text-align:center;">
		MY IMAGES
	</h3>

    <div class="container_12 clearfix" style="display:nonex;">
        <div class="grid_12" style="padding-top:0px; margin-bottom:0px;">

            <div id="profile-gallery-wrapper" class="royalSlider rsDefaultInv" 
				style="padding:0px !important;">

                <?php if (empty($user['images'])) : ?>

                    <!--<p style="text-align:center; font-weight:300">This user has not uploaded any images yet.</p>-->

                <?php else : ?>

                    <?php
                    foreach ($user['images'] as $picture) : ?>
					<div style="position:absolute; background-size:cover; object-fit:cover; top:0; left:0; bottom:0; right:0;
					z-index:-99 !important; margin:0 !important; padding:0px !important; width:100%; height:auto;">
                    <img src="/<?= $picture['file'] ?>"
                     style="width:100%; height:auto;" />   
					</div>
                    <?php
                    endforeach; ?>				
					
                <?php endif; ?>				
				
            </div>
			<!-- END OF RYSLIDER -->
			
  <script type="text/javascript">
  $(document).ready(function() {			
			var fancylinks = $("a.lightboximg");
			fancylinks.click(function(event){
				//event.stopPropagation();
				e.preventDefault();
			});
			fancylinks.fancybox();
    });
  </script>			
			
			<div class="half" style="overflow:hidden; display:nonex;">
				<div class="thumbcon" style="position:relative; bottom:0px; left:0px; width:100%; white-space: nowrap;
			-webkit-overflow-scrolling: touch; text-align:center;
				height:auto; text-align:center; overflow: hidden; z-index:999">
					<div class="thumb-wrapper" style="text-align:center;">
						<?php
						foreach ($user['images'] as $picture) : ?>				
						<div class="thumb" style="">
							<a href="/<?= $picture['file'] ?>" class="lightboximg" rel="gallery"><img 
							src="/<?= $picture['file'] ?>" 
							style="object-fit: cover; object-position:center top;" /></a>
						</div>
						<?php
						endforeach; ?>					
						<div class="clear"></div>
					</div>
				</div>						
			</div>
			<div class="clear"></div>
		</div><!-- GRID 12 COLS -->
	</div><!-- CONTAINER 12 COLS -->
	
	<br /><br />
	
</div><!-- FULL WIDTH CONTAINER -->

<script type="text/javascript">
	$(".load-popin").each(function(){
	    var href = $(this).attr("href");
	    $(this).fancybox({
	  		'hideOnContentClick': true,
	        'width': 1000,
	        'height': 550,
	        'autoDimensions': false,
	        'autoSize': true,
	        'transitionIn': 'elastic',
	        'transitionOut': 'elastic',
	        'speedIn': 500,
	        'speedOut': 300,
	        'centerOnScroll': true,
	        'type': 'ajax',
	        'href': href
	    });
	});
</script>

<script type="text/javascript">
jQuery(document).ready(function($) {
	$('.showqrcoderight').click(function(e) {
		//$(".AccordionPanelContent span").css("background-color", "white");
		$('.showqrcodeleft').css("background-color", "#eeeeee");
		$('.showqrcodeleft').css("color", "#aaaaaa");
		$('.showqrcoderight').css("background-color", "#ffffff");
		$('.showqrcoderight').css("color", "#000000");
		$('.qrcodeleft').fadeOut('slow', function() {
			$('.qrcoderight').fadeIn('slow');
		});
	});
	
	$('.showqrcodeleft').click(function(e) {
		$('.showqrcodeleft').css("background-color", "#ffffff");
		$('.showqrcodeleft').css("color", "#000000");
		$('.showqrcoderight').css("background-color", "#eeeeee");
		$('.showqrcoderight').css("color", "#aaaaaa");
		$('.qrcoderight').fadeOut('slow', function() {
			$('.qrcodeleft').fadeIn('slow');
		});
	});
	
	$('#chevron_pp').click(function () {
		$("#chevron_pp").toggleClass('fa-chevron-down fa-chevron-down open');
		//$("#pp_inputs").toggle();
		$("#pp_inputs").slideToggle();
	});

	$('#chevron_ppp').click(function () {
		$("#chevron_pp").toggleClass('fa-chevron-down fa-chevron-down open');
		//$("#pp_inputs").toggle();
		$("#pp_inputs").slideToggle();
	});
	
	// MODAL SLIDE UP
	$('#openGASettings,#closeGASettings').click(function () {
		//$("#dark_overlay").toggle("darkoverlay");
		if ($("#dark_overlay").hasClass('darkoverlay2')) {
			$("#dark_overlay").toggleClass('darkoverlay2');
		} else {
			$("#dark_overlay").toggleClass('darkoverlay2');
		}
		$('#ga_slide_up').slideToggle({
			direction: "up"
		}, 300);
		$(this).toggleClass('closeGASettings');
		//
	}); // end click
	
    $('#profile-gallery-wrapper').royalSlider({
        fullscreen: {
            enabled: true,
            nativeFS: true
        },
        controlNavigation: 'bullets',
        slideshowEnabled:true,                 // Autoslideshow enabled
        slideshowDelay:2000,                    // Delay between slides in slideshow
        slideshowPauseOnHover:true,             // Pause slideshow on hover
        slideshowAutoStart:true,                // Auto start slideshow
        autoPlay: {
                enabled: true,
                stopAtAction: false,
                pauseOnHover: true,
                delay: 3000,
            },
        autoScaleSlider: false,
        autoScaleSliderWidth: false,
        autoScaleSliderHeight: false,
        transitionType: 'fade',
        loop: true,
        imageScaleMode: 'fit-if-smaller',
        navigateByClick: false,
        numImagesToPreload:3,
        arrowsNav:true,
        arrowsNavAutoHide: true,
        arrowsNavHideOnTouch: true,
        keyboardNavEnabled: true,
        fadeinLoadedSlide: true,
        globalCaption: false,
        globalCaptionInside: false,
        thumbs: {
            arrows: true,
            autoCenter: true,
            appendSpan: true,
            firstMargin: true,
            paddingBottom: 75,
            paddingLeft: 150
        }
    });
    
	$('.pleaselogin').click(function () {
		alert('Please login to do that...');
	});   
});
</script>

<script class="rs-file" src="/static/js/jquery.royalslider.min.js"></script>
<link class="rs-file" href="/static/css/royalslider.css" rel="stylesheet">

<div style="display:none;">
	<div id="shareqrcode" class="" style="max-width:600px; background:none !important;">
		<div class="overlay-bl-bg"></div>
		<div class="container_6 pop-content" style="background:none !important;">
			<div class="" style="background:none !important;">
				<div class="form login-form" style="background:none !important; -webkit-border-radius: 8px;
				-moz-border-radius: 8px; border-radius: 8px; width:100% !important">
					<h3 class="rs title-form" style="text-align:center"></h3>
					<!-- CONTENT CONTAINER STARTS HERE -->
					<div class="box-white" style="background:#fff; border:0px; /*max-height:350px;*/
						max-height:450px; padding:15px 20px 0; overflow:hidden; font-size:15px;
						text-align:left; line-height:22px; font-weight:300; margin-bottom:0 !important">

						<p class="rs" style="font-size:15px; line-height:24px; font-weight:600; text-align:left;">
								
							<div style="margin-bottom:10px; text-align:center;">
								<span style="font-size:19px; font-weight:600;"><img 
								src="/static/images/icons/link_icon.png" alt="link" 
								style="height:20px; margin-top:-3px" align="absmiddle"> Join this Account's Mob</span>
							</div>
							
							<img src="/3rdparty/phpqrcode/follow/<?= $user['user_slug'] ?>.png"
							alt="QR Code" style="width:125px; margin:4px 10px 0 0; border:1px solid #eee;" 
							align="left" />
								
							<span style="font-size:15px; font-weight:400;">Scan the QR Code with your phone&rsquo;s
							camera or <a href="/r/<?= $user['refcode'] ?>" style="font-weight:600;">tap here</a>.
							(Tip: long-press QR Code image to save)</span>				

						<br /><br />
						<textarea style="width:96%; min-height:25px; margin-top:10px; margin-bottom:3px; font-size:17px;
                        text-align:left; padding:10px 8px 12px; border:1px solid #ccc; font-weight:600;
                        -moz-border-radius: 5px; border-radius: 5px; -webkit-border-radius: 5px; background:#fff;
						color:#f11303;" onclick="this.focus();this.select()">https://flipmob.com/r/<?= $user['refcode'] ?></textarea>
							
							<!--<a href="/loyalty" title="ChattrBox Loyalty and Rewards"
								style="font-weight:600; color:#2996cc">Learn more
								<i class="fa fa-angle-right" aria-hidden="true"></i></a>-->
							<!--What if the entire Internet had a Loyalty + Rewards system?
							Companies, Businesses, Brands &amp; Influencers are making billions.
							We created ChattrBox to help the ones that truly care give a little
							something more back.-->
						</p>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!-- ######################################### -->
<!-- ####           SHARE MODAL          ##### -->
<!-- ######################################### -->
<div id="ga_slide_up" style="display:none; z-index: 51; position:fixed; bottom:0; left:0; width:100%;
	height:500px; margin-bottom:-45px; background:rgba(0,0,0,.85); -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px; z-index:9999;">

	<!-- ################################### -->
	<!-- ####### TOP MODAL BAR AREA ####### -->
	<!-- ################################### -->
	<div style="height:50px; text-align:center; position:relative;">
		<div style="position:absolute; right:0; float:right; margin-right:5px; margin-top:10px; width:30px; height:30px; text-align:center; padding:5px; background:none;" id="closeGASettings">
			<a href="#" class="closeGASettings" style="color:#fff;"><img 
			src="/static/images/icons/close_x_white.png" style="height:25px;" /></a>
		</div>
		<div style="position:relative; float: none; display:inline-block; width:300px; overflow: hidden; height:40px; line-height:50px; background:none; font-size:16px; font-weight:700; letter-spacing:1px; color:#fff; text-align:center; padding-top:5px; font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
			SHARE OR JOIN THIS FLIPMOB
		</div>
	</div>

	<!-- ############################################ -->
	<!-- #######    GENERAL MODAL SETTINGS    ####### -->
	<!-- ############################################ -->
	<div style="padding: 0px 10px 60px;  margin:0 auto; overflow:hidden; /*max-height:330px;*/ background:none; 
	max-width:600px; text-align:center">
	
		<div style="font-size:17px; color:#ccc;">
			<img src="/static/images/icons/qr_scanner_icon.png" alt="Scan"
			style="height:27px; margin-right:3px;" /> Scan with your phone&rsquo;s camera or
			<a href="/r/<?= $user['refcode'] ?>" style="font-weight:600;">tap here</a>
			to join my flipmob.<!--<span style="color:#ff8692"></span>-->
			<br /><br />
			<img src="/3rdparty/phpqrcode/referrals/user_<?= $user['id'] ?>.png" alt="absmiddle"
			style="height:140px; margin-top:0px; margin-right:0px; border:0px solid #ddd;
			box-shadow: 0 3px 10px rgb(0 0 0 / 20%);">
			<br /><br />
			<!--<span style="font-size:15px;">
				<a href="/referrals" title="Referrals" style="font-weight:600;">flipmob.com/referrals</a> 
			(Tip: long-press QR Code to save)</span>
			<br /><br />-->

			<div class="box-grayxxx" style="padding-bottom: 15px; margin-top:10px; color:#aaa;">
				<img src="/static/images/icons/link_icon_white.png" alt="link" 
				style="height:20px; margin-top:-3px" align="absmiddle"> SHARE LINK
				<br>
				<textarea style="width:96%; max-width:400px; height:auto; margin-top:5px; margin-bottom:3px; 
					font-size:15px; text-align:left; padding:10px 8px 8px; border:1px solid #00A1FE; font-weight:400;
                    -moz-border-radius: 50px; border-radius: 50px; -webkit-border-radius: 50px; background:none;
                    color:#fff;" rows="1"
                    onclick="this.focus();this.select()">https://flipmob.com/r/<?= $user['refcode'] ?></textarea>
				<br>
				<div style="display:nonex; font-weight:300; font-size:12px; line-height:17px; color:#aaa">
					click/tap-to-copy
				</div>
				<div style="position:absolute; right:10px; bottom:30; height:30px; width:30px;">
					<a href="sms:?&amp;body=Hi. Connect with me at FlipMob.com at 
					https://flipmob.com/r/<?= $user['user_slug'] ?>" 
					title="Click here to share by text" class="texticon"><i class="fa fa-share"></i></a>
				</div>
			</div>

		<div class="clear"></div>
		</div>

		<br /><br /><br /><br /><br /><br />
	</div>
	<div style="display:none; position:absolute; bottom:0; left:0; width:30px; height:30px; float:left; 
	text-align:center; padding:10px; background:none;" id="closeGASettings">
		<a href="#" class="closeGASettings" style="color:#fff;"><img 
		src="/static/images/icons/close_x_white.png" style="height:25px;" /></a>
	</div>
</div>

<!-- ################################################################################## -->
<!-- ########################           SHARE MODAL           ######################### -->
<!-- ################################################################################## -->
<div id="ga_slide_up2" style="display:none; z-index: 51; position:fixed; bottom:0; left:0; width:100%;
	height:530px; margin-bottom:-45px; background:#fff; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px;">

	<!-- ################################### -->
	<!-- ####### TOP MODAL BAR AREA ####### -->
	<!-- ################################### -->
	<div style="height:50px; text-align:center; position:relative;">
		<div style="position:absolute; right:0; float:right; margin-right:5px; margin-top:10px; width:30px; height:30px; text-align:center; padding:5px; background:none;" id="closeGASettings">
			<a href="#" class="closeGASettings" style="color:#fff;"><img 
			src="/static/images/icons/close_x_black.png" style="height:25px;" /></a>
		</div>
		<div style="position:relative; float: none; display:inline-block; width:300px; overflow: hidden; height:40px; line-height:50px; background:none; font-size:16px; font-weight:700; letter-spacing:1px; color:#222; text-align:center; padding-top:5px; font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
			SHARE THIS CHALLENGE
		</div>
	</div>

	<!-- ############################################ -->
	<!-- #######    GENERAL MODAL SETTINGS    ####### -->
	<!-- ############################################ -->
	<div style="padding: 0px 10px 60px;  margin:0 auto; overflow:hidden; /*max-height:330px;*/ background:none; 
	max-width:600px; text-align:center">
	
		<div style="font-size:17px;">
		
			<span style="font-size:15px;">Share your Challenge(s) and you&rsquo;ll receive 50% of 
				the Prize Value if someone wins. Learn more at
				<a href="/referrals" title="Referrals" style="font-weight:600;">playpassphrase.com/referrals</a> 
			(Tip: long-press QR Code to save)</span>
			<br /><br />


			<div class="box-gray" style="padding-bottom: 15px; margin-top:10px">
				<img src="/static/images/icons/link_icon.png" alt="link" 
				style="height:20px; margin-top:-3px" align="absmiddle"> SHARE LINK
				<br>
				<textarea style="width:90%; height:48px; margin-top:3px; margin-bottom:3px; font-size:17px;
                        text-align:left; padding:10px 8px 8px; border:1px solid #ccc; font-weight:300;
                        -moz-border-radius: 5px; border-radius: 5px; -webkit-border-radius: 5px; background:#fff;
                        color:#333;" rows="3"
                        onclick="this.focus();this.select()">https://playpassphrase.com/challenges/<?= $challenge['id'] ?></textarea>
				<br>
				<div style="display:none; font-weight:300; font-size:11px; line-height:17px;">
					Note: r = referral + your ID &amp; s = solution + the Solution ID
				</div>
			</div>

		<div class="clear"></div>
		</div>

		<br /><br /><br /><br /><br /><br />
	</div>
	<div style="display:none; position:absolute; bottom:0; left:0; width:30px; height:30px; float:left; text-align:center; padding:10px;
		background:none;" id="closeGASettings">
	<a href="#" class="closeGASettings" style="color:#fff;"><img src="/static/images/icons/close_x_black.png" style="height:25px;" /></a>
	</div>
</div>

<?php include('views/_footer.tpl.php'); ?>