<!-- OFFICIAL SELLING EDIT PAGE -->
<?php
error_reporting(0);
ini_set('display_errors', 0);
if (isset($_GET['saved'])) {
	//$msg = htmlentities(strip_tags($_GET['msg']));
	$saved = "Saved Successfully!";
}
?>
<!--<script src="/3rdparty/ckeditoradv/ckeditor.js"> </script>-->
<script src="/3rdparty/ckeditor/ckeditor.js"> </script>
<link rel="stylesheet" href="/static/css/jquery.datetimepicker.css"/>
<script src='/static/js/jquery.datetimepicker.js'> </script>

<style type="text/css">
	body {
		background: #f9f9f9;
		/*background: #f5f5f5;*/
	}
	footer { display:none; }
	.scrollup {
		bottom: 123px !important;
	}
	.form .txt {
		background: #eee !important;
		border: 0px;
	}
	div.spacer {
		padding-top: 54px;
	}
	#map-canvas {
		width: 90%;
		float: right;
		border: 3px solid #fff;
	}
	.hidden {
		display: none;
	}
	h1, h2, h3, h4, h5, h6 {
		font-family: 'Open Sans';
		font-weight: 300;
	}
	h2 {
		line-height: 28px;
	}
	.container_12.splitintwo {
		width: 60%;
		float: left;
	}
	.container_12.splitintwor {
		width: 35%;
		float: right;
	}
	.container_12.splitintwos {
		width: 48%;
		float: left;
	}
	.saved  {
		background: #cd1000;
	margin-top: 0px;
	color: #fff;
	text-align: center;
	padding: 10px;
	font-size: 15px;
	}
	.saved a, .saved a:active, .saved a:visited {
		background: #fff;
	color: #28d52d;
		border-radius: 50px;
	-moz-border-radius: 50px;
	-webkit-border-radius: 50px;
	padding: 3px 10px;
	font-weight: 800;
	}
	.saved a:hover {
		color: #fff;
	background: #28d52d;
	}

	/* ########################################### */
	/* ############# PREVIEW FEATURE ############# */
	/* ########################################### */

	.coupon-wrapper {
		position: fixed;
		/*padding-left:20px;*/
		max-width: 332px;
	}
	.coupon-realtime {
		/*width:428px;*/
		width: 300px;
		border: 1px solid #ddd;
		box-shadow: 0 1px 3px rgba(0,0,0,0.1),
		0 0 2px rgba(255,255,255,0.1) inset,
		0 1px 2px rgba(255,255,255,0.2) inset;
		background: #ffffff;
		padding: 15px;
	}
	.coupon-realtime .coupon-image {
		/*float: left;*/
		width: 100%;
		/*margin-right:10px;*/
	}
	.coupon-realtime .coupon-content {
		float: left;
		width: 300px;
		padding: 5px;
		margin-top: 10px;
		font-family: Montserrat, 'Open Sans',Helvetica, sans-serif;
	}
	.coupon-realtime .coupon-content h3,
	.coupon-realtime .coupon-content p {
		margin-bottom: 3px;
		margin-top: 0px;
	}

	.row-item.submit-wrapper {
		padding-left: 30%;
	}
	.home-feature-category .marked-category {
		margin-bottom: 0px !important;
	}
	.form .txt {
		width: 270px;
	}
	.form .row-item .lbl {
		float: left;
		padding-top: 12px;
		width: 177px;
		text-align: right;
	}
	input[type="text"].txt {
		/*width: 270px;*/
		width: 100%;
	}
	.dummy-criteria {
		display: none;
	}
	.value-selector:disabled {
		display: none;
	}
	.campaign .btn {
		padding: 5px 16px !important;
	}
	select.txt {
		width: auto !important;
	}

	div.fSized {
		float: left;
		width: 40px !important;
		padding-top: 7px;
	}

	.business .result-icon {
		float: left;
		width: 32px;
		height: 32px;
	}
	.business .result-icon img {
		width: 32px;
		height: 32px;
	}

	/*select {
	padding: 15px !important;
	height: 35px;
	line-height: 35px !important;
	min-width: 158px !important;
	width: auto !important;
	max-width: 97%;
	color: #222;
	background: #fff;
	text-transform: none;
	font-weight: 200;
	font-family: 'Open Sans',sans-serif;
	font-size: 14px;
	border: 1px solid ddd;
	-ms-box-sizing: content-box;
	-moz-box-sizing: content-box;
	-webkit-box-sizing: content-box;
	box-sizing: content-box;
	}*/

	#termsdiv {
		padding-top: 20px;
	}
	#spaceit {
		padding-bottom: 0px;
	}

	/* ###################################################### */
	/* ####### 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     ############## */
	/* ##################################################### */

	.mvl {
		display: none;
	}
	.dvl {
		display: inline;
	}
	
	#sectiondiv {
		padding: 20px 0 20px;
	}

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

	@media (max-width: 600px) {
		.mvl {
			display: inline;
		}
		.dvl {
			display: none;
		}
		.container_12.splitintwo, .container_12.splitintwor {
			width: 96%;
			float: none;
			border-right: 0px solid #ddd;
		}
		.coupon-realtime {
			width: 300px;
		}
		.coupon-wrapper {
			position: relative;
			padding-left: 0px;
		}
		.coupon-realtime .coupon-image {
			float: left;
			width: 80px;
			margin-right: 10px;
		}
		.coupon-realtime .coupon-content {
			float: left;
			width: 160px;
			padding: 5px;
		}
		#map-canvas {
			width: 96%;
		}
		.form .txt {
			width: 150px;
		}
		input[type="text"].txt {
			width: 150px;
		}
		.home-feature-category .marked-category {
			margin-bottom: 0px !important;
		}
		.coupon-realtime {
			margin: auto;
		}
		.form .row-item {
			padding-bottom: 5px;
		}
		.form .row-item .lbl .lblsms {
			display: none;
		}
		.form .row-item .val {
			margin-left: 0px; /* was 193px */
		}
		.form .row-item .lbl {
			float: left;
			padding-top: 12px;
			padding-bottom: 7px;
			width: 100%; /* was 177px */
			text-align: left;
		}
		#descriplabel {
			padding: 0px;
			height: 10px;
		}
		#descriplabel2 {
			display: none;
		}
		.row-item.submit-wrapper {
			padding-left: 0%;
		}
		.form .description-input {
			font-family: 'Open Sans', sans-serif;
			font-weight: 300;
			font-style: italic;
			color: #999;
		}
		#sectiondiv {
			padding: 10px 0 20px;
		}
		#termsdiv {
			padding-top: 0px;
		}
		#spaceit {
			padding-top: 10px;
			padding-bottom: 10px;
		}
		.mtext {
			font-size: 17px;
		}
		/* ############# PREVIEW FEATURE ############# */
		.coupon-realtime .coupon-image {
			float: none;
			display: block;
			width: 100%;
			/* margin-right: 10px; */
		}
		.coupon-realtime .coupon-content {
			float: none;
			width: 100%;
			padding: 0px;
		}
	}
