<?php
	include("sms_reply_func.php");
	$hddnSmsId = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}
	$row = $sableDB->getRow("select sms_message__reply.*, sms_message.sms_message from sms_message__reply where sms_id = ".$hddnSmsId);

?>
<script src="<?php SableGeneralFunctions::printModuleJS('sms_message'); ?>"></script>

<!--// Sms Reply -->
<form id="frmSmsReply" name="frmSmsReply" autocomplete="on">
	<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnSmsReplyId)); ?>" id="hddnSmsReplyId" name="hddnSmsReplyId" />
	<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-envelope-open-text" aria-hidden="true"></i>&nbsp;View SMS Reply</h3>
					<p></p>
				</div>
			</div>
			<!--// edtSmsId -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtSmsId" type="text" id="edtSmsId"readonly value="<?php echo($row['sms_id']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtSmsId">Sms Id</div>
				</div>
			</div>
			<p></p>
			<!-- edtSmsId //-->
			<p></p>
			<!--// edtSmsMessage -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtSmsMessage" type="text" id="edtSmsMessage"readonly value="<?php echo($row['sms_message']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtSmsMessage">Sms Message</div>
				</div>
			</div>
			<p></p>
			<!-- edtSmsMessage //-->
			<p></p>
			<!--// edtSmsTimestamp -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtSmsTimestamp" type="date" id="edtSmsTimestamp"readonly value="<?php echo($row['sms_timestamp']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtSmsTimestamp">Sms Timestamp</div>
				</div>
			</div>
			<p></p>
			<!-- edtSmsTimestamp //-->
			<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('/sms_reply/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="editSmsReply('<?php echo(SableSystem::sableEncode($hddnSmsReplyId)); ?>')" value="Modify Sms Reply" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Sms Reply //-->
