<?php
global $website_options;

include ('views/_header.tpl.php');
require_once '3rdparty/phpqrcode/qrlib.php';

if (isset($_GET['msg'])) {
	$_GET['msg'] = "Settings Saved Successfully!";
	$msg = htmlentities(strip_tags($_GET['msg']));
}
//echo "Session User ID: " . print_r($_SESSION['user_id']) . "<br /><br />";
//echo "Session User: " . print_r($_SESSION['user']);
?> 

<style>
	div.spacer { padding-top:70px; }
	#mmen { display:none; }
	a.btn-black-slim { 
	    width: 100%;
	    margin-bottom: 10px;
	    background: #000;
	    color: #ddd;
	    border: 0px;
	    text-shadow: 0px 0px 0px;
	    font-size: 15px;
	    font-family: 'Open Sans',Arial,Helvetica Neue,Helvetica,sans-serif;
	    font-weight: 300;
	    letter-spacing: 1px;
	    border-radius: 50px !important;
	    -moz-border-radius: 50px;
	    -webkit-border-radius: 50px;
	    height: 48px !important;
	    padding: 10px 25px 10px !important;
	}
	a.btn-black-slim:hover { 
		background:#222;
		color:#fff;
	}	
	h2 {
		font-family: Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;
	}
	
	.form .txt, input.datepicker {
	    height: 48px;
	    line-height: 48px;
	    padding: 15px;
	    width: 100%;
	    margin-bottom: 10px;
	    border: 1px solid #fafafa;
	    color: #000;
	    background: #f7f7f7;
	    text-shadow: 0px 1px 0px rgb(255 255 255 / 20%);
	    font-size: 17px;
	    font-weight: 300;
	    box-sizing: border-box;
	    -webkit-box-sizing: border-box;
	    -moz-box-sizing: border-box;
	    -webkit-border-radius: 8px;
	    -moz-border-radius: 8px;
	    border-radius: 8px;		
		/*
	    border: 1px solid #d9d9d9;
	    margin-bottom: 3px;
	    padding: 8px 10px;
	    background: #fff;
	    max-width: 350px;
	    width: 98%;
	    border-radius: 4px;
	    -moz-border-radius: 4px;
	    -webkit-border-radius: 4px;
	    box-shadow: inset 0 0 0 rgb(0 0 0 / 0%), 0 0 0 rgb(0 0 0 / 0%);
	    -moz-box-shadow: inset 0 0 0 rgba(0, 0, 0, 0), 0 0 0 rgba(0, 0, 0, 0);
	    -webkit-box-shadow: inset 0 0 0 rgb(0 0 0 / 0%), 0 0 0 rgb(0 0 0 / 0%);
	    box-sizing: border-box;
	    -moz-box-sizing: border-box;
	    -webkit-box-sizing: border-box;
	    */
	    transition: border linear 0.2s, box-shadow linear 0.2s;
	    -o-transition: border linear 0.2s, box-shadow linear 0.2s;
	    -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
	    -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
	}	
	.form .row-item .lbl {
	    float: left;
	    padding-top: 11px;
	    width: 177px;
	    text-align: right;
	    font-weight:300;
	}	
	
	.close-button {
		border: none;
		display: inline-block;
		
		vertical-align: middle;
		overflow: hidden;
		text-decoration: none;
		color: inherit;
		background-color: inherit;
		text-align: center;
		cursor: pointer;
		white-space: nowrap;
		font-size: 21px;
		font-weight: 700;
		line-height: 1;
	}
	
	.chattrbg {
		background-color: #BA00F1;
		background-image: linear-gradient(45deg, #BA00F1, #FD0172);
	}
	
	#map-canvas {
		height: 300px;
		width: 100%;
		margin: auto;
		padding: 0;
	}
	
	/* ###################################################### */
	/* ####### The Switch - the box around the slider ####### */
	/* ###################################################### */

	.switch {
		position: relative;
		display: inline-block;
		width: 60px !important;
		height: 32px;
	}

	/* Hide default HTML checkbox */
	.switch input {
		display: none;
	}

	/* The slider */
	.sliderr {
		position: absolute;
		cursor: pointer;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #ccc;
		-webkit-transition: .4s;
		transition: .4s;
	}

	.sliderr:before {
		position: absolute;
		content: "";
		height: 28px;
		width: 28px;
		left: 2px;
		bottom: 2px;
		background-color: white;
		-webkit-transition: .4s;
		transition: .4s;
	}

	input:checked + .sliderr {
		background-color: #98cb54;
	}

	input:focus + .sliderr {
		box-shadow: 0 0 1px #98cb54;
	}

	input:checked + .sliderr:before {
		-webkit-transform: translateX(28px);
		-ms-transform: translateX(28px);
		transform: translateX(28px);
	}

	/* Rounded sliders */
	.sliderr.round {
		border-radius: 32px;
		-moz-border-radius: 32px;
		-webkit-border-radius: 32px;
	}

	.sliderr.round:before {
		border-radius: 50%;
		-moz-border-radius: 50%;
		-webkit-border-radius: 50%;

	}
	/* ##################################################### */
	/* ##############     The Switch ENDS     ############## */
	/* ##################################################### */   	
	
	#errordiv a, #errordiv a:active, #errordiv a:visited { 
	background:#fff;  color:#28d52d; border-radius:50px; -moz-border-radius:50px; -webkit-border-radius:50px; padding:3px 10px; font-weight:800; }
	#errordiv a:hover { color:#fff;  background:#28d52d; }
	
	.tipdiv { display:none; }
	
/* ######################################################### */
/*                        MOBILE STYLES                      */
/* ######################################################### */

@media (min-width: 980px) and (max-width: 1024px) {
	
}

/* Portrait tablet to landscape and desktop */
@media (min-width: 768px) and (max-width: 979px) {

}

/* Landscape phone to portrait tablet */
@media (max-width: 767px) {

}

/* Landscape phones and down */
@media (max-width: 586px) {
	.tipdiv { display:block; }
	.form .row-item {
		padding-bottom: 5px;
	}
	.form .row-item .lbl {
	    float: left;
	    padding-top: 11px;
		padding-bottom:5px;
	    width: 177px;
	    text-align: left;
	    font-weight:300;
	}	
	.form .row-item .val {
		margin-left:0px;
	}
	input[type="text"] {
		margin:0 auto;
		width:100% !important;
		max-width:600px !important;
	}
}	
</style>

<div class="layout-2cols">
	<?php
	if (isset($msg)) {
		echo "<div id='errordiv' style='line-height:25px; background:#cd0000; text-align:center; color:#fff; padding:11px 15px; 
		margin:5px 10px 15px; border:1px solid #fff; font-weight:300; font-size:15px; 
		border-radius:50px; -moz-border-radius:50px; -webkit-border-radius:50px;'>$msg
			&nbsp;<span style='float:right;'><a href='/profile/edit'>Ok!</a></span></div>";
	}
	?>
	<div class="content grid_8">
		<div class="project-detail">
			<div class="project-tab-detail tabbable accordion">