</style>

<script type="text/javascript">
	$(document).ready(function() {
		$(".timepicker").datetimepicker({
			hours12: true,
			format: 'Y-m-d H:i:s',
			formatTime: 'h:i',
			timepicker: true,
			datepicker: true,
			timepickerScrollbar: true,
			step: 30
		});

		$(".datepicker").datetimepicker({
			hours24: true,
			format: 'm/d/y',
			formatTime: 'H:i',
			datepicker: true,
			timepicker: false,
			timepickerScrollbar: true,
			step: 30
		});
	});
</script>

<?php
if (isset($saved)) {
	echo "<div class='saved' />$saved &nbsp;&nbsp;&nbsp; <a href='/listing/{$project['id']}/edit'>Ok</a></div>";
}
?>

<form method="post" enctype="multipart/form-data">
	<div class="home-feature-category" style="background:none; border:none;">
		<div class="container_12 splitintwo clearfix">
			<div class="grid_12 marked-category form tab-content active">

				<h1>
					<div style="float:left; text-align:center;
							height:28px; width:24px; text-align:center; line-height:28px; padding-right:4px;
							padding-bottom:1px; background:#000; color:#fff; margin-left:5px; margin-right:6px;
							border-radius:6px; -moz-border-radius:6px; -webkit-border-radius:6px; margin-top:1px">
						<a href="/listing/<?= $project['id'] ?>" style="color:#fff; display:block">
							<i class="fa fa-angle-left" aria-hidden="true"></i></a></div> Back |
							Edit this Listing
				</h1>
				
				<div style="padding-left:5px;">
					<!--<span class="mvl">| <a href="/category/all">All</a></span>-->
					<!--<span class="dvl">| <a href="/category/all">All Mobs</a> |</span>-->
					<a href="/listing/<?= $project['id'] ?>"
						style="font-weight:300; font-size:15px;">View this Listing <i class="fa fa-angle-right"
					aria-hidden="true"></i></a>
				</div>
				<div class="clear"></div>
				<br />

				<?php
				if (isset($_SESSION['user']['is_admin']) && $_SESSION['user']['is_admin'] ==1) {
                ?>
                
                <div class="row-item clearfix">
					<label class="lbl" for="txt_bio">Status:</label>
					<div class="val">
						<select class="txt" name="status" class="txt" style="height:48px;
							line-height:48px; font-size:17px; font-weight:300;
							max-width:390px; width:100% !important">
							<!--<option value="11" title="Deals" selected>Deals</option> -->
							
							<option value="created"
								<?php if ($project['status'] == 'created')
									echo "selected"; ?>>created</option>
							<option value="hired"
								<?php if ($project['status'] == 'hired')
									echo "selected"; ?>>hired</option>
							<option value="accepted"
								<?php if ($project['status'] == 'accepted')
									echo "selected"; ?>>accepted</option>
							<option value="completed"
								<?php if ($project['status'] == 'completed')
									echo "selected"; ?>>completed</option>
							<option value="reviewed"
								<?php if ($project['status'] == 'reviewed')
									echo "selected"; ?>>reviewed</option>
							<option value="withdrawn"
								<?php if ($project['status'] == 'withdrawn')
								echo "selected"; ?>>withdrawn</option>		
							
						</select>
						<p class="rs description-input">Current: <?= $project['status'] ?></p>
					</div>
				</div>
            
				<div class="row-item clearfix">
					<label class="lbl" for="txt_bio">Listing Type:</label>
					<div class="val">
						<select class="txt" name="project_type_id" class="txt" style="height:48px;
							line-height:48px; font-size:17px; font-weight:300;
							max-width:390px; width:100% !important">
							<!--<option value="11" title="Deals" selected>Deals</option> -->
							
							<option value="2"
								<?php
								if ($project['project_type_id'] == '2')
									echo "selected"; ?>>FlipMob</option>
							<option value="3"
								<?php
								if ($project['project_type_id'] == '3')
									echo "selected"; ?>>Selling</option>
							
						</select>
						<p class="rs description-input">PTID: <?= $project['project_type_id'] ?></p>
					</div>
				</div>
				
				<?php
                }
                ?>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_bio">FlipMob Type:</label>
					<div class="val">
						<select class="txt" name="type_id" class="txt" style="height:48px;
							line-height:48px; font-size:17px; font-weight:300;
							max-width:390px; width:100% !important">
							<!--<option value="11" title="Deals" selected>Deals</option> -->
							<?php
								foreach ($types as $type) :
								$sel_opt = $type['id'] == $project['type_id'] ? " selected" : "";
							?>
							<option<?= $sel_opt ?> value="<?= $type['id'] ?>"
							>&nbsp;<?= $type['title'] ?></option>
							<?php endforeach; ?>
						</select>
						<p class="rs description-input"></p>
					</div>
				</div>

				<?php
					$categoryModel = new marketplaceModel();
					$categories = $categoryModel->getList();
				?>
				<div class="row-item clearfix" style="display:nonex;">
					<label class="lbl" for="txt_name1">Category:</label>
					<div class="val">
						<select name="category_id" class="txt" style="height:48px; line-height:48px; font-size:17px;
							font-weight:300; width:100% !important; max-width:390px">
							<option value="">Select a Category</option>

							<?php
							foreach ($categories as $category)
								:
							$sel = $project['category_id'] == $category['id'] ? ' selected="selected"' : ''; ?>
							<option value="<?= $category['id'] ?>" <?= $sel ?>><?= $category['title'] ?></option>
							<?php endforeach; ?>

						</select>
						<p class="rs description-input"><!--Select a category <?= $project['category_id'] ?>--></p>
					</div>
				</div>

				<div class="row-item clearfix images">
					<label class="lbl" for="txt_name1">Image:</label>

					<div class="val">
						<div>
							<div class="fileUpload">
								<span>Upload</span>
								<input type="file" class="upload" data-type="image" />
							</div>
							<span class="maxsize">(max size: 10MB)</span>
							<div style="clear:both"></div>
						</div>
						<?php
						foreach ($project['images'] as $image) {
							echo "<img src='/{$image['file']}' style='margin:5px 0; margin-right:8px; width:200px' />
					<a href='?deleteFile={$image['id']}'><img src='/static/images/icons/delete_icon.png' style='margin:0 2px 3px 0; width:20px' align='absmiddle' /> delete</a><br />";
						}
						?>
					</div>
				</div>

				<input class="txt" type="hidden" name="user_id" value="<?= $project['user_id'] ?>" />
				<br />

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Title:</label>
					<div class="val">
						<input class="txt" type="text" name="title" value="<?= $project['title'] ?>"
						class="txt" style="min-width:250px; max-width:900px;
						font-size:17px; font-weight:300; width:100% !important">
						<p class="rs description-input" style="color:#dd0000;"></p>
					</div>
				</div>

				<div class="row-item clearfix" id="spaceit" style="">
					<label class="lbl" for="txt_name1" id="descriplabel">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<span style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
						Description/Requirements for your Listing
						</span>
					</div>
				</div>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1" id="descriplabel2">&nbsp;</label>
					<div class="val">
						<textarea id="description" name="description" class="ckeditor"
							data-update-variable="description" maxlength="250"
							style="width:80%; min-height:100px; max-height:130px; font-size:17px;
							line-height:27px;"><?= $project['description'] ?></textarea>
						<p class="rs description-input">(Max 250 characters)</p>
					</div>
				</div>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Tags:</label>
					<div class="val">
						<input class="txt" type="text" name="tags" data-update-variable="tags"
						onkeyup="countChar(this)" id="keywords" maxlength="55"
						value="<?= $project['tags'] ?>" style="min-width:250px; max-width:900px;
						font-size:15px; font-weight:300; width:100% !important">
						<p class="rs description-input">ie. bulk, discount, min. spend, goal, mission, etc.</p>

						<div style="display:inline-block; width:auto; margin-top:5px; min-width:150px;">
							<div id="keywordscount" style="width:40px; text-align:center; background:#EA0000;
									color:#fff; font-weight:300; display:inline-block;
									border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;">55</div>
							<div style="display:inline-block; font-weight:300;">55 character limit</div>
						</div>
					</div>
				</div>

				<div style="display:none">
					PROJECTS TABLE

					tamount = was credits (for creating listings)
					budget
					specific_fee (int11)
					already_paid (float 10,2)
					price (decimal 10,2)
					chipins (int11)
					crowdfund (total chipins amount)(int11)
					budgetcf (int11)
					raised (int11)

					1. My budget - tamount (int11)
					2. Total Budget - budget (float 10,2)
					3. Recommended Budget - budgetcf (this is a system/admin amount) TBD

					AUTOMATICALLY CALCULATED IN THE BACKGROUND
					4. Market Price (average of proposals) - price
					5. Group Budget (SO FAR) - crowdfund

					OPEN
					6. raised
				</div>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Asking Price ($):</label>
					<div class="val">
						<input class="txt" type="text" name="budget" value="<?= $project['budget'] ?>"
						style="min-width:250px; font-size:17px; font-weight:300;" placeholder="100"
						data-update-variable="budget">
						<!--<p class="rs description-input" style="color:#ff0000;">
							<span style="font-style:normal; font-weight:600;
							color:#000;">$<?= number_format($project['budget'],2,'.',',') ?></span>
						</p>-->
					</div>
				</div>
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Deadline:</label>
					<div class="val">

						<!--<input class="txt timepicker" type="text" name="scheduled"
						value="<?= date('Y-m-d H:i:s', strtotime($notification['scheduled'])); ?>"
						style="font-weight:300;">

						<?= date('m-d-Y H:i:s a', strtotime($notification['scheduled'])); ?>-->

						<input class="timepicker txt" type="text" name="timestamp_end" placeholder=""
						value="<?= $project['timestamp_end'] ?>" data-update-variable="timestamp_end"
						style="min-width:250px; max-width:900px;
						font-size:17px; font-weight:300; width:100% !important" /><br />
						<p class="rs description-input" style="color:#ff0000;">
							(Optional) <span style="color:#000; 
							font-style:normal">| <?= date('m/d/Y H:i:s a', strtotime($project['timestamp_end'])); ?></span>
							
						</p>
					</div>
				</div>

				<!-- /////////////////////////////////////////////////////////////// -->
				<!-- //////////////    FLIPMOB SETTINGS START HERE    ////////////// -->
				<!-- /////////////////////////////////////////////////////////////// -->
				
				<!-- ########### SWITCH FIELD STARTS HERE ########### -->
