<?php
	include("position_func.php");
	$hddnPositionId = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		if ((isset($hddnPositionId)) && ($hddnPositionId != $_SESSION['user']['user_code'])) SableGeneralFunctions::divertFromPage("position/view.php");
	}
	$row = $sableDB->getRow("select * from position where position_id = ".$hddnPositionId);
$selAccessId  = $sableDB->getValue("select access_name from `access` where access_id = '".$row["access_id"]."'");
?>
<script src="<?php SableGeneralFunctions::printModuleJS('position'); ?>"></script>

<!--// Position -->
<form id="frmPosition" name="frmPosition" autocomplete="on">
	<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnPositionId)); ?>" id="hddnPositionId" name="hddnPositionId" />
	<div class="forms">
		<div class="container forms-grids">
			<div class="row forms-grid">
				<div class="col-md-12">
					<h3 class="title"><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;View Position</h3>
					<p></p>
				</div>
			</div>
			<!--// edtPositionTitle -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtPositionTitle" type="text" id="edtPositionTitle"readonly value="<?php echo($row['position_title']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtPositionTitle">Position Title</div>
				</div>
			</div>
			<p></p>
			<!-- edtPositionTitle //-->
			<p></p>
			<!--// edtPositionDesc -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtPositionDesc" type="text" id="edtPositionDesc"readonly value="<?php echo($row['position_desc']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtPositionDesc">Description</div>
				</div>
			</div>
			<p></p>
			<!-- edtPositionDesc //-->
			<p></p>
			<!--// selAccessId -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="selAccessId" type="text" id="selAccessId"readonly value="<?php echo($selAccessId); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_selAccessId">Access</div>
				</div>
			</div>
			<p></p>
			<!-- selAccessId //-->
			<p></p>
		<!--// buttons -->
			<div class="row forms-grid">
				<div class="col-md-2">
					<input type="button" id="btnCancel" value="Cancel"
					class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/position/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="editPosition('<?php echo(SableSystem::sableEncode($hddnPositionId)); ?>')" value="Modify Position" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Position //-->