<!--				<div style="display:none; background:#fff; padding:10px 0; text-align:left">
					<a href="/shopp" style="font-size:15px;">&laquo; Back to Shop</a>
				</div>-->
				
				<div class="tipdiv" style="margin-top:10px; height:25px; background:#f0f0f0; color:#df0000; font-size:12px; 
				font-weight:400; padding:5px; text-align:center;line-height:25px; text-shadow:0px 1px 0px #fff;">
				<i class="fa fa-star" aria-hidden="true"></i> TIP: TAP PROFILE TAB TO VIEW REFERRAL + IMAGES TABS
				</div>
				<ul class="nav nav-tabs clearfix">
					<li class="active"><a href="#">PROFILE</a></li>
					<li><a href="#" class="be-fc-orange">MY FAVS</a></li>
					<li><a href="#" class="be-fc-orange">MY REFERRALS</a></li>
					<li><a href="#" class="be-fc-orange">REF CLICKS</a></li>
					<li><a href="#" class="be-fc-orange">MY IMAGES</a></li>
                </ul>
				<div class="tab-content">
					
					<!-- ################################################################### -->
					<!-- ########################       PROFILE     ######################## -->
					<!-- ################################################################### -->
				
					<div>
						<h3 class="rs alternate-tab accordion-label">
							PROFILE <span style="float:right;">TAP TO EXPAND <i id="chevron_pp" 
							class="fa fa-chevron-down open"></i></span>
						</h3>
						<div class="tab-pane accordion-content active">
						
						<div class="profilebg" style="overflow:hidden; width:100%; max-height:250px;
								display: flex; align-items: center; justify-content: center;
								-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;">
							<!-- /static/images/users/agency/cityfast.jpg -->
							<img src="/static/images/users/agency/<?= $user['profilebg'] ?>" alt="BG Img"
							onerror="this.src='/static/images/users/agency/geobg.png'"
							style="background-position:top center; background-size:cover;
							object-fit:cover; min-height:100%; width:100%" />
						</div>

						<div class="profilepic" style="background:none; padding:0px; height:150px; width:150px; float:left;
						 	margin-left:25px; z-index:7; margin-top:-75px">
							<?php echo "<div style='position:relative;  z-index:7 !important; background-color:#eee;
								border:5px solid #fff; overflow:hidden; height:140px; width:140px; margin: 0 auto;
								border-radius:50%; -moz-border-radius: 50%; -webkit-border-radius: 50%;'>
								<img style='height:140px; width:auto !important; max-width:140px; position:relative;
								z-index:99999999999 !important;' src='/static/images/users/agency/{$user['image']}'
								onerror=\"this.src='/static/images/users/agency/default-avatar.jpg'\"
								 />
								</div>";
						?>
						</div>
						<div class="clear"></div>
						
							<div class="form form-profile" style="width:auto; padding:0 20px 20px">
							 
								<!--<a href="/profile/<?= $user['user_slug'] ?>"
								title="<?= $user['name'] ?>"><div class="chattrbg" style="margin:0 0px 10px; font-weight:500; 
									border:1px solid #ccc; color:#fff; width:auto; display:block;
									text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
									padding:10px; font-size:14px; text-align:center;
									-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;">
									<i class="fa fa-user" aria-hidden="true"></i> View My Public Profile
									<i class="fa fa-angle-right" aria-hidden="true"></i>
									</div></a>-->
									
								<div class="" 
									style="margin:0 0px 0px; font-weight:500; height:23px; background:none;
									border:0px solid #ccc; color:#bbb; width:auto; display:block;
									padding:10px; font-size:14px; text-align:center;
									-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;">
									<span style="float:left;"><a href="/profile/<?= $user['user_slug'] ?>" 
										style="font-size:15px; font-weight:600; color:#bbb;"><i class="fa fa-user" 
									aria-hidden="true"></i> My Profile</a></span>
									
									<span style="float:left;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a 
									href="/profiles/<?= $user['user_slug'] ?>"
									style="font-size:15px; font-weight:600; color:#bbb;"><i class="fa fa-user"
									aria-hidden="true"></i> New Profile!</a></span>
									
									<span style="float:right;"><a href="/profile/<?= $user['user_slug'] ?>"
										style="font-size:15px; font-weight:600; color:#bbb;"><i class="fa fa-flag"
									aria-hidden="true"></i> Activity <i class="fa fa-angle-right
									aria-hidden="true"></i></a></span>
								</div>
							
								<a href="/profile/bids" title="Buy Credits"><div class="chattrbg" 
									style="display:none; margin:0 0px 10px; font-weight:500; 
									border:1px solid #ccc; color:#fff; width:auto;
									text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
									padding:10px; font-size:14px; text-align:center;
									-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;">
									<span style="font-size:17px; font-weight:600;"><!--<i class="fa fa-paper-plane" aria-hidden="true"></i>--> 
										
									<img src="/static/client/devshares_credits_mini_white.png" alt="C" 
									align="absmiddle" style="height:23px; margin-top:0px; margin-right:0px">
									<?= number_format($_SESSION['user']['credits'],0,'.',','); ?></span> Bid credits
									<span style="float:right;">Buy <i class="fa fa-angle-right
									aria-hidden="true"></i></span>
								</div></a>
							
								<form method="post" enctype="multipart/form-data">
								
						        <div class='ewalletdiv' style='text-align:center; border:1px solid #ddd; height:65px;
									margin-bottom:5px;'>
							        <div style='float:left; width:50%; padding:10px; text-align:center;
										line-height:47px; -webkit-box-sizing: border-box;
									-moz-box-sizing: border-box; box-sizing: border-box;'>
										<a class="logo-footer" href="/" title="FlipMob"><img
										src="/<?= $website_options['footer_logo'] ?>"
										alt="FlipMob" style="max-width:165px; width:95%; height:auto;
										margin-bottom:2px;" /></a>
							        	<!--<img src='/static/client/ewallet_logo_339.png' alt='E-Wallet' 
							        	style='height:45px;' / >-->
							        </div>	
									<div style="float:left; width:50%; background:#f7f7f7; text-align:center; 
									color: #4ba220; font-size: 25px; font-weight: 600; 
									font-family: Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;
							        height:40px; padding:15px 0 10px; text-shadow:0px 1px 0px #fff;">
									<span class="topbal">$<?= number_format(($user['virtual_balance']/100),2,'.',','); ?></span>
										<span style="font-size:14px;"><a class="refreshBal" style="color:#bbb"
										href="javascript:;" data-uid="<?= $project['user_id'] ?>"
										data-pid="<?= $project['id'] ?>"> <i 
										class="fa fa-refresh updateB"></i></a></span>
							        	<br />
										<span style='font-size:11px; color:#000'>YOUR BALANCE <a href="/profile/load" 
										title="Learn more about what your Account Balance is used for"><img 
										src="/static/images/icons/info-icon-gray.png" alt="i"></a></span>
							        </div>	   
							        <div class='clear'></div>   	
						        </div>		
						        <br />					
								<!--<br />				
								<center><a href="/payments/buy" class="btn-black-slim">Load E-Wallet</a></center>
								<br /> <br />-->			
        						
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-user"></i> Profile picture:</label>
										<div class="val">
											<input type="file" name="image" style="background:none;" />
											<!-- <button class="btn btn-white">Choose location</button> -->
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-user"></i> Profile BG:</label>
										<div class="val">
											<input type="file" name="profilebg" style="background:none;" />
											<!-- <button class="btn btn-white">Choose location</button> -->
										</div>
									</div>																					

									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Registered E-Mail:</label>
										<div class="val">
											<input name="email" id="email" class="txt fill-width" type="text" 
											placeholder="Registered Email" value="<?= $user['email'] ?>" readonly  />
												
											<p class="rs description-input"></p>
										</div>
									</div>								
								
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Name:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="name" value="<?= $user['name']; ?>">
											<p class="rs description-input">Your name is displayed on your profile.</p>
										</div>
									</div>

                                    <div class="row-item clearfix">
										<label class="lbl" for="txt_location">Phone Number:</label>
										<div class="val">
											<input class="txt" type="text" name="phone" value="<?= $user['phone']; ?>" 
											id="phonenumber" placeholder="3125552020">
											<p class="rs description-input">ie. 3125552020 -
											<?php if($user['is_verified_phone'] == 1) { 
											echo "<span style='color:#00b600; font-style:normal; font-weight:600;'>Verified!</span>"; } else 
											{ echo "<span style='font-style:normal; font-weight:600; color:#dd1000;'>Not Verified</span>"; } ?> | <a href="#" id="verifynow" style="font-weight:600; font-style:normal; color:#3c76d8;">Verify Now &raquo;</a></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Phone Carrier:</label>
										<div class="val">
										
		<select name="carrier" id="carrier" class="txt" type="number" style="height: 48px;
			line-height: 35px; padding: 5px; border: 1px solid #eee; background: #f7f7f7;">
           <option value="">Select Phone Carrier</option>
           <option value="ATT" <?php if($user['carrier'] == 'ATT') echo "selected"; ?>>AT&T</option>
           <option value="Verizon" <?php if($user['carrier'] == 'Verizon') echo "selected"; ?>>Verizon</option>
           <option value="Sprint" <?php if($user['carrier'] == 'Sprint') echo "selected"; ?>>Sprint</option>
           <option value="USCellular" <?php if($user['carrier'] == 'USCellular') echo "selected"; ?>>U.S. Cellular</option>               			   <option value="TMobile" <?php if($user['carrier'] == 'TMobile') echo "selected"; ?>>T-Mobile</option>
           
           <option value="BoostMobile" <?php if($user['carrier'] == 'BoostMobile') echo "selected"; ?>>Boost Mobile </option>
           <option value="C-Spire" <?php if($user['carrier'] == 'C-Spire') echo "selected"; ?>>C-Spire</option>
           <option value="ConsumerCellular" <?php if($user['carrier'] == 'ConsumerCellular') echo "selected"; ?>>Consumer Cellular</option>
           <option value="Cricket" <?php if($user['carrier'] == 'Cricket') echo "selected"; ?>>Cricket</option>
           <option value="GoogleFi" <?php if($user['carrier'] == 'GoogleFi') echo "selected"; ?>>Google Fi (Project Fi)</option>
           <option value="H2OWireless" <?php if($user['carrier'] == 'H2OWireless') echo "selected"; ?>>H2O Wireless</option>
           <option value="MetrobyT-Mobile" <?php if($user['carrier'] == 'MetrobyT-Mobile') echo "selected"; ?>>Metro by T-Mobile</option>
           <option value="MintMobile" <?php if($user['carrier'] == 'MintMobile') echo "selected"; ?>>Mint Mobile</option>
           <option value="PagePlus" <?php if($user['carrier'] == 'PagePlus') echo "selected"; ?>>Page Plus</option>
           <option value="RedPocket" <?php if($user['carrier'] == 'RedPocket') echo "selected"; ?>>Red Pocket</option>
           <option value="RepublicWireless" <?php if($user['carrier'] == 'RepublicWireless') echo "selected"; ?>>Republic Wireless</option>
           <option value="SimpleMobile" <?php if($user['carrier'] == 'SimpleMobile') echo "selected"; ?>>Simple Mobile</option>
           <option value="Ting" <?php if($user['carrier'] == 'Ting') echo "selected"; ?>>Ting</option>
           <option value="Tracfone" <?php if($user['carrier'] == 'Tracfone') echo "selected"; ?>>Tracfone</option>
           <option value="UltraMobile" <?php if($user['carrier'] == 'UltraMobile') echo "selected"; ?>>Ultra Mobile</option>
           <option value="USMobile" <?php if($user['carrier'] == 'USMobile') echo "selected"; ?>>US Mobile</option>
           <option value="VirginMobile" <?php if($user['carrier'] == 'VirginMobile') echo "selected"; ?>>Virgin Mobile</option>
           <option value="Visible" <?php if($user['carrier'] == 'Visible') echo "selected"; ?>>Visible</option>
           <option value="XfinityMobile" <?php if($user['carrier'] == 'XfinityMobile') echo "selected"; ?>>Xfinity Mobile</option>
           <option value="NotSure" <?php if($_SESSION['user']['carrier'] == 'NotSure') echo "selected"; ?>>Not Sure</option>
       </select> 
											<p class="rs description-input">ie. At&t, Sprint, TMobile, etc.</p>
										</div>
									</div>								
									<!--

									///////////////////////////////////////////
									
									Boost Mobile 
									number@sms.myboostmobile.com
									
									C-Spire
									number@cspire1.com
									
									Consumer Cellular
									number@mailmymobile.net
									
									Cricket number@sms.cricketwireless.net 
									
									Google Fi (Project Fi)
									number@msg.fi.google.com
									
									H2O Wireless
									number@txt.att.net
									
									Metro by T-Mobile
									number@mymetropcs.com
									
									Mint Mobile
									number@mailmymobile.net
									
									Page Plus
									number@vtext.com
									
									Red Pocket Red Pocket uses AT&T or T-Mobile (for GSM SIMs) & Verizon for CDMA
									
									Republic Wireless
									number@text.republicwireless.com
									
									Simple Mobile
									number@smtext.com
									
									Ting
									number@message.ting.com (SMS for CDMA)
									number@tmomail.net (SMS for GSM)
									
									Tracfone
									number@mmst5.tracfone.com
									
									Ultra Mobile
									number@mailmymobile.net
									
									U.S. Mobile
									number@vtext.com
									
									Virgin Mobile
									number@vmobl.com
									
									Visible
									number@vtext.com
									
									Xfinity Mobile:
									number@vtext.com (SMS)
									
									
									AT&T: number@txt.att.net (SMS), number@mms.att.net (MMS)
									
									Boost Mobile: number@sms.myboostmobile.com (SMS), number@myboostmobile.com (MMS)
									
									C-Spire: number@cspire1.com
									Consumer Cellular: number@mailmymobile.net
									Cricket: number@sms.cricketwireless.net (SMS), number@mms.cricketwireless.net (MMS)
									Google Fi (Project Fi): number@msg.fi.google.com (SMS & MMS)
									H2O Wireless: number@txt.att.net (SMS), number@mms.att.net (MMS)
									Metro by T-Mobile: number@mymetropcs.com (SMS & MMS)
									Mint Mobile: number@mailmymobile.net (SMS)
									Page Plus: number@vtext.com (SMS), number@mypixmessages.com (MMS)
									Red Pocket: Red Pocket uses AT&T or T-Mobile (for GSM SIMs) & Verizon for CDMA. See info. for those carriers.
									Republic Wireless: number@text.republicwireless.com (SMS)
									Simple Mobile: number@smtext.com (SMS)
									
									Sprint: number@messaging.sprintpcs.com (SMS), number@pm.sprint.com (MMS)
									
									T-Mobile: number@tmomail.net (SMS & MMS)
									
									Ting: number@message.ting.com (SMS for CDMA), number@tmomail.net (SMS for GSM)
									Tracfone: number@mmst5.tracfone.com (MMS)
									Ultra Mobile: number@mailmymobile.net
									
									U.S. Cellular: number@email.uscc.net (SMS), number@mms.uscc.net (MMS)
									
									U.S. Mobile: number@vtext.com (SMS), number@mypixmessages.com (MMS)
									
									Verizon: number@vtext.com (SMS), number@vzwpix.com (MMS)
									
									Virgin Mobile: number@vmobl.com (SMS), number@vmpix.com (MMS)
									Visible: number@vtext.com (SMS), number@vzwpix.com (MMS)
									Xfinity Mobile: number@vtext.com (SMS), number@mypixmessages.com (MMS)
									-->
									
                                    <div class="row-item clearfix">
										<label class="lbl" for="txt_location">Customer ID:</label>
										<div class="val">
											<input class="txt" type="text" name="square_id" value="<?= $user['square_id']; ?>" placeholder="Customer ID" readonly>
											<p class="rs description-input"></p>
										</div>
									</div>		
									
                                    <div class="row-item clearfix">
										<label class="lbl" for="txt_location">Birthday:</label>
										<div class="val">
											<input class="txt" type="text" name="birthday" value="<?= $user['birthday']; ?>" placeholder="1985-01-31">
											<p class="rs description-input"></p>
										</div>
									</div>										
									
                                    <div class="row-item clearfix">
										<label class="lbl" for="txt_location">Verified Date:</label>
										<div class="val">
											<input class="txt" type="text" name="verified_date" value="<?= $user['verified_date']; ?>" 
											placeholder="Verified Data" readonly>
											<p class="rs description-input">phone number verification</p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Landing Page:</label>
										<div class="val">
										
	   <select name="account_type" id="account_type" class="txt" type="number" style="height: 48px;
			line-height: 35px; padding: 5px; border: 1px solid #eee; background: #f7f7f7;">
           <option value="">Select a preferred Landing Page</option>
           <option value="dashboard" <?php if($user['account_type'] == 'dashboard') echo "selected"; ?>>Dashboard Console</option>
           <option value="inbox" <?php if($user['account_type'] == 'inbox') echo "selected"; ?>>Inbox</option>
           <option value="profile" <?php if($user['account_type'] == 'profile') echo "selected"; ?>>Edit Profile</option>
       </select> 
	   <p class="rs description-input" style="color:#999;">ie. the first page you&rsquo;ll see when you login</p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Directory: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
											<!-- 1 is show, 0 is hide -->
											<?php
											$is_directory = !empty($user['directory']) ? " checked='checked'" : "";
											?>
											<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox' 
												name="directory"<?= $is_directory ?> /><span class='sliderr round'></span>
											</label> 
										
										<p class="rs description-input">List me in the Members Directory (turn off to hide)</p>
										</div>
									</div>	
									