<!--				<div class="row-item clearfix" id="sectiondiv" style="border-top:3px solid #03b5ff; margin-top:20px">
					<label class="lbl" for="txt_name1" style="padding-top:6px"></label>
					<div class="val" style="padding-top:0px; font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:10px;">
							FLIPMOB SETTINGS
						</h2>
						<?php
							$check_flipmob = $project['fmeligible'] ? ' checked="checked"' : '';
						?>
						<label class='switch' style="display:inline-block; float:left;">
							<input class='' id='showflipmob' data-toggle='toggle'  type='checkbox'
							name="fmeligible"<?= $check_flipmob ?> /><span class='sliderr round'></span>
						</label>
						<div style="display:inline-block; float:left; height:30px; width:120px; line-height:30px;
							 font-weight:300; margin-left:7px;">
							ON = YES, SHOW
						</div>
						<div class="clear"></div>
					</div>
				</div>-->

				<div id="flipmobsettings" <?php if($project['fmeligible']==0) { ?>style="display:none;<?php } ?>">
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Opportunity ($):</label>
					<div class="val">
						<input class="txt" type="text" name="opportunity" value="<?= $project['opportunity'] ?>"
						style="min-width:250px; font-size:17px; font-weight:300;" placeholder="100"
						data-update-variable="opportunity">
						<p class="rs description-input" style="color:#ff0000;">
							(Optional) How much this flip could generate.
							<span style="font-style:normal; font-weight:600;
							color:#000;">$<?= number_format($project['opportunity'],2,'.',',') ?></span>
						</p>
					</div>
				</div>
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Potential ROI (%)</label>
					<div class="val">
						<input class="txt" type="text" name="roi" value="<?= $project['roi'] ?>"
						style="min-width:250px; font-size:17px; font-weight:300;" placeholder="20">
						<p class="rs description-input" style="color:#ff0000;">
							(Optional) Potential Return for Mobbers, ie. 20%
						</p>
					</div>
				</div>
				
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">My Budget ($):</label>
					<div class="val">
						<input class="txt" type="text" name="tamount" value="<?= $project['tamount'] ?>"
						style="min-width:250px; font-size:17px; font-weight:300;" placeholder="5+">
						<p class="rs description-input" style="color:#dd0000;">Amount I can contribute:
							<span style="font-style:normal; font-weight:600;
							color:#000;">$<?= number_format($project['tamount'],2,'.',',') ?></span>
						</p>
					</div>
				</div>

				<!--				<div class="row-item clearfix">
				<label class="lbl" for="txt_name1">Min. Spend ($):</label>
				<div class="val">
				<input class="txt" type="text" name="specific_fee" value="<?= $project['specific_fee'] ?>"
				style="min-width:250px; font-size:17px; font-weight:300;" placeholder="5+">
				<p class="rs description-input" style="color:#ff0000;">Minimum Spend to activate:
				<span style="font-style:normal; font-weight:600;
				color:#000;">$<?= number_format($project['specific_fee'],2,'.',',') ?></span>
				</p>
				</div>
				</div> -->

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Min Buy-in ($):</label>
					<div class="val">
						<input class="txt" type="text" name="price" value="<?= $project['price'] ?>"
						style="min-width:250px; font-size:17px; font-weight:300;" placeholder="1+">
						<p class="rs description-input" style="color:#ff0000;">
							Minimum Mobbers must contribute to participate:
							<span style="font-style:normal; font-weight:600;
							color:#000;">$<?= number_format($project['price'],2,'.',',') ?></span>
						</p>
					</div>
				</div>
				</div>
				<!-- END OF FLIPMOB SETTINGS TOGGLESLIDE SECTION -->
				<!-- /////////////////////////////////////////////////////////// -->

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_bio">Skills:</label>
					<div class="val">
						<select name="talents[]" multiple class="txtx" style="line-height:28px;
						font-size:17px; font-weight:300; width:100% !important; background:#fff;
						min-width:300px; max-width:900px; padding:10px; border:1px solid #ccc;">
							<?php
							foreach ($talents as $talent)
								:
							$sel_opt = in_array($talent['id'], $project['talents_ids']) ? " selected" : "";
							?>
							<option<?= $sel_opt ?> value="<?= $talent['id'] ?>"
							style="font-size:17px; font-weight:300;">&nbsp;<?= $talent['title'] ?></option>
							<?php endforeach; ?>
						</select>
						<p class="rs description-input">Tip: Hold Control or Command +
							Click to select multiple</p>
					</div>
				</div>

				<!--				<div class="row-item clearfix images">
				<label class="lbl" for="txt_name1">Image:</label>

				<div class="val">
				<div>
				<div style="margin-top:7px;">
				<span>Upload</span>
				<input type="file" name="image" onchange="updateCouponImage(this)" style="border:0px;" />
				</div>
				<span class="maxsize">(max size: 10MB*)</span>
				<div style="clear:both"></div>
				</div>
				</div>
				</div>-->

				<?php
				$select_single = $project['redeem_type'] == "Multi Use Coupon" ? "" : " selected='selected'";
				$select_multi  = $project['redeem_type'] == "Multi Use Coupon" ? " selected='selected'" : "";
				?>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">Redeem(s) :</label>
					<div class="val">
						<select data-update-variable="usage" name="redeem_type" style="padding:7px;">
							<option value="Single Use / Multi Use Coupon">Please Select</option>
							<option value="Single Use Coupon"<?= $select_single ?>>Single Use Coupon</option>
							<option value="Multi Use Coupon"<?= $select_multi ?>>Multi-Use Coupon</option>
						</select>
						<p class="rs description-input">Optional: Single Use - or - Multi-Use Coupon</p>
					</div>
				</div>
				
				<!-- /////////////////////////////////////////////////////////////// -->
				<!-- //////////////    LOCATION SETTINGS START HERE   ////////////// -->
				<!-- /////////////////////////////////////////////////////////////// -->

				<div class="row-item clearfix" id="sectiondiv" style="border-top:3px solid #03b5ff; margin-top:20px">
					<label class="lbl" for="txt_name1"></label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:0px;">
							LOCATION SETTINGS
						</h2>
						Is this item or service location-specific? If so, set toggle to ON and add an address.
					</div>
				</div>
				
								<!-- ########### SWITCH FIELD STARTS HERE ########### -->
				<div class="row-item clearfix" style="display:nonex;">
					<label class="lbl" for="txt_name1" style="padding-top:6px">Location?:</label>
					<div class="val" style="padding-top:0px;">
						<?php
						$check_locspec = $project['locspec'] ? ' checked="checked"' : '';
						?>
						<label class='switch' style="display:inline-block; float:left;">
							<input class='' id='showlocationsettings' data-toggle='toggle'  type='checkbox'
							name="locspec"<?= $check_locspec ?> /><span class='sliderr round'></span>
						</label>
						<div style="display:inline-block; float:left; height:30px; width:120px; line-height:30px;
							 font-weight:300; margin-left:7px;">
							OFF = NO
						</div>
					</div>
				</div>
				
				<div id="locationsettings" <?php if($project['locspec']==0) { ?>style="display:none;<?php } ?>">

				<!-- MY LOCATION/ADDRESS CODE -->
				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Location:</label>
					<div class="val">
						<input class="txt" type="text" onblur="geocodeAddress();" id="txt_location"
						data-update-variable="location"
						name="location" value="<?= $project['location'] ?>"
						style="min-width:220px; max-width:900px;
						font-size:17px; font-weight:300; width:100% !important">

						<p class="rs description-input" style="color:#dd0000; margin-bottom:5px;">
							Enter City, Building, Place or Full Address, then click tab. You can also
							long-press marker, drag + drop.
						</p>

						<input type='hiddenx' name='location_lat' value="<?= $project['location_lat']; ?>"
						readonly style='background:#eee; border:0; padding:5px; 
						border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;' />
						<input type='hiddenx' name='location_lng' value="<?= $project['location_lng']; ?>"
						readonly style='background:#eee; border:0; padding:5px;
						border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px;' />

					</div>
				</div>

				<!--				<div class="row-item clearfix">
				<label class="lbl" for="txt_name1">Destination:</label>
				<div class="val">
				<input class="txt" type="text" onblur="geocodeAddress2();" id="txt_location"
				data-update-variable="location2"
				name="location" value="<?= $project['location2'] ?>" style="min-width:220px;">

				<input type='hidden' name='location_lat2' value="<?= $project['location_lat2']; ?>"/>
				<input type='hidden' name='location_lng2' value="<?= $project['location_lng2']; ?>"/>
				<p class="rs description-input"></p>
				</div>
				</div>-->

				<script src='/static/js/googlemaps/GoogleMapsProject.js'> </script>
				<div class="row-item clearfix">
					<div id="map-canvas"></div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="padding-top:12px; font-size:15px;">
						<div id="distance"></div>
						<!--<p class="rs description-input"></p>-->
					</div>
				</div>
				</div>
				<!-- TOGGLESLIDE AREA FOR LOCATIONS AND MAP ENDS HERE -->
				<!-- ////////////////////////////////////////////////////////////// -->

				<!--                <div class="row-item clearfix">
				<label class="lbl" for="txt_name1">Website:</label>
				<div class="val">
				<input class="txt" type="text" name="website"  value="<?= $project['website'] ?>"
				style="min-width:250px;">
				<p class="rs description-input">like: http://website.com or https://website.com</p>
				</div>
				</div>

				<div class="row-item clearfix">
				<label class="lbl" for="txt_name1">Phone:</label>
				<div class="val">
				<input class="txt" type="text" name="phone"  value="<?= $project['phone'] ?>"
				style="min-width:250px;">
				<p class="rs description-input">like: 312-555-1234</p>
				</div>
				</div>  -->



				<div class="row-item clearfix" id="termsdiv" style="border-top:3px solid #03b5ff; margin-top:20px">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500;">
							Real-Time Notification Alerts (Optional)
						</h2>
						<span class="mtext" style="color:#000; font-weight:300; margin:0px 0 10px">
						If you&rsquo;d like to receive real-time notifications whenever someone shows
						interest in your listing, enter
						your email and/or phone number below. <i>Note: Simply delete to turn off notifications.</i>
						</span>
					</div>
				</div>

				<?php
				if (!empty($project['email'])) {
					$lister_email = $project['email'];
				} elseif(!empty($_SESSION['user']['email'])){
					$lister_email = $_SESSION['user']['email'];
				} else {
					$lister_email = "";
				}
				?>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Email:</label>
					<div class="val">
						<input class="txt" type="text" name="email" value="<?= $lister_email ?>"
						style="min-width:250px; font-size:17px; font-weight:300" placeholder="youremail@somesite.com">
						<p class="rs description-input" style="color:#ff0000;"></p>
					</div>
				</div>

				<?php
				if (!empty($project['phone'])) {
					$lister_phone = $project['phone'];
				} elseif(!empty($_SESSION['user']['phone'])){
					$lister_phone = $_SESSION['user']['phone'];
				} else {
					$lister_phone = "";
				}
				?>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Phone:</label>
					<div class="val">
						<input class="txt" type="text" name="phone" value="<?= $lister_phone ?>"
						style="min-width:250px; font-size:17px; font-weight:300" placeholder="###-###-####">
						<p class="rs description-input" style="color:#ff0000;">for receiving SMS
							Text Message Notifications</p>
					</div>
				</div>

				<div class="row-item clearfix" id="termsdiv" style="border-top:3px solid #03b5ff;
					padding-bottom:20px; margin-top:20px">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:0">
							Terms (Optional)
						</h2>
					</div>
				</div>

				<div class="row-item clearfix">
					<label class="lbl" for="txt_name1">Terms:</label>
					<div class="val">
						<textarea class="txt" name="terms" maxlength="250" data-update-variable="terms"
							style="width:100%; min-height:100px; max-height:100px; font-size:15px; font-weight:300;
							padding:0 10px 10px; max-width:700px;"><?= $project['terms'] ?></textarea>
						<p class="rs" style="font-weight:300;">Terms for your Listing</p>
					</div>
				</div>

				<div class="row-item clearfix" style="padding-bottom: 20px;">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:0px;">
							Attachments (Optional)
						</h2>
						<span class="mtext" style="color:#000; font-weight:500; margin:0px 0 10px">
						Attach Important Notes, Documentation, NDA, Contract, etc.
						</span>
					</div>
				</div>

				<div class="row-item clearfix files">
					<label class="lbl" for="txt_name1">Attachments:</label>
					<div class="val" style="padding-top:11px;">
						<div>
							<div class="fileUpload">
								<span>Upload</span>
								<input type="file" class="upload" data-type="file" />
							</div>
							<span class="maxsize">(max size: 10MB)</span>
							<div style="clear:both"></div>
						</div>
						<br />
						<?php
						foreach ($project['files'] as $file) {
							echo "{$file['orig_filename']} | <a href='?deleteFile={$file['id']}'>delete</a><br />";
						}
						?>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500;">
							Optional: Need Affordable Project Management?
						</h2>
						<span class="mtext" style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
						DevShares can oversee this for you and more. <a href="#managed"
						class="loginpop nav-title">Learn more <i class="fa fa-angle-right"
						aria-hidden="true"></i></a>
						</span>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">ProjMgt:</label>
					<div class="val">
						<select name="pm" class="txt" style="height:48px; line-height:48px; font-size:17px;
							font-weight:300; width:100% !important; max-width:350px">
							<option value="">Select one</option>

							<option value="Undecided"
								<?php
								if ($project['pm'] == 'Undecided')
									echo "selected"; ?>>Undecided</option>
							<option value="Maybe"
								<?php
								if ($project['pm'] == 'Maybe')
									echo "selected"; ?>>Maybe</option>
							<option value="Yes"
								<?php
								if ($project['pm'] == 'Yes')
									echo "selected"; ?>>Yes</option>
							<option value="No"
								<?php
								if ($project['pm'] == 'No')
									echo "selected"; ?>>No</option>

						</select>
						<p class="rs description-input"><!--Select a category <?= $project['category_id'] ?>--></p>
					</div>
				</div>

				<div class="row-item clearfix" id="spaceit" style="display:none;">
					<label class="lbl" for="txt_name1" id="descriplabel">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<span style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
						Quick overview of your Project Management needs
						</span>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1" id="descriplabel2">PM Notes:</label>
					<div class="val">
						<textarea id="ckeditor1" name="pm_notes" class="ckeditor"
							maxlength="500"
							style="width:80%; min-height:100px; max-height:130px; font-size:17px;
							line-height:27px;"><?= $project['pm_notes'] ?></textarea>
						<p class="rs description-input">(Max 500 characters)</p>
					</div>
				</div>

				<div class="row-item clearfix" style="padding-bottom:0px; display:none;">
					<label class="lbl" for="txt_name1">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<span class="mtext" style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
						Would you like FlipMob to handle QA Testing &amp; Review of the performed work?
						</span>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">Testing:</label>
					<div class="val">
						<select name="qat" class="txt" style="height:48px; line-height:48px; font-size:17px;
							font-weight:300; width:100% !important; max-width:350px">
							<option value="">Select one</option>

							<option value="Undecided"
								<?php
								if ($project['qat'] == 'Undecided')
									echo "selected"; ?>>Undecided</option>
							<option value="Maybe"
								<?php
								if ($project['qat'] == 'Maybe')
									echo "selected"; ?>>Maybe</option>
							<option value="Yes"
								<?php
								if ($project['qat'] == 'Yes')
									echo "selected"; ?>>Yes</option>
							<option value="No"
								<?php
								if ($project['qat'] == 'No')
									echo "selected"; ?>>No</option>

						</select>
						<p class="rs description-input"><!--Select a category <?= $project['category_id'] ?>--></p>
					</div>
				</div>

				<div class="row-item clearfix" id="spaceit" style="display:none;">
					<label class="lbl" for="txt_name1" id="descriplabel">&nbsp;</label>
					<div class="val" style="font-weight:300;">
						<span style="color:#000; font-weight:500; margin:0px 0 0px; font-weight:300;">
						Quick overview of your QA Testing needs
						</span>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1" id="descriplabel2">&nbsp;</label>
					<div class="val">
						<textarea id="ckeditor2" name="qat_notes" class="ckeditor"
							maxlength="500"
							style="width:80%; min-height:100px; max-height:130px; font-size:17px;
							line-height:27px;"><?= $project['qat_notes'] ?></textarea>
						<p class="rs description-input">QA Testing Notes (Max 500 characters)</p>
					</div>
				</div>

				<!-- ################################################ -->
				<!-- ##########        REQUIREMENTS       ########### -->
				<!-- ################################################ -->
				
								
				<!-- /////////////////////////////////////////////////////////////// -->
				<!-- //////////////     COLLABORATION START HERE      ////////////// -->
				<!-- /////////////////////////////////////////////////////////////// -->
				
				<!-- ########### SWITCH FIELD STARTS HERE ########### -->
<!--				<div class="row-item clearfix" id="sectiondiv" style="border-top:3px solid #03b5ff; margin-top:20px;
					padding-bottom:10px;">
					<label class="lbl" for="txt_name1" style="padding-top:6px"></label>
					<div class="val" style="padding-top:0px; font-weight:300;">
						<h2 style="color:#000; font-weight:500; margin-bottom:10px;">
							ALLOW COLLABORATION?
						</h2>
						<?php
						$check_collab = $project['collab'] ? ' checked="checked"' : '';
						?>
						<label class='switch' style="display:inline-block; float:left;">
							<input class='' id='showcollab' data-toggle='toggle'  type='checkbox'
							name="collab"<?= $check_collab ?> /><span class='sliderr round'></span>
						</label>
						<div style="display:inline-block; float:left; height:30px; width:120px; line-height:30px;
							 font-weight:300; margin-left:7px;">
							ON = YES
						</div>
						<div class="clear"></div>
					</div>
				</div>-->

				<div class="collabmore" <?php if($project['collab']==0) { ?>style="display:none;<?php } ?>">
				<div class="row-item clearfix" style="padding-top:0px;">
					<label class="lbl" for="txt_name1"></label>
					<div class="val" style="font-weight:300;">
						<h2 style="color:#000; font-weight:500;">
							Optional: Interactive Additions or Changes Requested
						</h2>
						<span class="mtext" style="color:#000; font-weight:500; margin:0px 0 0px;
						font-weight:300;">

						You can list important details to this flip mob and others can suggest additional
						items, changes, details, etc. which you can then approve. This increases the chances
						that you&rsquo;ll get more mobbers to join. Note:
						Displays on the About tab, below the details.

						<span style="color:#ff0000;">A value in first column is
						<span style="font-weight:600;"><u>required</u></span>.</span>
						<!--<a href="#requirements"
						class="loginpop nav-title">View Fields Legend <i class="fa fa-angle-right"
						aria-hidden="true"></i></a>-->
						</span>
					</div>
				</div>

				<!-- REMOVED THIS
				<input class="form txt" name="back_amount[]" placeholder="$Budg"
				style="width:12%" value="' . $level['amount'] . '" />

				<input class="form txt" name="back_quantity[]" placeholder="#CF"
				style="width:8%" value="' . $level['quantity_desired'] . '" />

				<input class="form txt" name="days[]" placeholder="Days" style="width:10%"
				value="' . $level['days'] . '" />
				-->
				<div class="row-item clearfix levels">
					<label class="lbl" for="txt_name1">Changes:</label>
					<div class="val" style="-webkit-box-sizing: border-box;
						-moz-box-sizing: border-box; box-sizing: border-box; background:none;
						font-size:15px; font-weight:300;">
						<?php
						foreach ($project['backing'] as $level) {
							if ($level['sort']==99) {
								$status_level = "background:#ffc8ca !important;";
							} else {
								$status_level = "";
							}
							echo '<input class="form txt" name="sort[]" placeholder="#" style="'. $status_level .'width:10%; text-align:center" value="' . $level['sort'] . '" />
						  <input class="form txt" name="back_reward[]" placeholder="Item/Good"
						  maxlength="50" style="'. $status_level .'width:65%; max-width:500px;" value="' . $level['reward'] . '" />
						  <input class="form txt datepicker" name="back_eta[]" placeholder="Need By"
						  style="'. $status_level .'font-size:13px; width:21%" value="' . $level['eta'] . '" />
						  <input class="form txt" name="cf_id[]" type="hidden"
						  style="width:0%" value="' . $level['cf_id'] . '" /><br />';
						}
						$totalreqs = count($project['backing']) + 1;
						?>
						<!-- <input class="form txt" name="user_id[]" type="hidden"
						style="width:0%" value="' . $level['user_id'] . '" /> -->
						<input id="totalreqs" class="txt" type="hidden" value="<?= $totalreqs ?>" />
						<div id="first_level" style="-webkit-box-sizing: border-box;
                        -moz-box-sizing: border-box; box-sizing: border-box;">
							<input id="sortinput" class="form txt" name="sort[]" placeholder="#"
							style="width:10%; text-align:center" />
							<!--<input class="form txt" name="back_amount[]" placeholder="$Budg" style="width:12%" />-->
							<!--<input class="form txt" name="back_quantity[]" placeholder="#CF" style="width:8%" />-->
							<input id="reqinput" class="form txt" name="back_reward[]" placeholder="Detail/Item"
							style="width:65%; max-width:500px;" maxlength="50" />
							<input class="form txt datepicker" name="back_eta[]" placeholder="Need By"
							style="font-size:13px; width:21%" />
							<!--<input class="form txt" name="days[]" placeholder="Days" style="width:10%" />-->
						</div>

						<div class="dynamicSection"></div>

						<p class="rs description-input">
							<a style="margin-left:0px; float:left; margin-top:10px;"
                        	class="btn-blue btn" href='javascript:;'
                        	onclick='addLevel()'>+add another detail/item</a>
							<div style="display:inline; float:left; background:none; margin-top:10px; margin-left:7px;
								height:37px; line-height:37px; font-size:12px; color:#999">
								Enter 0 for # (then Save Changes) to delete a line
							</div>
						</p>
						<div class="clear"></div>
						<p class="" style="font-size:13px;">
							Highlighted rows are pending additions or changes from potential
							Flip Mobbers,
							<strong>enter a number
								higher than 0 in the first column (#) to &ldquo;accept&rdquo;</strong> the Request.
						</p>
					</div>
				</div>
				</div><!-- END OF COLLAB TOGGLESLIDE AREA -->
				
				
				<div class="row-item clearfix" id="sectiondiv" style="border-top:3px solid #03b5ff; margin-top:20px">
					<label class="lbl" for="txt_name1" style="margin-top:7px;">Access to this:</label>
					<div class="val" style="padding-top:7px;">
						<select name="is_private" class="txt fill-width"
							style="height:48px; line-height:48px; font-size:17px;
							font-weight:300; width:100% !important; max-width:390px">
							<?php
							foreach (['0', '1'] as $val)
								:
							$sel = $project['is_private'] == $val ? " selected='selected'" : "";
							$txt = $val == '0' ? 'Public' : 'Private (Invite Only)'; ?>

							<option value="<?= $val ?>"<?= $sel ?>><?= $txt ?></option>

							<?php endforeach; ?>
						</select>
						
						<p class="rs description-input" style="color:#dd0000; margin-bottom:5px;">
							Coming Soon
						</p>
					</div>
				</div>

				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">Maximum Redeems:</label>
					<div class="val">
						<input class="txt" type="text" name="redeem_max_global" value="<?= $project['redeem_max_global'] ?>" >
						<p class="rs description-input">
							This is the MAX number of times a Deal can be redeemed.
							0 = unlimited.
						</p>
					</div>
				</div>

				<?php
				if (isset($_SESSION['user']['is_admin'])) { ?>

				<!-- ########### SWITCH FIELD STARTS HERE ########### -->
				<?php
				$check_featured = $project['is_featured'] ? " checked" : "";
				?>
				<div class="row-item clearfix" style="display:none;">
					<label class="lbl" for="txt_name1">Feature this Flip?:</label>
					<div class="val" style="padding-top:11px;">
						<label class='switch'>
							<input class='' id='' data-toggle='toggle' type='checkbox'
							name="is_featured"<?= $check_featured ?> /><span class='sliderr round'></span>
						</label>
					</div>
				</div>
				<!-- ########### SWITCH FIELD STARTS HERE ########### -->
				<?php } ?>

				<div class="row-item clearfix" style="display:nonex;">
					<label class="lbl" for="txt_name1" style="padding-top:6px">Active?:</label>
					<div class="val" style="padding-top:0px;">
						<?php
						$check_active = $project['is_active'] ? ' checked="checked"' : '';
						?>
						<label class='switch' style="display:inline-block; float:left;">
							<input class='' id='' data-toggle='toggle'  type='checkbox'
							name="is_active"<?= $check_active ?> /><span class='sliderr round'></span>
						</label>
						<div style="display:inline-block; float:left; height:30px; width:120px; line-height:30px;
							 font-weight:300; margin-left:7px;">
							Off = save as Draft
						</div>
					</div>
				</div>
				
			</div><!--end: .marked-category -->
			<div class="clear"></div>
			<br /><br /><br /><br /><br /><br />
		</div>
		<!-- END OF LEFT COLUMN -->

		<!-- ################################################ -->
		<!-- ########## FIXED COLUMN ON THE RIGHT ########### -->
		<!-- ################################################ -->

		<div class="container_12 splitintwor clearfix" style="padding-bottom:100px;">
			<div class="coupon-wrapper" style="margin:0 auto;">
				<h2>
					<a href="/listing/<?= $project['id'] ?>" style="font-weight:500;">Preview</a>
					of your Listing
				</h2>
				<div class="coupon-realtime">

					<?php
					if ($project['main_img'] != "")
						: ?>
					<a href="/listing/<?= $project['id'] ?>">
						<div class="coupon-image"><img
							src="/<?= $project['main_img'] ?>" data-variable="image"
							alt="Event Img" style="max-height:300px; width:100%;
							object-fit: cover; overflow:hidden" /></div></a>
					<?php else
						: ?>
					<a href="/listing/<?= $project['id'] ?>">
						<div class="coupon-image"><img
							src="/static/images/default_listing_banner.jpg"
							alt="Img" style="height:100px; max-height:300px; width:100%;
							object-fit: cover; overflow:hidden" /></div></a>

					<?php endif; ?>

					<div class="coupon-content"><!-- DARK BLUE 005089 -->
						<div style="width:100%; max-height:88px; overflow:hidden; margin-bottom:7px">
							<span style="font-weight:bold; color:#00A1FE; text-transform: uppercase;
							font-family:Montserrat, 'Open Sans',Helvetica, sans-serif; font-size:17px;"
							data-variable="title"><?= $project['title'] ?></span>
						</div>

						<!--<p data-variable="description"><?= $project['description'] ?></p>-->
						<!--<span>0.00 Miles away</span><br />-->

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

						<div style="width:100%; max-height:88px; overflow:hidden; margin-bottom:7px">
							<p id="regTitle"><?= substr($project['description'],0,160) . '...'; ?></p>
						</div>

						<!--						<div style="background:none; float:left; width:50px; margin:0; height:25px;
						font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						WHEN
						</div>-->

						<div style="display:none; background:none; position:relative; float: none;
						overflow: hidden; height:25px;
							 line-height:25px;">
							<?= date('g:i a \o\n M d, Y',strtotime('0 hour' ,
							strtotime($project['timestamp_end']))); ?>
							<!-- g:i a \o\n m/d/y  -->
						</div>

						<div style="height:25px; overflow:hidden; line-height:25px">
							<span style="font-weight:300; color:#00A1FE; text-transform: lowercase;
							font-family:Montserrat, 'Open Sans',Helvetica, sans-serif; font-size:14px;"
							data-variable="tags"><?= $project['tags'] ?></span>
						</div>
						<div class="clear"></div>

						<div style="background:none; float:left; width:100px; height:25px;
						font-weight:600; text-align:left; padding:0px 10px 0 0px;
						line-height:25px; margin-top:5px;">
							ASKING PRICE:
						</div>

						<div style="background:none; position:relative; float: none; overflow: hidden;
							height:25px; line-height:25px; margin-top:5px;">

							<span style="color:#298a39; font-weight:600;
							font-size:15px;">$</span><span style="color:#298a39; font-weight:600;
							font-size:15px;" data-variable="budget"
							class="numbers"><?= number_format($project['budget'],0,'.',',') ?></span>
							<!--for

							<span style="color:#298a39; font-weight:600;
							font-size:15px;">$</span><span style="color:#298a39; font-weight:600;
							font-size:15px;" data-variable="opportunity"
							class="numbers"><?= number_format($project['opportunity'],0,'.',',') ?></span>-->

						</div>

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

						<!--						<div style="background:none; float:left; width:50px; margin:0; height:25px;
						font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						PICKUP
						</div>

						<div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
						line-height:25px;">
						<img src="/static/images/google_maps_icon/office-marker.png" alt="Map"
						style="height:20px; margin-top:-3px"> <span style="color:#005089;"
						data-variable="location"><?= $project['location'] ?></span>
						</div>

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

						<div style="background:none; float:left; width:50px; margin:0; height:25px;
						font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						DEST.
						</div>

						<div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
						line-height:25px;">
						<img src="/static/images/google_maps_icon/office-marker.png" alt="Map"
						style="height:20px; margin-top:-3px"> <span style="color:#005089;"
						data-variable="location2"><?= $project['location2'] ?></span>
						</div>

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

						<!--						<div style="background:none; float:left; width:50px; margin:0; height:25px;
						font-weight:600; text-align:right; padding:0px 10px 0 5px; line-height:25px;">
						FOR
						</div>

						<div style="background:none; position:relative; float: none; overflow: hidden; height:25px;
						line-height:25px;">
						<?= $project['user']['name'] ?>
						</div>

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

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

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

	</div><!--end: .home-feature-category -->
	<div class="home-feature-category" style="position:fixed; bottom:0; left:0; right:0;
		width:100%; background:rgba(0,0,0,.85); border:none; padding-top:10px; padding-bottom:20px;
		text-align:center;">
		
		<input class="btn btn-black" type="submit"
		style="padding:15px 30px; font-family: 'Open Sans'; font-weight:300; max-width:300px;
		border:2px solid rgba(255,255,255,.3);" 
		value="Save Changes" />
		<br />
		
		<div style="text-align:center; height:24px; overflow:hidden; font-size:15px;
		line-height:24px; background:none;">
			<a class="txt confirm" href="/listing/<?= $project['id'] ?>?delete=<?= $project['id'] ?>"
				 style="color:#fa6f6c;"><img src="/static/images/icons/delete_icon_reddish.png" alt="X"
				style="height:16px; margin-top:-2px;" /> Delete Listing</a>

		</div>
		<div class="clear"></div>
	</div><!--end: .home-feature-category -->
</form>

<br /><br />

<script type="text/javascript">
	function addLevel()
	{
		$('.levels .dynamicSection').append($('#first_level').html());
	}
	function updateCouponImage(input)
	{
		if (!input.files || !input.files[0])
			return false;

		var reader = new FileReader();
		reader.onload = function(e) {
			$("[data-variable='image']").attr("src", e.target.result);
		}
		reader.readAsDataURL(input.files[0]);
	}
	// CHARACTER COUNTING TOOL FOR TAGS
	function countChar(val)
	{
		var len = val.value.length;
		if (len >= 55) {
			c
		} else {
			$('#keywordscount').text(55 - len);
		}
	};

	$(document).ready(function() {
		// CHARACTER COUNTING TOOL FOR TAGS
		var specialty_text = $('#keywords').val();
		var specialty_text_length = $('#keywords').val().length;

		if (specialty_text_length < 55) {
			$('#keywordscount').text(55 - specialty_text_length);
		}
		// REAL-TIME PREVIEW FEATURE
		$("[data-update-variable!='']").each(function() {
			var elm_input  = $(this);
			elm_input.on("keyup change", function() {
				var variable   = elm_input.attr("data-update-variable");
				var elm_update = $("[data-variable='" + variable + "']");
				var attribute  = elm_update.attr("data-attribute");

				if (! attribute)
					//alert('Text');
				// update HTML
				// .toLocaleString()
				if (variable == "budget") {
					var budg = elm_input.val();
					//alert('Budget: ' + budg);
					var budgy = Number(budg).toLocaleString();
					//alert('Budget: ' + budgy);
					elm_update.html(budgy);
				} else if (variable == "opportunity") {
					var tamt = elm_input.val();
					//alert('T Amt: ' + tamt);
					var tamtf = Number(tamt).toLocaleString();
					//alert('Budget: ' + budgy);
					elm_update.html(tamtf);
				} else {
					elm_update.html(elm_input.val());
				}

				//descrippreview.html(evt.editor.getData());
				//var desc = CKEDITOR.instances.description.getData();
				//alert(desc);
				else
					//alert('Here');
				// update the attribute's data
				elm_update.attr(attribute, elm_input.val());
			});
		});
		//sortinput, totalreqs
		$('#reqinput').blur(function() {
			var reqtext = $(this).val();
			var totalreqs = $("#totalreqs").val(); // Customer ID associated with a phone number

			var thislength = $('#reqinput').val().length;

			if (thislength > 0) {
				$("#sortinput").val(totalreqs);
			} else {
				$("#sortinput").val('');
			}

		});

		/////////////
	});
</script>

<script type="text/javascript">
	//	CKEDITOR.replace( 'ckeditor7' ,{
	//		filebrowserBrowseUrl : '/filemanager/dialog.php?type=2&editor=ckeditor&fldr=',
	//		filebrowserUploadUrl : '/filemanager/dialog.php?type=2&editor=ckeditor&fldr=',
	//		filebrowserImageBrowseUrl : '/filemanager/dialog.php?type=1&editor=ckeditor&fldr='
	//	});
	CKEDITOR.replace( 'ckeditor1' );
	CKEDITOR.replace( 'ckeditor2' );
	var editor = CKEDITOR.replace( 'description' );
	var descripcontent;
	// The "change" event is fired whenever a change is made in the editor.
	editor.on( 'change', function( evt ) {
		// getData() returns CKEditor's HTML content.
		//alert('Yep');
		descripcontent = evt.editor.getData();

		//		var descrip_length = descripcontent.length();
		//		if (descrip_length > 160) {
		//			$("#regTitle").html(descripcontent.substr(0, 160));
		//		} else {
		//			$("#regTitle").html(descripcontent);
		//		}
		// REF
		//$(this).val(text.substr(0, maxlength));
		//alert('D: ' + descripcontent);
		//descrippreview.html(descripcontent);
		// ORIG
		$("#regTitle").html(descripcontent);

		//descrippreview.html(evt.editor.getData());
		//console.log( 'Total bytes: ' + evt.editor.getData().length );
	});
	$(document).ready(function() {

		$("#getDataBtn").click(function() {
			//var editorData= CKEDITOR.instances['description'].getData();
			//alert(" your data is :"+editorData);
			//alert('clicked');
		});
		
		$('#showlocationsettings').click(function () {
			$("#locationsettings").slideToggle();
		});
		$('#showcollab').click(function () {
			$(".collabmore").slideToggle();
		});
		$('#showflipmob').click(function () {
			$("#flipmobsettings").slideToggle();
		});
	});
</script>

<script src='/static/js/jquery.csv-0.71.js'> </script>