<!-- ######################################################################### -->
<!-- ####################    BUSINESS INFO STARTS HERE    #################### -->
<!-- ######################################################################### -->
									<br /><br />
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px; 
										margin-top:0px; line-height:22px; font-weight:600;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
										MEMBER BIO/PROFILE
									</h2>	
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_bio">Bio:</label>
										<div class="val">
											<textarea class="txt fill-width" name="biography" style="line-height:25px;"
												id="keywords" cols="30" rows="6" maxlength="160"
												onkeyup="countChar(this)"><?= $user['biography']; ?></textarea>
											<!--<p class="rs description-input">Keep it short!</p>-->
											<div class="clear"></div>
											<div id="keywordscount" style="width:40px; text-align:center; margin-left:2px;
											background:#EA0000; color:#fff; font-weight:300; display:inline-block;
											border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;">
												160
											</div>
											<div style="display:inline-block; font-weight:300;">
												160 character limit
											</div>

										</div>
									</div>
									
									<div class="row-item clearfix" style="border-top:0px solid #ccc;
										padding-top:10px; padding-bottom:10px;">
										<!--<label class="lbl" for="txt_location"></label>-->
										<div class="val" style="font-weight:300; max-width:355px; font-size:17px;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
											<strong>Website + Link</strong>

										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Website:</label>
										<div class="val">
											<input class="txt" type="text" name="website"
											value="<?= $user['website']; ?>" placeholder="http://" />
											<p class="rs description-input"></p>
										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Other Link:</label>
										<div class="val">
											<input class="txt" type="text" name="www"
											value="<?= $user['www']; ?>" placeholder="http://" />
											<p class="rs description-input"></p>
										</div>
									</div>
									
									<!-- this could be interests, but not sure. Need to confirm which powers 
									our AI Matching -->
									<div class="row-item clearfix" style="padding-bottom:15px;">
										<label class="lbl" for="txt_location">Interests:</label>
										<div class="val">
										
										<textarea id="interests-ac" class="txt fill-width" name="temperaments" 
											style="line-height:25px; height:110px"
											placeholder="development,design,accounting,etc"
											cols="30" rows="4" 
											maxlength="80"><?= $user['temperaments']; ?></textarea>
										
											<!--<input class="txt" type="text" name="temperaments"
											value="<?= $user['temperaments']; ?>" 
											placeholder="development,design,accounting,etc" />-->
											<p class="rs description-input" 
											style="color:#777; background:none;">separate with commas, like: 
											<span style="color:#ff0000">development,design,accounting,etc</span></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<!--<label class="lbl" for="txt_location"></label>-->
										<div class="val" style="font-weight:300; background:none; max-width:355px">
											<i class="fa fa-star"></i> Interests are used for FlipMob&rsquo;s 
											AI-powered Synergy Matching and also appear on your 
											<b>Profile</b> in the <a href="/members" style="font-weight:600;"
											title="View Member Profiles in the Member Directory">Members 
											Directory</a> to help you connect with others.
											<p class="rs description-input"></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<!--<label class="lbl" for="txt_location"></label>-->
										<div class="val" style="font-weight:300; background:none; max-width:355px;
											font-size:17px; 
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
											<br />
											<img src="/static/client/devshares_synergy_icon_black.png"
											alt="<+>" style="height:40px; float: left; margin: 0px 8px 0 0;"
											align="left">
											<strong>Get Synergy Matches + Suggestions</strong>
											<!--<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:0px"></a>-->
											<!--Skills appear on your
											<a href="/profile/<?= $user['user_slug']; ?>" style="font-weight:600;"
											title="View My Profile">Profile</a> page and
											help potential Clients &amp; Employers find you in the
											<a href="/members" style="font-weight:600;"
											title="View Member Profiles in the Member Directory">Member Directory</a>
											via a special skill (or skills) you may have.-->
											<br /><br />
											<!--<p class="rs description-input"></p>-->
											<span style="font-size:15px;">Delivered by email. Text Message
											and Push Notification options will be released soon.</span>
										</div>
									</div>
									
									<div class="row-item clearfix" style="padding-top:10px;">
										<label class="lbl" for="txt_location">Find Synergies: &nbsp;</label>
										<div class="val" style="padding-top:0px;">

											<?php
												$is_getmatches = !empty($user['m0']) ? " checked='checked'" : "";
											?>
											<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="m0"<?= $is_getmatches ?> /><span
												class='sliderr round'></span>
											</label>

											<!--<p class="rs description-input">Receive important emails</p>-->
										</div>
									</div>	
									
<!--									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Link3:</label>
										<div class="val">
											<input class="txt" type="text" name="social_link"
											value="<?= $user['social_link']; ?>" placeholder="http://" />
											<p class="rs description-input"></p>
										</div>
									</div>	-->										

<!-- ################################################################################ -->
<!-- ####################    LOCATION INFORMATION STARTS HERE    #################### -->
<!-- ################################################################################ -->
									<br />
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px; 
										margin-top:0px; line-height:17px; font-weight:600;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">	
										
										<img src="/static/client/devshares_synergy_icon_black.png"
										alt="<+>" style="height:40px; margin: 0px 0px 0 0;"
										align="absmiddle">
											
										REAL-TIME SYNERGY MATCHING
										<div style="background:none; margin-top:7px;">
											<img src="/static/images/google_maps_icon/google_maps_marker.png"
											alt="M" style="height:20px; margin: 0px 0px 0 0;"
											align="absmiddle">
											<small style="margin-top:0px; 
											font-weight:400;">GPS Location-based</small>
										</div>
										<div style="background:#dd1000; color:#fff; margin-top:7px;
											padding:7px; font-size:15px; line-height:22px; font-weight:400;">
											Please feel free to fill out your settings, we&rsquo;ll be 
											turning this on soon - we&rsquo;re currently making some upgrades.
										</div>
									</h2>
									<br />									
									
									<div style="font-weight:300; text-align:left; font-size:14px; line-height:24px">
										<!--<strong>Required to submit bids</strong> - -->
										<!--Coming Soon (Optional): -->The 
										<span style="font-weight:600;">&ldquo;Interests&rdquo;</span> (under your 
										Member Bio/Profile section above) combined with 
										various <span style="font-weight:600;">real-time location-data</span> 
										(which is never revealed to anyone else)
										allows FlipMob&rsquo;s AI to send you real-time 
										<a href="#synergy" class="loginpop" 
										style="font-weight:600;">Synergy Alerts</a>.
										<!--as emails, DMs and push notifications if you have the DevShares Mobile App. -->
										
										<!--when another Member 
										
										(ie. or potenital Client or Employer) is looking 
										for those particular skills
										or posts a job or project that requires them. (<span style="color:#ff0000;">
										type any place or address, then hit tab to activate the auto-map marker
										</span>)-->
									</div>
									<br />	
									
									<script src='/static/js/googlemaps/GoogleMapsProfile.js'> </script>
									<!--<script src='/static/js/googlemaps/GoogleMapsProject.js'> </script>-->
									<!--<div class="row-item clearfix"></div>-->
										<div id="map-canvas"></div>
									<br /><br />
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Location 1:</label>
										<div class="val">
											<input class="txt" type="text" onblur="geocodeAddress();" id="txt_location"
											data-update-variable="location"
											name="location" value="<?= $user['location'] ?>" 
											style="min-width:220px; max-width:900px;
											font-size:17px; font-weight:300; width:100% !important">

											<input type='hiddenx' name='location_lat' 
											value="<?= $user['location_lat']; ?>"/>
											
											<input type='hiddenx' name='location_lng' 
											value="<?= $user['location_lng']; ?>"/>
											
											<p class="rs description-input">Optional: Can be City or Full Address.</p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Get Matches: &nbsp;</label>
										<div class="val" style="padding-top:7px;">

											<?php
												$is_getmatches = !empty($user['m1']) ? " checked='checked'" : "";
											?>
											<label class='switch' style='float:left; display:inline-block;'>
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="m1"<?= $is_getmatches ?> /><span 
												class='sliderr round'></span>
											</label>
											<div style="display:inline-block; width:90px; height:32px; 
												background:none; margin-left:7px; line-height:32px;">
												for Location 1
											</div>

											<!--<p class="rs description-input">Receive important emails</p>-->
										</div>
									</div>	
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Dist:</label>
										<div class="val">
											<input class="txt" type="text" name="dist1"
											value="<?= $user['dist1']; ?>" placeholder="25" />
											<p class="rs description-input">miles</p>
										</div>
									</div>	
									
									<div style="border-top:2px solid #ccc; width:200px; margin:0 auto;"></div>
									<br /><br />
									
									<div class="row-item clearfix">
										<!--<label class="lbl" for="txt_location"></label>-->
										<div class="val" style="font-weight:300; background:none; max-width:355px;
											font-size:17px; line-height:27px">
											<img src="/static/images/google_maps_icon/google_maps_marker.png" 
											alt="M" style="height:20px; float: left; margin: 5px 8px 0 0;"
											align="left"> <strong>2nd Location (Telegraph)</strong> - if you 
											want to get matches around a particular location.
											<!--Skills appear on your
											<a href="/profile/<?= $user['user_slug']; ?>" style="font-weight:600;"
											title="View My Profile">Profile</a> page and
											help potential Clients &amp; Employers find you in the
											<a href="/members" style="font-weight:600;"
											title="View Member Profiles in the Member Directory">Member Directory</a>
											via a special skill (or skills) you may have.-->
											<p class="rs description-input"></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Location 2:</label>
										<div class="val">
											<input class="txt" type="text" onblur="geocodeAddress2();" id="txt_location"
											data-update-variable="location2"
											name="location2" value="<?= $user['location2'] ?>"
											style="min-width:220px; max-width:900px;
											font-size:17px; font-weight:300; width:100% !important">

											<input type='hiddenx' name='location2_lat'
											value="<?= $user['location2_lat']; ?>"/>

											<input type='hiddenx' name='location2_lng'
											value="<?= $user['location2_lng']; ?>"/>

											<p class="rs description-input">Optional: Remote/Telegraph Location</p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Get Matches: &nbsp;</label>
										<div class="val" style="padding-top:7px;">

										<?php
											$is_getmatches2 = !empty($user['m2']) ? " checked='checked'" : "";
										?>
											<label class='switch' style='float:left; display:inline-block;'>
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="m2"<?= $is_getmatches2 ?> /><span 
												class='sliderr round'></span>
											</label>
											<div style="display:inline-block; width:90px; height:32px;
												background:none; margin-left:7px; line-height:32px;">
												for Location 2
											</div>

											<!--<p class="rs description-input">Receive important emails</p>-->
										</div>
									</div>	
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Dist:</label>
										<div class="val">
											<input class="txt" type="text" name="dist2"
											value="<?= $user['dist2']; ?>" placeholder="25" />
											<p class="rs description-input">miles</p>
										</div>
									</div>					

<!-- ################################################################################ -->
<!-- ####################    BUSINESS INFORMATION STARTS HERE    #################### -->
<!-- ################################################################################ -->
									<br />
<!--									<h2 style="border:1px solid #ddd; text-align:center; padding:15px; margin-top:0px;">
										BUSINESS INFORMATION*
									</h2>-->
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px;
										margin-top:0px; line-height:22px; font-weight:600;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
										BUSINESS INFORMATION*
									</h2>
									<br />									
									
									<center style="font-weight:300;">
										<!--<strong>Required to submit bids</strong> - -->
										Optional: Fill out all your Business Info (then submit) to become Verified, 
										which displays a Verified Badge on all your Bids/Proposals.
									</center>
									<br />
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Verified: &nbsp;</label>
										<div class="val" style="padding-top:11px;">
											<!-- 1 is show, 0 is hide -->
											<!--<?php $is_validated = !empty($user['is_approved']) ? " checked='checked'" : "";
											?>-->
											
											<?php
											if ($user['is_approved']==1) {
												$approvedstatus = '<img 
												src="/static/client/green_checkmark_mini.png"
												alt="Verified!" style="height:20px; margin-top:-3px;"
												align="middle"> Verified!';
												$approved_color = 'color:#149a0c;';
											} elseif($user['is_approved']==0){
												$approvedstatus = 'Not Verified';
												$approved_color = 'color:#da0000;';
											} else {
												$approvedstatus = 'Pending...';
												$approved_color = 'color:#bbbbbb;';
											}
											
											?>
											
											<!--<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="is_approved"<?= $is_validated ?> /><span class='sliderr round'></span>
											</label>-->

											<p class="rs description-input" style="font-style:normal; 
											<?= $approved_color ?> font-size:15px; font-weight:700">
											<?= $approvedstatus ?></p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Occupation:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="occupation_title"
											value="<?= $user['occupation_title']; ?>">
											<p class="rs description-input">Your official Business or Company Name, or DBA</p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Business Name:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="occupation_at" 
											value="<?= $user['occupation_at']; ?>">
											<p class="rs description-input">Your official Business or Company Name, or DBA</p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Type of Business:</label>
										<div class="val">

											<select name="bus_type" id="" class="txt" style="height: 48px;
												line-height: 35px; padding: 5px; border: 1px solid #eee; 
												background: #f7f7f7;">
												
												<option value="">Select one</option>
												<option value="LLC" <?php
													if ($user['bus_type'] == 'LLC')
														echo "selected"; ?>>LLC</option>
												<option value="Corp" <?php
													if ($user['bus_type'] == 'Corp')
														echo "selected"; ?>>Corp</option>
												<option value="SCorp" <?php
													if ($user['bus_type'] == 'SCorp')
														echo "selected"; ?>>S Corp</option>
												<option value="SoleProp" <?php
													if ($user['bus_type'] == 'SoleProp')
														echo "selected"; ?>>Sole Proprietor</option>
												<option value="Other" <?php
													if ($user['bus_type'] == 'Other')
														echo "selected"; ?>>Other</option>		
											</select>
											<p class="rs description-input" style="color:#999;"></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Address:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="address" value="<?= $user['address']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Address2:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="address2" value="<?= $user['address2']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">City:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="city" value="<?= $user['city']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">State:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="state" value="<?= $user['state']; ?>">
											<p class="rs description-input">Abbrev. ie. IL</p>
										</div>
									</div>

									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Zip:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="zip" value="<?= $user['zip']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>
								
<!--									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-paperclip"></i> Business Insurance:</label>
										<div class="val">
											<input type="file" name="insurance" 
											style="background:none;" onchange="validateImage()" />
											
											<a href="/static/images/users/attachments/<?= $user['insurance'] ?>" title="Click to view"><?= $user['insurance'] ?> <i class="fa fa-external-link"></i></a>
									
										</div>
									</div>-->	
									
<!--									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-paperclip"></i> Attachment1:</label>
										<div class="val">
											<input type="file" name="attach1"
											style="background:none;" onchange="validateImage()" />
											
											<a href="/static/images/users/attachments/<?= $user['attach1'] ?>" title="Click to view"><?= $user['attach1'] ?> <i class="fa fa-external-link"></i></a>
											
										</div>
									</div>-->
									
<!--									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-paperclip"></i> Attachment2:</label>
										<div class="val">
											<input type="file" name="attach2"
											style="background:none;" onchange="validateImage()" />
											
											<a href="/static/images/users/attachments/<?= $user['attach2'] ?>" title="Click to view"><?= $user['attach2'] ?> <i class="fa fa-external-link"></i></a>
											
										</div>
									</div>-->	
									
<!--									<div class="row-item clearfix">
										<label class="lbl" for="txt_location" style="padding-top:0px;">
											<i class="fa fa-paperclip"></i> Attachment3:</label>
										<div class="val">
											<input type="file" name="attach3"
											style="background:none;" onchange="validateImage()" />
											
											<a href="/static/images/users/attachments/<?= $user['attach3'] ?>" title="Click to view"><?= $user['attach3'] ?> <i class="fa fa-external-link"></i></a>
											
										</div>
									</div>	-->
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Display: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
											<!-- 1 is show, 0 is hide -->
											<?php
											$is_addyshown = !empty($user['show_addy']) ? " checked='checked'" : "";
											?>
											<label class='switch' style="float:left;">
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="show_addy"<?= $is_addyshown ?> /><span class='sliderr round'></span>
											</label>
											<div style="float:left; display:inline; height:33px; line-height:33px;
												margin-left:7px;">
												Display Address on Profile page
											</div>

											<p class="rs description-input"></p>
										</div>
									</div>
									
									<div class="row-item clearfix" style="padding-top:15px;">
										<label class="lbl" for="txt_location">Submit: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
											<!-- 1 is show, 0 is hide -->
											<?php $is_submitted = !empty($user['is_sub']) ? " checked='checked'" : "";
											?>
											
											<label class='switch' style="float:left;">
												<input class='' id='' data-toggle='toggle' type='checkbox'
												name="is_sub"<?= $is_submitted ?> /><span class='sliderr round'></span>
											</label>
											<div style="float:left; display:inline; height:33px; line-height:33px; 
												margin-left:7px;">
												for review as a Verified Account
											</div>

											<p class="rs description-input" style="font-style:normal; 
											color:#000; font-size:15px;"></p>
										</div>
									</div>	
									
									<br />
									
									 <!--style="margin-top:10px;"-->
									
<!-- ################################################################################ -->
<!-- #################### MESSAGES + NOTIFICATIONS TOGGLES START #################### -->
<!-- ################################################################################ -->
									
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px;
										margin-top:0px; line-height:22px; font-weight:600;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
										MESSAGES / NOTIFICATIONS / ALERTS
									</h2>
									<br />									
									
									<center style="font-weight:300;">Toggle off to stop all (across both site and apps).</center>
									<br />
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Emails: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
										
											<?php
												$is_subscribed = !empty($user['is_subscribe']) ? " checked='checked'" : "";
											?>
											<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox' 
												name="is_subscribe"<?= $is_subscribed ?> /><span class='sliderr round'></span>
											</label> 
										
											<!--<p class="rs description-input">Receive important emails</p>-->
										</div>
									</div>	

									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Text Messages: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
										
											<?php
												$is_text = !empty($user['is_text']) ? " checked='checked'" : "";
											?>
											<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox' 
												name="is_text"<?= $is_text ?> /><span class='sliderr round'></span>
											</label> 
										
											<!--<p class="rs description-input">Receive important text messages</p>-->
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_location">Push Notifications: &nbsp;</label>
										<div class="val" style="padding-top:7px;">
										
											<?php
												$is_push = !empty($user['is_push']) ? " checked='checked'" : "";
											?>
											<label class='switch'>
												<input class='' id='' data-toggle='toggle' type='checkbox' 
												name="is_push"<?= $is_push ?> /><span class='sliderr round'></span>
											</label> 
										
											<!--<p class="rs description-input">Receive important push notifications</p>-->
										</div>
									</div>		
									
									<!--<center style="font-weight:300;">The ability to turn off by 
									Brand/Person Coming Soon</center>-->
									<br /><br />
									<!--<div style="border-top:3px solid #eee;">&nbsp;</div>-->																
									<!-- ################################################################################ -->
									<!-- ################################################################################ -->			
									<!--
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px; margin-top:0px;">
										SHIPPING / DELIVERY ADDRESS
									</h2>
									<br />			
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Type:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="deliv_type" value="<?= $user['deliv_type']; ?>">
											<p class="rs description-input">ie. Shipping / Delivery Type of home, office, etc.</p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Special?:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="special" value="<?= $user['special']; ?>">
											<p class="rs description-input">ie. special instructions</p>
										</div>
									</div>-->	
									
<!-- ################################################################################ -->
<!-- ####################      REFFERAL INFO SECTION STARTS      #################### -->
<!-- ################################################################################ -->			
									
									<h2 style="border:1px solid #ddd; text-align:center; padding:15px;
										margin-top:0px; line-height:22px; font-weight:600;
										font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana, sans-serif;">
										MY REFERRAL INFO
									</h2>
									
									<center style="font-weight:300;">Share your unique Referral link <i>or</i>
									QR Code to refer others. You&rsquo;ll also earn referral commissions
									off of all users you directly refer - for life.  
									<span style="color:#aaa;">Note: The QR Code is just a graphical version of
										your entire Referral Link.</span> <a href="/referrals" 
									title="Referral Program"><img src="/static/client/info_icon_black.png" 
									alt="i" style="height:22px; margin-top:-3px; margin-left:0px"></a></center>
									<br />
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">My Referral Code:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="refcode" value="<?= $user['refcode']; ?>" readonly>
											<p class="rs description-input"></p>
										</div>
									</div>
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Referred By:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="refby" value="<?= $user['refby']; ?>" readonly>
											<p class="rs description-input"></p>
										</div>
									</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/referrals/';
		$PNG_WEB_DIR_REF = '3rdparty/phpqrcode/referrals/';
		$rfname = 'user_' . $user['id'] . '.png';
		$rfilename2 = '3rdparty/phpqrcode/referrals/' . $rfname;
		$rfilename = $PNG_TEMP_DIR_REF.$rfname;
		$refurl = 'https://flipmob.com/r/'.$user['refcode'];

		//$qr_string = array(
		//    'website' => 'https://preorder.sqdash.co/'.$page['slug'],
		//);
		//echo "<br />";
		//$qrString = json_encode($qr_string);
		$rqrString = "Open 'flipmob.com/r/".$user['refcode']."' to sign up as a Referral of this Member.";
		//$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="My Unique Referral QR Code"
//					//style="border:1px solid #ddd; width:150px; height:auto;" /></div>';
//		echo "<br /><br /><br />";
		?> 									
		
									<div class="row-item clearfix" style="display:nonex;">
										<!--<label class="lbl" for="txt_name1">My QR Code:</label>-->
										<div class="valx" style="background:none; text-align:center;">
										
										<span style="font-size:17px; font-weight:600">My Unique QR Code</span>
										<br /><br />
										<span style="font-size:15px; font-weight:300">Share this to refer 
										friends</span>
										<br /><br />
										
											<!-- ////////////////////////////////////// -->
											<!-- ////////     QR CODE IMAGE    //////// -->
											<!-- ////////////////////////////////////// -->
											
											<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%);">
											
											<br /><br /><br />
											<span style="font-size:17px; font-weight:600">My Unique Referral Link</span>
											<br /><br />
											<!--<span style="font-size:15px; font-weight:300">Share this to refer
												people. It&rsquo;ll take them to the signup/register page, which will 
												link them to you and then they&rsquo;ll automatically be able to see 
												your messages/notifications:</span>
											<br /><br />-->
											
											<!--<span style="font-size:16px; font-weight:500; color:#00A1FE;">
											https://flipmob.com/r/<?= $user['refcode'] ?></span>-->
											
											<textarea style="width:90%; max-width:400px; height:24px;
											margin-bottom:3px; font-size:17px; text-align:left; margin:0 auto;
											padding:15px 15px 12px; border:2px solid #00A1FE;
											-moz-border-radius: 50px; border-radius: 50px; -webkit-border-radius: 50px;
											background:#fff; color:#00A1FE; font-weight:500;" 
											rows="3" 
											onclick="this.focus();this.select()">https://flipmob.com/r/<?= $user['refcode'] ?></textarea>
											<br />
											<div style="font-weight:300; font-size:11px; line-height:17px;">
												click to copy
											</div>
											
										</div>
									</div>			
									<!--<br />	-->	
									
									<center>
									
<!--										<h2 style="border:1px solid #ddd; text-align:center; padding:15px; margin-top:0px;">
											CHATTRBOX LOYALTY &amp; REWARDS <span style="color:#cd1000;">(COMING SOON)</span>
										</h2>
										
										<div style="font-size:17px; line-height:27px; font-weight:300">
											Users will be able to earn automatic entries whenever they view, read or open a message
											or notification from any brand or person they follow. Those entries will be automatically
											entered into daily, weekly and monthly giveaways. And, if a user wins, the brand or person
											who referred them wins the exact same prize! Simple!
										</div>
										<br />-->

										<div style="height:50px; line-height:50px; display:none;">
											<span id="loyalty_total" 
											style="font-size:44px; color:#000;"><?= $user['reward'] ?></span>
											<span style="font-size:28px; color:#000;">
											<i class="fa fa-ticket" style="margin-bottom:10px;"></i></span>
											<!--<img src="/static/client/gold_star.png" alt="stars"
											style="height:36px; margin-top:-17px;" align="middle"></span>-->
										</div>

										<!--<span style="font-size:15px; letter-spacing: 3px">ENTRIES</span>

										<br>
										-->
										<span id="checkmark" style="margin-top:10px;"><img src="/static/client/green_checkmark_mini.png" alt="Verified!"
										style="height:20px; margin-top:-3px;" align="middle"></span> <?php
									if ($user['loyalty'] == 1) {
										echo "<span style='color:#00b600; font-style:normal; font-weight:600;'>Verified Member!</span>"; } else {
										echo "<span style='font-style:normal; font-weight:600; color:#dd1000;'>Not Verified.</span>"; } ?><br />

										<span id="member_since" 
										style="font-size:12px; color:#aaa; font-weight:300;">Member 
										since: <?= $user['reg_date'] ?></span>

									</center>
									<br />							
																		
									<!--<h2 style="border:1px solid #ddd; text-align:center; padding:15px; margin-top:0px;">
										VEHICLE INFO
									</h2>
									<br />
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Contactless:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="contactless" value="<?= $user['contactless']; ?>">
											<p class="rs description-input">ie. instructions</p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Make:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="make" value="<?= $user['make']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>		
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Model:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="model" value="<?= $user['model']; ?>">
											<p class="rs description-input">ie. model and/or type, ie. Land Rover or Landrover SUV</p>
										</div>
									</div>				
									
									<div class="row-item clearfix">
										<label class="lbl" for="txt_name1">Color:</label>
										<div class="val">
											<input class="txt" type="text" id="txt_name1" name="color" value="<?= $user['color']; ?>">
											<p class="rs description-input"></p>
										</div>
									</div>	-->																																																										
									
<!--									<h3 style="border:1px solid #ddd; text-align:center; padding:5px; margin:0px;">
										<i>Coming Soon: Referral Codes, Vehicle Type + Curbside Manager Suite</i>
									</h3>	-->																																												
                                    <p>
										<button class="btn btn-black btn-submit-all" 
										style="width:100%; padding:15px; font-size:17px; 
										font-weight:300;">Save all settings</button>
										<br />
										<center><a href="/profile/edit?delete=<?= $user['id']; ?>" 
										class="confirm" style="color:#dd1000; font-weight:500; 
										width:auto; display:block; padding:15px 15px 12px; 
										font-size:17px; font-weight:300;"> <span aria-hidden="true" 
										class="close-button" style="font-size:28px; 
										margin-top:-3px">&times;</span>Delete My Account</a></center>
										
									</p>
									
									<div style="position:fixed; left:0; bottom:0; right:0; z-index:999999999999;
										width:100%; background:#ff0000; height:54px; padding:0;">
										<button class="btn btn-black btn-submit-all"
											style="width:100%; padding:15px 15px; height:54px !important;
											font-size:17px; line-height:40px;
										font-weight:300; border-radius: 0px !important; -moz-border-radius: 0px;
										-webkit-border-radius:0px; ">Save all settings</button>
									</div>
								</form>
							</div>
						</div>
						<!--end: .tab-pane (Profile) -->
					</div>
					
					<!-- ################################################################### -->
					<!-- ########################       MY FAVS     ######################## -->
					<!-- ################################################################### -->

					<div>
						<h3 class="rs alternate-tab accordion-label">
							MY FAVS <span style="float:right;">TAP TO EXPAND <i id="chevron_pp"
							class="fa fa-chevron-down open"></i></span>
						</h3>
						<div class="tab-pane accordion-content">
                                <?php if (empty ( $favorites )) : ?>
									<p style="padding: 5px 15px; font-weight:300; font-size:15px;">
                                		<!--You have not added Favorites yet!--> COMING SOON - for now
                                		you can view your Favs on the <a href="/nearby">Nearby</a> page
                                	</p>
								<?php endif; ?>

                                <?php foreach ( $favorites as $objid => $favorite_object ) :
									require 'views/profile/favorite-default.tpl.php';
									endforeach ; 
								?>
                            </div>
						<!--end: .tab-pane -->
					</div>
					
					<!-- ################################################################### -->
					<!-- ########################    MY REFERRALS   ######################## -->
					<!-- ################################################################### -->
					
					<div>
						<h3 class="rs alternate-tab accordion-label">
							MY REFERRALS <span style="float:right;">TAP TO EXPAND <i id="chevron_pp"
							class="fa fa-chevron-down open"></i></span>
						</h3>
						<div class="tab-pane accordion-content">
							<br />
							<div class="tabcontent" style="font-size:15px; font-weight:300; padding:0 15px;
								line-height:23px; 
								font-family:Montserrat,Raleway,'Open Sans', Helvetica,Verdana,sans-serif;">
								<span style="font-weight:600; font-size:17px; 
								line-height:27px;">Earn $$$ from all your direct referrals.</span>
								<br />
								You&rsquo;ll receive <span style="font-weight:600;"></span> commissions
								from all your direct referrals&rsquo; Opportunity Success fees + Memberships
								<!--Co-Fund towards DevShares Listings, Projects &amp; Jobs +
								<span style="font-weight:600;">25%</span> of all Monthly Subscriptions
								and Pay-as-you-go (PAYGO) upgrades. Coming Soon.-->
								<!--<a href="/pricing" style="font-weight:400;" 
								title="View Pricing Overview">Superfan monthly membership</a>. <a href="/monetize" 
								style="font-weight:600;">Learn more <i class="fa fa-angle-right"></i></a>-->
							</div>
                            <?php if (empty ( $referrals )) : ?>
							<p style="padding: 5px 10px; font-size:17px; font-weight:300; line-height:25px;">
								You don&rsquo;t have any Referrals yet!
							</p>
							<?php endif; ?>
							
                            <?php require 'views/profile/referrals.tpl.php'; ?>
                        </div>
						<!--end: .tab-pane -->
					</div>
					
					<!-- ################################################################### -->
					<!-- ########################    REFERRAL CLIX   ####################### -->
					<!-- ################################################################### -->
					
					<div>
						<h3 class="rs alternate-tab accordion-label">
							MY REF CLICKS <span style="float:right;">TAP TO EXPAND <i id="chevron_pp"
							class="fa fa-chevron-down open"></i></span>
						</h3>
						<div class="tab-pane accordion-content">
							<br />
							<div class="tabcontent" style="font-size:17px; font-weight:300; padding:0 15px 7px;
								line-height:27px; border-bottom:1px solid #ccc; margin-bottom:10px;">
								VISITORS FROM YOUR REFERRAL LINKS &amp; CODE
								<!--<a href="/pricing" style="font-weight:400;" 
								title="View Pricing Overview">Superfan monthly membership</a>. <a href="/monetize" 
								style="font-weight:600;">Learn more <i class="fa fa-angle-right"></i></a>-->
							</div>
                            <?php if (empty ( $referralclicks )) : ?>
							<p style="padding: 5px 10px; font-size:17px; font-weight:300; line-height:25px;">
								You don&rsquo;t have any Referral Clicks yet!
							</p>
							<?php endif; ?>
							
                            <?php require 'views/profile/referralclicks.tpl.php'; ?>
                        </div>
						<!--end: .tab-pane -->
					</div>		
					
					<!-- ################################################################### -->
					<!-- ########################      MY IMAGES     ####################### -->
					<!-- ################################################################### -->
					
					<div>
						<h3 class="rs alternate-tab accordion-label">
							MY IMAGES <span style="float:right;">TAP TO EXPAND <i id="chevron_pp"
							class="fa fa-chevron-down open"></i></span>
						</h3>

						<div class="tab-pane accordion-content">
							<br />
							<div class="tabcontent" style="font-size:17px; font-weight:300; padding:0 15px 0px;
								line-height:27px; border-bottom:0px solid #ccc; margin-bottom:5px;">
								PROFILE PAGE IMAGES
							</div>
							<div class="tabcontent" style="font-size:15px; font-weight:300; padding:0 15px 7px;
								line-height:23px; margin-bottom:0px; color:#999;">
								Share/Showcase images
							</div>
							<div class="form form-profile">

								<?php require 'views/profile/form-mypictures.tpl.php'; ?>

							</div>
						</div>
						<!--end: .tab-pane (My Pictures) -->
					</div>
					
					
					<!-- END OF ALL THE PROFILE TABS -->
                    </div>
				<!--end: .tab-content -->
			</div>
			<!--end: .project-tab-detail -->
		</div>
	</div>
	<!--end: .content -->

<!-- ################################################################### -->
<!-- ########################      SIDE BAR      ####################### -->
<!-- ################################################################### -->	
	
	<div class="sidebar grid_4">

		<div class="box-gray project-author" style="margin-bottom:0px;">
			<a href="/levels" title="Click to learn more about Levels" 
			style="color:#555; text-shadow:0px 1px 0px #fff;"><div 
			style="margin:0px auto 0; height:30px; line-height:30px;
					text-align:center; background:#f0f0f0;
					font-family:'Bai Jamjuree',Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
					MEMBER INFO - <span style="font-weight:600; 
					text-shadow:0px 1px 0px #fff;"><?= $user['social_id']; ?></span>
			</div></a>
			<br />
			<!--<h3 class="title-box">Account Info</h3>-->
			<div class="media" style="max-height:130px; overflow:hidden;">
				
				<a href="/profile/<?= $user['user_slug']; ?>" class="thumb-left" 
					style="border-radius: 50px !important; -moz-border-radius: 50px; 
					-webkit-border-radius: 50px; overflow:hidden;"> 
					<img onerror="this.src='/static/images/users/default-avatar.jpg'"
					src="/static/images/users/agency/<?= $user['image'] ?>" alt="<?= $user['name'] ?>"
					style="border-radius: 50px !important; -moz-border-radius: 50px; -webkit-border-radius: 50px;
					overflow:hidden;" />
				</a>
				
				<div class="media-body" style="">
					<h4 class="rs pb10" style="margin-bottom:0px; padding-bottom:0px">
						<a href="/profiles/<?= $user['user_slug']; ?>" style="font-size:19px; color:#222"
							class="fw-b"><?= $user['name'] ?></a> 
							<?php if($user['is_approved'] == 1) : ?>
								<img src="/static/client/verified_badge.png"
								alt="Verified!" style="display:inline; height:20px; margin-top:-8px;">
							<?php else : ?>
							<?php endif; ?>
					</h4>
					<div style="font-size:15px; line-height:23px; font-weight:300;">
						@<?= $user['user_slug']; ?>
					</div>
					
					<p class="rs">
						<span style="font-weight:300; font-size:15px;">Account ID#: <?= $user['id'] ?></span>
					</p>
<!--					<p class="rs">
						<span style="font-weight:300; font-size:15px;"><img 
						src="/static/images/icons/certificate-seal-icon.png" alt="Equity" 
						style="height:20px;"> Shares: <span 
						style="font-weight:700"><?= number_format($user['shares'],0,'',','); ?></span></span>
					</p>-->
					<!--<p class="rs"><span style="font-weight:300"><?= $user['city'] ?>, 
					<?= $user['state'] ?></span></p>-->
					<p class="rs">
						<a href="/profile/<?= $user['user_slug'] ?>" 
						style="font-weight:500; font-size:15px;"><i class="fa fa-user" 
						aria-hidden="true"></i> View My Profile <i class="fa fa-angle-right" 
						aria-hidden="true"></i></a>
					</p>
					<p class="rs">
						<a href="/profiles/<?= $user['user_slug'] ?>" 
						style="font-weight:500; font-size:15px;"><i class="fa fa-user" 
						aria-hidden="true"></i> View My New Profile <i class="fa fa-angle-right" 
						aria-hidden="true"></i></a>
					</p>
						<!-- MAKE EVERYONE FOLLOW THIS USER!!! : ) -->
						<!--<a href="?followMEE">Follow ME</a>-->
					<!--<p class="rs fc-gray"><?= count($myProjects) ?> Projects</p>
					<p class="rs fc-gray"><?= $user['reviews_count'] ?> Reviews</p>-->
				</div>
			</div>
			<div class="author-action">
				<!-- <a class="btn btn-red" href="#">Edit info</a> -->
				<a class="btn btn-blue" href="/messages">
					<i class="fa fa-envelope"></i> Inbox</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/profile/edit" 
					style="font-size:17px; color:#ddd"><i class="fa fa-refresh"></i></a>
				
				<a class="btn btn-red" href="/auth/logout" style="float:right;">
					<i class="fa fa-power-off"></i> Logout</a>
			</div>
			<div class="clear"></div>
			<div class="author-action" style="text-align:center;">
				<br />
				<center><a href="/profile/mylistings" class="btn-black-slim"><i class="fa fa-list"></i> My Listings</a>
				</center>
				<div class="clear"></div>
				<br />
			</div>
		</div>
		<!--end: .project-author -->
		
		<br />
		<!--<center style="font-weight:600; font-size:22px; color:#000; line-height:29px">My Unique<br />E-Wallet QR Code</center>-->
		<div style="width: 100%; height: auto; padding: 0px 0; text-align: center;">
		<div style="display:none">
        <?php 
            //require_once '3rdparty/phpqrcode/qrlib.php';
            
            //$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'members'.DIRECTORY_SEPARATOR;
			$PNG_TEMP_DIR = '/home/flipmob/public_html/3rdparty/customers/';
            $PNG_WEB_DIR = '3rdparty/phpqrcode/customers/';
            $fname = 'cust_' . $user['id'] . '.png';
            $filename2 = '3rdparty/phpqrcode/customers/' . $fname;
            $filename = $PNG_TEMP_DIR.$fname;
			$url = 'https://flipmob.com/admin/scan?uid='.$user['id'];
            
            //$qr_string = array(
            //    'website' => 'https://preorder.sqdash.co/'.$page['slug'],
            //);
            //echo "<br />"; 
            //$qrString = json_encode($qr_string);
			$qrString = "Open 'https://flipmob.com/admin/scan?uid=".$user['id']."' to take E-Wallet payment.";
			//$qrString = "Open to verify the Vax or Clearance Pass.";
            //echo $qrString;
            QRcode::png($qrString, $filename2);
            //QRcode::png('https://preorder.sqdash.co/pinipico', $filename2);
        
            //echo "<br /><br /><br />";
            //echo "PNG TEMP DIR: " . $PNG_TEMP_DIR ."<br />";
            //echo "PNG WEB DIR: " . $PNG_WEB_DIR ."<br />";
            //echo "IMG FILE NAME: " . $fname ."<br />";
            //echo "IMG PATH: " . $filename2 ."<br />";
            //echo "IMG PATH: " . $filename ."<br />";
            //echo "<br /><br /><br />";
        
            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.basename($filename).'"alt="My E-Wallet QR Code" 
				style="border:1px solid #ddd; width:150px; height:auto;" /></div>'; 
            //echo "<br /><br /><br />"; 
       ?> 
	   </div>
		
			
			<div class="box-gray" style="display:none; margin-top:10px; padding-bottom: 15px;
			font-family:'Bai Jamjuree',Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">

				<div style="width:50%; display:inline-block; float:left; text-align:center;">
					<div style="margin-bottom:10px;">
						<span style="font-weight:600">SERVICE</span> CREDITS
					</div>
					<a href="/buycredits" title="Buy Service Credits"><img
						src="/static/client/customer_service_rep.png" alt="Rep" align="absmiddle"
						style="height:28px; margin-top:-9px;">

						<span class="animatedcoins" style="font-size:28px; font-weight:400; color:#555;
						font-family:'Bai Jamjuree',Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
						<?= number_format($_SESSION['user']['credits'],0,'.',','); ?></span></a>
				</div>
				<div style="width:1px; margin-top:20px; display:inline-block; float:left; text-align:center;
				height:20px; border-right:1px solid #ccc;">
					&nbsp;
				</div>
				<div style="width:49%; display:inline-block; float:left; text-align:center;">
					<div style="margin-bottom:10px;">
						<span style="font-weight:600">BID</span> CREDITS
					</div>
					<a href="/profile/bids" title="Buy Bid Credits"><img
						src="/static/client/credits_black.png" alt="Bids"
						align="absmiddle" style="height:27px; margin-top:-9px;">

						<span class="animatedcoins" style="font-size:28px; font-weight:400; color:#555;
						font-family:'Bai Jamjuree',Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
						<?= number_format($_SESSION['user']['bids'],0,'.',','); ?></span></a>
				</div>
				<div class="clear"></div>
				<div style=" margin-top:7px; font-weight:300; font-size:12px; line-height:17px;
					text-align:center; text-transform:uppercase">
					<a href="/pricing" title="View Pricing">VIEW PRICING
						<i
					class="fa fa-angle-right" aria-hidden="true"></i></a>
					<br /><br />
					<span style="font-size:14px; text-transform: none;">Own part of FlipMob. <a href="/ownership"
					title="FlipMob Ownership" style="font-size:14px">Learn more
					<i class="fa fa-angle-right" aria-hidden="true"></i></a></span>
				</div>
			</div>
			<!-- END OF CREDITS BOX -->
			 
			<div style="border:2px solid #ddd">
			
				<br />
				<!--<img src='/static/client/ewallet_logo_339.png' alt='E-Wallet' style='height:45px;' />-->
				<div style="font-weight:400; font-size:14px; line-height:19px; letter-spacing: 2px; margin-top:10px;
				font-family:Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;">
					ACCOUNT BALANCE
				</div>
				<br />
				<span style="color: #4ba220; font-size: 36px; font-weight: 600;
				font-family: Montserrat,Raleway,'Open Sans',Helvetica,Verdana,sans-serif;
				">$<?= number_format(($user['virtual_balance']/100),2,'.',','); ?></span>
				<!--<span style="color: #aaa; font-weight:300">Your Account Balance</span> <br />-->
				<br /><br />
				<div style="border-top:2px solid #ddd; max-width:150px; margin:0 auto;"></div>
				<!-- /profile/load -->
			
				<h2 style="font-weight:600;">
					Buy, Sell &amp; Flip Safely + Securely
				</h2>
				
				<div style="font-size:15px; line-height:24px; padding:0 15px; text-align:left;">
					FlipMob features a secure, 256-bit encrypted escrow system that
					allows members to safely load funds for use throughout FlipMob.
				</div>

				<br /><br />
				<a href="https://shop.flipmob.com/productt/234" class="btn-black-slim">Add/Load Funds</a>
				<div class="clear"></div>
				<div style="margin-top:15px;">
					powered by Square
				</div>
				
				<br /><br />
				<a href="/load" class="btn-black-slim">Add/Load Funds</a>
				<div class="clear"></div>
				<div style="margin-top:15px;">
					powered by Paypal/Square
				</div>
				
				<br /><br />
				<a href="https://square.link/u/lKNAREoa" class="btn-black-slim">Add/Load Funds</a>
				<div class="clear"></div>
				<div style="margin-top:15px;">
					powered by Square Online
				</div>
				
				<?php if($_SESSION['user']['is_admin']){ ?>
					<!--<br /><br /><br />
					<a href="/profile/load" class="btn-black-slim">Add/Load Funds (Stripe)</a>-->
				
				<?php } ?>
				
				<br /><br />
			</div>
			
			<!--<a href="/profile/bids" class="btn-black-slim"><img src="/static/client/devshares_credits_mini_white.png"
				alt="C" align="absmiddle" style="height:20px; margin-top:-2px; margin-right:0px"> Bid Credits</a>
			<br /><br /><br />-->
			<!-- CHECK THIS ONE WHEN IT'S TIME TO CHARGE FOR PREMIUM PUSH AND MESSAGING CREDITS -->
			<!--<a href="/buycredits" class="btn-black-slim">Service Credits</a>-->
			<!-- old legacy page -->
			<!--<a href="/payments/buy" class="btn-black-slim">Load E-Wallet</a>-->
			<br /><br />

			<hr style="height: 1px; border-top: 0px dashed #ccc; border-left: 0px; border-right: 0px; border-bottom: 0px;
			margin: 0 auto; margin-top: 10px; margin-bottom: 10px; width: 60%;">

			<a href="/profile/edit" style="font-size:17px;">
				<i class="fa fa-refresh"></i></a>
			<br /><br />
			
			
            </div>
	</div>
	<!--end: .sidebar -->
	<div class="clear"></div>
</div>

<br /><br />


<script type="text/javascript">
	// VALIDATE Image
	function validateImage()
	{
		var formData = new FormData();
		var file = document.getElementById("main_img").files[0];
		formData.append("Filedata", file);
		var t = file.type.split('/').pop().toLowerCase();
		if (t != "jpeg" && t != "jpg" && t != "png" && t != "bmp" && t != "gif" && t != "pdf") {
			alert('Please select a valid image file, such as png, jpg, jpeg, gif, bmp, pdf. It looks like your image is this file type: ' + t + '. Please contact Tech Support if you think we should be accepting this file type at support@flipmob.com');
			document.getElementById("img").value = '';
			return false;
		}

		var fsize = (file.size / 1024 / 1024).toFixed(2);
		if (fsize > 2) {
			alert('Max Upload size is 2MB only');
			document.getElementById(id).value = '';
			return false;
		}
		return true;
	}

	// utilities for multi-selection autocomplete
	function split(val) {
		return val.split(/,\s*/);
	}
	function extractLast(term) {
		return split(term).pop();
	}
	// end utilities

	// Verify the Phone Number AND Carrier 
	function verifyphone(){
		//alert('Verify works...');
		var phone = $("#phonenumber").val();
		var carrier = $("#carrier").val();
		
		//alert('Code: ' + code);
		
//		var ref_length = $("#userefcode").val().length;
//		if (ref_length === 0) {
//			$("#userefcode").css("background", "rgba(0,0,0,.4);");
//		} 
		//alert('Length: ' + ref_length);

		$.ajax({
		  url: "/auth/validatePhone",
		  type: "POST",
		  data: {phone: phone, carrier: carrier},
		  success: function(d) {
				//alert('Typing..');
				//alert('D : ' + d);
				//alert('D: ' + d + ' and Result: ' + d);
				//if (d > 0) {
				if (d == 1) {	
				  //alert('We found your Device ID: ' + d);	
				  //$("#userefcode").val(code); 
				  //$("#userefcode").css("background", "#27C427");
				  //alert('The verify function did work!');
				  alert('We\'ve sent a verification link to your phone. If you don\'t receive it, please contact tech support at support@chattrboxx.com.');
				  //$("#userefcode").val(''); 
				  //$('#username_availability_result').html(''); 
				  //$("#refmsg").html("Your Organization Name looks valid!");
				  //$('#username_availability_result').html('<span style="color:#29CE29; font-weight:bold;">' + ref + '</span>' + ' is Available!');
				} else {
					//alert('The verify function did not work.');
					//alert(d);
					//alert('No');
					alert('Oooops, something went wrong. Please contact tech support at support@chattrboxx.com to verify your phone number.');
				  //alert('Ooops we could not find that Organization.');
				  //$("#userefcode").css("background", "#cd1000");
				  //$("#refmsg").html("Continue typing until the background turns green, which indicates your Company Name is valid.");
				} 
				return false;
		  }// success
		}); // ajax
		return false;
    }
    
    //////////////////////////////////////////
	function countChar(val){
		var len = val.value.length;
		if (len >= 160) {
			c
		} else {
			$('#keywordscount').text(159 - len);
		}
	};
	//////////////////////////////////////////

$(document).ready(function(){
	
	// Alright, let's try to verify and validate the phone number and carrier
	var phonenum = $("#phonenumber").val();
	var carrier = $("#carrier").val();
	
	$('#verifynow').click(function (e) {
		//alert('Phone: ' + phonenum + ' and Carrier : ' + carrier);
		verifyphone();
		e.preventDefault();
	});  
	
	//////////////////////////////////////////

	var specialty_text = $('#keywords').val();
	var specialty_text_length = $('#keywords').val().length;

	if (specialty_text_length < 161) {
		$('#keywordscount').text(160 - specialty_text_length);
	}

	//////////////////////////////////////////
	
    $("#add_mailing_addr").change(function(){
        if ($(this).is(":checked")) {
            $("input[name='mailing_address']").removeProp("disabled");
            $("input[name='mailing_address']").focus();
        }
        else
            $("input[name='mailing_address']").prop("disabled", true);
    });

    $(".interests-ac")
    .bind("keydown", function(event) {
		if (event.keyCode === $.ui.keyCode.TAB
			&& $(this).autocomplete("instance").menu.active)
			// prevent value inserted on focus
			event.preventDefault();
	})
	.autocomplete({
		source: function(request, response) {
			$.getJSON("/interest/search", {
				term: extractLast(request.term)
			}, response);
		},
		search: function() {
			// custom minLength
			var term = extractLast(this.value);
			if (term.length < 2)
				return false;
		},
		focus: function() {
			// prevent value inserted on focus
			return false;
		},
		select: function( event, ui ) {
			var terms = split(this.value);
			// remove the current input
			terms.pop();
			// add the selected item
			terms.push(ui.item.value);
			// add placeholder to get the comma-and-space at the end
			terms.push("");
			this.value = terms.join(", ");
			return false;
		}
	});
	
	//////////////////////////////////////////
	
	$(".updateB").click(function(){
	    // e.preventDefault();
	    alert('update Balance button on Edit Profile clicked');
	    return false;
		var pid    = $(this).parent(".refreshBal").attr("data-pid"); // project id
		var uid    = $(this).parent(".refreshBal").attr("data-uid"); // poster id

	    $.ajax({
			url: "/listing/updateBalance",
	        type: "post",
	        data: {
	            pid: pid,
	            uid: uid
	        },
	        success: function(d) {
				//alert(d);
	            var d = eval(d);
				$('.topbal').load(document.URL +  ' .topbal');
	        }
	    });

	    return false;
	});	
});
</script>

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